Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
1  
Welcome to TeX.SX. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}) or hit Ctrl+K. –  Claudio Fiandrino Apr 3 '13 at 13:05
5  
See tex.stackexchange.com/q/84155/15925 –  Andrew Swann Apr 3 '13 at 13:08
1  
why isn't the x in math mode? ...mand} \times 100$ –  David Carlisle Apr 3 '13 at 13:13
1  

3 Answers 3

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.

share|improve this answer

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.

share|improve this answer

Try this:

$\displaystyle\frac{\mbox{Actual Value of Production}}{\mbox{Demand}}$ x $100$
share|improve this answer
    
Fantastic, thank you :) –  Charlotte Apr 3 '13 at 13:06
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 '13 at 13:07
    
\text is actually preferred to \mbox, since it is more conscientious in preserving font styles. –  Ryan Reich Apr 3 '13 at 19:14
    
Also, for short inline formulas, one can use the more convenient command \dfrac{}{}, also from amsmath, instead of \displaystyle\frac{}(}. –  fpast Jan 24 at 15:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.