LaTeX forum ⇒ Text Formattingcurly braces in text mode

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

curly braces in text mode

Postby AliceWonder » Thu Nov 07, 2013 4:11 am

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.

AliceWonderMisc
Posts: 17
Joined: Mon Aug 20, 2018 3:27 pm

Postby AliceWonderMisc » Sun Jun 02, 2019 12:43 pm

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] [Expand/Collapse] [Download] ({untitled.tex})
  1. \string{
and
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \string}


For example:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \texttt{exec\string{\string}}
will typeset in the monospace font as
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. exec{}


Return to “Text Formatting”

Who is online

Users browsing this forum: MSN [Bot] and 3 guests