如何使表格中的下标加粗? \small {\textbf{$df_1$}}

如何使表格中的下标加粗? \small {\textbf{$df_1$}}

我想添加下标并且加粗。

在此处输入图片描述

\begin{table}[h!]
\centering
 \begin{tabular}{cccc}
    \toprule
     \small {\textbf{F}}
     & \small {\textbf{$df_1$}} & \small {\textbf{$df_2$}}
     & \small {\textbf{Sig.}}\\
     \midrule
    2.016 & 3 & 36 & 0.129 \\
    \bottomrule
    \end{tabular}
\end{table}

我尝试过这个:

 & \small {\textbf{df_1$}} & \small {\textbf{df_2$}}

可以工作,但出现错误:

Check that your $'s match around math expressions. If they do, then you've probably used a symbol in normal text that needs to be in math mode. Symbols such as subscripts ( _ ), integrals ( \int ), Greek letters ( \alpha, \beta, \delta ), and modifiers (\vec{x}, \tilde{x} ) must be written in math mode. See the full list here.If you intended to use mathematics mode, then use $ … $ for 'inline math mode', $$ … $$ for 'display math mode' or alternatively \begin{math} … \end{math}.

答案1

像这样吗?

在此处输入图片描述

\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{table}[h!]
\[ % switch to display math mode -- fewer '$' symbols to type
\begin{array}{@{}cccc@{}} % use 'array', not 'tabular'
    \toprule
       \mathbf{F} & \mathbf{df_1} & \mathbf{df_2} & \mathbf{Sig.}\\
    \midrule
       2.016 & 3 & 36 & 0.129 \\
    \bottomrule
\end{array}
\]
\end{table}
\end{document}

相关内容