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

Local-path figures not rendered in output/manuscript.html #237

Closed
sbonaretti opened this issue Jun 26, 2019 · 5 comments · Fixed by #238
Closed

Local-path figures not rendered in output/manuscript.html #237

sbonaretti opened this issue Jun 26, 2019 · 5 comments · Fixed by #238

Comments

@sbonaretti
Copy link

sbonaretti commented Jun 26, 2019

Hi,
I am learning manubot and the learning curve is very fast! I really like it! Thanks for creating it!
Two quick questions:

  • My figures are not rendered in .html, but they are rendered in .pdf. Do you have any suggestions on what I should double-check?
  • When I run build.sh I get a bunch of warnings (see attachment). Do you have any recommendations on how to fix them?
    Thanks a lot!
    Serena

warnings

@dhimmel
Copy link
Member

dhimmel commented Jun 26, 2019

Sounds like you are most interested in the local builds (as opposed to builds through Travis CI). That is OKAY, just that this is the most complex workflow. But thanks for trying it out and reporting issues!

My figures are not rendered in .html, but they are rendered in .pdf. Do you have any suggestions on what I should double-check?

Interesting. Are you opening output/manuscript.html and not seeing the images? That is actually expected if your images are provided by local path (rather than by URL to an external repo or location). If after you run your sh build/build.sh, you run the following:

# Configure the webpage directory
python build/webpage.py

Then you should be able to open webpage/index.html in a browser and see the images. Let me know if this addresses the issue? We'll think about how the documentation can make this more clear.

I get a bunch of warnings (see attachment). Do you have any recommendations on how to fix them?

I think all those warnings are from the HTML to PDF conversion by WeasyPrint. They can be safely ignored. Note that on Travis CI and local systems with Docker installed, we use a different program called athenapdf to convert from HTML to PDF. athenapdf doesn't output all these warnings.

@sbonaretti
Copy link
Author

Yes, I am using the local build - it feels a lot like sphinx, and thus it feels familiar to me.
The python command works, and the images get rendered in webpage/index.html.
I will be happy to ignore the warnings.
Thanks for replying and helping me out so quickly!

@dhimmel dhimmel changed the title Figures not rendered Local-path figures not rendered in output/manuscript.html Jun 26, 2019
@dhimmel
Copy link
Member

dhimmel commented Jun 26, 2019

I will be happy to ignore the warnings.

Cool, you can also do BUILD_PDF=false bash build.sh to suppress building PDF altogether if you only care about the HTML output.

We can leave this issue open until we either update the docs or redesign the layout such that images in output/manuscript.html work.

@sbonaretti
Copy link
Author

Great! Thanks!

@agitter
Copy link
Member

agitter commented Jun 26, 2019

We could also consider adding some of these common WeasyPrint warnings to build/README.md so that new users know it is okay to ignore them.

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

Successfully merging a pull request may close this issue.

3 participants