Math Mode – Creating Fractions with Word Items

fractionsmath-mode

I have troubles writing a fraction whose items are words not numbers.

In a nutshell I should write:

minaccia/vulnerabilità   --> this is the numerator
---------------------- 
contromisure             --> this is the denominator

I simply do this, but it doesn't work.

\[
\frac{minaccia/vulnerabilit\'a}{contromisure} 
\]

Can anyone help me?

Best Answer

You should load the amsmath package and use \text{...}:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\[
  \frac{ax^2+bx+c}{\sin^2y+\cos^2z} \qquad 
  \frac{\text{minaccia/vulnerabilit\`a}}{\text{contromisure}} 
\]
\end{document}

You can also use \mbox{...} or \textrm{...}, but these won't scale when used inside exponents the way \text{...} does.