Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using two Unicode subscritps #395

Closed
asr opened this issue Jul 27, 2017 · 12 comments
Closed

Error when using two Unicode subscritps #395

asr opened this issue Jul 27, 2017 · 12 comments

Comments

@asr
Copy link

asr commented Jul 27, 2017

After updating my TeX Live installation running tlmgr update --all, I'm getting the following error:

bug.tex:

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

\begin{document}
\begin{align*}
  r = s₁₂
\end{align*}
\end{document}
$ xelatex bug.tex
...
! Missing } inserted.
<inserted text>
                }
l.9 \end{align*}

? ! Extra }, or forgotten $.
<template> }
            $}\ifmeasuring@ \savefieldlength@ \fi \set@field \hfil \endtempl...
l.9 \end{align*}

? ! Missing } inserted.
<inserted text>
                }
l.9 \end{align*}

? ! Extra }, or forgotten $.
<template> }
            $}\ifmeasuring@ \savefieldlength@ \fi \set@field \hfil \endtempl...
l.9 \end{align*}

? [1] (./bug.aux)

 *File List*
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
  size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
 amsmath.sty    2016/11/05 v2.16a AMS math features
 amstext.sty    2000/06/29 v2.01 AMS text
  amsgen.sty    1999/11/30 v2.0 generic functions
  amsbsy.sty    1999/11/29 v1.2d Bold Symbols
  amsopn.sty    2016/03/08 v2.02 operator names
unicode-math.sty    2017/01/27 v0.8d Unicode maths in XeLaTeX and LuaLaTeX
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
   expl3.sty    2017/07/19 L3 programming layer (loader)
expl3-code.tex    2017/07/19 L3 programming layer
l3xdvipdfmx.def
ucharcat.sty    2015/11/19 v0.03 ucharcat for luaLaTeX (DPC)
  xparse.sty    2017/07/19 L3 Experimental document command parser
l3keys2e.sty    2017/07/19 LaTeX2e option processing using LaTeX3 keys
fontspec.sty    2017/07/23 v2.6c Font selection for XeLaTeX and LuaLaTeX
fontspec-xetex.sty    2017/07/23 v2.6c Font selection for XeLaTeX and LuaLaTeX
 fontenc.sty
   tuenc.def    2017/04/05 v2.0i Standard LaTeX file
fontspec.cfg
  fix-cm.sty    2015/01/14 v1.1t fixes to LaTeX
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
filehook.sty    2011/10/12 v0.5d Hooks for input files
unicode-math-xetex.sty
@wspr
Copy link
Collaborator

wspr commented Jul 30, 2017

Is this possibly @davidcarlisle's fault? The error goes away if you replace \begin{align*}...\end{align} with \[...\].

@asr
Copy link
Author

asr commented Jul 30, 2017

Is this possibly @davidcarlisle's fault?

What did you mean?

@wspr
Copy link
Collaborator

wspr commented Jul 30, 2017

I wondered if there had been changes in amsmath that caused this problem. Perhaps not though, it doesn't look like the dates are too close.

Does the following work for you?

\documentclass{article}
\usepackage{unicode-math}
\begin{document}
\[ r = s₁₂ \]
\end{document}

@asr
Copy link
Author

asr commented Jul 30, 2017

Replacing \begin{align*}...\end{align*} with \[...\] works for me.

@wspr
Copy link
Collaborator

wspr commented Jul 30, 2017

Thanks, that helps. It's possible the bug is in an underlying part of expl3 or amsmath rather than unicode-math — or maybe an interaction between all three. That makes it harder to track down...

@asr
Copy link
Author

asr commented Jul 30, 2017

Thanks for the workaround.

@davidcarlisle
Copy link
Member

davidcarlisle commented Jul 30, 2017 via email

@wspr
Copy link
Collaborator

wspr commented Jul 31, 2017 via email

@asr
Copy link
Author

asr commented Aug 1, 2017

I suspected the changes in some expl3 brace matching code

Thanks for the pointing! The problem disappears if I use a previous version of expl3, so I filed latex3/latex3#387.

@asr asr closed this as completed Aug 1, 2017
@blefloch
Copy link
Member

blefloch commented Aug 1, 2017

FYI @davidcarlisle I don't think I got pinged. But indeed it's somehow my fault. A bad interaction between \halign and the align-safe groups of expl3.

@asr
Copy link
Author

asr commented Aug 1, 2017

I'm reopening the issue because the PR #397.

@asr asr reopened this Aug 1, 2017
@wspr wspr closed this as completed in 9a83289 Aug 2, 2017
@asr
Copy link
Author

asr commented Aug 2, 2017

Thanks everyone for fixing the issue so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants