Re[2]: [NTG-context] Two framed texts on the same line

2005-11-25 Thread Giuseppe Bilotta
Friday, November 25, 2005 Hans Hagen wrote:

> \def\dodostopframedtext#1#2% % no \baselinecorrection, see faq docs
>   {\endgraf
>\removelastskip
>\doifvalue{\??kd#1\c!depthcorrection}\v!on % local and global
>  {\forgetall
>   \vskip-\struttotal
>   \verticalstrut
>   \egroup
>   \forgetall
>   \vskip-\lineheight
>   % will be an option, not default
>   % \setbaselinecorrections
>   % \donegbotbaselinecorrection
>   \verticalstrut}
>\stopboxedcontent
>\stopcolor
>\egroup
>\doif{#2}\v!none\insidefloattrue % new
>   
> \doif{\framedtextparameter{#1}\c!location}\v!none\insidefloattrue
> % 
> newer
>\ifinsidefloat
>  \box\framebox
>\else
> 
> \doplacement[\??kd#1][\c!depthcorrection=\v!off]{\box\framebox}%
>\fi
>\egroup}

Hm, strange, I patched core-rul and redumped the format, but
location=none still doesn't work. However, \startlepi[none]
does, so I'll go by this for the time being, thanks.

-- 
Giuseppe "Oblomov" Bilotta

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re[2]: [NTG-context] Two framed texts on the same line

2005-11-25 Thread Giuseppe Bilotta
Friday, November 25, 2005 Hans Hagen wrote:

> depends a bit on the usage; the following shows you a few tricks

> \defineframedtext
>   [gb]
>   [align=raggedright,
>width=.5\textwidth,
>offset=0pt,
>frame=off,
>before=,
>after=]

> \startbuffer[left]
> \startgb[none]
> \input tufte
> \stopgb
> \stopbuffer

> \startbuffer[right]
> \startgb[none]
> \input zapf
> \stopgb
> \stopbuffer

> \starttext

> \input tufte

> \definepairedbox[gb][location={right,top}]

> \startbaselinecorrection
> \placepairedbox[gb]
>   {\getbuffer[left]}
>   {\getbuffer[right]}
> \stopbaselinecorrection

> \input zapf

> \stoptext

Oh, interesting this pairedbox thing (it's undocumented,
though). I was hoping to be able to do it like this:

\defineframedtext[lepi][align=raggedright,width=fit,offset=0pt,frame=off,location=left]
\defineframedtext[repi][align=raggedright,width=fit,offset=0pt,frame=off,location=right]
\definepairedbox[epi][location={right,top}]

\placepairedbox[epi]
{\startlepi
{\bf Coordinatore}\par
prof. F.~Nicolosi
\stoplepi}
{\startrepi
{\bf Tutor}\par
prof. G.~Russo
\stoprepi}

But it won't work because the second box (repi) gets placed
with its LEFT margin on the right margin of the page,
whereas I needed to be with its right margin at the right
margin of the page. I think the problem is that, from what I
get by reading the source, in paired boxes are not treated
equally.

Basically, the rpbolem seems to be that the width of the
lepi framed text is not the 'natural width' of the text,
despite the width=fit command ... why is this so?

-- 
Giuseppe "Oblomov" Bilotta


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context