This thread evoked from this thread.
\documentclass{article}
\usepackage{unicode-math} % This causes the question mark bug
% This code requises unicode-math
% How can you use the code without unicode-math -package?
\setmathfont[BoldFont={latinmodern-math.otf}]{latinmodern-math.otf}
\setmathfont[range=\mathscr,Scale=MatchUppercase]{Asana-Math.otf}
\usepackage{tikz}
\usetikzlibrary{tikzmark,decorations.pathreplacing,calc}
\newcommand\MyText[4][0pt]{%
\begin{tikzpicture}[overlay, remember picture]
\draw [decoration={brace},decorate,thick]
( $ ({pic cs:#3}|-{pic cs:#2}) + (#1,1.3ex) $ ) --
node[anchor=west,xshift=5pt,text width=5cm] {#4}
( $ (pic cs:#3) + (#1,0) $ );
\end{tikzpicture}%
}
% I have defined question like this
\usepackage[framemethod=tikz]{mdframed}
\newtheorem{question}{Question}
\mdfdefinestyle{que}{
linecolor=cyan,
backgroundcolor=cyan!20,
}
\surroundwithmdframed[style=que]{question}
\begin{document}
\begin{question}
Lorem ipsum?
\end{question}
\end{document}
I am thinking why you need the unicode-math
package for the TikZ code.
Why does the TikZ code require unicode-math
package?
\question
command and this clash with the name of your environment. Use a different name. – Ulrike Fischer Feb 22 '14 at 15:09question
environment without defining it, because there's no predefined one; so this code is wrong in the first place. Withoutunicode-math
it wouldn't compile; withunicode-math
it's using the\question
command that is completely unsuitable for this usage. – egreg Feb 22 '14 at 16:00