ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* interlinespace confusion (MkIV)
@ 2010-03-12 13:41 Steffen Wolfrum
  2010-03-12 16:04 ` Peter Rolf
  2010-03-12 18:51 ` Hans Hagen
  0 siblings, 2 replies; 3+ messages in thread
From: Steffen Wolfrum @ 2010-03-12 13:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I am totally confused by interlinespace usage in mkiv ...

Please have a look at this torture test below:

Setting bodytext to a tight interlinespace works by \setuplayout[grid=both].

But \chapter doesn't get right:
Either you use \setuplocalinterlinespace, then you  might get an extra space between the first and the second chaper line,
or you use \setupinterlinespace, then the bodytext interlinespace gets disturbed.

[btw: and how do I get a tight interlinespace in \chapter too?? here grid=both doesn't work ...]

Could someone please help?!

Steffen

-----

\usetypescript[postscript]
\definetypeface[postscript][rm][serif][times][default]
\mainlanguage[de]

\setupbodyfont[postscript,10pt]\setupinterlinespace[line=9pt]

\def\MyChapter{%
 \switchtobodyfont[rm,13pt]\bf
 \setuplocalinterlinespace[line=16pt]% <- spurious space between 1. and 2. line
% \setupinterlinespace[line=16pt]% <- bodytext interlinespace disturbed
 }

\setuphead[chapter]
[grid=both,style=\MyChapter]

\setuplayout[grid=both]

\starttext

\chapter{Éç\\Éç\\Éç\\Éç}

Éç\par Éç\par Éç\par Éç

\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: interlinespace confusion (MkIV)
  2010-03-12 13:41 interlinespace confusion (MkIV) Steffen Wolfrum
@ 2010-03-12 16:04 ` Peter Rolf
  2010-03-12 18:51 ` Hans Hagen
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Rolf @ 2010-03-12 16:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 2262 bytes --]

Hi Steffen,

i have tried my best, but i'm no grid expert. see attached example.

@Hans:
1.) \startgridcorrection[top] does not work

! Undefined control sequence.
\nextoptionalcommandyes ...menttrue \domoveongrid

2.) without an additional \setupinterlineskip (after the bodyfont change
in the header) the struts for the number and the text differ. this
results in 'an extra space between the first and the second chapter line'.


best wishes,

Peter

Am 12.03.2010 14:41, schrieb Steffen Wolfrum:
> Hi,
> 
> I am totally confused by interlinespace usage in mkiv ...
>
+1  :)

> Please have a look at this torture test below:
> 
> Setting bodytext to a tight interlinespace works by \setuplayout[grid=both].
> 
> But \chapter doesn't get right:
> Either you use \setuplocalinterlinespace, then you  might get an extra space between the first and the second chaper line,
> or you use \setupinterlinespace, then the bodytext interlinespace gets disturbed.
> 
> [btw: and how do I get a tight interlinespace in \chapter too?? here grid=both doesn't work ...]
> 
> Could someone please help?!
>
> Steffen
> 
> -----
> 
> \usetypescript[postscript]
> \definetypeface[postscript][rm][serif][times][default]
> \mainlanguage[de]
> 
> \setupbodyfont[postscript,10pt]\setupinterlinespace[line=9pt]
> 
> \def\MyChapter{%
>  \switchtobodyfont[rm,13pt]\bf
>  \setuplocalinterlinespace[line=16pt]% <- spurious space between 1. and 2. line
> % \setupinterlinespace[line=16pt]% <- bodytext interlinespace disturbed
>  }
> 
> \setuphead[chapter]
> [grid=both,style=\MyChapter]
> 
> \setuplayout[grid=both]
> 
> \starttext
> 
> \chapter{Éç\\Éç\\Éç\\Éç}
> 
> Éç\par Éç\par Éç\par Éç
> 
> \stoptext
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 


[-- Attachment #2: test.tex --]
[-- Type: text/plain, Size: 1169 bytes --]

\usetypescript[postscript]
\definetypeface[postscript][rm][serif][times][default]
\mainlanguage[de]

\setupbodyfont[postscript,10pt]%\setupinterlinespace[line=9pt]

\setupbodyfontenvironment [postscript] [10pt] [interlinespace=9pt] % text
\setupbodyfontenvironment [postscript] [13pt] [interlinespace=27pt] % chapter

\setuplayout[grid=both]

\def\MyChapter{%
 \switchtobodyfont[rm,13pt]\bf
 \setupinterlinespace % without \setupinterlinespace you get different struts for number and text
% \setuplocalinterlinespace[line=16pt]% <- spurious space between 1. and 2. line (caused by different struts)
% \setupinterlinespace[line=16pt]% <- bodytext interlinespace disturbed
 }

\setuphead[chapter]
[grid=both,style=\MyChapter]



\starttext
\showframe
\showgrid
\showstruts

\chapter{Éç\par Éç\par Éç\par Éç}

Éç\par Éç\par Éç\par Éç

\startgridcorrection%[top] % no argument possible!
\switchtobodyfont[rm,13pt] % also wrong interlineskip without grid correction
\snaptogrid\hbox{Éç\par} % needed to snap in; maybe obsolete, if grid correction argument works
 Éç\par Éç\par Éç
\stopgridcorrection

\stoptext

[-- Attachment #3: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: interlinespace confusion (MkIV)
  2010-03-12 13:41 interlinespace confusion (MkIV) Steffen Wolfrum
  2010-03-12 16:04 ` Peter Rolf
@ 2010-03-12 18:51 ` Hans Hagen
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2010-03-12 18:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Steffen Wolfrum

On 12-3-2010 14:41, Steffen Wolfrum wrote:
> Hi,
>
> I am totally confused by interlinespace usage in mkiv ...
>
> Please have a look at this torture test below:
>
> Setting bodytext to a tight interlinespace works by \setuplayout[grid=both].
>
> But \chapter doesn't get right:
> Either you use \setuplocalinterlinespace, then you  might get an extra space between the first and the second chaper line,
> or you use \setupinterlinespace, then the bodytext interlinespace gets disturbed.
>
> [btw: and how do I get a tight interlinespace in \chapter too?? here grid=both doesn't work ...]
>
> Could someone please help?!
>
> Steffen
>
> -----
>
> \usetypescript[postscript]
> \definetypeface[postscript][rm][serif][times][default]
> \mainlanguage[de]
>
> \setupbodyfont[postscript,10pt]\setupinterlinespace[line=9pt]
>
> \def\MyChapter{%
>   \switchtobodyfont[rm,13pt]\bf
>   \setuplocalinterlinespace[line=16pt]%<- spurious space between 1. and 2.. line
> % \setupinterlinespace[line=16pt]%<- bodytext interlinespace disturbed
>   }
>
> \setuphead[chapter]
> [grid=both,style=\MyChapter]
>
> \setuplayout[grid=both]
>
> \starttext
>
> \chapter{Éç\\Éç\\Éç\\Éç}
>
> Éç\par Éç\par Éç\par Éç
>
> \stoptext

this is because interlinespace is adapted to the font automatically

i added a key 'interlinespace' so that you cna say:

\usetypescript[postscript]
\setupbodyfont[postscript,10pt]
\setupinterlinespace[line=20pt]

\def\MyChapter
   {\switchtobodyfont[rm,13pt]%
    \setuplocalinterlinespace[line=30pt]}

\showstruts

\defineinterlinespace[bagger][line=50pt]

% the interline space in MyChapter wins, when not set there, the 
interline space
% is adapted anyway to the font
%
% \setuphead[chapter][style=\MyChapter,textstyle=,numberstyle=]
%
% the given interlinespace takes precedence
%
% 
\setuphead[chapter][style=\MyChapter,textstyle=,numberstyle=,interlinespace={line=40pt}]
% 
\setuphead[chapter][style=\MyChapter,textstyle=,numberstyle=,interlinespace=40pt]

\setuphead[chapter][style=\MyChapter,textstyle=,numberstyle=,interlinespace=bagger]

\starttext

\chapter{Éç\\Éç\\Éç\\Éç}

Éç\par Éç\par Éç\par Éç

\stoptext

the problem is that keeping track of interline space being set in the 
style is somewhat messy; it now happens but the prefered way is the 
key/value

will be in next beta

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2010-03-12 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-12 13:41 interlinespace confusion (MkIV) Steffen Wolfrum
2010-03-12 16:04 ` Peter Rolf
2010-03-12 18:51 ` Hans Hagen

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