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 2. I do not want that one digit months have the zero displayed. But using `m` acts as using `month`. \date[d=29,m=8,y=2099][d,.\,,m] result: 29. August 3. Spacing between numbers. Using LaTeX there were some suggestions to typeset a date using small spaces like `29.\,8.\,2010`. I guess this depends on the fonts used and personal taste? If there is a rule, maybe that could be added to the typesetting chapter in the user manual. Thanks, Paul [1] http://wiki.contextgarden.net/Reference/en/date [2] http://www.pragma-ade.com/general/manuals/cont-eni.pdf [3] http://foundry.supelec.fr/gf/project/contextman/scmsvn/?action=browse&path=%2Fcontext-reference%2Fen%2Fco-language.tex&view=markup
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
On Sat, Aug 28 2010, Wolfgang Schuster wrote:
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.
It's a general problem with ConTeXt macros. The same applies for example for \externalfigure. Should this be fixed for all commands, that can be used in running text, or should this behaviour just be well documented? Peter -- Contact information: http://pmrb.free.fr/contact/
Am 28.08.10 21:02, schrieb Peter Münster:
On Sat, Aug 28 2010, Wolfgang Schuster wrote:
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.
It's a general problem with ConTeXt macros. The same applies for example for \externalfigure. Should this be fixed for all commands, that can be used in running text, or should this behaviour just be well documented?
Fixing it for command which appear in the text is the best solution for me but it will take time but it has to be documented somewhere because such a change will likely only happen in mkiv. Wolfgang
Am 28.08.2010 um 21:02 schrieb Peter Münster:
On Sat, Aug 28 2010, Wolfgang Schuster wrote:
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.
It's a general problem with ConTeXt macros. The same applies for example for \externalfigure. Should this be fixed for all commands, that can be used in running text, or should this behaviour just be well documented?
\unprotect \unexpanded\def\externalfigure {\doifnextoptionalelse\doexternalfigure\donothing} \def\doexternalfigure[#1]% {\strictdoifnextoptionalelse{\dodoexternalfigure[#1]}{\nodoexternalfigure[#1]}} \def\nodoexternalfigure[#1]% {\dododoexternalfigure[#1][][]} \def\dodoexternalfigure[#1][#2]% {\strictdoifnextoptionalelse{\dododoexternalfigure[#1][#2]}{\dododoexternalfigure[#1][#2][]} \def\dododoexternalfigure[#1][#2][#3]% [label][file][settings] | [file][settings] | [file][parent][settings] {\bgroup \doifelsenothing{#1} {\framed[\c!width=\defaultfigurewidth,\c!height=\defaultfigureheight]{external\\figure\\no name}} {\doifundefinedelse{\??ef\??ef#1} {\useexternalfigure[\s!dummy][#1][#2][#3]% \getvalue{\??ef\??ef\s!dummy}[]} % [] is dummy arg 5 {\doifassignmentelse{#2} {\getvalue{\??ef\??ef#1}[#2]}% {\getvalue{\??ef\??ef#1}[#3]}}}% \globallet\currentresourcecomment\empty \egroup} \protect \starttext this is how a \externalfigure[cow][height=\lineheight] looks i the netherlands \stoptext Wolfgang
Am 28.08.2010 um 21:02 schrieb Peter Münster:
On Sat, Aug 28 2010, Wolfgang Schuster wrote:
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.
It's a general problem with ConTeXt macros. The same applies for example for \externalfigure. Should this be fixed for all commands, that can be used in running text, or should this behaviour just be well documented?
The alternative defintions for \date and \externalfigure i showed do fix the problem with the space after the command but the price for this is that you can write the arguments in two different lines or put a space between them because the second argument is then no longer seen by tex. Wolfgang
Dear ConTeXt folks, Am Samstag, den 28.08.2010, 16:02 +0200 schrieb Paul Menzel:
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
this question was answered by Wolfgang and he gave a solution.
2. I do not want that one digit months have the zero displayed. But using `m` acts as using `month`.
\date[d=29,m=8,y=2099][d,.\,,m]
result: 29. August
3. Spacing between numbers. Using LaTeX there were some suggestions to typeset a date using small spaces like `29.\,8.\,2010`. I guess this depends on the fonts used and personal taste? If there is a rule, maybe that could be added to the typesetting chapter in the user manual.
Could you answer or give your opinions an 0., 2. and 3. please? That would be great. Thanks, Paul
Hi Paul, On 2010-08-31 <10:29:39>, Paul Menzel wrote:
3. Spacing between numbers. Using LaTeX there were some suggestions to typeset a date using small spaces like `29.\,8.\,2010`. I guess this depends on the fonts used and personal taste? If there is a rule, maybe that could be added to the typesetting chapter in the user manual.
Could you answer or give your opinions an 0., 2. and 3. please? That would be great.
unfortunately I can only come up with a negative answer: I skimmed the Bringhurst and although he does discuss date strings with slashes as separators, I could not find anything concerning their spacing. As you guessed, “personal taste” might be a valid criterion in this matter. Maybe you should redirect this question to http://typophile.com/forums, but make sure to come back with a definite answer ;-) Philipp
___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
On 08/31/2010 11:48 AM, Philipp Gesang wrote:
Hi Paul,
On 2010-08-31<10:29:39>, Paul Menzel wrote:
3. Spacing between numbers. Using LaTeX there were some suggestions to typeset a date using small spaces like `29.\,8.\,2010`. I guess this depends on the fonts used and personal taste? If there is a rule, maybe that could be added to the typesetting chapter in the user manual.
Could you answer or give your opinions an 0., 2. and 3. please? That would be great.
unfortunately I can only come up with a negative answer: I skimmed the Bringhurst and although he does discuss date strings with slashes as separators,
The Chicago manual (14ed) says that slashed/dotted dates are bad style and should be avoided and that one should use full month names instead. Best wishes, Taco
On 2010-08-31 <13:41:06>, Taco Hoekwater wrote:
On 08/31/2010 11:48 AM, Philipp Gesang wrote:
unfortunately I can only come up with a negative answer: I skimmed the Bringhurst and although he does discuss date strings with slashes as separators,
The Chicago manual (14ed) says that slashed/dotted dates are bad style and should be avoided and that one should use full month names instead.
Best wishes, Taco
That's what I prefer, too. Bringhurst (v.3.2, p. 81f.) only uses the date as an example for the opposition virgule/solidus and states that “[i]t is useful in dates [...] and in text where a comma or parenthesis might otherwise have been used”. He does not give general advice wrt typesetting of dates. For the record, p. 406 of the TeXbook has this: ··8<············································································ \def\today{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space\number\day, \number\year} ··8<············································································ Ergo common spaces. Philipp
___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
2010/8/31 Taco Hoekwater
The Chicago manual (14ed) says that slashed/dotted dates are bad style and should be avoided and that one should use full month names instead.
Seconded. And if you have to use a short form, please follow ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601) - nobody can be sure when the 8.9.10 is. Best Martin
participants (6)
-
Martin Schröder
-
Paul Menzel
-
Peter Münster
-
Philipp Gesang
-
Taco Hoekwater
-
Wolfgang Schuster