I did want to typeset material within framedtext with some white before and after each line. Appropriate for this seems to me: \null\quad material \quad\null\crlf etc.; the preceding \null preventing disappearence of the first \quad. The strange thing is that the \null in the first line induces an extra vertical whitespace between the top of the frame and the first line inside the frame. An impression of the result: ----------------------- | | with \null in first line | first line | | second line | ----------------------- ----------------------- | first line | without \null in first line | second line | ----------------------- It seems counterintuitive to withhold the \null in the first line in order to have the framing correct. A minimal example on which I encountered this follows: \setupbodyfont[cmr] % gives extra vertical white \startframedtext[middle][width=fit] \null\quad\type{extra vertical space}\quad\null\crlf \null\quad\type{normal vertical space}\quad\null \stopframedtext % normal vertical white \startframedtext[middle][width=fit] \quad\type{normal vertical space}\quad\null\crlf \null\quad\type{normal vertical space}\quad\null \stopframedtext \stoptext Does this occur elsewhere too? Is it normal behaviour of framedtext? Hans van der Meer
Hans van der Meer wrote:
I did want to typeset material within framedtext with some white before and after each line. Appropriate for this seems to me: \null\quad material \quad\null\crlf etc.; the preceding \null preventing disappearence of the first \quad.
The strange thing is that the \null in the first line induces an extra vertical whitespace between the top of the frame and the first line inside the frame.
An impression of the result:
----------------------- |� �� �� �� �� �� �� �|� with \null in first line |� �� �first line� � �| |� �� �second line � �| -----------------------
----------------------- |� �� �first line� � �|� without \null in first line |� �� �second line � �| -----------------------
It seems counterintuitive to withhold the \null in the first line in order to have the framing correct. A minimal example on which I encountered this follows:
\setupbodyfont[cmr] interesting, cmr
% gives extra vertical white \startframedtext[middle][width=fit] \null\quad\type{extra vertical space}\quad\null\crlf \null\quad\type{normal vertical space}\quad\null \stopframedtext
% normal vertical white \startframedtext[middle][width=fit] \quad\type{normal vertical space}\quad\null\crlf \null\quad\type{normal vertical space}\quad\null \stopframedtext
\stoptext
Does this occur elsewhere too? Is it normal behaviour of framedtext?
the width=fit option will decompose the box try - as best as can do done with current tex- determine the fittign width; in the process, spacing may disappear also, framed may place struts automatically this may work: \startframedtext[middle][width=fit] \strut\endgraf \type{extra vertical space}\endgraf \type{normal vertical space}\endgraf \strut\endgraf \stopframedtext as may this: (smaller strut) \startframedtext[middle][width=fit,strut=no] {\setupstrut[x]\strut}\endgraf\nointerlineskip \type{extra vertical space}\endgraf \type{normal vertical space}\endgraf {\setupstrut[x]\strut}\endgraf\nointerlineskip \stopframedtext another option is to do something: \framed [width=fit,offset=overlay] \bgroup \vskip 1ex \quad \framed[width=fit,frame=off] \bgroup your content \egroup \quad \vskip 1ex \egroup or alike Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Jun 12, 2006, at 23:31, Hans Hagen wrote:
Hans van der Meer wrote:
I did want to typeset material within framedtext with some white before and after each line. Appropriate for this seems to me: \null\quad material \quad\null\crlf etc.; the preceding \null preventing disappearence of the first \quad.
The strange thing is that the \null in the first line induces an extra vertical whitespace between the top of the frame and the first line inside the frame.
An impression of the result:
----------------------- |� �� �� �� �� �� �� �|� with \null in first line |� �� �first line� � �| |� �� �second line � �| -----------------------
----------------------- |� �� �first line� � �|� without \null in first line |� �� �second line � �| -----------------------
It seems counterintuitive to withhold the \null in the first line in order to have the framing correct. A minimal example on which I encountered this follows:
\setupbodyfont[cmr] interesting, cmr
Yes, my default font setup sometimes seems to play havoc with me. It turns automagically into lm. As for the above problem, my brains were a bit rusty I think. Just a leavevmode did the trick: \startframedtext[middle][width=fit] \leavevmode % <= the solution \null\quad\type{with leavevmode: no more extra vertical space}\quad \null\crlf \null\quad\type{normal vertical space}\quad\null \stopframedtext Hans van der Meer
Hans van der Meer wrote:
On Jun 12, 2006, at 23:31, Hans Hagen wrote:
Hans van der Meer wrote:
I did want to typeset material within framedtext with some white before and after each line. Appropriate for this seems to me: \null\quad material \quad\null\crlf etc.; the preceding \null preventing disappearence of the first \quad.
The strange thing is that the \null in the first line induces an extra vertical whitespace between the top of the frame and the first line inside the frame.
An impression of the result:
----------------------- |� �� �� �� �� �� �� �|� with \null in first line |� �� �first line� � �| |� �� �second line � �| -----------------------
----------------------- |� �� �first line� � �|� without \null in first line |� �� �second line � �| -----------------------
It seems counterintuitive to withhold the \null in the first line in order to have the framing correct. A minimal example on which I encountered this follows:
\setupbodyfont[cmr]
interesting, cmr
Yes, my default font setup sometimes seems to play havoc with me. It turns automagically into lm.
As for the above problem, my brains were a bit rusty I think. Just a leavevmode did the trick:
\startframedtext[middle][width=fit] \leavevmode % <= the solution \null\quad\type{with leavevmode: no more extra vertical space}\quad \null\crlf \null\quad\type{normal vertical space}\quad\null \stopframedtext
in general \dontleavehmode is better since \leavevmode may introduce unwanted whitespace sometimes (i try to avoid \leavevmode whenever possible) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 6/12/06, Hans Hagen
|� �� �� �� �� �� �� �|� with \null in first line |� �� �first line� � �| |� �� �second line � �| -----------------------
----------------------- |� �� �first line� � �|� without \null in first line |� �� �second line � �| -----------------------
Is it only me, or do you really need to do somethnig about your encoding settings, Hans? nikolai
Nikolai Weibull wrote:
On 6/12/06, Hans Hagen
wrote: |� �� �� �� �� �� �� �|� with \null in first line |� �� �first line� � �| |� �� �second line � �| -----------------------
----------------------- |� �� �first line� � �|� without \null in first line |� �� �second line � �| -----------------------
Is it only me, or do you really need to do somethnig about your encoding settings, Hans?
i dunno, this what i got; normally utf8 works ok; i use thunderbird Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 6/15/06, Hans Hagen
Nikolai Weibull wrote:
Is it only me, or do you really need to do somethnig about your encoding settings, Hans?
i dunno, this what i got; normally utf8 works ok; i use thunderbird
At my end (gmail), a random set of spaces from Hans van der Meer's (such an awesome name, btw) example have turned into U+FFFD in your reply. nikolai
participants (3)
-
Hans Hagen
-
Hans van der Meer
-
Nikolai Weibull