[NTG-context] Math literal colon

Hans Aberg haberg-1 at telia.com
Mon Jul 20 18:22:52 CEST 2015


> On 20 Jul 2015, at 17:43, Manuel Blanco <manuelbl at ucm.es> wrote:
> 
> Well, you can make the colon active in math mode and then let it output \colon.
> 
> This is a TeX way, I don't know if there's a ConTeXt way for this:
> 
>    \begingroup\lccode`\~=`\:\lowercase{\endgroup
>      \let~}\colon
>    \mathcode`\:="8000 %

For some reason, the colon in ConTeXt is larger relative LuaTeX.

Also, it seems that “\:” is not used for anything - error in luatex, and empty in context. So it might be used for the infix operator.

— context —
\setupbodyfont[xits,10pt]

\setupformulas[location=left]

\begingroup\lccode`\~=`\:\lowercase{\endgroup
     \let~}\colon
   \mathcode`\:="8000 %

\starttext

The function $f: A → B$, $g\colon A → B$.

\stoptext
—

— luatex —
\begingroup\lccode`\~=`\:\lowercase{\endgroup
     \let~}\colon
   \mathcode`\:="8000 %

The function $f: A → B$.
—



More information about the ntg-context mailing list