ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Adding a line after the TOC
@ 2024-10-08  9:18 jbf
  2024-10-08 10:07 ` [NTG-context] " Duncan Hothersall
  0 siblings, 1 reply; 6+ messages in thread
From: jbf @ 2024-10-08  9:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

I am struggling with something that might be simple enough, but...

The author is insisting that on the TOC page, after all the chapters and 
their page numbers, I need to add the line (obviously without any page 
number associated with it): 'All translations are by the author'.

I have trie various combinations of \writetolist and \writebetweenlist, 
and I can get his comment at the beginning of the TOC, but I cannot get 
it at the end, and perhaps with some vertical space separation from the 
main list. How can I place it at the end?

Here is my simple MWE where at least I can get it at the beginning:

\starttochead[title={Contents}]

\setcounter [userpage] [7]

\setupheader[state=stop]

\placecombinedlist[content]

\writebetweenlist[chapter]{All translations are by the author!}

\stoptochead

Julian

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

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Adding a line after the TOC
  2024-10-08  9:18 [NTG-context] Adding a line after the TOC jbf
@ 2024-10-08 10:07 ` Duncan Hothersall
  2024-10-08 20:10   ` jbf
  0 siblings, 1 reply; 6+ messages in thread
From: Duncan Hothersall @ 2024-10-08 10:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

You need to write to a list at the end of your document if you want
what you are writing to appear at the end of the list.

Is there something stopping you just outputting the line of text after the
TOC? Do you need it to appear as if it was part of the TOC?

Duncan

On Tue, 8 Oct 2024 at 10:25, jbf <roma83537@gmail.com> wrote:

> I am struggling with something that might be simple enough, but...
>
> The author is insisting that on the TOC page, after all the chapters and
> their page numbers, I need to add the line (obviously without any page
> number associated with it): 'All translations are by the author'.
>
> I have trie various combinations of \writetolist and \writebetweenlist,
> and I can get his comment at the beginning of the TOC, but I cannot get it
> at the end, and perhaps with some vertical space separation from the main
> list. How can I place it at the end?
>
> Here is my simple MWE where at least I can get it at the beginning:
>
> \starttochead[title={Contents}]
>
> \setcounter [userpage] [7]
>
> \setupheader[state=stop]
>
> \placecombinedlist[content]
>
> \writebetweenlist[chapter]{All translations are by the author!}
>
> \stoptochead
>
> Julian
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
>
> ___________________________________________________________________________________
>

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

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Adding a line after the TOC
  2024-10-08 10:07 ` [NTG-context] " Duncan Hothersall
@ 2024-10-08 20:10   ` jbf
  2024-10-08 20:22     ` Duncan Hothersall
  0 siblings, 1 reply; 6+ messages in thread
From: jbf @ 2024-10-08 20:10 UTC (permalink / raw)
  To: Duncan Hothersall; +Cc: mailing list for ConTeXt users


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

What I have just tried might be rather ugly and unorthodox, but it 
achieves what I want. As you can see from below, after the final chapter 
I simply created a 'subject' without giving it a title as such. I 
realised I needed the [location=here] to place it below the last item in 
the TOC.

So I have what I want, in the end, but am I missing something that is 
obvious to others but not to me when you say 'Is there something 
stopping you just outputting the line of text after the TOC?' Since the 
TOC is created automatically from heads like chapter, section etc., I 
don't know (other than the solution I came up with below) how to 'just 
output a line of text after the TOC'. I suppose I was imagining a 
\writeafterlist command or something like that🙂

Thanks for you help Duncan, since at least it made me look to the end of 
the document rather than the beginning of it, as I had been doing.

Julian .....

\stopchapter

\startsubject[title={}]

\writebetweenlist[section][location=here]{\blank[2*big] Note: All 
translations throughout the book are my own.}

\stopsubject

\stopbodymatter

\stopdocument

On 8/10/24 21:07, Duncan Hothersall wrote:
> You need to write to a list at the end of your document if you want 
> what you are writing to appear at the end of the list.
>
> Is there something stopping you just outputting the line of text after 
> the TOC? Do you need it to appear as if it was part of the TOC?
>
> Duncan
>
> On Tue, 8 Oct 2024 at 10:25, jbf <roma83537@gmail.com> wrote:
>
>     I am struggling with something that might be simple enough, but...
>
>     The author is insisting that on the TOC page, after all the
>     chapters and their page numbers, I need to add the line (obviously
>     without any page number associated with it): 'All translations are
>     by the author'.
>
>     I have trie various combinations of \writetolist and
>     \writebetweenlist, and I can get his comment at the beginning of
>     the TOC, but I cannot get it at the end, and perhaps with some
>     vertical space separation from the main list. How can I place it
>     at the end?
>
>     Here is my simple MWE where at least I can get it at the beginning:
>
>     \starttochead[title={Contents}]
>
>     \setcounter [userpage] [7]
>
>     \setupheader[state=stop]
>
>     \placecombinedlist[content]
>
>     \writebetweenlist[chapter]{All translations are by the author!}
>
>     \stoptochead
>
>     Julian
>
>     ___________________________________________________________________________________
>     If your question is of interest to others as well, please add an
>     entry to the Wiki!
>
>     maillist : ntg-context@ntg.nl /
>     https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>     webpage  : https://www.pragma-ade.nl / https://context.aanhet.net
>     (mirror)
>     archive  : https://github.com/contextgarden/context
>     wiki     : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  :https://www.pragma-ade.nl /https://context.aanhet.net (mirror)
> archive  :https://github.com/contextgarden/context
> wiki     :https://wiki.contextgarden.net
> ___________________________________________________________________________________

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

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Adding a line after the TOC
  2024-10-08 20:10   ` jbf
@ 2024-10-08 20:22     ` Duncan Hothersall
  2024-10-08 20:29       ` jbf
  2024-10-08 20:42       ` Wolfgang Schuster
  0 siblings, 2 replies; 6+ messages in thread
From: Duncan Hothersall @ 2024-10-08 20:22 UTC (permalink / raw)
  To: jbf; +Cc: mailing list for ConTeXt users


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

Sorry for not being clearer Julian, I was meaning could you just do
something like this?

\starttochead[title={Contents}]
\setupheader[state=stop]
\placecombinedlist[content]
\blank[2*big]
Note: All translations throughout the book are my own.
\stoptochead

Obviously you might need to apply styling to that line if you need it to
match whatever you have set up for the combinedlist, but it wasn't clear
to me why you needed the text to be *in* the TOC.

Cheers,

Duncan

On Tue, 8 Oct 2024 at 21:10, jbf <roma83537@gmail.com> wrote:

> What I have just tried might be rather ugly and unorthodox, but it
> achieves what I want. As you can see from below, after the final chapter I
> simply created a 'subject' without giving it a title as such. I realised I
> needed the [location=here] to place it below the last item in the TOC.
>
> So I have what I want, in the end, but am I missing something that is
> obvious to others but not to me when you say 'Is there something stopping
> you just outputting the line of text after the TOC?' Since the TOC is
> created automatically from heads like chapter, section etc., I don't know
> (other than the solution I came up with below) how to 'just output a line
> of text after the TOC'. I suppose I was imagining a \writeafterlist command
> or something like that🙂
>
> Thanks for you help Duncan, since at least it made me look to the end of
> the document rather than the beginning of it, as I had been doing.
>
> Julian .....
>
> \stopchapter
>
> \startsubject[title={}]
>
> \writebetweenlist[section][location=here]{\blank[2*big] Note: All
> translations throughout the book are my own.}
>
> \stopsubject
>
> \stopbodymatter
>
> \stopdocument
>
> On 8/10/24 21:07, Duncan Hothersall wrote:
>
> You need to write to a list at the end of your document if you want
> what you are writing to appear at the end of the list.
>
> Is there something stopping you just outputting the line of text after the
> TOC? Do you need it to appear as if it was part of the TOC?
>
> Duncan
>
> On Tue, 8 Oct 2024 at 10:25, jbf <roma83537@gmail.com> wrote:
>
>> I am struggling with something that might be simple enough, but...
>>
>> The author is insisting that on the TOC page, after all the chapters and
>> their page numbers, I need to add the line (obviously without any page
>> number associated with it): 'All translations are by the author'.
>>
>> I have trie various combinations of \writetolist and \writebetweenlist,
>> and I can get his comment at the beginning of the TOC, but I cannot get it
>> at the end, and perhaps with some vertical space separation from the main
>> list. How can I place it at the end?
>>
>> Here is my simple MWE where at least I can get it at the beginning:
>>
>> \starttochead[title={Contents}]
>>
>> \setcounter [userpage] [7]
>>
>> \setupheader[state=stop]
>>
>> \placecombinedlist[content]
>>
>> \writebetweenlist[chapter]{All translations are by the author!}
>>
>> \stoptochead
>>
>> Julian
>>
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net
>> (mirror)
>> archive  : https://github.com/contextgarden/context
>> wiki     : https://wiki.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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________
>
>

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

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Adding a line after the TOC
  2024-10-08 20:22     ` Duncan Hothersall
@ 2024-10-08 20:29       ` jbf
  2024-10-08 20:42       ` Wolfgang Schuster
  1 sibling, 0 replies; 6+ messages in thread
From: jbf @ 2024-10-08 20:29 UTC (permalink / raw)
  To: Duncan Hothersall; +Cc: mailing list for ConTeXt users

Well, you couldn't be more clearer than that! So I should have applied 
Occam's Razor all along... the law of parsimony, or put otherwise, the 
simplest solution is the best! I hadn't realised I could simply add to 
the TOC that way. Always assumed it was to do with the heads, and those 
alone.

Thank you,

Julian

On 9/10/24 07:22, Duncan Hothersall wrote:
> \blank[2*big]
> Note: All translations throughout the book are my own.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Adding a line after the TOC
  2024-10-08 20:22     ` Duncan Hothersall
  2024-10-08 20:29       ` jbf
@ 2024-10-08 20:42       ` Wolfgang Schuster
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2024-10-08 20:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Duncan Hothersall

Duncan Hothersall schrieb am 08.10.2024 um 22:22:
> Sorry for not being clearer Julian, I was meaning could you just do 
> something like this?
> 
> \starttochead[title={Contents}]
> \setupheader[state=stop]
> \placecombinedlist[content]
> \blank[2*big]
> Note: All translations throughout the book are my own.
> \stoptochead
> 
> Obviously you might need to apply styling to that line if you need it to 
> match whatever you have set up for the combinedlist, but it wasn't clear 
> to me why you needed the text to be *in* the TOC.

This seems to be the best solution.

Below is a different method how a custom header can be used to create 
additional toc entries on the chapter level.

%%%% begin example
\definehead
   [chapternote]
   [chapter]
   [page=no,
    number=no,
    placehead=no]

\setuplist
   [chapternote]
   [margin=2em,
    pagenumber=no]

\startdocument

\completecontent[list={chapter,chapternote}]

\dorecurse{10}{\chapter{Chapter \convertnumber{word}{#1}}}

\chapternote{All translations are by the author!}

\stopdocument
%%%% end example

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2024-10-08 20:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-08  9:18 [NTG-context] Adding a line after the TOC jbf
2024-10-08 10:07 ` [NTG-context] " Duncan Hothersall
2024-10-08 20:10   ` jbf
2024-10-08 20:22     ` Duncan Hothersall
2024-10-08 20:29       ` jbf
2024-10-08 20:42       ` Wolfgang Schuster

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