Open Darthagnon opened 6 months ago
This should work! I just did a small test and it worked fine. You'll have to provide a complete test case we can run to duplicate the issue. (Not your whole book -- just pare things down to the minimum necessary to reproduce it, and give us all the files necessary.)
I see you're on Windows. It's possible that the problem involves /
as a path separator? Does the image appear if you use \
instead of /
in the image path?
Aha, that's it. When I use backslashes for image paths, it works. Thank you!
Any chance slash translation could be added as a feature? The Markdown editors I use, MarkdownPad 2 and Notepad++ with NppMarkdownPanel, and previewers 1218 Seer and QuickLook display images regardless of back/forward slash; guess that's why I didn't spot this as the solution earlier.
I just realised, 1218 Seer uses Pandoc v1.16.0.2 under the hood, and when previewing Markdown files with linked images on Windows, it does the opposite to the issue I'm observing here with Pandoc v3.1.13: images linked with backslashes \
are not displayed, but images linked with forward slashes /
are displayed.
Although, on closer examination, I'm not sure if it's using Pandoc to render Markdown, as the plugin folder only contains scripts for DOCX and EPUB:
{
"name": "docx2md",
"suffix": ["docx","odt"],
"exec": "pandoc.exe -s \"*SEER_INPUT_PATH*\" -t markdown -o \"*SEER_OUTPUT_PATH*.md\""
}
{
"name": "epub2text",
"suffix": ["epub"],
"exec": "pandoc.exe -s \"*SEER_INPUT_PATH*\" -t plain -o \"*SEER_OUTPUT_PATH*.txt\""
}
Explain the problem.
I'm compiling an EPUB from Markdown source files, one file per chapter. I'm compiling the book using the following command in a batch file:
Some of the chapters reference images, e.g.
The images exist, but are ignored by Pandoc and are not included in the rendered EPUB. Except for the cover, which is included. How can I make sure they're included?
Pandoc version?
What version of pandoc are you using, on what OS? v3.1.13 amd64 Win10 v1709
Possibly related issues:
Some of the above issue threads seem to suggest referencing the images in ways not standard to Markdown in order to force Pandoc to include them. Surely there's a better, simpler way? Any advice would be appreciated!