Text Formattingcurly braces in text mode

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
AliceWonder
Posts: 28
Joined: Wed Oct 31, 2012 12:04 am

curly braces in text mode

Post by AliceWonder »

When I try to use \{ and \} to create curly braces outside of math mode, it works and always has. However if I load the mtpro2 package in my preamble, it then fails, complaining about a miss $ insserted.

What is the right to way get curly braces outside of math mode that won't break by loading the mathtime pro2 package?

Googling around, escaping them is all I have thus far found, but that clearly is broken by the mtpro2 package.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
AliceWonderMisc
Posts: 17
Joined: Mon Aug 20, 2018 3:27 pm

curly braces in text mode

Post by AliceWonderMisc »

Old post but I ran into same problem and this was top google result for my query.

I found a solution that works with mtpro2

Use

Code: Select all

\string{
and

Code: Select all

\string}
For example:

Code: Select all

\texttt{exec\string{\string}}
will typeset in the monospace font as

Code: Select all

exec{}
Post Reply