ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* help needed with difficult document structure
@ 2006-04-19 20:59 Karsten Heymann
  2006-04-20  7:22 ` Taco Hoekwater
  0 siblings, 1 reply; 3+ messages in thread
From: Karsten Heymann @ 2006-04-19 20:59 UTC (permalink / raw)



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

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


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: help needed with difficult document structure
  2006-04-19 20:59 help needed with difficult document structure Karsten Heymann
@ 2006-04-20  7:22 ` Taco Hoekwater
  2006-04-20  8:41   ` Karsten Heymann
  0 siblings, 1 reply; 3+ messages in thread
From: Taco Hoekwater @ 2006-04-20  7:22 UTC (permalink / raw)




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

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

* Re: help needed with difficult document structure
  2006-04-20  7:22 ` Taco Hoekwater
@ 2006-04-20  8:41   ` Karsten Heymann
  0 siblings, 0 replies; 3+ messages in thread
From: Karsten Heymann @ 2006-04-20  8:41 UTC (permalink / raw)



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

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


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

end of thread, other threads:[~2006-04-20  8:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-19 20:59 help needed with difficult document structure Karsten Heymann
2006-04-20  7:22 ` Taco Hoekwater
2006-04-20  8:41   ` Karsten Heymann

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