Skip to main content
\\
Source Link
David Carlisle
  • 771k
  • 70
  • 1.6k
  • 2.5k

The \dfrac macro renders fractions as those in displayed math, even if it is part of an inline equation, fraction, or other setting where LaTeX prefers to typeset an inline version.

Conversely, I frequently find myself using \tfrac, which renders fractions in an inline (or "text mode") fashion even if the setting is display mode, because I often find the large fractions distracting from what is important in my equations.

As with most useful but basic macros for mathematics, these are provided by the amsmath package.

Example code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
Some fractions in inline math:
\( \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2} \)

\vspace{1ex}
Some fractions in displayed math (in and outside of some environments):
\begin{gather*}
  \begin{split}
    \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2}           \    \\
    \begin{bmatrix}
      \dfrac{\sqrt 2}{2} & \frac{\sqrt 2}{2} & \tfrac{\sqrt 2}{2}
    \end{bmatrix}
  \end{split}
  \qquad
  \begin{cases}
    \dfrac{\sqrt 2}{2} \\[2ex] \frac{\sqrt 2}{2} \\[2ex]  \tfrac{\sqrt 2}{2}
  \end{cases}   \    \\
\end{gather*}
\end{document}

Result: Sample images of fractions

The \dfrac macro renders fractions as those in displayed math, even if it is part of an inline equation, fraction, or other setting where LaTeX prefers to typeset an inline version.

Conversely, I frequently find myself using \tfrac, which renders fractions in an inline (or "text mode") fashion even if the setting is display mode, because I often find the large fractions distracting from what is important in my equations.

As with most useful but basic macros for mathematics, these are provided by the amsmath package.

Example code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
Some fractions in inline math:
\( \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2} \)

\vspace{1ex}
Some fractions in displayed math (in and outside of some environments):
\begin{gather*}
  \begin{split}
    \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2}           \        \begin{bmatrix}
      \dfrac{\sqrt 2}{2} & \frac{\sqrt 2}{2} & \tfrac{\sqrt 2}{2}
    \end{bmatrix}
  \end{split}
  \qquad
  \begin{cases}
    \dfrac{\sqrt 2}{2} \\[2ex] \frac{\sqrt 2}{2} \\[2ex]  \tfrac{\sqrt 2}{2}
  \end{cases}   \    \end{gather*}
\end{document}

Result: Sample images of fractions

The \dfrac macro renders fractions as those in displayed math, even if it is part of an inline equation, fraction, or other setting where LaTeX prefers to typeset an inline version.

Conversely, I frequently find myself using \tfrac, which renders fractions in an inline (or "text mode") fashion even if the setting is display mode, because I often find the large fractions distracting from what is important in my equations.

As with most useful but basic macros for mathematics, these are provided by the amsmath package.

Example code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
Some fractions in inline math:
\( \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2} \)

\vspace{1ex}
Some fractions in displayed math (in and outside of some environments):
\begin{gather*}
  \begin{split}
    \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2}           \\
    \begin{bmatrix}
      \dfrac{\sqrt 2}{2} & \frac{\sqrt 2}{2} & \tfrac{\sqrt 2}{2}
    \end{bmatrix}
  \end{split}
  \qquad
  \begin{cases}
    \dfrac{\sqrt 2}{2} \\[2ex] \frac{\sqrt 2}{2} \\[2ex]  \tfrac{\sqrt 2}{2}
  \end{cases}   \\
\end{gather*}
\end{document}

Result: Sample images of fractions

revised example to take less vertical space; added 16 characters in body
Source Link
Niel de Beaudrap
  • 14.4k
  • 6
  • 46
  • 61

The \dfrac macro renders fractions as those in displayed math, even if it is part of an inline equation, fraction, or other setting where LaTeX prefers to typeset an inline version.

Conversely, I frequently find myself using \tfrac, which renders fractions in an inline (or "text mode") fashion even if the setting is display mode, because I often find the large fractions distracting from what is important in my equations.

As with most useful but basic macros for mathematics, these are provided by the amsmath package.

Example code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
Some fractions in inline math:
\( \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2} \)

\vspace{1ex}
Some fractions in displayed math (in and outside of some environments):
\begin{gather*}
  \begin{split}
    \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2}           \        \begin{bmatrix}
        \dfrac{\sqrt 2}{2} & \frac{\sqrt 2}{2} & \tfrac{\sqrt 2}{2}
    \end{bmatrix}   \  
  \end{split}
  \qquad
  \begin{cases}
        \dfrac{\sqrt 2}{2} \\[2ex] \frac{\sqrt 2}{2} \\[2ex]  \tfrac{\sqrt 2}{2}
    \end{cases}
    \    \end{gather*}
\end{document}

Result: Sample images of fractionsSample images of fractions

The \dfrac macro renders fractions as those in displayed math, even if it is part of an inline equation, fraction, or other setting where LaTeX prefers to typeset an inline version.

Conversely, I frequently find myself using \tfrac, which renders fractions in an inline (or "text mode") fashion even if the setting is display mode, because I often find the large fractions distracting from what is important in my equations.

As with most useful but basic macros for mathematics, these are provided by the amsmath package.

Example code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
Some fractions in inline math:
\( \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2} \)

\vspace{1ex}
Some fractions in displayed math (in and outside of some environments):
\begin{gather*}
  \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2}         \       \begin{bmatrix}
        \dfrac{\sqrt 2}{2} & \frac{\sqrt 2}{2} & \tfrac{\sqrt 2}{2}
    \end{bmatrix}   \       \begin{cases}
        \dfrac{\sqrt 2}{2} \\[2ex] \frac{\sqrt 2}{2} \\[2ex]  \tfrac{\sqrt 2}{2}
    \end{cases}
 \end{gather*}
\end{document}

Result: Sample images of fractions

The \dfrac macro renders fractions as those in displayed math, even if it is part of an inline equation, fraction, or other setting where LaTeX prefers to typeset an inline version.

Conversely, I frequently find myself using \tfrac, which renders fractions in an inline (or "text mode") fashion even if the setting is display mode, because I often find the large fractions distracting from what is important in my equations.

As with most useful but basic macros for mathematics, these are provided by the amsmath package.

Example code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
Some fractions in inline math:
\( \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2} \)

\vspace{1ex}
Some fractions in displayed math (in and outside of some environments):
\begin{gather*}
  \begin{split}
    \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2}           \        \begin{bmatrix}
      \dfrac{\sqrt 2}{2} & \frac{\sqrt 2}{2} & \tfrac{\sqrt 2}{2}
    \end{bmatrix} 
  \end{split}
  \qquad
  \begin{cases}
    \dfrac{\sqrt 2}{2} \\[2ex] \frac{\sqrt 2}{2} \\[2ex]  \tfrac{\sqrt 2}{2}
  \end{cases}   \    \end{gather*}
\end{document}

Result: Sample images of fractions

added example code; added 22 characters in body
Source Link
Niel de Beaudrap
  • 14.4k
  • 6
  • 46
  • 61

The \dfrac macro renders fractions as those in displayed math, even if it is part of an inline equation, fraction, or other setting where LaTeX prefers to typeset an inline version.

Conversely, I frequently find myself using \tfrac, which renders fractions in an inline (or "text mode") fashion, even if itthe setting is in display mode, because I often find the large fractions distracting from what is important in my equations.

As with most useful but basic macros for mathematics, these are provided by the amsmath package.

Example code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
Some fractions in inline math:
\( \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2} \)

\vspace{1ex}
Some fractions in displayed math (in and outside of some environments):
\begin{gather*}
  \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2}         \       \begin{bmatrix}
        \dfrac{\sqrt 2}{2} & \frac{\sqrt 2}{2} & \tfrac{\sqrt 2}{2}
    \end{bmatrix}   \       \begin{cases}
        \dfrac{\sqrt 2}{2} \\[2ex] \frac{\sqrt 2}{2} \\[2ex]  \tfrac{\sqrt 2}{2}
    \end{cases}
\end{gather*}
\end{document}

Result: Sample images of fractions

The \dfrac macro renders fractions as those in displayed math, even if it is part of an inline equation, fraction, or other setting where LaTeX prefers to typeset an inline version.

Conversely, I frequently find myself using \tfrac, which renders fractions in an inline fashion, even if it is in display mode, because I often find the large fractions distracting from what is important in my equations.

As with most useful but basic macros for mathematics, these are provided by the amsmath package.

The \dfrac macro renders fractions as those in displayed math, even if it is part of an inline equation, fraction, or other setting where LaTeX prefers to typeset an inline version.

Conversely, I frequently find myself using \tfrac, which renders fractions in an inline (or "text mode") fashion even if the setting is display mode, because I often find the large fractions distracting from what is important in my equations.

As with most useful but basic macros for mathematics, these are provided by the amsmath package.

Example code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
Some fractions in inline math:
\( \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2} \)

\vspace{1ex}
Some fractions in displayed math (in and outside of some environments):
\begin{gather*}
  \dfrac{\sqrt 2}{2} \bigg/ \frac{\sqrt 2}{2} \bigg/ \tfrac{\sqrt 2}{2}         \       \begin{bmatrix}
        \dfrac{\sqrt 2}{2} & \frac{\sqrt 2}{2} & \tfrac{\sqrt 2}{2}
    \end{bmatrix}   \       \begin{cases}
        \dfrac{\sqrt 2}{2} \\[2ex] \frac{\sqrt 2}{2} \\[2ex]  \tfrac{\sqrt 2}{2}
    \end{cases}
\end{gather*}
\end{document}

Result: Sample images of fractions

Source Link
Niel de Beaudrap
  • 14.4k
  • 6
  • 46
  • 61
Loading