[NTG-context] Unicode mathematics in ConTeXt

Hamid,Idris Idris.Hamid at ColoState.EDU
Fri May 3 21:40:07 CEST 2019


Dear gang,

Ok, I've made some progress:

1. tex-gyre etc. *do* support Unicode mathematics, but the version of  
ConTeXt I was using had produced the wrong encoding in the pdf output. For  
example, U+1D4D2 (๐“’) in the input was being mapped to U+2D4D2 in the  
output.

Updating to the latest beta appears to have fixed this issue.

2. tex-gyre etc. appears to be missing some superscript characters, e.g.,  
โฟ (U+207F).

3. New example:

=======
\setupbodyfont
   [cambria,12pt]
   % [pagella,12pt]
   % [times,12pt]

% \starttext
\startTEXpage
\def\ANTI{{^{\rm nt}}}
\def\ANTIU{{^{\rm โฟแต—}}}

\def\CATCA{$\cal \bf C\ANTI$}
\def\CATCAU{$๐“’\ANTIU$}

๐“’ \CATCA \CATCAU
\stopTEXpage
% \stoptext
=======

\CATCAU and \ANTIU use Unicode characters and superscripts directly,  
instead of the old TeX method.

4. Issues. In the pdf output of \CATCAU:
i)   Why does ConTeXt make the second superscript larger than the first?
ii)  If one copies the text of the pdf output to an editor - even this  
email client - the second superscript moves to a new line:

๐“’ โฟ
t

Why does this happen? Is this a bug?

5. Here is what we want: ๐“’ โฟแต—

What is the proper or best way to get a character-superscript combination  
in ConTeXt whose output can be copied and pasted to an editor and give the  
correct result? What am I missing?

Thank you in advance.

Best wishes
Idris

On Wed, 01 May 2019 14:58:06 -0600, Hamid,Idris  
<Idris.Hamid at colostate.edu> wrote:

> Dear gang,
>
> I need to convert a document from TeX-style to Unicode mathematics. For
> example:
>
> \starttext
> \def\ANTI{{^{\rm nt}}}
> \def\CATCA{$\cal \bf C\ANTI$}
>
> \CATCA
> \stoptext
>
> Issues:
>
> 1. I need calligraphic characters, but the relevant characters in
> latinmodern-math.otf are not encoded in (standard) Unicode. The same goes
> for the tex-gyre-math fonts.
>
> 2. What comprehensive unicode-math fonts do you recommend as an
> alternative?
>
> 3. In the above example, \cal is used.
>
> 4. Other issues may arise, e.g., getting subscripts and superscripts
> correct. How might one rewrite the above with Unicode mathematics in  
> mind?
> Is there a My Way or some other guide to Unicode mathematics in ConTeXt?
>
> This writer has never had to think about this matter before so this is  
> all
> new ground to learn. Thank you in advance for any guidance.
>
> Best wishes
> Idris


-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scratch.pdf
Type: application/pdf
Size: 85921 bytes
Desc: scratch.pdf
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190503/0cc683e2/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scratch.tex
Type: application/x-tex
Size: 315 bytes
Desc: scratch.tex
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190503/0cc683e2/attachment-0001.tex>


More information about the ntg-context mailing list