-
-
Notifications
You must be signed in to change notification settings - Fork 874
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
include_graphics fails with '~' home directory shorthand #1411
Comments
Absolute paths like this is almost always a very bad idea. Please use relative paths instead for the sake of portability. |
I am well aware that it's usually a good idea to use paths relative to the location of the document. In this case, however, precisely for reasons of portability I've specified all paths relative to project root using the |
I guess it is not the responsibility of
I have my reserved opinions about here. I see its point, but I don't think this nasty problem of file paths really has a perfect solution. |
THe odd thing is that paths with '~' work for ioslides, but not html/doc documents, and both use pandoc. Couldn't include_graphics() just expand the path itself to avoid this error? |
It could. It is just that I prefer fixing the disease instead of the symptoms. In this case, it is not the fault of ioslides is different with all other output formats. It is based on a custom Lua writer. That is probably why Pandoc wouldn't complain about the path. |
Gotcha, thanks for the response and for the awesome package! |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
include_graphics
apparently fails on Mac when I specify a path using the~
shorthand for the user home directory.gives
upon knitting. The following works, in contrast:
The text was updated successfully, but these errors were encountered: