ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* TOC question
@ 2009-02-16 18:22 Alan Stone
  2009-02-16 22:28 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Stone @ 2009-02-16 18:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi,

How do you get the chapter number in front of the chapter heading in the
TOC,
in the following example with \setuphead[chapter][number=no] ?

\setuplist[chapter][%
 alternative=b,
 numbercommand={\headnumber[chapter]},    % this has no effect
% criterium=local]
 criterium=chapter]

\setuphead[chapter][%
% number=yes]
 number=no]

\starttext

 \placecontent[%
  level=chapter,
%  criterium=chapter,
  alternative=b]

 \dorecurse{2}{\chapter{Chapter #1}\dorecurse{20}{\input knuth\par}}

\stoptext

-- 
Best,
Alan

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

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: TOC question
  2009-02-16 18:22 TOC question Alan Stone
@ 2009-02-16 22:28 ` Wolfgang Schuster
  2009-02-17  8:44   ` Alan Stone
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2009-02-16 22:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 16.02.2009 um 19:22 schrieb Alan Stone:

> How do you get the chapter number in front of the chapter heading in  
> the TOC,
> in the following example with \setuphead[chapter][number=no] ?
>
> \setuphead[chapter][%
> % number=yes]
>  number=no]

With "number=no" the current section is no longer written to the  
utility file
and there is no way to get it in the toc. What you can do is to enable  
section
numbering but remove it from the output.

\setuphead
   [chapter]
   [numbercommand=\gobbleoneargument,
    distance=0pt]

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: TOC question
  2009-02-16 22:28 ` Wolfgang Schuster
@ 2009-02-17  8:44   ` Alan Stone
  2009-02-17  9:29     ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Stone @ 2009-02-17  8:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Mon, Feb 16, 2009 at 11:28 PM, Wolfgang Schuster <
schuster.wolfgang@googlemail.com> wrote:

>
> Am 16.02.2009 um 19:22 schrieb Alan Stone:
>
>  How do you get the chapter number in front of the chapter heading in the
>> TOC,
>> in the following example with \setuphead[chapter][number=no] ?
>>
>> \setuphead[chapter][%
>> % number=yes]
>>  number=no]
>>
>
> With "number=no" the current section is no longer written to the utility
> file
> and there is no way to get it in the toc. What you can do is to enable
> section
> numbering but remove it from the output.
>
> \setuphead
>  [chapter]
>  [numbercommand=\gobbleoneargument,
>   distance=0pt]


Great ! With \setuphead[alternative=middle] there's still an empty/blank
space above the chapter head though (where the chapter number is located
when leaving out the numbercommand)...
\showframe

\setuplist[chapter][%
 alternative=b,
 criterium=chapter]

\setuphead[chapter][%
 alternative=middle,
 number=yes,
 numbercommand=\gobbleoneargument,
 distance=0pt]

\starttext

 \placecontent[%
  level=chapter,
  alternative=b]

 \dorecurse{2}{\chapter{Chapter #1}\dorecurse{20}{\input knuth\par}}
\stoptext

Alan



>
> Wolfgang

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

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: TOC question
  2009-02-17  8:44   ` Alan Stone
@ 2009-02-17  9:29     ` Wolfgang Schuster
  2009-02-17 13:36       ` Alan Stone
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2009-02-17  9:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 17.02.2009 um 09:44 schrieb Alan Stone:

>> With "number=no" the current section is no longer written to the  
>> utility
>> file and there is no way to get it in the toc. What you can do is
>> to enable section numbering but remove it from the output.
>>
>> \setuphead
>>   [chapter]
>>   [numbercommand=\gobbleoneargument,
>>    distance=0pt]
>
> Great ! With \setuphead[alternative=middle] there's still an empty/ 
> blank
> space above the chapter head though (where the chapter number is  
> located
> when leaving out the numbercommand)...
>
> \setuphead[chapter][%
>   alternative=middle,
>   number=yes,
>   numbercommand=\gobbleoneargument,
>   distance=0pt]

Then don't use it, 'align=middle' should work.

\setuphead
   [chapter]
   [numbercommand=\gobbleoneargument,
    distance=0pt,
    align=middle]

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: TOC question
  2009-02-17  9:29     ` Wolfgang Schuster
@ 2009-02-17 13:36       ` Alan Stone
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Stone @ 2009-02-17 13:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Tue, Feb 17, 2009 at 10:29 AM, Wolfgang Schuster <
schuster.wolfgang@googlemail.com> wrote:

>
> Am 17.02.2009 um 09:44 schrieb Alan Stone:
>
>  With "number=no" the current section is no longer written to the utility
>>> file and there is no way to get it in the toc. What you can do is
>>> to enable section numbering but remove it from the output.
>>>
>>> \setuphead
>>>  [chapter]
>>>  [numbercommand=\gobbleoneargument,
>>>   distance=0pt]
>>>
>>
>> Great ! With \setuphead[alternative=middle] there's still an empty/blank
>> space above the chapter head though (where the chapter number is located
>> when leaving out the numbercommand)...
>>
>> \setuphead[chapter][%
>>  alternative=middle,
>>  number=yes,
>>  numbercommand=\gobbleoneargument,
>>  distance=0pt]
>>
>
> Then don't use it, 'align=middle' should work.
>
> \setuphead
>  [chapter]
>  [numbercommand=\gobbleoneargument,
>   distance=0pt,
>   align=middle]


Though undocumented, it works. Thanks.


>  Wolfgang
>

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

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2009-02-17 13:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-16 18:22 TOC question Alan Stone
2009-02-16 22:28 ` Wolfgang Schuster
2009-02-17  8:44   ` Alan Stone
2009-02-17  9:29     ` Wolfgang Schuster
2009-02-17 13:36       ` Alan Stone

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