Closed kevinushey closed 7 years ago
The tilde expansion is done by the shell and varies from one shell to another. It doesn't seem any more appropriate for pandoc to expand ~
than it would be for pandoc to expand ?
or *
or $HOME
.
Should there be some pandoc convention, though, for refering to $HOME? I have a single default bib file for all my academic writing, and I can't refer to it in YAML in a way that will work on both OSX and linux. I usually solve this by using a Makefile, which enters the bib as a command-line option. But in quick one-offs, it would be nice to refer to it in the YAML. Similarly, I can imagine there might be folks who want to use a resource in an image across multiple files (say, a company logo for letters) without copying it into each project dir.
Closing this. @jkr, re your question, I think a better approach would be some kind of environment variable that pandoc-citeproc would look in for bibliography files, see #3212.
This might be intentional / by design, but wanted to log for posterity. Suppose we do have an image at the path
~/scratch/image.png
, and the following Markdown file:Attempting to call pandoc with this gives:
This example works fine with a full path rather than an aliased path. Any chance pandoc could do tilde expansion on paths for self-contained documents (replacing with the value of an environment variable, e.g.
HOME
(USERPROFILE
on Windows)?