Hi, all,

Hans has done some work on autopunctuation which made it into
yesterday's beta (2012.12.03 11:33). This includes a 'set it like I
type it' mode people have been asking for.

There are now three options to \setupmathematics[autopunctuation=...]:
* autopunctuation=no — default TeX behaviour. Commas get a thin space,
periods get nothing.
* autopunctuation=yes — manual control for commas. Commas followed by
a space get a thin space; periods, and commas followed by something
else, do not.
* autopunctuation=all — like `yes`; and periods, too, get a thin space
unless suppressed

Example code below, example output attached, and the behaviour is documented at
http://wiki.contextgarden.net/Command/setupmathematics

Cheers,
Sietse

\defineparagraphs[asdf][n=3]

\startTEXpage[offset=2mm]

\startasdf
\setupmathematics[autopunctuation=no]
autopunctuation=no

\starttabulate[||||]
\NC input  \NC desired \NC output  \NC \NR
\NC 2,5  \NC 2, 5 \NC $2,5$  \NC \NR
\NC 2, 5 \NC 2, 5 \NC $2, 5$ \NC \NR
\NC 2.5  \NC 2.5  \NC $2.5$  \NC \NR
\NC 2. 5 \NC 2.5  \NC $2. 5$ \NC \NR
\stoptabulate

\asdf
\setupmathematics[autopunctuation=yes]
autopunctuation=yes

\starttabulate[||||]
\NC input  \NC desired \NC output  \NC \NR
\NC 2,5  \NC 2,5  \NC $2,5$  \NC \NR
\NC 2, 5 \NC 2, 5 \NC $2, 5$ \NC \NR
\NC 2.5  \NC 2.5  \NC $2.5$  \NC \NR
\NC 2. 5 \NC 2.5  \NC $2.5$  \NC \NR
\stoptabulate

\asdf
\setupmathematics[autopunctuation=all]
autopunctuation=all

\starttabulate[||||]
\NC input  \NC desired \NC output  \NC \NR
\NC 2,5  \NC 2,5  \NC $2,5$  \NC \NR
\NC 2, 5 \NC 2, 5 \NC $2, 5$ \NC \NR
\NC 2.5  \NC 2.5  \NC $2.5$  \NC \NR
\NC 2. 5 \NC 2. 5 \NC $2. 5$ \NC \NR
\stoptabulate
\stopasdf

\stopTEXpage

Attachment: punctuation-001.pdf
Description: Adobe PDF document

___________________________________________________________________________________
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