preview-inline
preview-inline copied to clipboard
Add image path prefix parameter
Image previewing only works when the path to the image on local disk can be resolved relative to the path of the markdown document. If pandoc (for markdown) or latex use a different path for images (in latex this would be specified using graphicspath), this does not work. This could be fixed by letting the user specify a prefix for images as a parameters.
Note that you can use absolute paths for images.
I've added a base path option in the development version, feel free to test it. Will release when i feel it's stable.
Works fine, thank you so much!
It currently only works with an absolute path as base path. It would be more convenient as a path relative to the document, because otherwise one needs to update the setting according to the document (if for examples figures are stored in a subfolder of the one where the document is)
Ok I will have a look at that - I don't want to load up on too many options because it can get a bit messy and unpredictable as to what the out put will be (it quickly starts to show in the logic for extracting file paths, there are lots of different branches and possible combinations of options).
For Latex I support graphicspath if it is in the same document. I've been toying with the idea of a project config file for large markdown projects - but I think that may make more sense as a separate package that preview-inline could optionally depend on.
In any case right now I'm crazy busy but I have a lot of ideas for better academic writing in markdown with Atom in the pipeline...