ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* questions regarding `\date`
@ 2010-08-28 14:02 Paul Menzel
  2010-08-28 18:54 ` Wolfgang Schuster
  2010-08-31  8:29 ` Paul Menzel
  0 siblings, 2 replies; 11+ messages in thread
From: Paul Menzel @ 2010-08-28 14:02 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1373 bytes --]

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

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: questions regarding `\date`
  2010-08-28 14:02 questions regarding `\date` Paul Menzel
@ 2010-08-28 18:54 ` Wolfgang Schuster
  2010-08-28 19:02   ` Peter Münster
  2010-08-31  8:29 ` Paul Menzel
  1 sibling, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2010-08-28 18:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: questions regarding `\date`
  2010-08-28 18:54 ` Wolfgang Schuster
@ 2010-08-28 19:02   ` Peter Münster
  2010-08-28 19:10     ` Wolfgang Schuster
                       ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Peter Münster @ 2010-08-28 19:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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/


___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: questions regarding `\date`
  2010-08-28 19:02   ` Peter Münster
@ 2010-08-28 19:10     ` Wolfgang Schuster
  2010-08-28 20:51     ` Wolfgang Schuster
  2010-08-29 10:17     ` Wolfgang Schuster
  2 siblings, 0 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2010-08-28 19:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: questions regarding `\date`
  2010-08-28 19:02   ` Peter Münster
  2010-08-28 19:10     ` Wolfgang Schuster
@ 2010-08-28 20:51     ` Wolfgang Schuster
  2010-08-29 10:17     ` Wolfgang Schuster
  2 siblings, 0 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2010-08-28 20:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: questions regarding `\date`
  2010-08-28 19:02   ` Peter Münster
  2010-08-28 19:10     ` Wolfgang Schuster
  2010-08-28 20:51     ` Wolfgang Schuster
@ 2010-08-29 10:17     ` Wolfgang Schuster
  2 siblings, 0 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2010-08-29 10:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: questions regarding `\date`
  2010-08-28 14:02 questions regarding `\date` Paul Menzel
  2010-08-28 18:54 ` Wolfgang Schuster
@ 2010-08-31  8:29 ` Paul Menzel
  2010-08-31  9:48   ` Philipp Gesang
  1 sibling, 1 reply; 11+ messages in thread
From: Paul Menzel @ 2010-08-31  8:29 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1399 bytes --]

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

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: questions regarding `\date`
  2010-08-31  8:29 ` Paul Menzel
@ 2010-08-31  9:48   ` Philipp Gesang
  2010-08-31 11:41     ` Taco Hoekwater
  0 siblings, 1 reply; 11+ messages in thread
From: Philipp Gesang @ 2010-08-31  9:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1513 bytes --]

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

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: questions regarding `\date`
  2010-08-31  9:48   ` Philipp Gesang
@ 2010-08-31 11:41     ` Taco Hoekwater
  2010-08-31 12:14       ` Philipp Gesang
  2010-08-31 13:03       ` Martin Schröder
  0 siblings, 2 replies; 11+ messages in thread
From: Taco Hoekwater @ 2010-08-31 11:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Philipp Gesang

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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: questions regarding `\date`
  2010-08-31 11:41     ` Taco Hoekwater
@ 2010-08-31 12:14       ` Philipp Gesang
  2010-08-31 13:03       ` Martin Schröder
  1 sibling, 0 replies; 11+ messages in thread
From: Philipp Gesang @ 2010-08-31 12:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1985 bytes --]

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

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: questions regarding `\date`
  2010-08-31 11:41     ` Taco Hoekwater
  2010-08-31 12:14       ` Philipp Gesang
@ 2010-08-31 13:03       ` Martin Schröder
  1 sibling, 0 replies; 11+ messages in thread
From: Martin Schröder @ 2010-08-31 13:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2010/8/31 Taco Hoekwater <taco@elvenkind.com>:
> 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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-08-31 13:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-28 14:02 questions regarding `\date` Paul Menzel
2010-08-28 18:54 ` Wolfgang Schuster
2010-08-28 19:02   ` Peter Münster
2010-08-28 19:10     ` Wolfgang Schuster
2010-08-28 20:51     ` Wolfgang Schuster
2010-08-29 10:17     ` Wolfgang Schuster
2010-08-31  8:29 ` Paul Menzel
2010-08-31  9:48   ` Philipp Gesang
2010-08-31 11:41     ` Taco Hoekwater
2010-08-31 12:14       ` Philipp Gesang
2010-08-31 13:03       ` Martin Schröder

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).