4

Hi I ve got this error message

Runaway argument?
\x@protect \[\protect \[  \@nil  \@ifpackageloaded {amstex}{\def \@tempa \ETC.
Paragraph ended before \@tempa was complete.
<to be read again> \par 
 l.435 \newenvironment{proof}[1][\proofname]{\par

while compiling this in XeLaTex

\documentclass[12pt]{book}%thesis

\usepackage{polyglossia}
\setmainlanguage{english}

\usepackage[numbers]{natbib}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amsmath} 
\usepackage{amssymb} 
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{epigraph}
\usepackage{pdfpages}
\usepackage{url} 
\usepackage{breqn}
\usepackage{setspace}
\usepackage{dsfont}
\usepackage{eurosym}
\usepackage{epstopdf}
\usepackage{color}
\usepackage{setspace}
\usepackage{titling}


\begin{document}
bla
\end{document} 

What seems to be the pbm?

7

polyglossia (or a package it loads) makes \[ robust but amsthm isn't expecting that. If you reset the original definition, things work better,

\documentclass[12pt]{book}%thesis


\let\zz\[\let\zzz\]
\usepackage{polyglossia}
\let\[\zz\let\]\zzz


\usepackage{amsthm}

\begin{document}
bla
\end{document} 

(I removed redundant packages from the example)

| improve this answer | |
  • David, it works. The original definition of what does the combination of \let\zz[\let\zzz] reset? – agozar Aug 28 '13 at 15:38
  • @agozar it saves the definition of \[ in \zz and \] in \zzz (the z names are just arbitrary local names) and then restores them after polyglossia, setting \[ back to \zz which is its original definition, and same for \] – David Carlisle Aug 28 '13 at 15:46
  • @ggll that isn't a comment anyone can act on. Which packages? Also which format as the situation has changed since this answer, latex now makes \[ robust by default. Probably best to ask a new question on teh sit ewith a complete example that shows the problem rather than comment on an old answer. – David Carlisle Sep 16 '15 at 15:39
  • 1
    getting the same error without using polyglossia: solved by loading amsthm after amsmath as advised here: tex.stackexchange.com/questions/164892/… – ggll Sep 16 '15 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.