TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like to change a/b to be


how to do that?

share|improve this question
yes,I only can use / now. – sam Jun 18 '11 at 13:34
See my answer below. But really, since you ask this very elementary question, I guess you do not have access to any form of documentation? You need to remedy that. LaTeX is too complex to use without documentation. – Harald Hanche-Olsen Jun 18 '11 at 13:36
Or have a look at this one: en.wikibooks.org/wiki/LaTeX – Harald Hanche-Olsen Jun 18 '11 at 13:42

\frac{a}{b}, in math mode of course.

share|improve this answer

For fractions use $\frac{a}{b}$, like Harald Hanche-Olsen said. For inline-math I still like fractions that use / because a \frac is often too tall. Here is a definition for a nicer fraction that uses /:

    \raise.5ex\hbox{\small #1}%
    \lower.25ex\hbox{\small #2}}

It is used like this:

share|improve this answer
The nicefrac package, or the units package, also offer a \nicefrac command. – Gonzalo Medina Jun 18 '11 at 13:46
The xfrac package seems to be the better choice. – Thorsten Donig Jun 18 '11 at 13:51
Is this kind of command can be used on MathJaX? Because I can't try success on Statistical Analysis board. – sam Jun 18 '11 at 13:52
You can also use $\dfrac{a}{b}$ if you want a larger fraction in inline math mode. – Peter Grill Jun 18 '11 at 14:51
@Peter: using \dfrac in inline math is not very good because it changes the space between lines and by default LaTeX uses smaller fractions in inline math just to avoid this. – Spike Jun 18 '11 at 15:16

Your Answer


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.