\usepackage{float}
\usepackage{bigstrut}
\usepackage{makecell}
\renewcommand\theadalign{bc}
\renewcommand\theadfont{\sfdefault}
\renewcommand\theadgape{\Gape[4pt]}
\renewcommand\cellgape{\Gape[4pt]}
\begin{table}[H]
\centering
\caption{Add caption}
\begin{tabular}{r r}
\hline
\rowcolor{LightCyan}
\thead{Emax/V \\ $\Delta$= $\pm$ 0 V} & V2 (V) \bigstrut\\
\hline
1 & 2 \bigstrut\\
\end{tabular}
\end{table}
Responder1
Provavelmente você quer
\renewcommand\theadfont{\sffamily}
e não
\renewcommand\theadfont{\sfdefault}
\sfdefault
contém um nome/identificador de fonte (aqui cmss
), para realmente usar sans serif, você precisa \sffamily
.
\documentclass{article}
\usepackage{float}
\usepackage{bigstrut}
\usepackage{makecell}
\usepackage[table,svgnames]{xcolor}
\usepackage{siunitx} % for typesetting units and numbers with units
\renewcommand\theadalign{bc}
\renewcommand\theadfont{\sffamily}
\renewcommand\theadgape{\Gape[4pt]}
\renewcommand\cellgape{\Gape[4pt]}
\begin{document}
\begin{table}[H]
\centering
\caption{Add caption}
\begin{tabular}{r r}
\hline
\rowcolor{LightCyan}
\thead{Emax/V \\ $\Delta= \pm 0$\,V} & V2 (V) \bigstrut\\
\thead{Emax/V \\ $\Delta= \SI[detect-family]{+-0}{\volt}$} & V2 (V) \bigstrut\\ % siunitx-alternative
\hline
1 & 2 \bigstrut\\
\end{tabular}
\end{table}
\end{document}