Hey there. I'm trying to write out a stoichiometry formula, something like 1 level * 20V/65536 levels * 1000mV / V. I think I have to be in math mode to get the fractions, but I want the text to be plain (no italics and the same font as the rest of the paper) and to have spaces. I saw one solution using \textrm{}, but that seems like a hack. Is there just a way to "escape out" of math mode temporarily to write plain text?
Thanks,
-mach7
General ⇒ Plain Text in Math Mode
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Posts: 105
- Joined: Fri Nov 30, 2007 11:32 pm
Re: Plain Text in Math Mode
It seems command \text{your text here} should be sufficient. You may not need \textrm. I am not sure what you mean by a hack, but that is the method suggested in the "The Latex Companion" by Mittelbach et. al.
Plain Text in Math Mode
Code: Select all
\text{}
spaces...in math mode spaces are automatic, so the text will be pushed right up against your equations...so you need to include spaces
Code: Select all
$2 \times \text{dumb\,example\,}=4$
good luck
dpc
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Plain Text in Math Mode
Hi mach7,
welcome to the LaTeX Community board!
\text{} is the right way like both members above said. I just want to add that \text needs the amsmath package (or at least amstext).
Without amsmath text inside math would be possible using \mbox{...}, but \text is the better choice, it respects current font size.
Stefan
welcome to the LaTeX Community board!
\text{} is the right way like both members above said. I just want to add that \text needs the amsmath package (or at least amstext).
Without amsmath text inside math would be possible using \mbox{...}, but \text is the better choice, it respects current font size.
Stefan
LaTeX.org admin