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?
\footnotesizebefore the table? – David Carlisle Jun 17 '20 at 18:52\let\oldlongtable\longtable \def\longtable{\footnotesizse\oldlongtable}– David Carlisle Jun 17 '20 at 18:57\centerfloat\footnotesizebefore the longtable content – PlasmaBinturong Jun 17 '20 at 18:58\textwidth. – PlasmaBinturong Jun 17 '20 at 19:10\textwidth? but anyway you can set\LTleftand\LTrightto-.1\textwith plus 1filland it'll allow to spill 10% at either side – David Carlisle Jun 17 '20 at 19:36