Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s4K2DJYp023917 for ; Tue, 20 May 2014 04:13:20 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx105) with ESMTPS (Nemesis) id 0LvyyX-1Wq1Z62lor-017jtr for ; Tue, 20 May 2014 04:13:13 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s4K29rTA012809 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 May 2014 04:09:53 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s4K0ect3016054; Tue, 20 May 2014 04:09:53 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11006157 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 20 May 2014 04:09:53 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s4K29qlK022814 for ; Tue, 20 May 2014 04:09:52 +0200 Received: from mail-oa0-f53.google.com (mail-oa0-f53.google.com [209.85.219.53]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s4K29axc012708 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Tue, 20 May 2014 04:09:39 +0200 Received: by mail-oa0-f53.google.com with SMTP id m1so7061717oag.26 for ; Mon, 19 May 2014 19:09:35 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.54.228 with SMTP id m4mr39748141oep.29.1400551775433; Mon, 19 May 2014 19:09:35 -0700 (PDT) Received: by 10.76.154.133 with HTTP; Mon, 19 May 2014 19:09:35 -0700 (PDT) Content-Type: multipart/alternative; boundary=089e0115ffc6107c5104f9cb5fbc Message-ID: Date: Tue, 20 May 2014 11:39:35 +0930 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Unicode math To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:+vRBBbGvdU8=:bWuf/O+DhMCDMrg8O35WR2htZx 3dQ38rsZxFG++Q0dBHsl69ydJZJWZ4S3Jcx8E2DEBB35o0rTo47YirbOhKvME6fKcy5UcEWJd OkErUy7T99XSQG3zaFE+7XVr2LKb7iMgnLokhTVURx5NIOFthP1k2O0fp6F7atHuqxqEEPrAP tf1qm4pewh9MI2ZUG5QA8ccTcSDztCwnwMa8hNnMoJbPmJQOntWAzlA6Wi8Iah+CgFVIcAhpr CkeuKiThrMaBvtu9wnkOK7YQ8gb+jywCAM8UUICBVDByQ7HzPgw2pbbjFvdF60mOoR4Y8SZGu gUz8ma/o3fVTa0jc9PL81Ixra4t+IHKjLE4Ec8pF7VsmSwL68A9vExxMz5tTNIAJBh0rozfNU nJPBVg88pQu5pnWJmQPB+LJxw68A+eEfscIMTP2nXUPKzO61GKs0Qfh2OUQTyODA7N7JGAqnw 975eFtxMZDLFCLD8RSwYM4G+7dTUeBg8nUfhJwisVZLLIShFta02lM8r+6S+IT3FSyoUrmSlh SDVQ/oMatzuES8097SH5FBz5bfW0yRe83OGqeHcRi/XaWHF8JNZaZqL8gU2SUFdi//mL3ekzc R+CkiHkcoc8ta8R9MdP1ksKRga9oIKMDnxHKYUz14bgCX93mCyMQuR7GSTG40nB9eWC41/e8w 52ccSYFuyVoaUbdCz/6PXLhYKxBwbNDJaBI/fTKhnRKSm+3BcSfawLDZ92MQhs2X4inR/I15H JqFNeSWAVxXqB7GHmLK79u+CkiwwUdC6edzf8jlc5WXnzgLrsQeUx8my/pniZ5BlKOxBZY4jo x3Wesl4Ya7PJeUVx+zd7RkmRb8u8Mv6gA5R/1RwA3uNghlzDxsBna8ConI60RMx5j55A95tRM RpmpVGgE5fghhTE34srh0r31lhBMv2bhxnXwezFyhpCB901irrvj6Y6lCKefvLW0TrU1cuI+r rylc2y7bmdWJmajb50h21tAYj/d2BNKcoExO91LBKnkTadqoztLyNpEQaXoZ0V4trKZ9nWp2S GIdPiSkpz6qRHdC0ImpAXMabA30BYNqoFPLjzI2XOqs6UqAMwJ3dh1jz60k8Z3XO6eh8o+7sd wJjdfXuWMyHRQBTnCXO4xAxs9X2zhQJ1+SXqQlfk2aOLv3CXFq5S7yvxdq0Z/l+PJR5zlbxnw ylpJlMapK7UKg5QG0BlIil/bsPDUhwuInREx8Dt3UVQHJwrghV34jeyGcUp/TojEvr1XVCyNS 9YCqvnwul0NRQUmlZ9haW/ZSJa9GxG4HiXWlZZ03s4sUmao9PFWsxYwsLpZQyRykH7UI1b785 p4QzQA0ZCwIGupIF3aJAfGXySjMUvV5qmGzM8IoZQ/w9FHsqv4yEeo3T3I4mUWmNW2uLSqVBL y5eXK+vkTGIvDM04YSH8yc+BlfzC/5IGzZW6B+gd7Bzdb1B5gXoE7IGi0MjxYwZ2NQxHSJP8W H75SZsPKokdPLuQglLl7OEulNEAm48J2TxNSYtj4hjqv/96vsGP8K5cSdCGrZXP8Pmj2hO57p j9thhEh7GqNGTBl1qCYxyL8PvDUjA5Tk8WJceVJw6 X-UI-Loop:V01:iBWG1teXnZo=:E81IhlMPRpPOmE/SroiVKm0WB89tVbI0bK4ZEYxFAUY= Status: R X-Status: X-Keywords: X-UID: 7410 --089e0115ffc6107c5104f9cb5fbc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear all, I'm writing to continue some recent discussions in other forums on unicode math and how: * unicode-math.sty current (incorrectly) deals with it, and * how we envisage official support for unicode math in LaTeX into the future. * * * In short, here's the issue as I see it. LaTeX has a default maths font plus families such as \mathrm, \mathit, and \mathbf to choose new alphabets. These maths fonts are expressly and strictly only allowed to be text fonts, contrary to their name. This allows people to write things like \mathit{Re} for Reynolds number and \mathbf{Set} in category theory (thanks David C for the example). The \mathbf command in particular has been abused in physics to denote vectors and matrices, such as \mathbf{B} for magnetic field. I suspect the situation is similar for sans math, with tensors using sans on occasion but no doubt in other contexts used for multi-letter identifiers. (Examples more than welcome; in fact, requested.) In contrast, Unicode math defines a number of alphabets in a single Unicode font, including mathematical italic and bold mathematical italic and many more variations. In OpenType maths fonts to date, these symbols are all designed as single-letter identifiers and not to be used for strings of characters such as "Re" in italic or "Set" in bold. So originally unicode-math simply mapped the unicode alphabets onto the LaTeX commands (with nice options and so on for choosing your style of bold and ensuring greek "just works"), and while all the style options and normalisation were nice and work (IMO) well, the choice of overwriting \mathbf and so on has led to obvious problems. * * * I'd first like to apologise for the inconvenience that unicode-math has caused up until this point -- I do hope to "fix" it soon, whatever "fix" means now. The rest of this email is largely a summary of approach taken by unicode-math and how it can be fixed, expressed in plain (Unicode-)TeX (see attached and run it through XeTeX; you'll need Linux Libertine installed but feel free to replace it with any font with both roman and greek text glyphs). 0. Colours are used to ensure what you're seeing is correct and not a side-effect of the underlying Plain math machinery. 1. \mathbf and friends go back to simply selecting a text font. Note that they still need to remap \mathcode{}s in this case because normal unicode math glyphs exist all the way up in Plane 1 where text fonts daren't to tread. 2. Greek input into \mathbf and friends does "work" -- if what you were after were Greek letters from a text font. 3. To get proper bold symbols, including Greek, we'll need a whole new set of commands. These will need sensible names of some sort. Below I've chosen \symbf, etc., which doesn't look too bad to me. 4. If how I've implemented unicode-math looks wrong to you, I'd appreciate suggestions :) Switching \mathcode{}s like this isn't super fun but * doesn't seem too slow, and * I'm not aware of anything else flexible and cross-platform enough that will work instead. 5. I'm largely happy to make a breaking change to unicode-math.sty itself, but comments on whether an "overwrite" mode which functions as the package currently does would be sensible as a long term thing would be appreciated. IMO, it doesn't make much sense to have a separate text font that is only used for bold math identifiers that aren't real single-letter symbols -- in such cases it would surely be sensible to use (perhaps a variation on) \textbf. Best regards, Will \newfam\bfmathfam \newfam\itmathfam \font\rm =3D "Linux Libertine O:color=3D000000" at 10pt\relax \font\bf =3D "Linux Libertine O Bold:color=3D0000FF" at 10pt\relax \font\it =3D "Linux Libertine O Italic:color=3D00AA00" at 10pt\relax \font\mm =3D "[latinmodern-math.otf]:color=3DFF0000" at 10pt\relax \textfont\bfmathfam\bf \textfont\itmathfam\it \textfont1\mm \def\alpha{=CE=B1} \def\beta{=CE=B2} \def\gamma{=CE=B3} \def\codemathhigh{% \Umathcode`\a =3D 7 1 "1D44E\relax \Umathcode`\b =3D 7 1 "1D44F\relax \Umathcode`\c =3D 7 1 "1D450\relax \Umathcode"03B1 =3D 7 1 "1D6FC\relax \Umathcode"03B2 =3D 7 1 "1D6FD\relax \Umathcode"03B3 =3D 7 1 "1D6FE\relax } \def\codemathlow{% \Umathcode`\a =3D 7 1 `\a\relax \Umathcode`\b =3D 7 1 `\b\relax \Umathcode`\c =3D 7 1 `\c\relax \Umathcode"03B1 =3D 7 1 "03B1\relax \Umathcode"03B2 =3D 7 1 "03B2\relax \Umathcode"03B3 =3D 7 1 "03B3\relax } \def\codemathsymbf{% \Umathcode`\a =3D 7 1 "1D41A\relax \Umathcode`\b =3D 7 1 "1D41B\relax \Umathcode`\c =3D 7 1 "1D41C\relax \Umathcode"03B1 =3D 7 1 "1D6C2\relax \Umathcode"03B2 =3D 7 1 "1D6C3\relax \Umathcode"03B3 =3D 7 1 "1D6C4\relax } \def\mathit#1{{\codemathlow\fam\itmathfam #1}} \def\mathbf#1{{\codemathlow\fam\bfmathfam #1}} \def\symbf#1{{\codemathsymbf #1}} \parindent=3D0pt\relax \hsize=3D6cm\relax \hrule \bigskip \rm \codemathhigh Regular symbols: $$ a + b + c \quad \alpha + \beta + \gamma $$ Bold and italic math families: $$ \mathit{abc\alpha\beta\gamma} \quad \mathbf{abc\alpha\beta\gamma} $$ Bold math symbols: $$ a+b+c \quad \symbf{a+b+c} $$ $$ \alpha + \beta + \gamma \quad \symbf{\alpha + \beta + \gamma} $$ \bye --089e0115ffc6107c5104f9cb5fbc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Dear all,

I'm writing to continue s= ome recent discussions in other forums on unicode math and how:
*= unicode-math.sty current (incorrectly) deals with it, and=C2=A0
= * how we envisage official support for unicode math in LaTeX into the futur= e.

* * *

In short, here'= s the issue as I see it.

LaTeX has a default maths= font plus families such as \mathrm, \mathit, and \mathbf to choose new alp= habets. These maths fonts are expressly and strictly only allowed to be tex= t fonts, contrary to their name. This allows people to write things like \m= athit{Re} for Reynolds number and \mathbf{Set} in category theory (thanks D= avid C for the example).

The \mathbf command in particular has been abused in ph= ysics to denote vectors and matrices, such as \mathbf{B} for magnetic field= . I suspect the situation is similar for sans math, with tensors using sans= on occasion but no doubt in other contexts used for multi-letter identifie= rs. (Examples more than welcome; in fact, requested.)

In contrast, Unicode math defines a number of alphabets= in a single Unicode font, including mathematical italic and bold mathemati= cal italic and many more variations. In OpenType maths fonts to date, these= symbols are all designed as single-letter identifiers and not to be used f= or strings of characters such as "Re" in italic or "Set"= ; in bold.

So originally unicode-math simply mapped the unic= ode alphabets onto the LaTeX commands (with nice options and so on for choo= sing your style of bold and ensuring greek "just works"), and whi= le all the style options and normalisation were nice and work (IMO) well, t= he choice of overwriting \mathbf and so on has led to obvious problems.

* * *

I'd first like to ap= ologise for the inconvenience that unicode-math has caused up until this po= int -- I do hope to "fix" it soon, whatever "fix" means= now. The rest of this email is largely a summary of approach taken by unic= ode-math and how it can be fixed, expressed in plain (Unicode-)TeX (see att= ached and run it through XeTeX; you'll need Linux Libertine installed b= ut feel free to replace it with any font with both roman and greek text gly= phs).

0. Colours are used to ensure what you're see= ing is correct and not a side-effect of the underlying Plain math machinery= .

1. \mathbf and friends go back to simply selecti= ng a text font. Note that they still need to remap \mathcode{}s in this cas= e because normal unicode math glyphs exist all the way up in Plane 1 where = text fonts daren't to tread.

2. Greek input into \mathbf and friends does "work= " -- if what you were after were Greek letters from a text font.
=

3. To get proper bold symbols, including Greek, we'= ll need a whole new set of commands. These will need sensible names of some= sort. Below I've chosen \symbf, etc., which doesn't look too bad t= o me.

4. If how I've implemented unicode-math looks wrong= to you, I'd appreciate suggestions :) Switching \mathcode{}s like this= isn't super fun but
* doesn't seem too slow, and
* I'm not aware of anything else flexible and cross-platform enoug= h that will work instead.

5. I'm largely happy= to make a breaking change to unicode-math.sty itself, but comments on whet= her an "overwrite" mode which functions as the package currently = does would be sensible as a long term thing would be appreciated. IMO, it d= oesn't make much sense to have a separate text font that is only used f= or bold math identifiers that aren't real single-letter symbols -- in s= uch cases it would surely be sensible to use (perhaps a variation on) \text= bf.

Best regards,
Will

<= div>\newfam\bfmathfam
\newfam\itmathfam

= \font\rm =3D "Linux Libertine O:color=3D000000" at 10pt\relax
\font\bf =3D "Linux Libertine O Bold:color=3D0000FF" at 10pt= \relax
\font\it =3D "Linux Libertine O Italic:color=3D00AA00= " at 10pt\relax
\font\mm =3D "[latinmodern-math.otf]:co= lor=3DFF0000" at 10pt\relax

\textfont\bfmathfam\bf
\textfont\itmathfam\it=
\textfont1\mm

\def\alpha{=CE=B1}
<= div>\def\beta{=CE=B2}
\def\gamma{=CE=B3}

\def\codemathhigh{%
=C2=A0\Umathcode`\a =3D 7 1 "1D44E\relax
=C2=A0\Umathco= de`\b =3D 7 1 "1D44F\relax
=C2=A0\Umathcode`\c =3D 7 1 "= ;1D450\relax
=C2=A0\Umathcode"03B1 =3D 7 1 "1D6FC\relax=
=C2=A0\Umathcode"03B2 =3D 7 1 "1D6FD\relax
=C2=A0\Umathcode"03B3 =3D 7 1 "1D6FE\relax
}
=
\def\codemathlow{%
=C2=A0\Umathcode`\a =3D 7 1 `\a\relax
=C2=A0\Umathcode`\b =3D 7 1 `\b\relax
=C2=A0\Umathcode`\c = =3D 7 1 `\c\relax
=C2=A0\Umathcode"03B1 =3D 7 1 "03B1\relax
=C2=A0\Umathc= ode"03B2 =3D 7 1 "03B2\relax
=C2=A0\Umathcode"03B3= =3D 7 1 "03B3\relax
}
\def\codemathsymbf{%
<= div>=C2=A0\Umathcode`\a =3D 7 1 "1D41A\relax
=C2=A0\Umathcode`\b =3D 7 1 "1D41B\relax
=C2=A0\Umathco= de`\c =3D 7 1 "1D41C\relax
=C2=A0\Umathcode"03B1 =3D 7 = 1 "1D6C2\relax
=C2=A0\Umathcode"03B2 =3D 7 1 "1D6C= 3\relax
=C2=A0\Umathcode"03B3 =3D 7 1 "1D6C4\relax
}

\def\mathit#1{{\codemathlow\fam\itmathfam #= 1}}
\def\mathbf#1{{\codemathlow\fam\bfmathfam #1}}
\def= \symbf#1{{\codemathsymbf #1}}

\parindent=3D0pt\rel= ax
\hsize=3D6cm\relax
\hrule
\bigskip

<= /div>
\rm
\codemathhigh

Regular symb= ols:
$$
=C2=A0a + b + c \quad \alpha + \beta + \gamma
$$
Bold and italic math families:
$$
=C2= =A0\mathit{abc\alpha\beta\gamma} \quad \mathbf{abc\alpha\beta\gamma}
<= div>$$
Bold math symbols:
$$
=C2=A0a+b+c \qua= d \symbf{a+b+c}
$$
$$
=C2=A0\alpha + \beta + \gamma \quad \symbf{\= alpha + \beta + \gamma}
$$

\bye
--089e0115ffc6107c5104f9cb5fbc--