Apparently this is an open issue . On Saturday, 7 January 2023 at 17:18:07 UTC Amy de Buitléir wrote: > I'm writing Pandoc LaTeX and Beamer templates that need to include images > for corporate branding. So I want to insert an includegraphics command > into the template, using the include-before-body option, or even > modifying the default template if necessary. > > The problem is that at the time pandoc is invoked, *we don't know the > path to the images*, > but we do know their location relative to the "user data directory" (e.g. > /home/amy/.local/share/pandoc) and the location of the YAML defaults file. > > Here's the directory structure I'm using for testing. > > . > ├── example.md > └── templates > └── defaults <-- Ultimately this will live in the > user data directory > ├── test.yaml > ├── body-include.tex <-- Contains "\includegraphics{test.png}" > ├── header-include.tex <-- Contains "\usepackage{graphicx}" > └── test.png > > I have tried two approaches. > > 1. Using --resource-path. This option can be used to specify locations to > look for images. That works fine for images that are included in the main > document, but not for images included in the template. > > 2. Passing some location information to body-include.tex (or the default > template if I need to modify that), so it can construct a path to the > image. The only way I know of to accomplish this is to use ${.}, but that > only works in fields that expect file paths, not in variables that LaTeX or > Beamer templates can use, as far as I know. > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/26856790-deed-4cd4-8862-181c6b74cafdn%40googlegroups.com.