Skip to content
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

Add image path prefix parameter #23

Open
tomfrancart opened this issue Mar 16, 2017 · 3 comments
Open

Add image path prefix parameter #23

tomfrancart opened this issue Mar 16, 2017 · 3 comments

Comments

@tomfrancart
Copy link

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.

@mangecoeur
Copy link
Owner

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.

@tomfrancart
Copy link
Author

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)

@mangecoeur
Copy link
Owner

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants