\documentclass{article}
\usepackage{mtpro2}
\begin{document}
$$\textrm{\{x\}}$$
\end{document}
I am using pdflatex and MiKTeX 2.7. When I try to compile this
example,
I get a "Missing $ inserted" message and no PDF is created. Not
loading
the mtpro2 package fixes the problem -- but is there an easy way to
fix
the problem while using that package?
I can get around the problem by replacing the text braces (\{ and \})
with
\textbraceleft and \textbraceright. But I would like to find a more
succinct fix.
Thank you,
--John
I have the Math Time Pro fonts, and the above code works fine for me
(Mactex 2007).
The code works for me too (XP, pdflatex miktex 2.7).
Kea, Martin, thank you. This surprises me.
Are either of you using the MathTime Pro 2 update (v 2.1) that was
issued
around February 2009? I ask because this update (which I am using)
made
a number of changes to brace handling in the MTPro2 fonts. (See
http://pctex.com/MTPro2Update.html.) I haven't been able to
determine
whether the update is the source of my problems, but I wonder if it
is.
No, I don't use the update. Didn't even know it existed...
>>> > I am unable to use text braces in display math environments while
>>> > using the MathTime Pro 2 package from PCTeX. �Here is a minimal
>>> > example:
>>
>>> > � � � � \documentclass{article}
>>> > � � � � \usepackage{mtpro2}
>>> > � � � � \begin{document}
>>> > � � � � � � $$\textrm{\{x\}}$$
>>> > � � � � \end{document}
> Are either of you using the MathTime Pro 2 update (v 2.1) that was
> issued around February 2009? I ask because this update (which I
> am using) made a number of changes to brace handling in the
> MTPro2 fonts. (See http://pctex.com/MTPro2Update.html.) I
> haven't been able to determine whether the update is the source
> of my problems, but I wonder if it is.
I don't have the fonts, but the update you mentioned certainly
contains the code which would led to this problem. In standard LaTeX
\{ is defined so that it can be used in math and text.
mtpro2 redefines \{ so that it can now be used only in math.
You could try the following after loading mtpro2:
\DeclareRobustCommand{\{}{\ifmmode\lbrace\else\textbraceleft\fi}
\DeclareRobustCommand{\}}{\ifmmode\rbrace\else\textbraceright\fi}
--
Ulrike Fischer
This works! Thank you.