ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* extra white in framedtext
@ 2006-06-12 19:58 Hans van der Meer
  2006-06-12 21:31 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Hans van der Meer @ 2006-06-12 19:58 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1348 bytes --]

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




[-- Attachment #1.2: Type: text/html, Size: 5226 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: extra white in framedtext
  2006-06-12 19:58 extra white in framedtext Hans van der Meer
@ 2006-06-12 21:31 ` Hans Hagen
  2006-06-13 10:07   ` Hans van der Meer
  2006-06-13 12:07   ` Nikolai Weibull
  0 siblings, 2 replies; 7+ messages in thread
From: Hans Hagen @ 2006-06-12 21:31 UTC (permalink / raw)


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
-----------------------------------------------------------------

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: extra white in framedtext
  2006-06-12 21:31 ` Hans Hagen
@ 2006-06-13 10:07   ` Hans van der Meer
  2006-06-13 10:10     ` Hans Hagen
  2006-06-13 12:07   ` Nikolai Weibull
  1 sibling, 1 reply; 7+ messages in thread
From: Hans van der Meer @ 2006-06-13 10:07 UTC (permalink / raw)



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



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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: extra white in framedtext
  2006-06-13 10:07   ` Hans van der Meer
@ 2006-06-13 10:10     ` Hans Hagen
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2006-06-13 10:10 UTC (permalink / raw)


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
-----------------------------------------------------------------

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: extra white in framedtext
  2006-06-12 21:31 ` Hans Hagen
  2006-06-13 10:07   ` Hans van der Meer
@ 2006-06-13 12:07   ` Nikolai Weibull
  2006-06-15 12:46     ` Hans Hagen
  1 sibling, 1 reply; 7+ messages in thread
From: Nikolai Weibull @ 2006-06-13 12:07 UTC (permalink / raw)


On 6/12/06, Hans Hagen <pragma@wxs.nl> 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?

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: extra white in framedtext
  2006-06-13 12:07   ` Nikolai Weibull
@ 2006-06-15 12:46     ` Hans Hagen
  2006-06-16  6:55       ` Nikolai Weibull
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2006-06-15 12:46 UTC (permalink / raw)


Nikolai Weibull wrote:
> On 6/12/06, Hans Hagen <pragma@wxs.nl> 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
-----------------------------------------------------------------

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: extra white in framedtext
  2006-06-15 12:46     ` Hans Hagen
@ 2006-06-16  6:55       ` Nikolai Weibull
  0 siblings, 0 replies; 7+ messages in thread
From: Nikolai Weibull @ 2006-06-16  6:55 UTC (permalink / raw)


On 6/15/06, Hans Hagen <pragma@wxs.nl> wrote:

> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-06-16  6:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-12 19:58 extra white in framedtext Hans van der Meer
2006-06-12 21:31 ` Hans Hagen
2006-06-13 10:07   ` Hans van der Meer
2006-06-13 10:10     ` Hans Hagen
2006-06-13 12:07   ` Nikolai Weibull
2006-06-15 12:46     ` Hans Hagen
2006-06-16  6:55       ` Nikolai Weibull

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).