[NTG-context] Linespacing in TOC

Jan Tosovsky j.tosovsky at email.cz
Mon Feb 10 22:49:59 CET 2014


On 2013-11-23 Hans Hagen wrote:
> On 11/23/2013 2:32 PM, Jan Tosovsky wrote:
> > On 2013-11-23 Hans Hagen wrote:
> >> On 11/23/2013 1:44 PM, Jan Tosovsky wrote:
> >>> On 2013-11-23 Hans Hagen wrote:
> >>>>
> >>>> normally linespacing in the toc is the same as in the rest of the
> >>>> document unless one has assigned to before/after
> >>>
> >>> This example shows different behaviour:
> >>>
> >>> \showgrid
> >>> \starttext
> >>> \start
> >>> \placecontent
> >>> \stop
> >>> \chapter{aaaaaaaa}Foo
> >>>
> >>> Bar
> >>> \chapter{pppppppp}.
> >>> \chapter{ŠŠŠŠŠŠŠŠ}.
> >>> \stoptext
> >>>
> >>> On my computer the TOC linespacing is almost twice as big as that
> in
> >>> the paragraph.
> >>
> >> if the grid is on that can indeed be the case but only if there are
> >> lines with > lineheight so that's why you can use less strict
> options
> >> (older mails)
> >
> > Yes, it is true, but in my example the grid is not activated, just
> shown to
> > compare differences...
> 
> maybe
> 
> \showmakeup
> 
> shows what makes that happen (for instance it can be that you inject
> invisible stuff that interferes with spacing, in which case
> \dontleavehmode's might help as otherwise tex enters / exits h/v mode
> unexpected)

To be honest, I don't understand to \showmakeup result at all...

When the following code is used, I am getting almost desired output. But
when the grid is switched on (by uncommenting the first line), it again
produces extra lines after every TOC line...

%\setuplayout[grid=yes]
\showgrid
%\showmakeup

\starttext
%\placeongrid{\startlinecorrection
%\start
\setupinterlinespace[0]  % looks like there is an extra line (?) ...
%\setupwhitespace[none]
\placecontent
%\stop
%\stoplinecorrection}

\chapter{aaaaaaaa}.
\chapter{pppppppp}.
\chapter{ŠŠŠŠŠŠŠŠ}.
\stoptext

I am quite sad that after lot of investigation I still cannot achieve such a
basic formatting...

As it is required to force \setupinterlinespace[0] to zero to get proper
result even in non-grid environment, I suspect there is some white space
placed between lines (out of my control).

I still prefer placing lines on the grid. But if the grid could be switched
off just for ToC, I could use the above code ensuring lines in the 'grid'
positions. It is fake, but I cannot manage even that (startlinecorrection
doesn't work here).

Any idea?

Thanks, Jan



More information about the ntg-context mailing list