[NTG-context] Math literal colon

Hans Hagen pragma at wxs.nl
Fri Jul 24 15:48:55 CEST 2015


On 7/24/2015 3:00 PM, Hans Aberg wrote:
>
>> On 24 Jul 2015, at 11:43, Hans Hagen <pragma at wxs.nl> wrote:
>>
>> On 7/20/2015 6:22 PM, Hans Aberg wrote:
>>>
>>>> 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.
>>
>> you probably mean latex (macro package) here as luatex (engine) itself doesn't do anything
>>
>> keep in mind that context implements much of math in a complete different way, so solutions for problems or wishes are done differently too; in this case we try to use unicode and some lua magic instead of character juggling at the tex end
>>
>> we also need to keep in mind that characters have to behave well in tagged pdf and exports and so
>
>
> In the examples I mentioned (below), running ‘context’ on the first produces large colons, whereas ‘luatex’ on the second does not. The latter looks right to me.

define 'luatex' ... it's all about choices that macro packages make (or 
made in the past)

> There is a similar issue with integral symbols, where somehow ConTeXt add additional spacing after it.
>    http://www.ntg.nl/pipermail/ntg-context/2015/082541.html
>
>
> — 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$.

we could add a mathsymbol entry but I leave that to Aditya to decide

  {
   adobename="colon",
   category="po",
   cjkwd="na",
   description="COLON",
   direction="cs",
   linebreak="is",
   mathclass="relation",
--mathsymbol=0x2236,
   unicodeslot=0x3A,
  },

> \stoptext
>>
> — luatex —
> \begingroup\lccode`\~=`\:\lowercase{\endgroup
>       \let~}\colon
>     \mathcode`\:="8000 %
>
> The function $f: A \to B$.
>
> \end
>>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at 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
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list