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: Fri, 30 Nov 2012 13:51:57 +0100	[thread overview]
Message-ID: <CAF=dkzyq_UV4BUeV1KCTqUcJ55sZ1_qcrGVnN62Bq=G30f+pLw@mail.gmail.com> (raw)
In-Reply-To: <20121104230354.4bda9aa3@aga-netbook>

Reviving this thread, because MkIV's default behaviour is still
improper. The current default of always adding a space after periods
*and* commas is expected by nobody, I think. Revival prompted by a
recent tex.se question:
http://tex.stackexchange.com/questions/84911/number-kerning-in-context-math-mode-is-different-and-worse-than-normal/84947#84947

I've set out the behaviour below; A --> B means 'A displays as B'.
MkIV should probably follow either MkII, or the behavior Aditya and
Marcin proposed.
(Actually, even if we choose MkII behavior, it would be nice to have
the latter available, too. Maybe as an option autopunctuation=user? It
would require someone to hack respace[math_char] in math-noa.lua,
though.)
Cheers,
Sietse

== This is MkIV's behaviour ==

Spaces are ignored.

\setupmathematics[autopunctuation=no] (the default)
2,5 --> 2, 5
2.5 --> 2. 5

\setupmathematics[autopunctuation=yes]
2,5 --> 2,5
2.5 --> 2.5

Spaces are ignored.

== This is MkII's behaviour ==

Spaces are ignored.

Without \enablemathpunctuation (no \disablemathpunctuation):
% default TeX behaviour
2.5 or 2. 5 --> 2.5
2,5 --> 2, 5

\enablemathpunctuation:
2.5 --> 2.5
2,5 --> 2,5

== This would be really nice ==
See Aditya and Marcin's mails, further up this thread.
http://www.mail-archive.com/ntg-context@ntg.nl/msg66306.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg66307.html

Spaces are significant.

\setupmathematics[autopunctuation=no]
% standard TeX behaviour
2,5 --> 2, 5
2, 5 --> 2, 5
2.5 --> 2.5
2. 5 --> 2.5

\setupmathematics[autopunctuation=yes]
% user controls spacing without needing to type 2,\, 5 all the time
% decimal-mark agnostic
% but especially when the decimal mark is a comma
2,5 --> 2,5
2, 5 --> 2, 5
2.5 --> 2.5
2. 5 --> 2. 5
___________________________________________________________________________________
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-11-30 12:51 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 [this message]
2012-11-30 12:58         ` Sietse Brouwer
2012-12-04 12:58           ` Sietse Brouwer
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=dkzyq_UV4BUeV1KCTqUcJ55sZ1_qcrGVnN62Bq=G30f+pLw@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).