obsidian-pandoc
obsidian-pandoc copied to clipboard
Pandoc does not export pictures due to wrong path
When I want to export an Obsidian file to word in which I integrated a picture I get the following error message:

My pictures are stored in an attachment folder.
What can I do?
see my comment on #81
This might work for one fixed directory, but I have many folders with notes and images.
For me the better workaround is:
Suppose the note is in
/foo/bar/note.md
use the plugin to export note.md as LaTeX to /foo/bar/note.tex
then on the command line,
cd /foo/bar
pdflatex note.text
and that will give a correct note.pdf
There is something fundamentally broken in this plugin. Probably it does not put its current directory to where the note is, before running pandoc.
I have found a hot fix:
In the main.js of the pandoc plugin, in the functionconst pandoc = ...,
under the line
let args = [];
add these two lines
args.push('--resource-path')
args.push(path$1.dirname(input.file))
The effect is that pandoc will be called with `--resource-path=parentdir where parentdir is the parent directory containing the note. This will enable pandoc to resolve all relative links in the note.
Of course, this is a fix in the generated main.js.
@OliverBalfour Maybe you can review this proposal and fix it in the source?
I think this will improve the plugin a lot!
I have written a pull-request in the mean-while.