[Tex/LaTex] How to you change the font for the contents of all tables in a document

floatsfontstables

Is there a simple way to set the default font for all tables in a document?

Best Answer

Either amend the definition of \table directly or use the floatrow package and its \floatsetup macro. (Note: floatrow by default also centers the content of floats.)

\documentclass{article}

\makeatletter
\g@addto@macro{\table}{\sffamily}
\makeatother

\begin{document}

\begin{table}
(Table contents)
\end{table}

Some text outside a table.

\end{document}

\documentclass{article}

\usepackage{floatrow}
\floatsetup[table]{font=sf}

\begin{document}

\begin{table}
(Table contents)
\end{table}

Some text outside a table.

\end{document}