Math & ScienceHaving a fraction with words

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
bradgp
Posts: 1
Joined: Tue Jun 01, 2010 9:17 pm

Having a fraction with words

Post by bradgp »

I want to be able to have a fraction with words so that I can print:
# of cards/ Total # cards so that it will be look nice.

I have done
$$\frac{\# of cards}{Total \# of cards}$$
The result is a fraction with Italized font and all the letters are crammed together.

Is there a way I can fix this?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Having a fraction with words

Post by localghost »

Never ever introduce an unnumbered displayed equation the way you do (see l2tabu). Use the amsmath package to format the text in the fraction.

Code: Select all

\documentclass{article}
\usepackage{amsmath}

\begin{document}
  \[
    \frac{\text{\# of cards}}{\text{Total \# of cards}}
  \]
\end{document}

Best regards and welcome to the board
Thorsten
Post Reply