Discussion:
[XeTeX] semantic nest size
Apostolos Syropoulos
2018-04-12 16:57:40 UTC
Permalink
Hello,
I have this code
documentclass[a4paper]{article}
\usepackage{xltxtra}
\usepackage{xgreek}
\usepackage{unicode-math}
\usepackage{amsmath}
\begin{document}
\setmainfont[Mapping=tex-text,Ligatures=Common]{Garamond Premier Pro}
\setsansfont[Mapping=tex-text,Scale=MatchLowercase]{Myriad Pro}
\setmonofont[Scale=MatchLowercase]{Courier}
\setmathfont[Scale=MatchUppercase]{Asana Math}
\begin{displaymath}
\alpha^{\nu}=\underbrace{\alpha\cdot\alpha\cdots\alpha\cdot\alpha}_{\text{$\nu$ παράγοΜτες}}.
\end{displaymath}
\end{document}

I try to process it with XeLaTeX but it fails:
! TeX capacity exceeded, sorry [semantic nest size=500].
<recently read> {
                 
l.14 ...{\alpha\cdot\alpha\cdots\alpha\cdot\alpha}
                                                  _{\text{$\nu$ παράγοΜτες}}.
No pages of output.

When I have
\usepackage{amsmath}
\usepackage{unicode-math}
It compiles just fine. What is wrong? Any ideas?

A.S.
----------------------
Apostolos Syropoulos
Xanthi, Greece
David Carlisle
2018-04-12 18:03:30 UTC
Permalink
I don't have those fonts and couldn't reproduce the error when I tried
switching to other fonts so I can't trace the exact cause of the
error, but the error is not entirely surprising, unicode-math does
document that it must be called after amsmath

I get no error from the file below (using random TeX Gyre fonts) do
you just get the error with the fonts you used, or can you reproduce
with fonts in texlive?

David

\documentclass[a4paper]{article}
%\usepackage{xltxtra}
\usepackage{xgreek}
\usepackage{unicode-math}
\usepackage{amsmath}
\begin{document}
\setmainfont[Mapping=tex-text,Ligatures=Common]{TeX Gyre Termes}
\setsansfont[Mapping=tex-text,Scale=MatchLowercase]{TeX Gyre Heros}
\setmonofont[Scale=MatchLowercase]{TeX Gyre Cursor}
\setmathfont[Scale=MatchUppercase]{Asana Math}
\begin{displaymath}
\alpha^{\nu}=\underbrace{\alpha\cdot\alpha\cdots\alpha\cdot\alpha}_{\text{$\nu$
παράγοντες}}.
\end{displaymath}
\end{document}
Post by Apostolos Syropoulos
Hello,
I have this code
documentclass[a4paper]{article}
\usepackage{xltxtra}
\usepackage{xgreek}
\usepackage{unicode-math}
\usepackage{amsmath}
\begin{document}
\setmainfont[Mapping=tex-text,Ligatures=Common]{Garamond Premier Pro}
\setsansfont[Mapping=tex-text,Scale=MatchLowercase]{Myriad Pro}
\setmonofont[Scale=MatchLowercase]{Courier}
\setmathfont[Scale=MatchUppercase]{Asana Math}
\begin{displaymath}
\alpha^{\nu}=\underbrace{\alpha\cdot\alpha\cdots\alpha\cdot\alpha}_{\text{$\nu$
παράγοντες}}.
\end{displaymath}
\end{document}
! TeX capacity exceeded, sorry [semantic nest size=500].
<recently read> {
l.14 ...{\alpha\cdot\alpha\cdots\alpha\cdot\alpha}
_{\text{$\nu$
παράγοντες}}.
No pages of output.
When I have
\usepackage{amsmath}
\usepackage{unicode-math}
It compiles just fine. What is wrong? Any ideas?
A.S.
----------------------
Apostolos Syropoulos
Xanthi, Greece
--------------------------------------------------
http://tug.org/mailman/listinfo/xetex
--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman
Apostolos Syropoulos
2018-04-12 18:14:54 UTC
Permalink
Post by David Carlisle
I don't have those fonts and couldn't reproduce the error when I tried
switching to other fonts so I can't trace the exact cause of the
error, but the error is not entirely surprising, unicode-math does
document that it must be called after amsmath
I think the error is related to the \text command. When I change\text to \mbox, compilation proceeds with no error, even ifamsmath is called before unicode-math.

A.S.
----------------------
Apostolos Syropoulos
Xanthi, Greece
David Carlisle
2018-04-12 18:18:38 UTC
Permalink
well yes \text makes the thing be set four times as many times as
\mbox so does stress the semantic nest a bit but not as much as that
usually, but without a reproducible test hard to say exactly what is
wrong.
Post by Apostolos Syropoulos
Post by David Carlisle
I don't have those fonts and couldn't reproduce the error when I tried
switching to other fonts so I can't trace the exact cause of the
error, but the error is not entirely surprising, unicode-math does
document that it must be called after amsmath
I think the error is related to the \text command. When I change
\text to \mbox, compilation proceeds with no error, even if
amsmath is called before unicode-math.
A.S.
----------------------
Apostolos Syropoulos
Xanthi, Greece
--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex

Loading...