[NTG-context] 3 problems with framed

Hans Hagen pragma at wxs.nl
Mon Oct 31 22:16:34 CET 2005


� wrote:

>Hello,
>
>I've 3 problems with framed:
>
>\starttext
>\section{Linebreak, when \tex{framed} is the first letter}
>A\framed{B} % here it's ok
>
>\framed{A}B % here is a problem
>
>  
>
put a \dontleavehmode in front (it has to do with the ways tex 
determines when to enter hmode/vmode)

>\section{More vertical space with \tex{Numero}}
>\setupframed[align=flushleft,location=top]
>\hbox{\framed{%
>\startlines
>A
>\Numero
>\stoplines
>}%
>\framed{%
>\startlines
>A
>N
>\stoplines
>}}
>  
>

\Numero uses \high and this command sets the height/depth to strut 
height/depth

put a \obeydepth after \stoplines

(and also say: \setuplines[before=,after=])

keep in mind that framed adds strut itself (unless disables); best use 
the 'framedtext' macros here

>\section{More vertical space with \tex{startlines}}
>\framed[align=flushleft,
>top=\vskip-1.9\lineheight,bottom=\vskip-0.75\lineheight% workaround...
>]{%
>\startlines
>Ag
>\stoplines
>}
>\stoptext
>
>Could anybody help, please?
>

same problem, if a line has no depth ... well, you can always add \strut's

Hans


More information about the ntg-context mailing list