3 problems with framed
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 \section{More vertical space with \tex{Numero}} \setupframed[align=flushleft,location=top] \hbox{\framed{% \startlines A \Numero \stoplines }% \framed{% \startlines A N \stoplines }} \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? Cheers, Peter -- http://pmrb.free.fr/contact/
Hello Peter, Peter Münster 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
\leavevmode % \framed is a \vbox
\framed{A}B % here is a problem
\section{More vertical space with \tex{Numero}} \setupframed[align=flushleft,location=top] \hbox{\framed{% \startlines A \Numero
compare \framed[offset=overlay]{\Numero} to \framed[offset=overlay]{N}
\stoplines }% \framed{% \startlines A N \stoplines }}
\section{More vertical space with \tex{startlines}}
the space is not caused by \framed, but \startlines .. \stoplines, so you have to fiddle with \setuplines[before={\blank[???]}, after={\blank[???]}, inbetween={\blank[???]}} % with ???=".xx\bodyfontsize" to be font size independent
\framed[align=flushleft, top=\vskip-1.9\lineheight,bottom=\vskip-0.75\lineheight% workaround... ]{% \startlines Ag \stoplines } \stoptext
Could anybody help, please? Cheers, Peter
Greetings, Peter
� 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
On Mon, 31 Oct 2005, Hans Hagen wrote:
\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=])
\section{More vertical space with \tex{startlines}} \framed[align=flushleft, top=\vskip-1.9\lineheight,bottom=\vskip-0.75\lineheight% workaround... ]{%
Thanks for all your hints! I've just found out, that it's cleaner to say \setuplines[before=\vskip-\lineheight,after=] instead of the workaround with 1.9 etc... Cheers, Peter -- http://pmrb.free.fr/contact/
participants (3)
-
Hans Hagen
-
Peter Münster
-
Peter Rolf