Am 05.02.2011 um 12:41 schrieb Jeong Dalyoung:

> Dear Andreas,
> 
> Thank you for your code.
> I'll try it.
> 
> The other day, Wolfgang suggested me the same page in wiki.
> But, It looks a little bit complicate, so I use another simple method.

It’s no so complicated as you think.

The \startchapter command has two arguments, the first is used for
the chapter argument like title, reference, bookmark etc. and
the second argument, which is optional, for your own values, like
author, subtitle etc.

You can now access these values in your own chapter layout with
\structurevariable for the normal arguments (e.g. title) and
\structureuservariable for your own arguments (e.g. subtitle).

\define[2]\ChapterCommand
  {\starttabulate[|l|l|]
   \NC title     \EQ \structurevariable    {title}     \NC\NR
   \NC reference \EQ \structurevariable    {reference} \NC\NR
   \NC author    \EQ \structureuservariable{author}    \NC\NR
   \NC subtitle  \EQ \structureuservariable{subtitle}  \NC\NR
   \stoptabulate}

\setuphead[chapter][command=\ChapterCommand]

\starttext
\startchapter[reference=sec:knuth,title=Knuth][author=Donald E. 
Knuth,subtitle=ConTeXt Sample File]
\input knuth
\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 via email to