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

conversion to rst fails for embedded images (windows) #765

Open
peendebak opened this issue Feb 15, 2018 · 5 comments
Open

conversion to rst fails for embedded images (windows) #765

peendebak opened this issue Feb 15, 2018 · 5 comments
Labels
format:ReST pertains to exporting to the Restructured Text format good first issue great for new contributors

Comments

@peendebak
Copy link

When converting notebooks to .rst format (using jupyter nbconvert --to rst [filename]) the embedded images references are using the %5C character instead of a backslash (or forward slash). The resulting .rst files are not parsed properly by sphinx to html files.

@takluyver
Copy link
Member

There are some urlencode uses in the rst template which maybe shouldn't be there. I don't know if the filenames need some other form of escaping instead.

@takluyver
Copy link
Member

cc @mgeier for nbsphinx, who might have a better idea what kind of escaping, if any, is needed.

@mgeier
Copy link
Contributor

mgeier commented Feb 15, 2018

I'm using posix_path instead of urlencode:

https://github.com/spatialaudio/nbsphinx/blob/1cfef1188fdb63b424fc69b89b1b27c4f55f9e81/src/nbsphinx.py#L137

I originally had the same problem in nbsphinx, which was reported in spatialaudio/nbsphinx#9 and fixed in spatialaudio/nbsphinx#10.

@takluyver
Copy link
Member

takluyver commented Feb 26, 2018

Thanks @mgeier !

@peendebak do you want to have a go at a pull request based on that information?

@t-makaro t-makaro added format:ReST pertains to exporting to the Restructured Text format good first issue great for new contributors labels Aug 11, 2019
@ovdavid28
Copy link

How do I automatically modify to posix path? Do I have to do it mannually? I am having this problem generating sphinx documentation as html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format:ReST pertains to exporting to the Restructured Text format good first issue great for new contributors
Projects
None yet
Development

No branches or pull requests

5 participants