latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
239 stars 28 forks source link

Redefines text commands with old font encodings. #519

Closed tail-reversion closed 5 years ago

tail-reversion commented 5 years ago

Description

Loading unicode-math causes some text commands to change from the TU font encoding. For example, \textlangle and \textrangle revert to the TS1 font encoding.

Add info or delete as appropriate:

-[X] Relevant for XeTeX -[X] Relevant for LuaTeX -[X] Issue tracker has been searched for similar issues?

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{unicode-math}
\show\textlangle

Further details

I’m using TeX Live 2018, so there’s a possibility something has changed, and this no longer happens.

eg9 commented 5 years ago

It would be nicer if the answer from \show\textlangle were \TU-cmd \textlangle \TU\textlangle.

On the other hand, this is innocuous and is due to how definitions done with \DeclareTextSymbol work. Indeed, if you try

\documentclass{article}
\usepackage{unicode-math}

\begin{document}

\expandafter\let\csname TS1\string\textlangle\endcsname\thisshouldbeundefined

\textlangle

\fontencoding{TS1}\selectfont\textlangle

\end{document}

you only get an error for the second call of \textlangle. The first one, done when the current encoding is TU, actually performs \TU\textlangle.

tail-reversion commented 5 years ago

Ah, ok. That also explains why using pdfx also appears to cause an encoding change to text commands. In that case, there’s no issue here :-)