I have a newcommand
that I use through out the text.
\newcommand{\test}{$A_b$}
When I use in a table heading, I wanted to make it bold. So, I put it inside \textbf{\test}
like this. But, the table does not show the bold text.
Here is a minimal reproducible code of my table.
\documentclass[10pt, conference]{IEEEtran}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{booktabs}
\begin{table}
\caption{...}
\centering
\resizebox{0.5\textwidth}{!}{
\begin{tabular}{ll}
\toprule
\textbf{Model} &
\textbf{\test} &
...
\end{tabulr}
}
\end{table}
\end{document}
The first column header (i.e., Model) is bold.
What am doing wrong? Is it because the values I wanted to display are in math environment (e.g., $A_b$
)?
Edit: Added missing content of the reproducible example.
\textbf
. You want\boldmath\test
. By the way, never resize tables.\documentclass
, a\usepackage
forbooktabs
andgraphics
/graphicx
, a\begin{document}
an\end{tabular}
,\end{table}
, and\end{document}
.