ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Linespacing in TOC
       [not found] <013a01cee579$6a0c5640$3e2502c0$@tosovsky@email.cz>
@ 2013-11-19 23:00 ` Hans Hagen
  2013-11-22 20:44   ` Jan Tosovsky
       [not found]   ` <011201cee7c3$b3b1dc60$1b159520$@tosovsky@email.cz>
  0 siblings, 2 replies; 17+ messages in thread
From: Hans Hagen @ 2013-11-19 23:00 UTC (permalink / raw)
  To: ntg-context

On 11/19/2013 11:48 PM, Jan Tosovsky wrote:
> Dear All,
>
> I'd like to tweak a default TOC linespacing...
>
> I've 'invented' this:
>
> \setupcombinedlist[content][list=chapter, alternative=c]
>
> \starttext
>
> \title{Table of Contents}
> \setupinterlinespace[line=0.8ex] % too small, just for testing
> \placecontent
> \setupinterlinespace[line=2.75ex]
> %\setupinterlinespace[reset]
>
> \startfrontmatter
> \chapter{Intro}text
>
> text
>
> text
> \startfrontmatter
> \startbodymatter
> \chapter{Chapter}text
> \stopbodymatter
> \startbackmatter
> \chapter{Appendix}text
> \stopbackmatter
> \stoptext
>
> I cannot use simply the \completecontent command as the linespacing is
> effective already between the title and the first entry line... so I am
> splitting the title and the rest and set the linespacing just before list
> rendering. Finally I am resetting the value manually. The 'reset' keyword
> seems to be somehow ignored...
>
> Are there better ways to tweak linespacing in TOC ?

\title{Table of Contents}

\start
     \setupinterlinespace[line=0.8ex] % too small, just for testing
     \placecontent
\stop


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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] 17+ messages in thread

* Re: Linespacing in TOC
  2013-11-19 23:00 ` Linespacing in TOC Hans Hagen
@ 2013-11-22 20:44   ` Jan Tosovsky
       [not found]   ` <011201cee7c3$b3b1dc60$1b159520$@tosovsky@email.cz>
  1 sibling, 0 replies; 17+ messages in thread
From: Jan Tosovsky @ 2013-11-22 20:44 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2013-11-20 Hans Hagen wrote:
> On 11/19/2013 11:48 PM, Jan Tosovsky wrote:
> >
> > I'd like to tweak a default TOC linespacing...
> >
> > I've 'invented' this:
> >
> > \setupcombinedlist[content][list=chapter, alternative=c]
> >
> > \starttext
> >
> > \title{Table of Contents}
> > \setupinterlinespace[line=0.8ex] % too small, just for testing
> > \placecontent
> > \setupinterlinespace[line=2.75ex]
> > %\setupinterlinespace[reset]
> >
> > \startfrontmatter
> > \chapter{Intro}text
> >
> > text
> >
> > text
> > \startfrontmatter
> > \startbodymatter
> > \chapter{Chapter}text
> > \stopbodymatter
> > \startbackmatter
> > \chapter{Appendix}text
> > \stopbackmatter
> > \stoptext
> >
> > I cannot use simply the \completecontent command as the linespacing
> > is effective already between the title and the first entry line... 
> > so I am splitting the title and the rest and set the linespacing 
> > just before list rendering. Finally I am resetting the value manually.
> >
> > Are there better ways to tweak linespacing in TOC ?
> 
> \title{Table of Contents}
> 
> \start
>      \setupinterlinespace[line=0.8ex] % too small, just for testing
>      \placecontent
> \stop

Thanks for the hint. 

But as I found, any value below 2.8ex causes interline inconsistencies when
special cases appears, see the extreme below:

\starttext
\start
\setupinterlinespace[line=1.0ex]
\placecontent
\stop
\chapter{aaaaaaaa}. % line without descenders precedes a line without
ascenders
\chapter{pppppppp}. % line with descenders is followed with a line with
ascenders
\chapter{ŠŠŠŠŠŠŠŠ}. % the result is an inconsistent baseline distance
\stoptext

Is there any remedy for this? Can I fix the baseline distance somehow?

I have such cases in my TOC :-( 
(but not so extreme as here)

Thanks, Jan

___________________________________________________________________________________
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] 17+ messages in thread

* Re: Linespacing in TOC
       [not found]   ` <011201cee7c3$b3b1dc60$1b159520$@tosovsky@email.cz>
@ 2013-11-22 21:45     ` Hans Hagen
  2013-11-22 23:11       ` Jan Tosovsky
       [not found]       ` <013501cee7d8$1fefbb40$5fcf31c0$@tosovsky@email.cz>
  0 siblings, 2 replies; 17+ messages in thread
From: Hans Hagen @ 2013-11-22 21:45 UTC (permalink / raw)
  To: ntg-context

On 11/22/2013 9:44 PM, Jan Tosovsky wrote:
> On 2013-11-20 Hans Hagen wrote:
>> On 11/19/2013 11:48 PM, Jan Tosovsky wrote:
>>>
>>> I'd like to tweak a default TOC linespacing...
>>>
>>> I've 'invented' this:
>>>
>>> \setupcombinedlist[content][list=chapter, alternative=c]
>>>
>>> \starttext
>>>
>>> \title{Table of Contents}
>>> \setupinterlinespace[line=0.8ex] % too small, just for testing
>>> \placecontent
>>> \setupinterlinespace[line=2.75ex]
>>> %\setupinterlinespace[reset]
>>>
>>> \startfrontmatter
>>> \chapter{Intro}text
>>>
>>> text
>>>
>>> text
>>> \startfrontmatter
>>> \startbodymatter
>>> \chapter{Chapter}text
>>> \stopbodymatter
>>> \startbackmatter
>>> \chapter{Appendix}text
>>> \stopbackmatter
>>> \stoptext
>>>
>>> I cannot use simply the \completecontent command as the linespacing
>>> is effective already between the title and the first entry line...
>>> so I am splitting the title and the rest and set the linespacing
>>> just before list rendering. Finally I am resetting the value manually.
>>>
>>> Are there better ways to tweak linespacing in TOC ?
>>
>> \title{Table of Contents}
>>
>> \start
>>       \setupinterlinespace[line=0.8ex] % too small, just for testing
>>       \placecontent
>> \stop
>
> Thanks for the hint.
>
> But as I found, any value below 2.8ex causes interline inconsistencies when
> special cases appears, see the extreme below:
>
> \starttext
> \start
> \setupinterlinespace[line=1.0ex]
> \placecontent
> \stop
> \chapter{aaaaaaaa}. % line without descenders precedes a line without
> ascenders
> \chapter{pppppppp}. % line with descenders is followed with a line with
> ascenders
> \chapter{ŠŠŠŠŠŠŠŠ}. % the result is an inconsistent baseline distance
> \stoptext
>
> Is there any remedy for this? Can I fix the baseline distance somehow?
>
> I have such cases in my TOC :-(
> (but not so extreme as here)

\definegridsnapping[crap] [fit,0.2]
\setuplayout[grid=crap]

but if you really need that kind of tweaks you might consider using a 
better font: if interlinespace is too small you will never get nice results

you can try to play with the h/d ratio:

\setupinterlinespace[line=2.8ex,height=0.8,depth=0.2]
\showstruts \strut x
\setupinterlinespace[line=2.8ex,height=0.7,depth=0.3]
\showstruts \strut x

or you can plug in a command (in the toc handler) that puts each line in 
a box with manipulated dimensions

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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] 17+ messages in thread

* Re: Linespacing in TOC
  2013-11-22 21:45     ` Hans Hagen
@ 2013-11-22 23:11       ` Jan Tosovsky
       [not found]       ` <013501cee7d8$1fefbb40$5fcf31c0$@tosovsky@email.cz>
  1 sibling, 0 replies; 17+ messages in thread
From: Jan Tosovsky @ 2013-11-22 23:11 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2013-11-22 Hans Hagen wrote:
> On 11/22/2013 9:44 PM, Jan Tosovsky wrote:
> > On 2013-11-20 Hans Hagen wrote:
> >> On 11/19/2013 11:48 PM, Jan Tosovsky wrote:
> >>>
> >>> I'd like to tweak a default TOC linespacing...
> >>>
> >> \title{Table of Contents}
> >>
> >> \start
> >>       \setupinterlinespace[line=0.8ex] % too small, just for testing
> >>       \placecontent
> >> \stop
> >
> > But as I found, any value below 2.8ex causes interline
> > inconsistencies when
> > special cases appears, see the extreme below:
> >
> > \starttext
> > \start
> > \setupinterlinespace[line=1.0ex]
> > \placecontent
> > \stop
> > \chapter{aaaaaaaa}. % line without descenders precedes a line without
> > ascenders
> > \chapter{pppppppp}. % line with descenders is followed with a line
> > with ascenders
> > \chapter{ŠŠŠŠŠŠŠŠ}. % the result is an inconsistent baseline distance
> > \stoptext
> >
> > Is there any remedy for this? Can I fix the baseline distance
> > somehow?
> >
> 
> \definegridsnapping[crap] [fit,0.2]
> \setuplayout[grid=crap]

This helps! But... it breaks something else :-(

I am confused a bit. 

What exactly the linespacing is doing? It can set the baseline distance
(line=...), but it is not handled correctly? Is that snapping a workaround
for this deficiency of a standard solution?

All lines in my book have a certain (default) linespacing.
TOC entries are rendered (by default) using bigger linespacing.

I just wanted to make that TOC distance smaller a bit. Is this really the
only solution?

\definegridsnapping[crap] [fit] % what was that magic number 0.2 ?
\setuplayout[grid=crap]

\start
    \setupinterlinespace[line=2.2ex]
    \placecontent
\stop

It works. But that snapping is set globally and it breaks whitespace
handling in other parts of my document... It even produces widows/orphans
what I haven't seen before.

Just smaller gap between TOC lines, just that ;-)

Thanks in advance, Jan

___________________________________________________________________________________
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] 17+ messages in thread

* Re: Linespacing in TOC
       [not found]       ` <013501cee7d8$1fefbb40$5fcf31c0$@tosovsky@email.cz>
@ 2013-11-23 11:16         ` Jan Tosovsky
       [not found]         ` <001701cee83d$77460650$65d212f0$@tosovsky@email.cz>
  1 sibling, 0 replies; 17+ messages in thread
From: Jan Tosovsky @ 2013-11-23 11:16 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2013-11-23 Jan Tosovsky wrote:
> On 2013-11-22 Hans Hagen wrote:
> > On 11/22/2013 9:44 PM, Jan Tosovsky wrote:
> > > On 2013-11-20 Hans Hagen wrote:
> > >> On 11/19/2013 11:48 PM, Jan Tosovsky wrote:
> > >>>
> > >>> I'd like to tweak a default TOC linespacing...
> > >>>
> > >> \title{Table of Contents}
> > >>
> > >> \start
> > >>       \setupinterlinespace[line=0.8ex]
> > >>       \placecontent
> > >> \stop
> > >
> > > But as I found, any value below 2.8ex causes interline
> > > inconsistencies when
> > > special cases appears, see the extreme below:
> > >
> > > \starttext
> > > \start
> > > \setupinterlinespace[line=1.0ex]
> > > \placecontent
> > > \stop
> > > \chapter{aaaaaaaa}. % line without descenders
> > > \chapter{pppppppp}. % line with descenders
> > > \chapter{ŠŠŠŠŠŠŠŠ}. % the result is an inconsistent baseline
> > > \stoptext
> > >
> > > Is there any remedy for this? Can I fix the baseline distance
> > > somehow?
> > >
> >
> > \definegridsnapping[crap] [fit,0.2]
> > \setuplayout[grid=crap]
> 
> This helps! But... it breaks something else :-(

I've finally found an acceptable solution.

During my tests I found a crucial difference between:

\setupinterlinespace[line=2.0ex]

and 

\setupinterlinespace[0.25]

The latter sets the baseline distance correctly even without that
problematic snapping to the grid!

> All lines in my book have a certain (default) linespacing.
> TOC entries are rendered (by default) using bigger linespacing.

Btw, is there any option to override a default (huge) TOC linespacing? I
still consider my solution rather a hack.

Regards, Jan

___________________________________________________________________________________
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] 17+ messages in thread

* Re: Linespacing in TOC
       [not found]         ` <001701cee83d$77460650$65d212f0$@tosovsky@email.cz>
@ 2013-11-23 11:51           ` Hans Hagen
  2013-11-23 12:44             ` Jan Tosovsky
       [not found]             ` <002101cee849$b1e90c60$15bb2520$@tosovsky@email.cz>
  0 siblings, 2 replies; 17+ messages in thread
From: Hans Hagen @ 2013-11-23 11:51 UTC (permalink / raw)
  To: ntg-context

On 11/23/2013 12:16 PM, Jan Tosovsky wrote:
> On 2013-11-23 Jan Tosovsky wrote:
>> On 2013-11-22 Hans Hagen wrote:
>>> On 11/22/2013 9:44 PM, Jan Tosovsky wrote:
>>>> On 2013-11-20 Hans Hagen wrote:
>>>>> On 11/19/2013 11:48 PM, Jan Tosovsky wrote:
>>>>>>
>>>>>> I'd like to tweak a default TOC linespacing...
>>>>>>
>>>>> \title{Table of Contents}
>>>>>
>>>>> \start
>>>>>        \setupinterlinespace[line=0.8ex]
>>>>>        \placecontent
>>>>> \stop
>>>>
>>>> But as I found, any value below 2.8ex causes interline
>>>> inconsistencies when
>>>> special cases appears, see the extreme below:
>>>>
>>>> \starttext
>>>> \start
>>>> \setupinterlinespace[line=1.0ex]
>>>> \placecontent
>>>> \stop
>>>> \chapter{aaaaaaaa}. % line without descenders
>>>> \chapter{pppppppp}. % line with descenders
>>>> \chapter{ŠŠŠŠŠŠŠŠ}. % the result is an inconsistent baseline
>>>> \stoptext
>>>>
>>>> Is there any remedy for this? Can I fix the baseline distance
>>>> somehow?
>>>>
>>>
>>> \definegridsnapping[crap] [fit,0.2]
>>> \setuplayout[grid=crap]
>>
>> This helps! But... it breaks something else :-(
>
> I've finally found an acceptable solution.
>
> During my tests I found a crucial difference between:
>
> \setupinterlinespace[line=2.0ex]
>
> and
>
> \setupinterlinespace[0.25]
>
> The latter sets the baseline distance correctly even without that
> problematic snapping to the grid!
>
>> All lines in my book have a certain (default) linespacing.
>> TOC entries are rendered (by default) using bigger linespacing.
>
> Btw, is there any option to override a default (huge) TOC linespacing? I
> still consider my solution rather a hack.

just set 'before' and 'after'

normally linespacing in the toc is the same as in the rest of the 
document unless one has assigned to before/after



-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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] 17+ messages in thread

* Re: Linespacing in TOC
  2013-11-23 11:51           ` Hans Hagen
@ 2013-11-23 12:44             ` Jan Tosovsky
       [not found]             ` <002101cee849$b1e90c60$15bb2520$@tosovsky@email.cz>
  1 sibling, 0 replies; 17+ messages in thread
From: Jan Tosovsky @ 2013-11-23 12:44 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2013-11-23 Hans Hagen wrote:
> On 11/23/2013 12:16 PM, Jan Tosovsky wrote:
> > On 2013-11-23 Jan Tosovsky wrote:
> >> On 2013-11-22 Hans Hagen wrote:
> >>> On 11/22/2013 9:44 PM, Jan Tosovsky wrote:
> >>>> On 2013-11-20 Hans Hagen wrote:
> >>>>> On 11/19/2013 11:48 PM, Jan Tosovsky wrote:
> >>>>>>
> >>>>>> I'd like to tweak a default TOC linespacing...
> >>>>>>
> >>>>> \title{Table of Contents}
> >>>>>
> >>>>> \start
> >>>>>        \setupinterlinespace[line=0.8ex]
> >>>>>        \placecontent
> >>>>> \stop
> >>>>
> >>>> But as I found, any value below 2.8ex causes interline
> >>>> inconsistencies when
> >>>> special cases appears, see the extreme below:
> >>>>
> >>>> \starttext
> >>>> \start
> >>>> \setupinterlinespace[line=1.0ex]
> >>>> \placecontent
> >>>> \stop
> >>>> \chapter{aaaaaaaa}. % line without descenders
> >>>> \chapter{pppppppp}. % line with descenders
> >>>> \chapter{ŠŠŠŠŠŠŠŠ}. % the result is an inconsistent baseline
> >>>> \stoptext
> >>>>
> >>>> Is there any remedy for this? Can I fix the baseline distance
> >>>> somehow?
> >>>>
> >>>
> >>> \definegridsnapping[crap] [fit,0.2]
> >>> \setuplayout[grid=crap]
> >>
> >> This helps! But... it breaks something else :-(
> >
> > I've finally found an acceptable solution.
> >
> > During my tests I found a crucial difference between:
> >
> > \setupinterlinespace[line=2.0ex]
> >
> > and
> >
> > \setupinterlinespace[0.25]
> >
> > The latter sets the baseline distance correctly even without that
> > problematic snapping to the grid!
> >
> >> All lines in my book have a certain (default) linespacing.
> >> TOC entries are rendered (by default) using bigger linespacing.
> >
> > Btw, is there any option to override a default (huge) TOC
> linespacing? I
> > still consider my solution rather a hack.
> 
> just set 'before' and 'after'

Ok. I haven't realize that.

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

Jan

___________________________________________________________________________________
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] 17+ messages in thread

* Re: Linespacing in TOC
       [not found]             ` <002101cee849$b1e90c60$15bb2520$@tosovsky@email.cz>
@ 2013-11-23 12:54               ` Hans Hagen
  2013-11-23 13:32                 ` Jan Tosovsky
       [not found]                 ` <002601cee850$6c3196e0$4494c4a0$@tosovsky@email.cz>
  0 siblings, 2 replies; 17+ messages in thread
From: Hans Hagen @ 2013-11-23 12:54 UTC (permalink / raw)
  To: ntg-context

On 11/23/2013 1:44 PM, Jan Tosovsky wrote:
> On 2013-11-23 Hans Hagen wrote:
>> On 11/23/2013 12:16 PM, Jan Tosovsky wrote:
>>> On 2013-11-23 Jan Tosovsky wrote:
>>>> On 2013-11-22 Hans Hagen wrote:
>>>>> On 11/22/2013 9:44 PM, Jan Tosovsky wrote:
>>>>>> On 2013-11-20 Hans Hagen wrote:
>>>>>>> On 11/19/2013 11:48 PM, Jan Tosovsky wrote:
>>>>>>>>
>>>>>>>> I'd like to tweak a default TOC linespacing...
>>>>>>>>
>>>>>>> \title{Table of Contents}
>>>>>>>
>>>>>>> \start
>>>>>>>         \setupinterlinespace[line=0.8ex]
>>>>>>>         \placecontent
>>>>>>> \stop
>>>>>>
>>>>>> But as I found, any value below 2.8ex causes interline
>>>>>> inconsistencies when
>>>>>> special cases appears, see the extreme below:
>>>>>>
>>>>>> \starttext
>>>>>> \start
>>>>>> \setupinterlinespace[line=1.0ex]
>>>>>> \placecontent
>>>>>> \stop
>>>>>> \chapter{aaaaaaaa}. % line without descenders
>>>>>> \chapter{pppppppp}. % line with descenders
>>>>>> \chapter{ŠŠŠŠŠŠŠŠ}. % the result is an inconsistent baseline
>>>>>> \stoptext
>>>>>>
>>>>>> Is there any remedy for this? Can I fix the baseline distance
>>>>>> somehow?
>>>>>>
>>>>>
>>>>> \definegridsnapping[crap] [fit,0.2]
>>>>> \setuplayout[grid=crap]
>>>>
>>>> This helps! But... it breaks something else :-(
>>>
>>> I've finally found an acceptable solution.
>>>
>>> During my tests I found a crucial difference between:
>>>
>>> \setupinterlinespace[line=2.0ex]
>>>
>>> and
>>>
>>> \setupinterlinespace[0.25]
>>>
>>> The latter sets the baseline distance correctly even without that
>>> problematic snapping to the grid!
>>>
>>>> All lines in my book have a certain (default) linespacing.
>>>> TOC entries are rendered (by default) using bigger linespacing.
>>>
>>> Btw, is there any option to override a default (huge) TOC
>> linespacing? I
>>> still consider my solution rather a hack.
>>
>> just set 'before' and 'after'
>
> Ok. I haven't realize that.
>
>> 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)

Hans



-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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] 17+ messages in thread

* Re: Linespacing in TOC
  2013-11-23 12:54               ` Hans Hagen
@ 2013-11-23 13:32                 ` Jan Tosovsky
       [not found]                 ` <002601cee850$6c3196e0$4494c4a0$@tosovsky@email.cz>
  1 sibling, 0 replies; 17+ messages in thread
From: Jan Tosovsky @ 2013-11-23 13:32 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

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



___________________________________________________________________________________
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] 17+ messages in thread

* Re: Linespacing in TOC
       [not found]                 ` <002601cee850$6c3196e0$4494c4a0$@tosovsky@email.cz>
@ 2013-11-23 13:35                   ` Hans Hagen
  2014-02-10 21:49                     ` Jan Tosovsky
       [not found]                     ` <52f9499c.826f0e0a.58db.ffffbb09SMTPIN_ADDED_BROKEN@mx.google.com>
  0 siblings, 2 replies; 17+ messages in thread
From: Hans Hagen @ 2013-11-23 13:35 UTC (permalink / raw)
  To: ntg-context

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)

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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] 17+ messages in thread

* Re: Linespacing in TOC
  2013-11-23 13:35                   ` Hans Hagen
@ 2014-02-10 21:49                     ` Jan Tosovsky
       [not found]                     ` <52f9499c.826f0e0a.58db.ffffbb09SMTPIN_ADDED_BROKEN@mx.google.com>
  1 sibling, 0 replies; 17+ messages in thread
From: Jan Tosovsky @ 2014-02-10 21:49 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

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

___________________________________________________________________________________
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] 17+ messages in thread

* Re: Linespacing in TOC
       [not found]                     ` <52f9499c.826f0e0a.58db.ffffbb09SMTPIN_ADDED_BROKEN@mx.google.com>
@ 2014-02-10 22:25                       ` Wolfgang Schuster
  2014-02-11 16:32                         ` Jan Tosovsky
                                           ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Wolfgang Schuster @ 2014-02-10 22:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 10.02.2014 um 22:49 schrieb Jan Tosovsky <j.tosovsky@email.cz>:

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

When you have characters with big ascenders/descenders you have to increase
the interlinespace or change the height/depth ration of a strut.

1. Change the interlinespace value with

  \setupinterlinespace[line=14pt]

2. Change the height/depth ration with

  \setupinterlinespace[height=0.8,depth=0.2] % default: height=0.72,depth=0.28

Wolfgang
___________________________________________________________________________________
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] 17+ messages in thread

* Re: Linespacing in TOC
  2014-02-10 22:25                       ` Wolfgang Schuster
@ 2014-02-11 16:32                         ` Jan Tosovsky
       [not found]                         ` <52fa509d.826f0e0a.5656.ffff8d0bSMTPIN_ADDED_BROKEN@mx.google.com>
       [not found]                         ` <00d901cf2746$d2b9ce20$782d6a60$@tosovsky@email.cz>
  2 siblings, 0 replies; 17+ messages in thread
From: Jan Tosovsky @ 2014-02-11 16:32 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2014-02-10 Wolfgang Schuster wrote:
> 
> Am 10.02.2014 um 22:49 schrieb Jan Tosovsky <j.tosovsky@email.cz>:
> 
> > 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?
> 
> When you have characters with big ascenders/descenders you have to
> increase
> the interlinespace or change the height/depth ration of a strut.
> 
> 1. Change the interlinespace value with
> 
>   \setupinterlinespace[line=14pt]
> 
> 2. Change the height/depth ration with
> 
>   \setupinterlinespace[height=0.8,depth=0.2] % default:
> height=0.72,depth=0.28

Thanks, but neither solution works for me.

My fundamental question is why ToC has different ToC line gaps than body
text. I still think it is rather a bug which we are trying to work around
all the time...

Jan

\setuplayout[grid=yes]
\showgrid

\starttext
\setupinterlinespace[height=0.8, depth=0.2]
\placecontent  % there are blank lines between ToC lines

\chapter{aaaaaaaa}

\input{tufte}  % this is good
\chapter{pppppppp}
\chapter{ŠŠŠŠŠŠŠŠ}
\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] 17+ messages in thread

* Re: Linespacing in TOC
       [not found]                         ` <52fa509d.826f0e0a.5656.ffff8d0bSMTPIN_ADDED_BROKEN@mx.google.com>
@ 2014-02-11 17:58                           ` Wolfgang Schuster
  2014-02-12 16:02                             ` Jan Tosovsky
  0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Schuster @ 2014-02-11 17:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


Am 11.02.2014 um 17:32 schrieb Jan Tosovsky <j.tosovsky@email.cz>:

> My fundamental question is why ToC has different ToC line gaps than body
> text. I still think it is rather a bug which we are trying to work around
> all the time…

The chapter entries insert a empty line before their content, you can disable this with

  \setuplist[chapter][before=]

Wolfgang

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

[-- Attachment #2: Type: text/plain, Size: 485 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] 17+ messages in thread

* Re: Linespacing in TOC
       [not found]                         ` <00d901cf2746$d2b9ce20$782d6a60$@tosovsky@email.cz>
@ 2014-02-11 18:45                           ` Hans Hagen
  0 siblings, 0 replies; 17+ messages in thread
From: Hans Hagen @ 2014-02-11 18:45 UTC (permalink / raw)
  To: ntg-context

On 2/11/2014 5:32 PM, Jan Tosovsky wrote:

> My fundamental question is why ToC has different ToC line gaps than body
> text. I still think it is rather a bug which we are trying to work around
> all the time...

See Wolfgangs mail. Don't confuse line spacing with explicit spacing 
(before and after things).

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 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] 17+ messages in thread

* Re: Linespacing in TOC
  2014-02-11 17:58                           ` Wolfgang Schuster
@ 2014-02-12 16:02                             ` Jan Tosovsky
  0 siblings, 0 replies; 17+ messages in thread
From: Jan Tosovsky @ 2014-02-12 16:02 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2014-02-11 Wolfgang Schuster wrote: 
> > Am 11.02.2014 um 17:32 schrieb Jan Tosovsky <j.tosovsky@email.cz>:
> >
> > My fundamental question is why ToC has different ToC line gaps
> > than body text. I still think it is rather a bug which we are 
> > trying to work around all the time.
> 
> The chapter entries insert a empty line before their content, you can
> disable this with
> 
>   \setuplist[chapter][before=]

Great! I was not aware of that empty line!

I misled all of you by incorrect wording, sorry, but it is fortunately fixed
now!

Thanks a lot.

Jan

___________________________________________________________________________________
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] 17+ messages in thread

* Linespacing in TOC
@ 2013-11-19 22:48 Jan Tosovsky
  0 siblings, 0 replies; 17+ messages in thread
From: Jan Tosovsky @ 2013-11-19 22:48 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

Dear All,

I'd like to tweak a default TOC linespacing...

I've 'invented' this:

\setupcombinedlist[content][list=chapter, alternative=c]

\starttext

\title{Table of Contents}
\setupinterlinespace[line=0.8ex] % too small, just for testing
\placecontent
\setupinterlinespace[line=2.75ex]
%\setupinterlinespace[reset]

\startfrontmatter
\chapter{Intro}text

text

text
\startfrontmatter
\startbodymatter
\chapter{Chapter}text
\stopbodymatter
\startbackmatter
\chapter{Appendix}text
\stopbackmatter
\stoptext

I cannot use simply the \completecontent command as the linespacing is
effective already between the title and the first entry line... so I am
splitting the title and the rest and set the linespacing just before list
rendering. Finally I am resetting the value manually. The 'reset' keyword
seems to be somehow ignored...

Are there better ways to tweak linespacing in TOC ?

Thanks, Jan

___________________________________________________________________________________
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] 17+ messages in thread

end of thread, other threads:[~2014-02-12 16:02 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <013a01cee579$6a0c5640$3e2502c0$@tosovsky@email.cz>
2013-11-19 23:00 ` Linespacing in TOC Hans Hagen
2013-11-22 20:44   ` Jan Tosovsky
     [not found]   ` <011201cee7c3$b3b1dc60$1b159520$@tosovsky@email.cz>
2013-11-22 21:45     ` Hans Hagen
2013-11-22 23:11       ` Jan Tosovsky
     [not found]       ` <013501cee7d8$1fefbb40$5fcf31c0$@tosovsky@email.cz>
2013-11-23 11:16         ` Jan Tosovsky
     [not found]         ` <001701cee83d$77460650$65d212f0$@tosovsky@email.cz>
2013-11-23 11:51           ` Hans Hagen
2013-11-23 12:44             ` Jan Tosovsky
     [not found]             ` <002101cee849$b1e90c60$15bb2520$@tosovsky@email.cz>
2013-11-23 12:54               ` Hans Hagen
2013-11-23 13:32                 ` Jan Tosovsky
     [not found]                 ` <002601cee850$6c3196e0$4494c4a0$@tosovsky@email.cz>
2013-11-23 13:35                   ` Hans Hagen
2014-02-10 21:49                     ` Jan Tosovsky
     [not found]                     ` <52f9499c.826f0e0a.58db.ffffbb09SMTPIN_ADDED_BROKEN@mx.google.com>
2014-02-10 22:25                       ` Wolfgang Schuster
2014-02-11 16:32                         ` Jan Tosovsky
     [not found]                         ` <52fa509d.826f0e0a.5656.ffff8d0bSMTPIN_ADDED_BROKEN@mx.google.com>
2014-02-11 17:58                           ` Wolfgang Schuster
2014-02-12 16:02                             ` Jan Tosovsky
     [not found]                         ` <00d901cf2746$d2b9ce20$782d6a60$@tosovsky@email.cz>
2014-02-11 18:45                           ` Hans Hagen
2013-11-19 22:48 Jan Tosovsky

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