[NTG-context] Bug in math: version

Alan Braslau braslau.list at comcast.net
Thu Feb 14 16:42:15 CET 2019


On Thu, 14 Feb 2019 13:02:21 +0100
Hans Hagen <j.hagen at xs4all.nl> wrote:

> On 2/13/2019 7:12 PM, Alan Braslau wrote:
> > Not just the latest beta ... and indeed according to the TeXbook this should be a vertical double bar (\Vert), in math mode.
> > 
> > I wish to point out that | in text font (text mode) is different from | in math font (math mode). I noticed that Preview (on the mac) *fails* to render the math font $|$ whereas \| in text mode does get rendered in Preview or printed from Preview (my document used dejavu fonts). Other pdf renderers on the mac (acroread, mupdf, evince, ...) are OK. This is clearly a bug in Preview.
> > 
> > How, other then \|, should one produce | in *text* mode?  
> does \textbar work?

Now, this is really interesting

\starttext
\textbar x\textbar
\stoptext

produces |x| as seen by acroread, mupdf, evince, ... on the Mac
BUT shows | | with preview and with skim (which uses the Apple pdf rendering engine).

Thus, the Apple *bug* is perverse. (Would another Mac user confirm this.)


Using \textbar is fine as a fallback, but much less convenient (and readable) than a shorthand.
Two questions:

1) $\|$ SHOULD produce ‖ according to the TeXbook, so we cannot dispute Knuth's choice.
   \| may be undefined in the bible for textmode,
   but logic would have it also yield ‖ in a text font.

2) I guess | is active in text mode (and used as a delimiter in column specifications,
   for example, i.e. \starttabulate [|l|l|]). I have always felt a bit uncomfortable
   with this, having in a far past come from LaTeX practice where it defined a vertical line.

Our solution in ConTeXt is to use UTF-8 input, so ‖ for a double vertical bar.
Therefore, | SHOULD produce a single vertical bar, thus it should not be active.
Is this possible?
(Also, as a bonus, || should be taken as a ligature.)

Alan


More information about the ntg-context mailing list