ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to quote the section names in advance like the table of contents?
@ 2020-11-07 15:32 Sylvain Hubert
  2020-11-07 15:45 ` Pablo Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Sylvain Hubert @ 2020-11-07 15:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Dear List,

say I have three sections in the document:

    \section{foo} ... \section{bar} ... \section{baz} ...

Now I would like to auto generate a heavily customized table of contents
like the following text, which cannot be done by the stock \placecontent in
general, and put it into the preface:

   This book has 3 sections: foo, bar, and baz.

The text generation should be trivial with lua, but I don't know how such
forward reference of section names works. Could anyone help me with it?

Thanks in advance.

Best,
Sylvain

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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: How to quote the section names in advance like the table of contents?
  2020-11-07 15:32 How to quote the section names in advance like the table of contents? Sylvain Hubert
@ 2020-11-07 15:45 ` Pablo Rodriguez
  2020-11-07 17:37   ` Sylvain Hubert
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2020-11-07 15:45 UTC (permalink / raw)
  To: ntg-context

On 11/7/20 4:32 PM, Sylvain Hubert wrote:
> Dear List,
>
> say I have three sections in the document:
>
>     \section{foo} ... \section{bar} ... \section{baz} ...
>
> Now I would like to auto generate a heavily customized table of contents
> like the following text, which cannot be done by the stock \placecontent
> in general, and put it into the preface:
>
>    This book has 3 sections: foo, bar, and baz.

How about the following?

    \starttext
    as in \about[section-one], \about[section-two],
    \about[section-three]...

    \section[section-one]{Section One}
    \section[section-two]{Section Two}
    \section[section-three]{Section Three}
    \stoptext

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: How to quote the section names in advance like the table of contents?
  2020-11-07 15:45 ` Pablo Rodriguez
@ 2020-11-07 17:37   ` Sylvain Hubert
  0 siblings, 0 replies; 3+ messages in thread
From: Sylvain Hubert @ 2020-11-07 17:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi Pablo,

thanks for the suggestion, but I was looking for an automated method for
writing a module, therefore manual reference is not feasible here.

Sylvain

On Sat, 7 Nov 2020 at 16:46, Pablo Rodriguez <oinos@gmx.es> wrote:

> On 11/7/20 4:32 PM, Sylvain Hubert wrote:
> > Dear List,
> >
> > say I have three sections in the document:
> >
> >     \section{foo} ... \section{bar} ... \section{baz} ...
> >
> > Now I would like to auto generate a heavily customized table of contents
> > like the following text, which cannot be done by the stock \placecontent
> > in general, and put it into the preface:
> >
> >    This book has 3 sections: foo, bar, and baz.
>
> How about the following?
>
>     \starttext
>     as in \about[section-one], \about[section-two],
>     \about[section-three]...
>
>     \section[section-one]{Section One}
>     \section[section-two]{Section Two}
>     \section[section-three]{Section Three}
>     \stoptext
>
> Pablo
> --
> http://www.ousia.tk
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>

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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-11-07 17:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-07 15:32 How to quote the section names in advance like the table of contents? Sylvain Hubert
2020-11-07 15:45 ` Pablo Rodriguez
2020-11-07 17:37   ` Sylvain Hubert

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