Am 28.08.10 16:02, schrieb Paul Menzel:
Dear ConTeXt folks,
I have four questions regarding `\date`. I looked at the page in the
Wiki [1], in the ConTeXt user manual on page 159 [2][3] and tried some
things, but could not figure it out.
I am using Debian Sid/unstable and I am a total beginner regarding
ConTeXt.
0. I guess the first question is, if `\date` is supposed to be used
inside a text anyway or just when for example setting the title page.
1. No space is inserted after using `\date[…]`.
text \date[d=29,m=8,y=2099] text
result: text 29. August 2099text
Is that intentional? A slash after the command fixes it.
text \date[d=29,m=8,y=2099]\ text
It's a problem with the optional argument, if the second argument is
missing the space after the first is gobbled but it can be fixed.
\unprotect
\def\dododate[#1][#2]%
{\bgroup
\getparameters[\??da][d=\normalday,m=\normalmonth,y=\normalyear,#1]%
\normalday \@@dad\relax
\normalmonth\@@dam\relax
\normalyear \@@day\relax
\doifsomethingelse{#2}{\currentdate[#2]}{\currentdate}%
\egroup}
\def\nododate[#1]%
{\dododate[#1][]}
\def\dodate[#1]%
{\strictdoifnextoptionalelse{\dododate[#1]}{\nododate[#1]}}
\def\nodate
{\currentdate}
\def\date
{\strictdoifnextoptionalelse\dodate\nodate}
\protect
\starttext
text \date\ text
text \date[d=29,m=8,y=2099] text
text \date[d=29,m=8,y=2099][d,.\,,m] text
\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
___________________________________________________________________________________