[NTG-context] Is it possible to generate only a table of contents

Steffen Wolfrum context at st.estfiles.de
Fri Mar 18 10:09:11 CET 2011


Am 18.03.2011 um 09:32 schrieb Cecil Westerhof:

> Is it possible to generate only a TOC? (\completecontent) When creating a document I like to have the 'stakeholders' to have an indication of what is going on. For this a TOC is enough. I could create the document and cut out the TOC, but it would be simpler if that could be auto generated.


In MkII this was possible by accessing the TUO file (which contains the TOC entry information) directly and independently .

When typesetting a document "MyFile.tex" there is an accompanied TUO file generated "MyFile.tuo".
Just copy this file and re-name to eg. MyFileX.tuo

Then you can run \placelist[chapter, section,...][file=MyFile] from any document that contain these line:

\unprotect
\def\FrozenTUO{../MyFileX}
\def\doplacerawlist[#1][#2]%
  {\begingroup
   \dogetcommalistelement1\from#1\to\firstlistelement
   \dosetuplist[#1][#2]%
   \doifvalue{\??li\firstlistelement\c!coupling}\v!on
     {\startlistreferences{#1}}%
   \dosettoclevel\??li\firstlistelement
   \honorlocalfilterlevel
   \doutilities{listentries,#1}\FrozenTUO{#1}\relax\par
   \stoplistreferences{#1}%
   \dosetlistmode
   \endgroup}
\protect


In MkIV this is not possible up to now due to the completely different structure of TOU and TUC files (see Hans below) ... unfortunately.

Steffen


Am 23.02.2010 um 23:27 schrieb Hans Hagen:

> On 23-2-2010 21:18, Steffen Wolfrum wrote:
>> 
>> \def\FrozenTUO{MyFile}
>> 
>> .... thus each \placelist run would read from that paticular MyFile.tuo
>> 
>> The quoted code above was written by Hans to provide a way to implement a kind of \placelist[chapter, section,...][file=MyFile] in MkII.
> 
> the file= option will not come back, at least not soon, as we now have a completely different way of dealing with tables of contents (and actually all multipass data)





More information about the ntg-context mailing list