I like to change a/b to be
a
-
b
how to do that?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityFor 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 /
:
\def\nicefrac#1#2{\leavevmode%
\raise.5ex\hbox{\small #1}%
\kern-.1em/\kern-.15em%
\lower.25ex\hbox{\small #2}}
It is used like this:
\nicefrac{a}{b}
nicefrac
package, or the units
package, also offer a \nicefrac
command.
Jun 18, 2011 at 13:46
\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.