openjournals / joss

The Journal of Open Source Software
https://joss.theoj.org
MIT License
1.54k stars 186 forks source link

Add supported graphics section in docs #473

Open dmey opened 5 years ago

dmey commented 5 years ago

I have noticed that Scalable Vector Graphics (SVG) figures are not supported. Given that pdflatex is used to generate the pdf, I think the only supported formats are pdf, png, jpg, andeps. I think it would help to have a supported media-formats section. Happy to send a PR for the docs to include a table with supported formats.

jedbrown commented 5 years ago

I haven't tested it with a paper through whedon, but Pandoc supports SVG by using rsvg-convert. https://github.com/jgm/pandoc/commit/6b72c5e35ba9b0872704b77b2bd8793657adcaba Do you have an example that fails?

@arfon Is rsvg-convert (librsvg) installed on Whedon's host?

dmey commented 5 years ago

@jedbrown https://github.com/openjournals/joss-reviews/issues/1113#issuecomment-443378686

jedbrown commented 5 years ago

Aha, I ran it locally and it worked, though rsvg-convert botched the text wrapping so the diagram doesn't look good. I haven't run into this before and it would be worth filing a bug report.

@arfon I think it's worth installing librsvg -- it's a widely used tool and usually produces good output.

arfon commented 5 years ago

@jedbrown - it looks like librsvg2 is already installed on the Heroku hosts: https://devcenter.heroku.com/articles/stack-packages

Aha, I ran it locally and it worked, though rsvg-convert botched the text wrapping so the diagram doesn't look good. I haven't run into this before and it would be worth filing a bug report.

Does anything specific have to be passed to Pandoc or should it 'just work'?

jedbrown commented 5 years ago

It just works when I run locally. Is the executable rsvg-convert in PATH. That's what the implementation tries.

jedbrown commented 5 years ago

Looks like you need to install librsvg2-bin.

letmaik commented 5 years ago

What's the status for SVG support? I just tried to use https://github.com/openbases/openbases-pdf and got "rsvg-convert: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)".

arfon commented 5 years ago

I've not had time to get this working sorry. Please use another format (PNG etc.)

jedbrown commented 5 years ago

A pdf figure will look better (as a vector graphic).