* Unicode mathematics in ConTeXt
@ 2019-05-01 20:58 Hamid,Idris
2019-05-03 19:40 ` Hamid,Idris
0 siblings, 1 reply; 4+ messages in thread
From: Hamid,Idris @ 2019-05-01 20:58 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]
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
[-- Attachment #2: scratch.pdf --]
[-- Type: application/pdf, Size: 7706 bytes --]
[-- Attachment #3: scratch.tex --]
[-- Type: application/x-tex, Size: 86 bytes --]
[-- Attachment #4: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Unicode mathematics in ConTeXt
2019-05-01 20:58 Unicode mathematics in ConTeXt Hamid,Idris
@ 2019-05-03 19:40 ` Hamid,Idris
2019-05-04 10:32 ` Wolfgang Schuster
0 siblings, 1 reply; 4+ messages in thread
From: Hamid,Idris @ 2019-05-03 19:40 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 2589 bytes --]
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@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
[-- Attachment #2: scratch.pdf --]
[-- Type: application/pdf, Size: 85921 bytes --]
[-- Attachment #3: scratch.tex --]
[-- Type: application/x-tex, Size: 315 bytes --]
[-- Attachment #4: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Unicode mathematics in ConTeXt
2019-05-03 19:40 ` Hamid,Idris
@ 2019-05-04 10:32 ` Wolfgang Schuster
2019-05-04 11:35 ` Hamid,Idris
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2019-05-04 10:32 UTC (permalink / raw)
To: mailing list for ConTeXt users, Hamid,Idris
[-- Attachment #1.1: Type: text/plain, Size: 3146 bytes --]
Hi Idris,
please read this: https://www.w3.org/TR/unicode-xml/#Superscripts
Wolfgang
Hamid,Idris schrieb am 03.05.2019 um 21:40:
> 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@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
>
>
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 4057 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Unicode mathematics in ConTeXt
2019-05-04 10:32 ` Wolfgang Schuster
@ 2019-05-04 11:35 ` Hamid,Idris
0 siblings, 0 replies; 4+ messages in thread
From: Hamid,Idris @ 2019-05-04 11:35 UTC (permalink / raw)
To: mailing list for ConTeXt users, Wolfgang Schuster
On Sat, 04 May 2019 04:32:19 -0600, Wolfgang Schuster
<wolfgang.schuster.lists@gmail.com> wrote:
> Hi Idris,
>
> please read this: https://www.w3.org/TR/unicode-xml/#Superscripts
Many thanks. The issue is clearer now, e.g.,
=======
When used in mathematical context (MathML) it is recommended to
consistently use style markup for superscripts and subscripts. This is
because mathematical layout allows not just individual symbols, but entire
expressions to be superscripted or subscripted in a regular, nested manner.
=======
Of course, consistent use of style markup means that we can't naively
extract superscript text from the pdf, e.g., \CATCA becomes 𝓒nt.
OTOH, issues 4.i and 4.ii below are still perplexing. Are there any
workarounds?
Thanks again.
Best wishes
Idris
> Hamid,Idris schrieb am 03.05.2019 um 21:40:
>> 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@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
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-04 11:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-01 20:58 Unicode mathematics in ConTeXt Hamid,Idris
2019-05-03 19:40 ` Hamid,Idris
2019-05-04 10:32 ` Wolfgang Schuster
2019-05-04 11:35 ` Hamid,Idris
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).