1

I have this table which has a fraction in it. I don't like how it looks small and variables don't look clear. Is there a way to fix this or increase the size of the fraction or something? Thank you!!

\begin{table}[hbt!]
    \centering
    \caption{Bla bla bla.}
    \small
    \scalebox{1}{
    \begin{tabular}[t]{c c}
    \toprule
        $\omega_{PEG}$ [wt\%] & $\left| \frac{\mu_{40 \unit{\celsius}} - \mu_{60 \unit{\celsius}}}{40 \unit{\celsius}-60 \unit{\celsius}} \right|$\\
        \midrule
        0 & 0\\
        0 & 0\\
        \bottomrule
        
    \end{tabular}}
    \label{tab:my_label}
\end{table}

Output is: enter image description here

2
  • 1
    the fraction format is unconnected to the table, it is the style for inline, textstyle math. amsmath package provides \dfrac for display style fractions Jul 16, 2022 at 18:50
  • 2
    remove \scalebox{1}{ it is just forcing an uwanted space to the left of the table Jul 16, 2022 at 18:52

1 Answer 1

2

As mentioned by @DavidCarlisle, you may use the \dfrac (displaystyle) command from amsmath. Another possibility uses the mfrac (mediumsized) command from nccmath. Below is a code illustrating both possibilities:

    \documentclass{article}
    \usepackage{amsmath, nccmath}
    \usepackage{booktabs}
    \usepackage{siunitx}

    \begin{document}

    \begin{table}[hbt!]
        \centering
        \caption{Bla bla bla.}
        \begin{tabular}[t]{c c}
        \toprule
            $\omega_{PEG}$ [wt\%] & $\left| \dfrac{\mu_{40 \unit{\celsius}} - \mu_{60 \unit{\celsius}}}{40 \unit{\celsius}-60 \unit{\celsius}} \right|$\\
            \midrule
            0 & 0\\
            0 & 0\\
            \bottomrule
        \end{tabular}
    \vskip 2em
        \begin{tabular}[t]{c c}
        \toprule
            $\omega_{PEG}$ [wt\%] & $\left| \mfrac{\mu_{40 \unit{\celsius}} - \mu_{60 \unit{\celsius}}}{40 \unit{\celsius}-60 \unit{\celsius}} \right|$\\
            \midrule
            0 & 0\\
            0 & 0\\
            \bottomrule
        \end{tabular}
        \label{tab:my_label}
    \end{table}

    \end{document} 

enter image description here

2
  • thanks! how do i make this table align decimals?
    – Khalid
    Jul 17, 2022 at 1:12
  • @Khalid: the standard way to align decimals numbers on the decimal dot uses the S column type, from the siuntx package. In this case, when you want cells without decimals to be centred, you just have to add a pair of braces around their content.
    – Bernard
    Jul 17, 2022 at 8:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .