Math & ScienceFractions

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Fractions

Post by Mini »

Hello,

In my latex document, I have the following code:

Code: Select all

\\ (a) \ GP \frac{x+2}{x-2} = \frac{5x-2}{x+2}
\\ x^2+4x+4=5x^2-12x+4
\\ 0=4x^2-16x
\\ x=0 \ or \ 4
But it comes out as attached. I know the first line is the problem. I just want an ordinary fraction ie. (x+2)/(x-2) = (5x-2)/(x+2)... how would I achieve this?

Also, the font size for fractions, when they do work (which is for only numbers and single termed algebraic expressions) the size of it becomes really small and hard to read. How would I make the font size remain the same as the rest of the document?

Thanks, I think I'm getting the hang of this :D
Attachments
fractions.jpg
fractions.jpg (30.66 KiB) Viewed 2689 times

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Fractions

Post by frabjous »

Are you not using math mode? You must be getting a bunch of errors. You can't write that kind of math outside of math mode.

Consider using something like:

Code: Select all

\documentclass[leqno]{article}
\usepackage{amsmath}

\begin{document}
  \begin{equation} \tag{a}
    \begin{split}
      \text{GP } \frac{x+2}{x-2} &= \frac{5x-2}{x+2} \\
      x^2+4x+4 &= 5x^2-12x+4 \\
      0 &= 4x^2-16x \\
      x &=0 \text{ or } 4
    \end{split}
  \end{equation}
\end{document}
Try reading the mathmode document to learn more about type-setting math.
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Re: Fractions

Post by Mini »

Firstly, thank you. That's why I've been getting all these errors!

To clarify, I'm ONLY using LateX for maths. Thank you again!
Post Reply