On 26 Jun 2009, at 11:39, Wolfgang Schuster wrote:
Am 26.06.2009 um 11:11 schrieb Gerben Wierda:
The discussion went on about my silly PS. So I am reposting the
original question/problem.
The method in the wiki (http://wiki.contextgarden.net/
Document_Titles) does not work for me, but maybe it is the order in
which you have to do things?
Try this:
\unprotect
\definesystemvariable {title}
\definemarking[documenttitle]
\definemarking[documentauthor]
\definemarking[documentdate]
\def\setuptitle
{\dodoubleempty\dosetuptitle}
\def\dosetuptitle[#1][#2]%
{\ifsecondargument
\def\dodosetuptitle##1{\getparameters[\??title##1][#2]}%
\processcommalist[#1]\dodosetuptitle
\else
\getparameters[\??title][#1]%
\fi}
\def\placetitle
{\dosingleempty\doplacetitle}
\def\doplacetitle[#1]%
{\iffirstargument
\getparameters[\??title][#1]%
\fi
\def\dodoplacetitle##1%
{\marking[document##1]{\getvalue{\??title##1}}%
\blank[\getvalue{\??title##1\c!spacebefore}]%
\doattributes{\??dt##1}\c!style\c!color\getvalue{\??title##1}%
\blank[\getvalue{\??title##1\c!spaceafter}]}%
\@@titlebefore
\processcommalist[\c!title,\c!author,\c!date]\dodoplacetitle
\@@titleafter}
\setuptitle
[\c!title]
[\c!style=\tfd,
\c!color=,
\c!spacebefore={\v!force,2*\v!big},
\c!spaceafter={3*\v!medium}]
\setuptitle
[\c!author,\c!date]
[\c!style=\tfa,
\c!color=,
\c!spacebefore={2*\v!medium},
\c!spaceafter={3*\v!medium}]
\setuptitle
[\c!before={\startalignment[\v!middle]},
\c!after={\stopalignment},
\c!title=,
\c!author=,
\c!date=\currentdate]
\protect
\setuptitle
[title={Title to be determined},
author={G.C.Th.~Wierda, M.Sc., MBA\footnote{IT Lead Architect,
APG, http://www.apg.nl/}},
date={July 2009}]
\setupheadertexts[{\getmarking[documenttitle]}]
[{\getmarking[documentauthor]}]
\starttext
\placetitle
...
\stoptext
Wolfgang
Ends with:
begin file foo at line 11
! Undefined control sequence.
<argument> \??dt
\c!title
\doattributes ...ibutes \endgroup \fi \ifcsname #1
#2\endcsname \...@ea
\doconve...
\dodoplacetitle ...#1}\c!style \c!color \getvalue
{\??title #1}\blank
[\getv...
\next1 #1,->\dodoplacetitle {#1}
\doprocesscommaitem
<argument> \relax \c!title ,
\c!author ,\c!date
\doprocesscommalist ...aitem \gobbleoneargument #1
,]\relax \global
\advance ...
...
l.14
G
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________