18

I want to have written words in a fraction but to have them in correct fraction form and not crude-looking. So, I have;

$\displaystyle\frac{Actual Value of Production}{Demand}$ x $100$ 

But it makes the text appear in math-mode so all italics with no spaces and looks awful. If I remove the $ it just won't appear.

Any help?

4

3 Answers 3

20

another possibility, requiring amsmath is this:

\[
 \frac{\text{Actual Value of Production}}{\text{Demand}} \times 100
\]

enter image description here

since it's unlikely to be embedded in text, using "display" coding is preferable to the inline $...$ input.

warning: \text will follow the style of the surrounding text, so if this is included within the statement of a theorem, it will be set in italic. in such a situation, it's better to use \textrm.

14

If you're going to be writing a lot of fractions this way, you should define your own macro:

\usepackage{amsmath}
\newcommand*\textfrac[2]{
  \frac{\text{#1}}{\text{#2}}
}

Then you can just write $\textfrac{Top}{Bottom}$ and it will print the words in the current text style.

2

Try this:

$\displaystyle\frac{\mbox{Actual Value of Production}}{\mbox{Demand}}$ x $100$
3
  • 1
    I'll also change the "x" by \times, something like this: $\displaystyle\frac{\mbox{Actual Value of Production}}{\mbox{Demand}} \times 100$ If the answer is correct, please mark it as correct
    – Nico
    Apr 3, 2013 at 13:07
  • 1
    \text is actually preferred to \mbox, since it is more conscientious in preserving font styles.
    – Ryan Reich
    Apr 3, 2013 at 19:14
  • Also, for short inline formulas, one can use the more convenient command \dfrac{}{}, also from amsmath, instead of \displaystyle\frac{}(}. Jan 24, 2014 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .