The XY problem --as is often requested on SE forums-- is how to automatically set the following parameters of a longtable environment (because I'm using Pandoc to generate the latex):
- width ratio of the page
- centering
- font size
I achieved that previously on the table environment (renewenvironment with opening brace before, and closing brace after (to center wide floats)), also helped by existing macros from the Pandoc default template:
% Original macro to customize table
\makeatletter
\renewenvironment{table}[1][\fps@table]{
\edef\@tempa{\noexpand\@float{table}[#1]}
\@tempa\centerfloat\footnotesize%
}{
\end@float
}
\makeatother
Copy-pasting the above and replacing "table" by "longtable" just does not work:
\makeatletter
\renewenvironment{longtable}[1][\fps@longtable]{
\edef\@tempa{\noexpand\@float{longtable}[#1]}
\@tempa\centerfloat\footnotesize%
}{
\end@float
}
\makeatother
I suppose there is no such macro as \fps@longtable
in the longtable source, and also that one longtable might indeed be made of multiple floats... So what is the macro that I should redefine?
\footnotesize
before the table?\let\oldlongtable\longtable \def\longtable{\footnotesizse\oldlongtable}
\centerfloat\footnotesize
before the longtable content\textwidth
? but anyway you can set\LTleft
and\LTright
to-.1\textwith plus 1fill
and it'll allow to spill 10% at either side