# How can you change the font for the contents of all tables in a document

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

-

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

-
Thanks, I've got the captions under more control. –  Darling Oct 7 '11 at 9:14

The memoir document class provides a means to set a default formatting for floats (if this is what you mean by "tables") via the \setfloatadjustment{<float>}{<adjustment>} macro. This would add <adjustment> to <float> whenever it is used. For example,

\setfloatadjustment{figure}{\centering}

Alternatively, you could use the etoolbox package to patch certain commands/environments. By patching here, it could append code to the start/end of an environment that would change (say) the font/alignment, as in the above setup.