ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jano Kula <jano.kula@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \writetolist in mkiv
Date: Mon, 13 Oct 2014 09:14:28 +0200	[thread overview]
Message-ID: <543B7BD4.3070501@gmail.com> (raw)
In-Reply-To: <E99A3ED3-2A64-4AEB-8D97-6B5B80734E5B@gmail.com>

Thank you, Wolfgang, here is the working example for the structure manual ;)

% \writetolist & local table of contents example
\def\ManualSubsection#1{\blank%
{\bf Manual Subsection #1}\par%
\writetolist[subsection]{}{Manual Subsection #1}%
\input tufte\relax}

\starttext
\dorecurse{3}{%
\startchapter[title=Chapter]
\placelist[section][criterium=chapter]
\startsection[title=Section]
\placelist[subsection][criterium=section]
\ManualSubsection{\recurselevel-1}
\ManualSubsection{\recurselevel-2}
\stopsection
\startsection[title=Section]
\placelist[subsection][criterium=section]
\ManualSubsection{\recurselevel-1}
\ManualSubsection{\recurselevel-2}
\stopsection
\stopchapter}
\stoptext




On 12.10.2014 23:06, Wolfgang Schuster wrote:
>
> Am 12.10.2014 um 22:57 schrieb Jano Kula <jano.kula@gmail.com>:
>
>> Hello Wolfgang,
>>
>> On 12.10.2014 21:28, Wolfgang Schuster wrote:
>>>
>>> Am 12.10.2014 um 20:39 schrieb Jano Kula <jano.kula@gmail.com>:
>>>
>>>> Hello to everybody!
>>>>
>>>> Minimal story
>>>> -------------
>>>> How to insert local TOC of manually created subsections after the section starts?
>>>>
>>>> % start minimal example
>>>> \def\ManualSubsection#1{\blank%
>>>> {\bf Manual Subsection #1}\par%
>>>> \writetolist[subsection]{whatever}{Manual Subsection #1}%
>>>> \input tufte\relax}
>>>>
>>>> \starttext
>>>> \dorecurse{3}{%
>>>> \startchapter[title=Chapter]
>>>> \placecontent[chapter,criterium=local] % local TOC OK
>>>
>>> You can’t put a keyword (chapter) and a assignment (criterium=local) in the same argument
>>> of a setup-command, what you’re looking for is \placelist[chapter][criterium=local].
>>>
>>> Wolfgang
>>
>> Thanks, got it: \placelist[section][criterium=local] places the list of sections included in the chapter.
>>
>> Still, how to do the same with subsections manually inserted by \writetolist[subsection]{}{Subsection title}?
>
> \placelist[subsection][criterium=section]
>
> 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
___________________________________________________________________________________

      reply	other threads:[~2014-10-13  7:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-12 18:39 Jano Kula
2014-10-12 19:28 ` Wolfgang Schuster
2014-10-12 20:57   ` Jano Kula
2014-10-12 21:06     ` Wolfgang Schuster
2014-10-13  7:14       ` Jano Kula [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=543B7BD4.3070501@gmail.com \
    --to=jano.kula@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).