kawabata/ox-pandoc

Images are not exported and displayed in resulting document when included with absolute path

novoid opened this issue · 6 comments

  • pandoc.exe 2.2
  • Windows 10
  • Org mode version 9.1.6
  • GNU Emacs 26.0.90
  • First try: ox-pandoc Created: 2014-07-20 Version: 1.171202 (git 55861ad)
  • Then I updated to: ox-pandoc Created: 2014-07-20 Version: 1.171202 (git cd3c59f = latest)
    • Date is same, git hash has changed though. issue remains the same.

My input data is:

works only as link (not displayed "inline") with HTML4:

[[file:C:\Users\karl.voit\archive\file.png]]

does not result in a working link nor being displayed:

[[file:C:/Users/karl.voit/archive/file.png]]

works only as link (not displayed "inline") with HTML4:

[[C:\Users\karl.voit\archive\file.png]]

does not result in a working link nor being displayed:

[[file:C:/Users/karl.voit/archive/file.png]]

I did not find any possible way to convert to docx, html4/5, pdf that includes one of the image include methods I could imagine.

Can someone post an example that should work? My desired output format would be docx.

Would you try putting the image file in the same directory and put it as
`[[./image.png]]' ?

It at least worked in my environment (Windows with pandoc 2.2) with LaTeX and docx.

Thanks for the comment, @kawabata!

Yes, including files without any path is indeed working: [[image.png]]

However, in my use-case the images are maintained in different directories. I tried and found out that relative paths do work as well: [[../../archive/image.png]]

So this is my current workaround: find a (rather complicated) relative path to include images.

Is there a possibility to include images with an absolute path? When I have to use a different drive letter, relative paths fail as well ...

This is a bug in pandoc. Sorry. I'll fix it in a moment.

Pandoc 2.2.1 has just been released and contains a fix for this. @novoid, could you try with that version?

Hi!

Thanks for fixing this issue.

Here are my findings when testing with pandoc 2.2.1 on Windows 10:

works:
[[file:C:\Users\karl.voit\archive\file.png]]
[[file:C:/Users/karl.voit/archive/file.png]]
[[C:\Users\karl.voit\archive\file.png]]
[[file:C:/Users/karl.voit/archive/file.png]]

not working: (which is totally Okay since they reflect tests with an "alternative" path format)
[[file:C\Users\karl.voit\archive\file.png]]
[[file:C/Users/karl.voit/archive/file.png]]
[[file:C/Users/karl.voit/archive/file.png]]