help needed with difficult document structure
Hello, I'm having a little bit of problem with the document structure of the project I'm currently typesetting. It's kind of a scientific magazine that consists mainly of independent articles. The articles use \section and \subsection and should have their own numbering, as well as for the caption numbers and such. Oh, and the article's internal sectioning should not appear in any table of contents. At a higher level each Article has it's title (and author) and groups of articles are put together in categories ("Studies", "Documentations", "Focus articles"). These Categories and the Article Titles should appear in the main TOC: Studies On This And On That John Doe ................... 7 Another Study B. E. Ginner .............. 10 Focus Articles A Focus Article N. Ewbie .................. 15 Documentation Content of Documentations . 19 Europe .................... 20 Asia ...................... 23 America ................... 37 Africa .................... 42 and so on. Chosing \part level for categories and \chapter/\title for article titles comes to mind, but \chapter influences \section numbering ("2.1") and \title doesn't reset all those counters, leaving alone the problem of getting the author into the toc. I guess I'll have to do this one by hand. To make things even funnier there is the documentation part, which has two levels of unnumbered sectioning, of which the first level goes to the main TOC and the first and second go to a dedicated documentation TOC directly preceding that part and listing first and second level: Documentation Content Europe Germany ............... 21 Netherlands ........... 22 Asia China ................. 24 and so on. Now I'm a bit unsure how to implement this cleanly in ConTeXt. I've already done it for LaTeX (from which we are switching because of ConTeXts superior layout abilities). I simply used two additional toc files for that. In Context I even don't get unnumbered sections in any toc :( (but maybe I'm just a bit over-tired...) I cannot expect a ready-to-run solution, but any hints or "best context practices" would be highly appreciated! Yours sincerely, Karsten
Karsten Heymann wrote:
I cannot expect a ready-to-run solution, but any hints or "best context practices" would be highly appreciated!
In ConTeXt you can define alternative heads and tocs quite easily, but the actual setup depends (of course) on the structure of your input files. Here are some relevant, slighly editted bits from a book I've been working on (it has two tocs with wildly varying formats): Hope this helps, Taco % \definehead[shortchapter][chapter] \definehead[shortpart][part] \definecombinedlist [shortcontent] [shortpart,shortchapter] [level=shortchapter, criterium=all] \setuplist [shortpart,shortchapter] [numbercommand=\gobbleoneargument,pagenumber=no] \def\startchapter[#1]% {\chapter{#1}% \expanded {\writetolist[shortchapter]{\getvalue{section-2number}}{#1}}} \def\stopchapter {\page } \starttext \startfrontmatter \subject{Short Contents} \placecombinedlist[shortcontent] \completecontent \stopfrontmatter \startbodymatter \shortpart{First part} \dorecurse{5} {\expanded{\startchapter[Chapter \recurselevel]} \dorecurse{5}{\section{My section} \input knuth } \stopchapter} \shortpart{Second part} \dorecurse{2} {\expanded{\startchapter[Chapter \recurselevel]} \dorecurse{5}{\input knuth } \stopchapter} \stopbodymatter \stoptext
Hi Taco Taco Hoekwater wrote:
In ConTeXt you can define alternative heads and tocs quite easily, but the actual setup depends (of course) on the structure of your input files.
\setuplist [shortpart,shortchapter] [numbercommand=\gobbleoneargument,pagenumber=no]
Thanks, that already helps a lot. And as I just found the writetolist command (don't know how I could overlook it yesterday), I think I'll get it right now :) Thanks alot, Karsten
participants (2)
-
Karsten Heymann
-
Taco Hoekwater