1

enter image description here

\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}
5

Presumably you want

\renewcommand\theadfont{\sffamily}

and not

\renewcommand\theadfont{\sfdefault}

\sfdefault holds a font name/identifier (here cmss), to actually use sans serif, you need \sffamily.

output of code without cmss

\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}
  • +1. Please also change $\Delta$= $\pm$ 0 V to $\Delta=\pm 0$ V, though. :-) – Mico Feb 18 '18 at 12:57
  • @Mico Didn't notice that one, thanks. – Torbjørn T. Feb 18 '18 at 13:01
  • 1
    Or perhaps siunitx, those Vs looks like volts – daleif Feb 18 '18 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.