[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1019000: pandoc: LaTeX Error: Environment Shaded undefined.



Control: tags -1 +unreproducible

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


Kind regards,

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature


Reply to: