1

This question already has an answer here:

I want to have 2 separate words in a fraction (numerator & denominator), however, LaTeX would keep them together with no space.

I'm using the amsmath package. And this is the line of the code:

\centering
$\frac {desired  displacement_{max}}{actual  displacement_{max}}

How can I keep (desired and displacement) separately?

Thanks

marked as duplicate by Svend Tveskæg, Paul Gaborit, Jesse, Mico, Romain Picot Mar 22 '16 at 15:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

To add text in math mode, use the \text command provided by amsmath.

\frac{\text{foo bar}_{\text{max}}}{\text{foo bar}_{\text{min}}}
  • 2
    Since \max and \min are operators, they need not be placed in \text macros, as they will present in upright font already: \frac{\text{foo bar}_{\max}}{\text{foo bar}_{\min}} – Steven B. Segletes Mar 22 '16 at 14:25
  • I don’t think “max” and “min” are operator in this context but just indication that the values are the maximum and the minimum. It could have been superscript plus and minus as well. – Zoxume Mar 22 '16 at 14:29
  • It just saves some typing, that's all. – Steven B. Segletes Mar 22 '16 at 14:30
  • OK, I didn’t even think of this simple thing. However, wouldn’t the spacing around \min and \max be wrong, as operators always have some space around them? – Zoxume Mar 22 '16 at 14:33
  • 1
    @Zoxume no the spacing after a mathop is only added if there is something following. (but you should use \textrm not \text so that you get a fixed font not the font current outside the math (\max will use \mathrm so doesn't have that problem) – David Carlisle Mar 22 '16 at 14:35

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