ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan BRASLAU <alan.braslau@cea.fr>
To: ntg-context@ntg.nl
Subject: \setuplabeltext[chapter=Chapter ] (or mkiv document structure/TOC)
Date: Wed, 20 Jan 2010 19:45:23 +0100	[thread overview]
Message-ID: <201001201945.23543.alan.braslau@cea.fr> (raw)

In a large project, a book with parts, chapters, appendices, etc. I have set 
the table of contents to display the label "Chapter" yielding:

Part I
Chapter 1
Chapter 2
Chapter 3
Part II
Chapter 4
...

Through the following (mkiv):

%
% section headings
%
\definestructureresetset [default] [0,0] [1] % do not reset parts and chapters
\setuphead [part] [sectionresetset=default,
                   placehead=yes,
                   conversion=Romannumerals]
\setuphead [chapter,section,subsection] [placehead=yes,sectionsegments=2:100]
%
% table of contents
%
\setuplabeltext [chapter=Chapter ] % with trailing space; blank by default
\setuplist [chapter] [label=yes,width=5em]
\setuplist [part,chapter,section,subsection,subsubsection]
           [interaction=all,alternative=c] % number – title – dots – 
pagenumber

\starttext
\startfrontmatter
\stopfrontmatter

\startbodymatter
\stopbodymatter

\startappendices
\stopappendices

\startbackmatter
\stopbackmatter

\stoptext



In the above use, the appendices A,B,... get listed as

  Chapter A
  Chapter B

and the Bibliography, Name Index, Subject Index, List of Figures, List of 
Tables all get listed as

  Chapter Bibliography
  Chapter Name Index
  ...


Adding
  \setuplabeltext [chapter=Appendix ] % with trailing space; blank by default
after \startappendices doesn't work, nor does
  \setuplabeltext [chapter=] % reset to blank
after \startbackmatter.

(of course, these labels should be predefined according to the language, and 
some switch,
  \setuplist [chapter] [label=no]
after \startbackmatter, maybe by default, should take care of it.)

Any suggestions?

Alan
___________________________________________________________________________________
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:[~2010-01-20 18:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201001201945.23543.alan.braslau@cea.fr \
    --to=alan.braslau@cea.fr \
    --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).