-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pandoc cannot recognize image path #198
Comments
Where is the note you are exporting located? |
I was also getting this issue. I have my note in |
Same here, but if I switch the Export files from HTML or markdown option from "markdown" (default value) to "HTML", images are back again. |
I encountered the issue as well, though I found a simple workaround. change the image link from
to include the full path in your vault, like so
I am now able to export to docx format and it's beautiful. Thank you everyone!! |
I have the same issue and am not willing to change my links from relative to absolute as northben suggests. davideriboli's workaround of switching form "markdown" to "HTML" also did not work. Hope this can be resolved sometime soon. Either way, thanks for the awesome plugin! |
It has been resolved since version 3.1.7 of Pandoc. To export wikilink images with Pandoc, you just need to:
You add these arguments to the Extra arguments field of the Pandoc plugin. A caveat is that you can't use link attributes to specify the image size on wikilink images, as you can with markdown linked images. If you would like to see this supported, add your voice here: jgm/pandoc#9048 In any case, I would advise people to migrate away from the Pandoc plugin to the Enhancing export plugin, which also integrates Pandoc. Unlike the Pandoc plugin, it's not abandoned and buggy. It should be easier and more reliable to set this up there. |
the Enhancing Export plugin looks nice but for me it didn't export images at all, it just exported the markdown format for the image links. The .docx file has "![[the filename.docx]]" where it should have an image. |
My work computer is Mac and my home computer is Windows, so absolute paths to images aren't usable. And, even if I was on the same OS everywhere, I have images stored in the attachments folders under each obsidian folder -- I can't set a global path to images. Individually hand coding image paths, etc., just drives me to skip Obsidian, and to simply use Latex, PowerPoint, Word or whatever. But doesn't Pandoc Plugin have the info needed to handle image paths automatically? Obsidian itself can find those images with no user intervention, and so can Obsidian's built-in Export to PDF command. |
Thank you for your detailed guidance. as shown in the figure, the system runs the panrun command, it seems that the wikilinks_title_after_pipe extension does not work. Is there a conflict where extensions are disabled here is my yaml file: output:
docx:
standalone: true
embed-resources: true
from: markdown+wikilinks_title_after_pipe+mark+autolink_bare_uris+lists_without_preceding_blankline
to: docx
output: output.docx
lua-filter:
- image.lua
- codeblock.lua
- math.lua
- link.lua
filter: pandoc-crossref
citeproc: true
top-level-division: chapter
toc: true
linkReferences: true
codeBlockCaptions: true
chapters: true
chapDelim: '-'
numberSections: true
sectionsDepth: 3
titleDelim: ' '
figPrefixTemplate: |
$$p$$ -$$i$$
tableTemplate: |
*$$tableTitle$$$$i$$*$$titleDelim$$$$t$$
figureTemplate: |
$$figureTitle$$$$i$$$$titleDelim$$$$t$$
reference-doc: reference.docx
bibliography: ref.bib
csl: xxx.csl
link-citations: true
reference-section-title: xxx
toc-title: xxx
abstract-title: |
xxx
abstract: |
xxx wikilinks method of use: command run in powershell 5: pandoc --version:
pandoc-crossref --version:
|
Found the solutionI had the same problem, and I think I found the solution. I recorded a video to help you out. Here is the link: https://youtu.be/pKawg6mPWE4 |
@afganrasulov |
Currently, my Pandoc can export Word (with pictures)
But there is a very critical problem. All my local pictures are placed in ./Documents/${filename}
I don’t know what’s going on. Pandoc can’t find this directory, causing the picture to fail to be exported.
But when I put the picture in the root directory, Pandoc can recognize it and export the Word with the picture successfully.
I tried putting the image in a folder in the root directory but it still doesn't work.
You can only put the image directly in the root directory, which is very inconvenient.
Please give me some advice on how to make Pandoc recognize local images in other directories in i Cloud. Thanks.
The text was updated successfully, but these errors were encountered: