This answer describes a neat way to parse and extract a latex file. It works perfectly on my laptop and desktop (both ubuntu 18.04).
However, when I run the commands in a docker container, I get the error below. The container has textlive-full
installed. The container is running Debian Stretch 9.9.
The files tested
and instrumenter
are in https://tex.stackexchange.com/a/504528/224
studio@704da4b37614:~$ latex '\input instrumenter \input tested'
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
LaTeX2e <2017/01/01> patch level 3
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(./instrumenter.tex
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3dvips.def)))) (./tested.tex
(/usr/share/texlive/texmf-dist/tex/latex/base/report.cls
Document Class: report 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) (./instrumenter.aux)
! Illegal parameter number in definition of \chapter .
<to be read again>
3
l.7 \chapter
[foo]{Foo}
?