Home    Personal    Work    Computers    Miscellaneous

LaTeX    Software Projects    Rendering Tutorial    UNIX Commands    Using CVS    Case Modding    Base Wiki

How do I put unformatted text in an equation?

Sometimes, you want text to appear in an equation that doesn't have to be formatted mathematically, i.e., you don't want it to be in italic, etc. You can add text in an equation with the \textrm command. Note that this command is sensitive for white space characters.

The following example puts an "if" in normal formatted text within an equation

\begin{equation}
f(x)=0\textrm{ if }x>0
\end{equation}

Note that the spaces surrounding the "if" are included in the argument of the \textrm command! If you don't put the spaces in the \textrm command, all of the math before and after the command will stick to it and you'll get something like f(x)ifx>0 instead of f(x) if x>0.

Edit (locked) - History - Recent Changes - Search - Statistics
All contents copyrighted 2000-2006 Anthony Liekens unless otherwise noted. Powered by PmWiki
Page last modified on October 14, 2005, at 01:45 PM.