-
Notifications
You must be signed in to change notification settings - Fork 78
Description
I have been using pandoc-crossref with pandoc in quite a while, and it worked fine for me. However, I wanted to update today, and it broke.
I installed pandoc on Windows 10 with the MSI installer; and then I copied pandoc-crossref.exe in the same folder where pandoc.exe is. Btw, I could not find anywhere in the main README that the idea of unpacking the 7z file is to get a pandoc-crossref.exe which should then be copied in the pandoc.exe installation directory - please add that.
Anyways, since I'm a user of MSYS2, that is where I usually run pandoc, and it seems my path is set up properly:
$ pandoc --version
pandoc 3.8.3
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: C:\Users\user\AppData\Roaming\pandoc
Copyright (C) 2006-2025 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
$ pandoc-crossref.exe --version
pandoc-crossref v0.3.22 git commit c927e7341fa84bce65897e79511eff202c6a6c5e (HEAD) built with Pandoc v3.8.3, pandoc-types v1.23.1 and GHC 9.8.4
So, that seems fine. Then I downloaded the https://github.com/lierdakil/pandoc-crossref/tree/master/docs/demo directory, and I'm trying to run make pdf in it:
$ make pdf
pandoc --number-sections -t latex --filter pandoc-crossref -o output.pdf demo.md
Error producing PDF.
! Package keyval Error: alt undefined.
See the keyval package documentation for explanation.
Type H <return> for immediate help.
...
l.166 ...s64/tmp/media-8e356f01ab136ab2/img1.jpg}}
make: *** [Makefile:4: pdf] Error 43
I don't understand where that media-8e356f01ab136ab2 came from, there is no such thing in the .tex file - it certainly does not appear in the output.latex file:
$ make latex
pandoc --number-sections -t latex --filter pandoc-crossref -o output.latex demo.md
pandoc --number-sections -t latex --filter pandoc-crossref -o output-chapters.latex demo.md --top-level-division=chapter
pandoc --number-sections -t latex --filter pandoc-crossref -o output-cref.latex demo.md -M cref=True
pandoc --number-sections -t latex --filter pandoc-crossref -o output-listings.latex demo.md -M listings --syntax-highlighting=idiomatic
$ grep img1.jpg output.latex
\pandocbounded{\includegraphics[keepaspectratio,alt={A figure}]{img1.jpg}}
\pandocbounded{\includegraphics[keepaspectratio,alt={First figure}]{img1.jpg}}
\pandocbounded{\includegraphics[keepaspectratio,alt={Unlabelled image}]{img1.jpg}}
\begin{subfigure}{1.0\linewidth}\pandocbounded{\includegraphics[keepaspectratio,alt={Subfigure a}]{img1.jpg}}\caption{Subfigure
\begin{subfigure}{1.0\linewidth}\pandocbounded{\includegraphics[keepaspectratio,alt={Subfigure b}]{img1.jpg}}\caption{Subfigure
\begin{subfigure}{0.495\linewidth}\pandocbounded{\includegraphics[keepaspectratio,alt={Subfigure a}]{img1.jp}}\caption{Subfigure
What is going on, and how can I get the demo build to work?