pandoc
pandoc copied to clipboard
Not enough LaTeX runs for pageslts
I've been using a LaTeX package fullpagenumber.sty
for years, and it used to work with Pandoc:
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fullpagenumber}[2018/10/23 v0.1 fullpagenumber]
\RequirePackage{pageslts,fancyhdr,apptools,amssymb}
\newcommand*{\@lastpage}{\lastpageref*{pagesLTS.arabic}}
\fancypagestyle{fullpagenumber}{
\fancyhf{}\fancyfoot[C]{\thepage~/~\@lastpage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\fancypagestyle{cornernote}{
\fancyhf{}\fancyfoot[C]{\thepage~/~\@lastpage}%
\fancyhead[R]{\ifx\cnote\undefined\else{\hfill\tiny\cnote}\fi}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\AtBeginDocument{%
\pagenumbering{arabic}%
\pagestyle{fullpagenumber}}
\AtAppendix{%
\clearpage\pagenumbering{roman}%
\renewcommand*{\@lastpage}{\lastpageref*{LastPage}}}
A simple \usepackage{fullpagenumber}
in the default LaTeX template doesn't work anymore. Note that using Pandoc to generate LaTeX, followed by latexmk
still works. The issue is that Pandoc is missing a run to set the LastPage
counter.
Pandoc --version
:
pandoc 3.1.10
Features: +server +lua
Scripting engine: Lua 5.4
I believe this was fixed in 3.1.11 - try upgrading?
My bad. I didn't realize my homebrew was outdated. It works with 3.1.11.