ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* ToC - dots distance
@ 2013-01-23 19:10 hanak
  2013-01-23 19:21 ` Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: hanak @ 2013-01-23 19:10 UTC (permalink / raw)
  To: ntg-context

Hi,

I need to change the default distance of dots in ToC using alternative
"c". Could anybody tell me, how can I achieve this? So it should look
like this:


default look:

1. First chapter  ...................   1
2. Second chapter ...................  10 

requested look:

1. First chapter  . . . . . . . . . .   1
2. Second chapter . . . . . . . . . .  10

Thank for any help.

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

* Re: ToC - dots distance
  2013-01-23 19:10 ToC - dots distance hanak
@ 2013-01-23 19:21 ` Wolfgang Schuster
  2013-01-23 19:56   ` Devendra Ghate
  2013-01-23 22:11   ` Marco Patzer
  0 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2013-01-23 19:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 23.01.2013 um 20:10 schrieb hanak@wpb.cz:

> Hi,
> 
> I need to change the default distance of dots in ToC using alternative
> "c". Could anybody tell me, how can I achieve this? So it should look
> like this:
> 
> 
> default look:
> 
> 1. First chapter  ...................   1
> 2. Second chapter ...................  10 
> 
> requested look:
> 
> 1. First chapter  . . . . . . . . . .   1
> 2. Second chapter . . . . . . . . . .  10

\definefiller
  [pavel]
  [alterntive=symbol,
  %method=global,
   width=1em,
   leftmargin=.5em,
   rightmargin=.5em]

\setuplistalternative[c][filler={\filler[pavel]}]

\starttext

\completecontent[alternative=c]

\chapter{First chapter}
\chapter{Second chapter}

\stoptext

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

* Re: ToC - dots distance
  2013-01-23 19:21 ` Wolfgang Schuster
@ 2013-01-23 19:56   ` Devendra Ghate
  2013-01-23 20:05     ` Wolfgang Schuster
  2013-01-23 22:11   ` Marco Patzer
  1 sibling, 1 reply; 8+ messages in thread
From: Devendra Ghate @ 2013-01-23 19:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On 01/24/2013 12:51 AM, Wolfgang Schuster wrote:
> Am 23.01.2013 um 20:10 schrieb hanak@wpb.cz:
>
>> Hi,
>>
>> I need to change the default distance of dots in ToC using alternative
>> "c". Could anybody tell me, how can I achieve this? So it should look
>> like this:
>>
>>
>> default look:
>>
>> 1. First chapter  ...................   1
>> 2. Second chapter ...................  10
>>
>> requested look:
>>
>> 1. First chapter  . . . . . . . . . .   1
>> 2. Second chapter . . . . . . . . . .  10
> \definefiller
>    [pavel]
>    [alterntive=symbol,
>    %method=global,
>     width=1em,
>     leftmargin=.5em,
>     rightmargin=.5em]
>
> \setuplistalternative[c][filler={\filler[pavel]}]
>
> \starttext
>
> \completecontent[alternative=c]
>
> \chapter{First chapter}
> \chapter{Second chapter}
>
> \stoptext
>
> Wolfgang
> ___________
  Is that a complete MWE? It doesn't work on ConTeXt  ver: 2013.01.10 
01:04 MKIV.

I get:
-----------------------
! Undefined control sequence.

system          > tex > error on line 1 in file a.tex: Undefined control 
sequence ...

  1 >>  \definefiller
  2       [pavel]
  3       [alterntive=symbol,
  4       %method=global,
------------------------

Searching the wiki and mailing list also turned zero results for 
\definefiller.

Regards,
Devendra






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

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

* Re: ToC - dots distance
  2013-01-23 19:56   ` Devendra Ghate
@ 2013-01-23 20:05     ` Wolfgang Schuster
  2013-01-23 20:09       ` Devendra Ghate
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2013-01-23 20:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 23.01.2013 um 20:56 schrieb Devendra Ghate <devendra.ghate@gmail.com>:

> 
> On 01/24/2013 12:51 AM, Wolfgang Schuster wrote:
>> Am 23.01.2013 um 20:10 schrieb hanak@wpb.cz:
>> 
>>> Hi,
>>> 
>>> I need to change the default distance of dots in ToC using alternative
>>> "c". Could anybody tell me, how can I achieve this? So it should look
>>> like this:
>>> 
>>> 
>>> default look:
>>> 
>>> 1. First chapter  ...................   1
>>> 2. Second chapter ...................  10
>>> 
>>> requested look:
>>> 
>>> 1. First chapter  . . . . . . . . . .   1
>>> 2. Second chapter . . . . . . . . . .  10
>> \definefiller
>>   [pavel]
>>   [alterntive=symbol,
>>   %method=global,
>>    width=1em,
>>    leftmargin=.5em,
>>    rightmargin=.5em]
>> 
>> \setuplistalternative[c][filler={\filler[pavel]}]
>> 
>> \starttext
>> 
>> \completecontent[alternative=c]
>> 
>> \chapter{First chapter}
>> \chapter{Second chapter}
>> 
>> \stoptext
>> 
>> Wolfgang
>> ___________
> Is that a complete MWE?

Yes.

> It doesn't work on ConTeXt  ver: 2013.01.10 01:04 MKIV.

You need a newer version, the command is new and provides a high level interface for the \leaders macro.

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

* Re: ToC - dots distance
  2013-01-23 20:05     ` Wolfgang Schuster
@ 2013-01-23 20:09       ` Devendra Ghate
  0 siblings, 0 replies; 8+ messages in thread
From: Devendra Ghate @ 2013-01-23 20:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On 01/24/2013 01:35 AM, Wolfgang Schuster wrote:
> Am 23.01.2013 um 20:56 schrieb Devendra Ghate <devendra.ghate@gmail.com>:
>
>> On 01/24/2013 12:51 AM, Wolfgang Schuster wrote:
>>> Am 23.01.2013 um 20:10 schrieb hanak@wpb.cz:
>>>
>>>> Hi,
>>>>
>>>> I need to change the default distance of dots in ToC using alternative
>>>> "c". Could anybody tell me, how can I achieve this? So it should look
>>>> like this:
>>>>
>>>>
>>>> default look:
>>>>
>>>> 1. First chapter  ...................   1
>>>> 2. Second chapter ...................  10
>>>>
>>>> requested look:
>>>>
>>>> 1. First chapter  . . . . . . . . . .   1
>>>> 2. Second chapter . . . . . . . . . .  10
>>> \definefiller
>>>    [pavel]
>>>    [alterntive=symbol,
>>>    %method=global,
>>>     width=1em,
>>>     leftmargin=.5em,
>>>     rightmargin=.5em]
>>>
>>> \setuplistalternative[c][filler={\filler[pavel]}]
>>>
>>> \starttext
>>>
>>> \completecontent[alternative=c]
>>>
>>> \chapter{First chapter}
>>> \chapter{Second chapter}
>>>
>>> \stoptext
>>>
>>> Wolfgang
>>> ___________
>> Is that a complete MWE?
> Yes.
>
>> It doesn't work on ConTeXt  ver: 2013.01.10 01:04 MKIV.
> You need a newer version, the command is new and provides a high level interface for the \leaders macro.
This is some serious pace of development. I had just about installed 
context
couple of weeks ago and already I need an update.

Thank you.
Devendra


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

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

* Re: ToC - dots distance
  2013-01-23 19:21 ` Wolfgang Schuster
  2013-01-23 19:56   ` Devendra Ghate
@ 2013-01-23 22:11   ` Marco Patzer
  2013-01-23 22:52     ` Wolfgang Schuster
  1 sibling, 1 reply; 8+ messages in thread
From: Marco Patzer @ 2013-01-23 22:11 UTC (permalink / raw)
  To: ntg-context


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

On 2013–01–23 Wolfgang Schuster wrote:

Out of curiosity: Is possible to set up the new filler mechanism in
a way to yield alternating dots like in the TeXbook?

> > default look:
> > 
> > 1. First chapter  ...................   1
> > 2. Second chapter ...................  10 
> > 
> > requested look:
> > 
> > 1. First chapter  . . . . . . . . . .   1
> > 2. Second chapter . . . . . . . . . .  10

alternating look (Knuths' TeXbook style)

1. First chapter . . . . . . . . . . .  1
2. Second chapter . . . . . . . . . .  10

Marco

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 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] 8+ messages in thread

* Re: ToC - dots distance
  2013-01-23 22:11   ` Marco Patzer
@ 2013-01-23 22:52     ` Wolfgang Schuster
  2013-01-24  9:30       ` Marco Patzer
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2013-01-23 22:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 23.01.2013 um 23:11 schrieb Marco Patzer <homerow@lavabit.com>:

> On 2013–01–23 Wolfgang Schuster wrote:
> 
> Out of curiosity: Is possible to set up the new filler mechanism in
> a way to yield alternating dots like in the TeXbook?
> 
>>> default look:
>>> 
>>> 1. First chapter  ...................   1
>>> 2. Second chapter ...................  10 
>>> 
>>> requested look:
>>> 
>>> 1. First chapter  . . . . . . . . . .   1
>>> 2. Second chapter . . . . . . . . . .  10
> 
> alternating look (Knuths' TeXbook style)
> 
> 1. First chapter . . . . . . . . . . .  1
> 2. Second chapter . . . . . . . . . .  10

\definefiller[pavel-0][alterntive=symbol,method=global,width=1em,leftmargin=.5em,rightmargin=.5em,symbol=\clap{.}]
\definefiller[pavel-1][pavel-0][align=left]
\definefiller[pavel-2][pavel-0][align=middle]

\newconditional\PavelState

\define\PavelFiller
  {\ifconditional\PavelState
     \global\setfalse\PavelState
     \filler[pavel-1]%
   \else
     \global\settrue\PavelState
     \filler[pavel-2]%
   \fi}

% \define\PavelFiller
%   {\ifodd\structurelistlocation % does the value alternate?
%      \filler[pavel-1]%
%    \else
%      \filler[pavel-2]%
%    \fi}

\setuplistalternative[c][filler=\PavelFiller]

\starttext

\completecontent[alternative=c]

\dorecurse{10}{\expanded{\chapter{Chapter \recurselevel}}}

\stoptext

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

* Re: ToC - dots distance
  2013-01-23 22:52     ` Wolfgang Schuster
@ 2013-01-24  9:30       ` Marco Patzer
  0 siblings, 0 replies; 8+ messages in thread
From: Marco Patzer @ 2013-01-24  9:30 UTC (permalink / raw)
  To: ntg-context


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

On 2013–01–23 Wolfgang Schuster wrote:

> > Out of curiosity: Is possible to set up the new filler mechanism in
> > a way to yield alternating dots like in the TeXbook?
> > 
> >>> default look:
> >>> 
> >>> 1. First chapter  ...................   1
> >>> 2. Second chapter ...................  10 
> >>> 
> >>> requested look:
> >>> 
> >>> 1. First chapter  . . . . . . . . . .   1
> >>> 2. Second chapter . . . . . . . . . .  10
> > 
> > alternating look (Knuths' TeXbook style)
> > 
> > 1. First chapter . . . . . . . . . . .  1
> > 2. Second chapter . . . . . . . . . .  10
> 
> \definefiller[pavel-0][alterntive=symbol,method=global,width=1em,leftmargin=.5em,rightmargin=.5em,symbol=\clap{.}]
> \definefiller[pavel-1][pavel-0][align=left]
> \definefiller[pavel-2][pavel-0][align=middle]
> 
> […]

Very nice. I wikified¹ that code in case someone needs it.

Marco


[1] http://wiki.contextgarden.net/Table_of_Contents#Alternating_filler_dots

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 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] 8+ messages in thread

end of thread, other threads:[~2013-01-24  9:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-23 19:10 ToC - dots distance hanak
2013-01-23 19:21 ` Wolfgang Schuster
2013-01-23 19:56   ` Devendra Ghate
2013-01-23 20:05     ` Wolfgang Schuster
2013-01-23 20:09       ` Devendra Ghate
2013-01-23 22:11   ` Marco Patzer
2013-01-23 22:52     ` Wolfgang Schuster
2013-01-24  9:30       ` Marco Patzer

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