# amsthm not working correctly with unicode-math [duplicate]

I'm trying to use unicode-math with amsthm. I'm using the following code:

\documentclass{article}

\usepackage{amsthm}
\usepackage[math-style=TeX]{unicode-math}

\newtheorem{question}{Question}

\begin{document}
\begin{question}
My question
\end{question}
\end{document}


The output produced looks like this:

? My question


Any idea how to fix this? Thanks!

• Do you compile it with XeTeX or LuaTeX? – Przemysław Scherwentke Jun 22 '14 at 3:52
• XeTeX from TeXLive 2013. Just also upgraded and tried with TeXLive 2014. – K G Jun 22 '14 at 3:55
• Just also tried with LuaTex. Same result. – K G Jun 22 '14 at 3:59
• Wow, that's a pretty big difference to what's expected! I've added this to the unicode-math list of issues to be fixed: github.com/wspr/unicode-math/issues/271 – Will Robertson Jun 22 '14 at 4:14
• @WillRobertson This has come up recently in another question: from memory, it comes down to the order in which things are done ant the fact that question is a rather generic name (plus of course that LaTeX2e uses the same namespace for environments and commands). – Joseph Wright Jun 22 '14 at 8:22

unicode-math somewhat bravely defines \question to be ? you can restore your definition afterwards (or simply use a different name)

\documentclass{article}

\usepackage{amsthm}
\usepackage[math-style=TeX]{unicode-math}

\newtheorem{question}{Question}
\let\savedquestion\question

\begin{document}
\let\question\savedquestion

\begin{question}
My question
\end{question}
\end{document}

• Looking at this with fresh eyes, a fair few of these symbols should be renamed to be less problematic. (There is also \atsign, \ampersand, and so on which I'm not too comfortable "reserving" the definition.) – Will Robertson Jun 22 '14 at 11:31
• @WillRobertson just a suggestion but you might consider adding a namespace prefix to your symbol names. Something like \uc_question, \uc_ampersand etc. – K G Jun 22 '14 at 15:25
• @KG I have a couple of ideas on this. A global prefix isn't appropriate since most of these macros are intended to be user-accessible, such as \times, \sum, etc etc. However, there are a few ‘questionable’ choices of mine originally for these symbols that I've now renamed to \mathquestion etc. – Will Robertson Jun 23 '14 at 5:12