* \writetolist in mkiv
@ 2014-10-12 18:39 Jano Kula
2014-10-12 19:28 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Jano Kula @ 2014-10-12 18:39 UTC (permalink / raw)
To: ntg-context
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
\startsection[title=Section]
Here we would like to see the local list of manual subsections
\placecontent[section,criterium=local] % local TOC not OK
\ManualSubsection{\recurselevel-1}
\ManualSubsection{\recurselevel-2}
\stopsection
\stopchapter}
\stoptext
% stop minimal example
Longer Story
------------
Predefined \start<chapter|section> inserts "titledata" in TUC file:
["titledata"]={
["label"]="chapter",
["title"]="Chapter",
},
...
["titledata"]={
["label"]="section",
["title"]="Section",
},
while \writetolist[subsection]{whatever}{Manual Subsection #1} inserts
"userdata":
["userdata"]={
["first"]="whatever",
["second"]="Manual Subsection \\recurselevel -1",
},
Is this the reason and can I force to write "titledata" in the TUC file?
Real case is of course more complicated and also PDF hyperlinks should work.
Thank you in advance,
Jano
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \writetolist in mkiv
2014-10-12 18:39 \writetolist in mkiv Jano Kula
@ 2014-10-12 19:28 ` Wolfgang Schuster
2014-10-12 20:57 ` Jano Kula
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2014-10-12 19:28 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \writetolist in mkiv
2014-10-12 19:28 ` Wolfgang Schuster
@ 2014-10-12 20:57 ` Jano Kula
2014-10-12 21:06 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Jano Kula @ 2014-10-12 20:57 UTC (permalink / raw)
To: mailing list for ConTeXt users
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}?
Jano
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \writetolist in mkiv
2014-10-12 20:57 ` Jano Kula
@ 2014-10-12 21:06 ` Wolfgang Schuster
2014-10-13 7:14 ` Jano Kula
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2014-10-12 21:06 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \writetolist in mkiv
2014-10-12 21:06 ` Wolfgang Schuster
@ 2014-10-13 7:14 ` Jano Kula
0 siblings, 0 replies; 5+ messages in thread
From: Jano Kula @ 2014-10-13 7:14 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-13 7:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-12 18:39 \writetolist in mkiv 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 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).