From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/104201 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Unicode mathematics in ConTeXt Date: Sat, 4 May 2019 12:32:19 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2067752442327939749==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="133341"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/6.1.15 To: mailing list for ConTeXt users , "Hamid,Idris" Original-X-From: ntg-context-bounces@ntg.nl Sat May 04 12:32:34 2019 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hMry4-000YVo-5W for gctc-ntg-context-518@m.gmane.org; Sat, 04 May 2019 12:32:32 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C2ABA132F0C; Sat, 4 May 2019 12:32:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P6bOfDp5_Mhf; Sat, 4 May 2019 12:32:08 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2D469132F09; Sat, 4 May 2019 12:32:08 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1196D132F06 for ; Sat, 4 May 2019 12:32:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LUMteo9jWFb5 for ; Sat, 4 May 2019 12:32:06 +0200 (CEST) Original-Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 2BB37132E0E for ; Sat, 4 May 2019 12:32:06 +0200 (CEST) Original-Received: by mail-wr1-f52.google.com with SMTP id e28so10957225wra.0 for ; Sat, 04 May 2019 03:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=1/qGRk/d0ZJDzPtVm4U/pP8/F3q1yB4Czd5rYT1o+vk=; b=AGRJso1JK2h8aUTQKlsIwdtoweZndTDyIbmIyPAp0ZsgHZ5J/bb1Lcx9QkCWWROhnr OID4RNFoUby2a/zBHRS988eURtlQi+926jdYqQPzbAgAIQq6MhebEsrKm5tqeJMfHAUb PkZgqd/UWExGAegu7ep7jhbjrzVq7UL+MMjrMfrDInKWmGdl8I7YaAkAzPDtmD5+peJD qWujWoTlYWJaPncdFb+C8ULiom3lWLyYHaAq3dAzC30sLqTZcmOMg3xVwtiUBtpCHSk+ /Fo7Mz6cYiXO/N9wiaqY2zwpzSeQnAFgmfl4Ojdx/6KZz+2w81lsryiaRRIc+P0Y1Qf7 9Eew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=1/qGRk/d0ZJDzPtVm4U/pP8/F3q1yB4Czd5rYT1o+vk=; b=VLcf1bOhKtVu2qPZZIGvzp4tG6xX81eRTXHOOI9AUVR6CmkPAVdig18Z1WmUL4qQGL uhf3Ospu9Gh5qMp2k+ZBKsbFa0E3wlnNPnAAES2SjspkjCBKExlo4WnA9BmYs8fC3XJc J5P12peGovdU0E2uYNJdebToBfLUe8knKDnxov4EMk9puSs5jeWpy8TcF3PAm1NlZ/Ko ov2nbaf53GtlEv+MGAgkZHYyyvbUA6qsQJafi9/e7FPMSp9DJhRww1+LhwfntVo1cFb7 maSjf2PYH5zaxdlajeJndmWpPrrjuOEzyye/noFBywRMeKbvZp3JcUHABy2y14Fjq2FR icnw== X-Gm-Message-State: APjAAAVT9mjR2j6XxIdCW/Lf+arQH6KNVxzjSza8cM6XBpjNw61Ru3YW 22kW/PaBPyzNLglzX3vCdf4= X-Google-Smtp-Source: APXvYqzimadf6TTMYMCucN4fz90JNUKxCLAREZp9BXBYPYlYgLu1BBLhi94xfxXorWKxdnR/OxvljQ== X-Received: by 2002:adf:9301:: with SMTP id 1mr6796434wro.231.1556965925448; Sat, 04 May 2019 03:32:05 -0700 (PDT) Original-Received: from [192.168.1.16] (x4d027d69.dyn.telefonica.de. [77.2.125.105]) by smtp.gmail.com with ESMTPSA id b184sm6584774wmh.17.2019.05.04.03.32.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 May 2019 03:32:04 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:104201 Archived-At: This is a multi-part message in MIME format. --===============2067752442327939749== Content-Type: multipart/alternative; boundary="------------EDDB99137FD9AABE3CA2FB19" Content-Language: en-US This is a multi-part message in MIME format. --------------EDDB99137FD9AABE3CA2FB19 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 > 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 > ___________________________________________________________________________________ --------------EDDB99137FD9AABE3CA2FB19 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit 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
___________________________________________________________________________________

--------------EDDB99137FD9AABE3CA2FB19-- --===============2067752442327939749== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============2067752442327939749==--