ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Harald Koenig <koenig@tat.physik.uni-tuebingen.de>
Subject: Re: Chapter-author in TOC
Date: Sun, 19 Sep 2010 18:36:04 +0200	[thread overview]
Message-ID: <E7CC8DB0-697D-4D07-A942-D229BABCA77C@gmail.com> (raw)
In-Reply-To: <057F745A-733E-42D2-A06C-1CB2FC6E4124@rz-online.de>


Am 19.09.2010 um 17:44 schrieb Andreas Harder:

> Hi all!
> 
> I’m using the structureuservariable to set an author on a per chapter basis. But I would also like to have them in the table of contents, so I tried the following:
> 
> [...]
> 
> … without success. I appreciate any help.

Hi Andreas,

your question comes just in time, here is a example i planned to send to Harald only.

\define[3]\ChapterList
  {\bTABLE[offset=0pt,strut=yes,frame=off,width=.5\textwidth]
     \bTR
       \bTD \structurelistuservariable{date} \eTD
       \bTD #2 \eTD
     \eTR
   \eTABLE}

\setuplist
  [chapter]
  [alternative=command,
   command=\ChapterList]

\define[2]\ChapterHead
  {\startframedtext[frame=off,width=\textwidth,offset=0pt,align=middle]
   \doifsomething{\structureuservariable{date}}{\structureuservariable{date}\blank}
   #2
   \doifsomething{\structureuservariable{author}}{\blank\structureuservariable{author}}
   \stopframedtext}

\setuphead
  [chapter]
  [command=\ChapterHead]

\starttext
\completecontent
\startchapter[title=Rom][date=12.06.2010,author=Knuth]
\input knuth
\stopchapter
\startchapter[title=Pisa][date=14.06.2010,author=Tufte]
\input tufte
\stopchapter
\stoptext

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
___________________________________________________________________________________


  reply	other threads:[~2010-09-19 16:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-19 15:44 Andreas Harder
2010-09-19 16:36 ` Wolfgang Schuster [this message]
2010-09-19 16:50   ` Andreas Harder

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=E7CC8DB0-697D-4D07-A942-D229BABCA77C@gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=koenig@tat.physik.uni-tuebingen.de \
    --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).