aliftype/xits

Add missing subscript letters

phile314 opened this issue · 6 comments

XITS Math 7.1 is missing some of the subscript letters. It supports a,e,u,o,r,u,x. Missing are h,j,k,l,m,n,o,s,t.

Example tex file:

\documentclass{article}
\usepackage{agda}
\setmathfont{xits-math.otf}


\begin{document}
a $xₐ$\\
e $xₑ$\\
h $xₕ$\\
i $xᵢ$\\
j $xⱼ$\\
k $xₖ$\\
l $xₗ$\\
m $xₘ$\\
n $xₙ$\\
o $xₒ$\\
p $xₚ$\\
r $xᵣ$\\
s $xₛ$\\
t $xₜ$\\
u $xᵤ$\\
x $xₓ$\\
\end{document}

Resulting pdf when rendered with xelatex: http://files.314.ch/Test.pdf

See also https://en.wikipedia.org/wiki/Superscripts_and_Subscripts and http://www.unicode.org/charts/PDF/U2070.pdf

What do you need them for? They are certainly not needed/used for math layout.

The Agda programming language supports unicode for identifiers. This end up in Latex code, because
there is a special literate Agda mode which allows mixing Agda code with latex. This can be exported to a proper Latex file with highlighting information for the Agda code.

Small literate Agda example (note the begin/end{code} commands):

.... snip ...
\begin{document}
\begin{code}
id : A → A
id xₕ = xₕ
\end{code}
\end{document}

This then gets translated into the following Latex code:

.... snip ...
\begin{document}
\begin{code}
... snip ....
\>\AgdaFunction{id} \AgdaBound{xₕ} \AgdaSymbol{=} \AgdaBound{xₕ}
... snip ....
\end{code}
\end{document}

There are some Agda* helper functions used here, but basically the xₕ name ends up being used in math mode.

It's quite common to use subscripts in the Agda programming language. There are some workarounds, but from my point of view adding the subscripts to XITS Math would be the best option.

asr commented

There are some workarounds, but from my point of view adding the subscripts to XITS Math would be the best option.

👍

This is actually an issue with the unicode-math package, because XITS Math does not contain any of these subscript characters at all (they are used in linguistics not math, and also math requires arbitrary subscript support). What is happening is that unicode-math maps Unicode subscript and superscript characters to the equivalent LaTeX commands, so $xₐ$ is mapped to $x_a$, but it seems to base its mapping table to an old version of Unicode and the missing ones are relatively new additions to Unicode. As such I don’t think there anything to fix here.

Thank you for your help, I will give that a go then.