ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Sietse Brouwer <sbbrouwer@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: A problem with autopunctuation
Date: Tue, 4 Dec 2012 13:58:36 +0100	[thread overview]
Message-ID: <CAF=dkzyO==S1uyQ6ML1eQ+Wm=chginP0eP7auOaMcu_FDD0Kfw@mail.gmail.com> (raw)
In-Reply-To: <CAF=dkzz0LsZh7RbB-FUFKEGsLJJ1P+M--TpKj8iLwykRtx2yKw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1772 bytes --]

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 #2: punctuation-001.pdf --]
[-- Type: application/pdf, Size: 8585 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 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
___________________________________________________________________________________

  reply	other threads:[~2012-12-04 12:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-03  0:45 Marcin Borkowski
2012-11-04 21:11 ` Wolfgang Schuster
2012-11-04 21:38   ` Aditya Mahajan
2012-11-04 22:03     ` Marcin Borkowski
2012-11-30 12:51       ` Sietse Brouwer
2012-11-30 12:58         ` Sietse Brouwer
2012-12-04 12:58           ` Sietse Brouwer [this message]
2012-11-03 19:04 Andres Conrado
2012-11-03 20:15 ` Marcin Borkowski
2012-11-04 10:04   ` Wolfgang Schuster
2012-11-04 21:00     ` Marcin Borkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF=dkzyO==S1uyQ6ML1eQ+Wm=chginP0eP7auOaMcu_FDD0Kfw@mail.gmail.com' \
    --to=sbbrouwer@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).