You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
text
[My shiny image](/Images/img.png)
other text
[My shiny image 2](/Images/img2.png)
It has to be absolute because the files are stored on a github repository and there the path is relative to the current directory.
They are rendered as expected on github, but i'm aware that using pandoc the working dir is the main directory, not the file directory (and i'm compiling many markdown files when generating the single pdf)
But it fails to open them when i use pandoc (because with pandoc the path should be relative to the ProjectFolder). I read about the --resource-path option of pandoc and it looked the solution to my issue:
List of paths to search for images and other resources.
pandoc: /Images/taskssequence.png: openBinaryFile: does not exist (No such file or directory)
Note that the images are 2, and i got the error only for one. But the most interesting thing is that both images are present in the final pdf. So i'm confused they should or shouldn't be present?.
I think that using an absolute path in the markdown it is actually searching in the Root folder of my hard disk. But i wonder if there is a way to express an absolute path, forcing pandoc to consider the project directory as its root.
Pandoc version?
2.9.2.1
The text was updated successfully, but these errors were encountered:
I think that using an absolute path in the markdown it is actually searching in the Root folder of my hard disk
Correct.
But i wonder if there is a way to express an absolute path, forcing pandoc to consider the project directory as its root.
Not that I can think of. But perhaps you could use relative paths after all? If your content is below the images directory, could you use something like ../../images/picture.jpg? And then when you use pandoc, use -f markdown+rebase_relative_paths so that the paths will be computed from the file's directory and not the working directory?
I have the following scenario:
Now in
Folder2\File.md
i have:It has to be absolute because the files are stored on a github repository and there the path is relative to the current directory.
They are rendered as expected on github, but i'm aware that using pandoc the working dir is the main directory, not the file directory (and i'm compiling many markdown files when generating the single pdf)
But it fails to open them when i use pandoc (because with pandoc the path should be relative to the ProjectFolder). I read about the --resource-path option of pandoc and it looked the solution to my issue:
So i tried to use it with the following command:
And i got the following error:
Note that the images are 2, and i got the error only for one. But the most interesting thing is that both images are present in the final pdf. So i'm confused they should or shouldn't be present?.
I think that using an absolute path in the markdown it is actually searching in the Root folder of my hard disk. But i wonder if there is a way to express an absolute path, forcing pandoc to consider the project directory as its root.
Pandoc version?
2.9.2.1
The text was updated successfully, but these errors were encountered: