Text FormattingUndefined control sequence: $\text

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
sombrancelha
Posts: 22
Joined: Fri May 18, 2007 6:48 pm

Undefined control sequence: $\text

Post by sombrancelha »

Hello,

I have just performed a clean installation of Kile + TexLive and when I tried inserting text inside math mode, through the \text command, it didn't compile and gave me the error:
Undefined control sequence: $\text
Any idea on what can be wrong? All I did was as simple as

Code: Select all

$\text{abc}$

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Undefined control sequence: $\text

Post by kaiserkarl13 »

You need to include the amstext package (which is also included by the amsmath package) to get \text{} to work. You can use \mbox{} for many of the same things (except in sub/superscripts) to get the same effect without loading that package.
sombrancelha
Posts: 22
Joined: Fri May 18, 2007 6:48 pm

Re: Undefined control sequence: $\text

Post by sombrancelha »

Duh, I should have realized it was a missing package! Thanks!
Post Reply