Skip to content

Commit

Permalink
patch longtable command so that unlisted tables don't contribute to t…
Browse files Browse the repository at this point in the history
…he table of tables
  • Loading branch information
chrisfenner committed Jan 19, 2024
1 parent c14429e commit 9191950
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions template/eisvogel.latex
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,21 @@ $endif$
\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
\makeatother

% % Fix issue where unnumbered tables still contributed to the table counter.
% % https://tex.stackexchange.com/questions/32553/longtable-caption-without-incrementing-table
\usepackage{longtable}
\usepackage{etoolbox}
\makeatletter
\newif\ifLT@nocaption
\preto\longtable{\LT@nocaptiontrue}
\appto\endlongtable{%
\ifLT@nocaption
\addtocounter{table}{\m@ne}%
\fi}
\preto\LT@caption{%
\noalign{\global\LT@nocaptionfalse}}
\makeatother

% % Allow footnotes in longtable head/foot
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
\makesavenoteenv{longtable}
Expand Down

0 comments on commit 9191950

Please # to comment.