I am using the pandoc/latex docker container and having some issues with --resource-path
. My project is using a latex template which references an image, and I cannot get latex to find the image.
My file tree looks like this:
/app/tmp/
├── 42
│ ├── galley.md
│ └── img
│ ├── 1.jpg
│ ├── 5.jpg
│ ├── 7.jpg
│ └── 9.jpg
And I have user data dirs like this:
/home/worker/.pandoc
├── assets
│ └── logo.png
└── templates
└── sow.latex
The command I'm using looks like
pandoc --from markdown --to latex /app/tmp/42/galley.md --output=/app/tmp/42/2/out.pdf --template sow.latex --resource-path=.:/home/worker/.pandoc/assets
As mentioned the latex template does make a reference to logo.png
:
\includegraphics[width=0.75\textwidth]{logo.png}\par\vspace{1cm}
Whenever I run pandoc I get the following error:
! Package pdftex.def Error: File `logo.png' not found: using draft setting.
If I comment out the reference to logo.png
then everything works fine including the other images referenced within galley.md
. Likewise if I copy logo.png
into the directory with galley.md
everything works fine; as a workaround that is fine, but it feels quite clangy so I would rather sort out how to reference logo.png
from where it sits in assets
.
Is there something I've missed about how reference-path
plays with template
?
~/.pandoc
, to no avail. Specifying the directory via--data-dir=/~/.pandoc
does also not help – Prague