I'm trying to modify the table environment to apply small and centering, along with \figuversion{tabular} (this is some font-specific stuff), to all tables in the document.
What would be the best way to achieve this?
Here is how I tried to do this:
\renewenvironment{table}
{%
\@float{table}%
\small%
\centering%
\figureversion{tabular}%
}%
{%
\end@float%
}
However, optional placement identifier is lost here, i.e., if I write \begin{table}[h!], I get the table, and [h!] is printed above the table.
Here is the minimum working example:
\documentclass[a4paper]{book}
\makeatletter
\renewenvironment{table}%
{%
\@float{table}%
\small%
\centering%
%\figuversion{tabular}%
}%
{%
\end@float%
}
\makeatother
\begin{document}
\hbox{}
\begin{table}[b!]
\begin{tabular}{cc}
Entry 1 & Entry 2 \\
Entry 3 & Entry 4
\end{tabular}
\end{table}
\end{document}
P.S. I cannot use the floatrow package as it clashes with the float package that is not used directly, but some package in my document requires it.
EDIT: This question has already been answered. I repeat the solution here:
\renewenvironment{table}[#1][ht]
{%
\@float{table}[#1]%
\small%
\centering%
\figureversion{tabular}%
}%
{%
\end@float%
}
\renewenvironment{table}[1]...) in Stefan Kottwitz' answer to How can I center all tables in a document? – leandriis Sep 16 '19 at 07:42