* \writetolist not writing the number to the TOC
@ 2023-03-25 22:05 Willi Egger via ntg-context
2023-03-26 10:51 ` Henning Hraban Ramm via ntg-context
0 siblings, 1 reply; 5+ messages in thread
From: Willi Egger via ntg-context @ 2023-03-25 22:05 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Willi Egger
Good evening!
I have a setup in which I need to send info to the TOC:
Consider the following example:
\starttext
\starttitle[title=Contents]
\placelist[chapter][criterium=all]
\stoptitle
\startchapter[title=Mychapter]
\input knuth
\startsubject[title=Subject will be in TOC]
\writetolist[chapter]{1}{I am in TOC!}
\input ward
\stopsubject
\stopchapter
\stoptext
According to the Wiki I should get te number (1) in the TOC. Instead the text starts at the height of the chapter-numbering and is not carrying the given number.
Am I doing something wrong?
Kind regards
Willi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \writetolist not writing the number to the TOC
2023-03-25 22:05 \writetolist not writing the number to the TOC Willi Egger via ntg-context
@ 2023-03-26 10:51 ` Henning Hraban Ramm via ntg-context
2023-03-26 13:10 ` Willi Egger via ntg-context
0 siblings, 1 reply; 5+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2023-03-26 10:51 UTC (permalink / raw)
To: Willi Egger via ntg-context; +Cc: Henning Hraban Ramm
Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:
> Good evening!
>
> I have a setup in which I need to send info to the TOC:
>
> Consider the following example:
>
> \starttext
>
> \starttitle[title=Contents]
> \placelist[chapter][criterium=all]
> \stoptitle
>
> \startchapter[title=Mychapter]
> \input knuth
> \startsubject[title=Subject will be in TOC]
> \writetolist[chapter]{1}{I am in TOC!}
> \input ward
> \stopsubject
> \stopchapter
>
> \stoptext
>
> According to the Wiki I should get te number (1) in the TOC. Instead the text starts at the height of the chapter-numbering and is not carrying the given number.
>
> Am I doing something wrong?
The wiki says:
“The default table of contents is combined list. To write to it one has
to choose the level to which it should be inserted:
\writetolist[chapter]{1.}{Chapter list entry A},
\writetolist[section]{1.1}{Section list entry A}, etc.”
https://wiki.contextgarden.net/Command/writetolist
So maybe you need a dot?
Otherwise I don’t know.
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \writetolist not writing the number to the TOC
2023-03-26 10:51 ` Henning Hraban Ramm via ntg-context
@ 2023-03-26 13:10 ` Willi Egger via ntg-context
2023-03-27 13:52 ` Hans Hagen via ntg-context
0 siblings, 1 reply; 5+ messages in thread
From: Willi Egger via ntg-context @ 2023-03-26 13:10 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Willi Egger
Hello Hraban,
thank you. I missed this point. However, adding a dot behind the number does not appear to solve the problem. The title’s text still starts at the left margin which looks very odd.
Kind regards
Willi
> On 26 Mar 2023, at 12:51, Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl> wrote:
>
> Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:
>> Good evening!
>> I have a setup in which I need to send info to the TOC:
>> Consider the following example:
>> \starttext
>> \starttitle[title=Contents]
>> \placelist[chapter][criterium=all]
>> \stoptitle
>> \startchapter[title=Mychapter]
>> \input knuth
>> \startsubject[title=Subject will be in TOC]
>> \writetolist[chapter]{1}{I am in TOC!}
>> \input ward
>> \stopsubject
>> \stopchapter
>> \stoptext
>> According to the Wiki I should get te number (1) in the TOC. Instead the text starts at the height of the chapter-numbering and is not carrying the given number.
>> Am I doing something wrong?
>
> The wiki says:
>
> “The default table of contents is combined list. To write to it one has to choose the level to which it should be inserted: \writetolist[chapter]{1.}{Chapter list entry A},
> \writetolist[section]{1.1}{Section list entry A}, etc.”
>
> https://wiki.contextgarden.net/Command/writetolist
>
> So maybe you need a dot?
>
> Otherwise I don’t know.
>
> Hraban
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : https://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \writetolist not writing the number to the TOC
2023-03-26 13:10 ` Willi Egger via ntg-context
@ 2023-03-27 13:52 ` Hans Hagen via ntg-context
2023-03-27 15:13 ` Willi Egger via ntg-context
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen via ntg-context @ 2023-03-27 13:52 UTC (permalink / raw)
To: Willi Egger via ntg-context; +Cc: Hans Hagen
On 3/26/2023 3:10 PM, Willi Egger via ntg-context wrote:
> Hello Hraban,
>
> thank you. I missed this point. However, adding a dot behind the number does not appear to solve the problem. The title’s text still starts at the left margin which looks very odd.
>
> Kind regards
> Willi
>
>> On 26 Mar 2023, at 12:51, Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl> wrote:
>>
>> Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:
>>> Good evening!
>>> I have a setup in which I need to send info to the TOC:
>>> Consider the following example:
>>> \starttext
>>> \starttitle[title=Contents]
>>> \placelist[chapter][criterium=all]
>>> \stoptitle
>>> \startchapter[title=Mychapter]
>>> \input knuth
>>> \startsubject[title=Subject will be in TOC]
>>> \writetolist[chapter]{1}{I am in TOC!}
>>> \input ward
>>> \stopsubject
>>> \stopchapter
>>> \stoptext
>>> According to the Wiki I should get te number (1) in the TOC. Instead the text starts at the height of the chapter-numbering and is not carrying the given number.
>>> Am I doing something wrong?
>>
>> The wiki says:
>>
>> “The default table of contents is combined list. To write to it one has to choose the level to which it should be inserted: \writetolist[chapter]{1.}{Chapter list entry A},
>> \writetolist[section]{1.1}{Section list entry A}, etc.”
>>
>> https://wiki.contextgarden.net/Command/writetolist
>>
>> So maybe you need a dot?
>>
>> Otherwise I don’t know.
\definehead[xsubject][section][number=no]
\setuplist[xsubject][margin=2em]
\starttext
\starttitle[title=Contents]
\placelist[chapter,xsubject][criterium=all]
\stoptitle
\startchapter[title=Mychapter]
\input knuth
\startxsubject[title=Subject will be in TOC1] \input ward
\stopxsubject
\startxsubject[title=Subject will be in TOC2] \input ward
\stopxsubject
\stopchapter
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \writetolist not writing the number to the TOC
2023-03-27 13:52 ` Hans Hagen via ntg-context
@ 2023-03-27 15:13 ` Willi Egger via ntg-context
0 siblings, 0 replies; 5+ messages in thread
From: Willi Egger via ntg-context @ 2023-03-27 15:13 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Willi Egger
Thank you Hans,
that is, what I need. It was even easy to implement in the layout-file only :-) because these sections where already under a “mysection” head.
Kind regards
Willi
> On 27 Mar 2023, at 15:52, Hans Hagen via ntg-context <ntg-context@ntg.nl> wrote:
>
> On 3/26/2023 3:10 PM, Willi Egger via ntg-context wrote:
>> Hello Hraban,
>> thank you. I missed this point. However, adding a dot behind the number does not appear to solve the problem. The title’s text still starts at the left margin which looks very odd.
>> Kind regards
>> Willi
>>> On 26 Mar 2023, at 12:51, Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl> wrote:
>>>
>>> Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:
>>>> Good evening!
>>>> I have a setup in which I need to send info to the TOC:
>>>> Consider the following example:
>>>> \starttext
>>>> \starttitle[title=Contents]
>>>> \placelist[chapter][criterium=all]
>>>> \stoptitle
>>>> \startchapter[title=Mychapter]
>>>> \input knuth
>>>> \startsubject[title=Subject will be in TOC]
>>>> \writetolist[chapter]{1}{I am in TOC!}
>>>> \input ward
>>>> \stopsubject
>>>> \stopchapter
>>>> \stoptext
>>>> According to the Wiki I should get te number (1) in the TOC. Instead the text starts at the height of the chapter-numbering and is not carrying the given number.
>>>> Am I doing something wrong?
>>>
>>> The wiki says:
>>>
>>> “The default table of contents is combined list. To write to it one has to choose the level to which it should be inserted: \writetolist[chapter]{1.}{Chapter list entry A},
>>> \writetolist[section]{1.1}{Section list entry A}, etc.”
>>>
>>> https://wiki.contextgarden.net/Command/writetolist
>>>
>>> So maybe you need a dot?
>>>
>>> Otherwise I don’t know.
> \definehead[xsubject][section][number=no]
>
> \setuplist[xsubject][margin=2em]
>
> \starttext
> \starttitle[title=Contents]
> \placelist[chapter,xsubject][criterium=all]
> \stoptitle
> \startchapter[title=Mychapter]
> \input knuth
> \startxsubject[title=Subject will be in TOC1] \input ward \stopxsubject
> \startxsubject[title=Subject will be in TOC2] \input ward \stopxsubject
> \stopchapter
> \stoptext
>
>
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : https://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-27 15:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-25 22:05 \writetolist not writing the number to the TOC Willi Egger via ntg-context
2023-03-26 10:51 ` Henning Hraban Ramm via ntg-context
2023-03-26 13:10 ` Willi Egger via ntg-context
2023-03-27 13:52 ` Hans Hagen via ntg-context
2023-03-27 15:13 ` Willi Egger via ntg-context
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).