Your message dated Sat, 03 Sep 2022 17:37:29 +0200
with message-id <166221944967.12822.7589984488512852667@localhost>
and subject line Re: Bug#1019000: pandoc: LaTeX Error: Environment Shaded
undefined.
has caused the Debian Bug report #1019000,
regarding pandoc: LaTeX Error: Environment Shaded undefined.
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1019000: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1019000
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: pandoc
Version: 2.17.1.1-1
Severity: normal
X-Debbugs-Cc: [email protected]
Hi,
since pandoc 2.17.1.1-1, the latex generated from rst by [this script]
fails to build with:
[14] [15] [16]
Chapter 5.
(/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-cmr.cfg)
Overfull \hbox (15.37852pt too wide) in paragraph at lines 251--258
\TU/Inter(0)/m/n/10 for your computer to execute, but also to write
programs (s
cripts)
[17]
! LaTeX Error: Environment Shaded undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.278 \begin{Shaded}
?
! Emergency stop.
...
l.278 \begin{Shaded}
Output written on reform-handbook.pdf (17 pages).
Transcript written on reform-handbook.log.
Responsible for this is pandoc as evident from a debbisect run with this
reproducer script test.sh:
#!/bin/sh
set -e
chroot "$1" useradd --home-dir /home/user --create-home user
chroot "$1" runuser -u user -- env --chdir=/home/user sh -e << EOF
pip3 install sphinx
wget https://github.com/rsms/inter/releases/download/v3.15/Inter-3.15.zip
mkdir -p /home/user/.local/share/fonts
unzip Inter-3.15.zip
mv 'Inter Desktop' /home/user/.local/share/fonts/
fc-cache /home/user/.local/share/fonts
git clone https://source.mnt.re/reform/reform-handbook.git
mkdir -p reform-handbook/src/build
env --chdir=reform-handbook/src ./build-pdf-book.sh
EOF
And this command line:
$ debbisect --cache=./cache
--depends=python3-pip,texlive-xetex,texlive-latex-extra,pandoc,wget,unzip,fontconfig,texlive-font-utils,git,ca-certificates,texlive-fonts-recommended,ghostscript
20220813T160100Z 20220813T214310Z ./test.sh
snapshot timestamp difference: 0.237616 days
approximately 2 steps left to test
#1: using cached results from debbisect.20220813T160100Z.log.good
computation time left: 0:00:00.000067
approximately 1 steps left to test
#2: using cached results from debbisect.20220813T214310Z.log.bad
snapshot timestamp difference: 0.237616 days
computation time left: 0:00:00
approximately 0 steps left to test
#3: using cached result (was good) from debbisect.20220813T160100Z.log.good
bisection finished successfully
last good timestamp: 2022-08-13 16:01:00+00:00
first bad timestamp: 2022-08-13 21:43:10+02:00
the following packages differ between the last good and first bad timestamp:
liblua5.3-0:amd64 (n.a.) -> 5.3.6-1
libyaml-0-2:amd64 (n.a.) -> 0.2.5-1
pandoc 2.9.2.1-3+b2 -> 2.17.1.1-1
pandoc-data 2.9.2.1-3 -> 2.17.1.1-1
test installing liblua5.3-0:amd64 5.3.6-1...
installing liblua5.3-0:amd64 does not cause the problem
test installing libyaml-0-2:amd64 0.2.5-1...
installing libyaml-0-2:amd64 does not cause the problem
test upgrading pandoc 2.9.2.1-3+b2 -> 2.17.1.1-1...
upgrading pandoc triggered the problem
additional packages that got upgraded/installed at the same time:
liblua5.3-0:amd64 (n.a.) -> 5.3.6-1
libyaml-0-2:amd64 (n.a.) -> 0.2.5-1
pandoc-data 2.9.2.1-3 -> 2.17.1.1-1
test upgrading pandoc-data 2.9.2.1-3 -> 2.17.1.1-1...
upgrading pandoc-data triggered the problem
additional packages that got upgraded/installed at the same time:
liblua5.3-0:amd64 (n.a.) -> 5.3.6-1
libyaml-0-2:amd64 (n.a.) -> 0.2.5-1
pandoc 2.9.2.1-3+b2 -> 2.17.1.1-1
Thanks!
cheers, josch
[this script]
https://source.mnt.re/reform/reform-handbook/-/blob/master/src/build-pdf-book.sh
--- End Message ---
--- Begin Message ---
Hi,
Quoting Jonas Smedegaard (2022-09-03 16:54:53)
> Quoting Jonas Smedegaard (2022-09-03 16:21:21)
> > Quoting Johannes Schauer Marin Rodrigues (2022-09-03 15:35:36)
> > > so if you run this:
> > >
> > > echo ".. code-block:: none" | pandoc -o out.tex -frst
> > >
> > > then with the old pandoc 2.9.2.1 you get:
> > >
> > > \begin{verbatim}
> > > \end{verbatim}
> > >
> > > and with pandoc 2.17.1.1 you get:
> > >
> > > \begin{Shaded}
> > > \begin{Highlighting}[]
> > > \end{Highlighting}
> > > \end{Shaded}
> >
> > Thanks a lot - this makes it much easier to examine the issue further!
>
> ...but while the above minimal command demonstrates that "Shaded" gets
> introduced in intermediary LaTeX code, this slightly different command
> to generate a PDF from that same intermediary LaTeX code does not fail:
>
> echo ".. code-block:: none" | pandoc -o out.pdf -frst
>
> I tested in a somewhat clean sid environment with this prepation:
>
> apt --no-install-recommends install pandoc texlive-latex-recommended lmodern
>
>
> > > so for this to work with pandoc 2.17.1.1 we need some usepackage for
> > > the Shaded environment.
>
> I guess (but again I have *not* looked at your original external code,
> so really I am only guessing here!) that the real issue might be that a
> custom template is used and that custom template needs to be updated to
> match newer pandoc processing.
>
> To demonstrate that this is a bug in pandoc I will need to be able to
> trigger it with a minimal failing code example.
>
> If you agree that the bug may be in some custom template needing update,
> then you can probably find help in comparing the output from older and
> newer pandoc of this command:
>
> pandoc --print-default-template latex
>
> If you want to explore stepwise what is happening between your
>
> echo ".. code-block:: none" | pandoc -o out.tex -frst
>
> and my
>
> echo ".. code-block:: none" | pandoc -o out.pdf -frst
>
> then you are probably helped by addding option "--standalone":
>
> echo ".. code-block:: none" | pandoc -o out.tex -frst --standalone
Bingo! Using the --standalone option to pandoc indeed made it generate the
definition for the Highlighting and Verbatim environments.
Is there a way to tell pandoc to just give me the preamble that --standalone
produces so that nothing breaks the next time pandoc is updated?
Anyways, not pandoc's fault, so closing this bug.
Thanks!
cheers, josch
signature.asc
Description: signature
--- End Message ---