Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.21k stars 968 forks source link

Build failing with too many }'s #226

Closed TiemenSch closed 3 years ago

TiemenSch commented 3 years ago

https://travis-ci.com/github/Wandmalfarbe/pandoc-latex-template/jobs/478972771#L899

Build is failing on \begin{document} with

Error producing PDF.
! Too many }'s.
\FNH@check@a ...tnotes \expandafter \@gobble \fi }
                                                  {}}\@secondoftwo \scantoke...
l.417 \begin{document}

FYI, I'm having the same issue on my local (MiKTeX) installation.

Any ideas?

Wandmalfarbe commented 3 years ago

The build fails on the example images-and-tables. There might be an issue with the latest TeX Life because the travis build downloads the latest release.

Wandmalfarbe commented 3 years ago

If you comment out these lines it will work again.

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

The Package footnotehyper (https://ctan.org/pkg/footnotehyper) received an update on 2021-01-27 and 2021-01-30 that might cause Eisvogel builds to fail.

The default pandoc LaTeX template has the same code but is not affected.

Wandmalfarbe commented 3 years ago

The error was indeed caused by footnotehyper. A bug fix was published on 2021-02-05 with the following information.

  • Fix regression at v1.1b which caused a build crash whenever footnotehyper decided to raise a warning at begin document.

Jean-François Burnol https://ctan.org/ctan-ann/id/mailman.3887.1612536880.2532.ctan-ann@ctan.org

Your build should be working again, if you update footnotehyper to the latest version or update all installed packages. Thank you for reporting this issue.


To update all installed Packages:

tlmgr update --all

To update only footnotehyper:

tlmgr update footnotehyper
mariobaldini commented 3 years ago

Hi,

Could someone help me figure out if the error below is due the same reason as this issue?

(from eisvogel examples folder):
pandoc --verbose "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings

(/usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty)
! Argument of \strip@prefix has an extra }.
<inserted text> 
                \par 
l.6277 ...nglish,usenglish}\contentsname{Contents}
                                                  %
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on /tmp/tex2pdf.-c3f4f0c2ec0808e9/input.log.

[makePDF] Run #2
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(/tmp/tex2pdf.-c3f4f0c2ec0808e9/input.tex
LaTeX2e <2020-02-02> patch level 5
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2020/04/19 v3.30 KOMA-Script document class (article)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrlfile.sty)))
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)
(/usr/share/texlive/texmf-dist/tex/latex/koma-script/typearea.sty)
! Argument of \strip@prefix has an extra }.
<inserted text> 
                \par 
l.6277 ...nglish,usenglish}\contentsname{Contents}
                                                  %
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on /tmp/tex2pdf.-c3f4f0c2ec0808e9/input.log.

Error producing PDF.
! Argument of \strip@prefix has an extra }.
<inserted text> 
                \par 
l.6277 ...nglish,usenglish}\contentsname{Contents}

I tried:

sudo tlmgr -repository http://mirror.ctan.org/systems/texlive/tlnet update footnotehyper --ignore-warning

tlmgr: Local TeX Live (2020) is older than remote repository (2021).
Cross release updates are only supported with
  update-tlmgr-latest(.sh/.exe) --update
See https://tug.org/texlive/upgrade.html for details.

Is there a solution that does not involve updating the whole set of tex packages? (to reduce the chance of breaking something else)

My environment is a Fedora 34 Workstation. Tried with both 2.0.0 release and master of eisvogel.

TeX 3.14159265 (TeX Live 2020)
kpathsea version 6.3.2
pandoc 2.9.2.1
Compiled with pandoc-types 1.20, texmath 0.12.0.2, skylighting 0.8.5

I see no "typearea" in tlmgr lis

Since other renderings work, is there anything that I can apply to the eisvogel.tex itself to fix it, without changing system packages nor breaking previous builds? (preventing changes/incompatibility with other developers that are using it correctly).

Thanks