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

allow SVG for any document format but keep high priority in non-PDF #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

garfvl
Copy link

@garfvl garfvl commented Jun 19, 2023

Right now SVG (image/svg+xml) cannot be selected as a valid format for a diagram if the document output format is latex/context (so PDF as well).

As pandoc can convert SVG into some compatible format using rsvg-convert, This allows the SVG format to be in the preferred_mime_types list.

The previous behavior with non-PDF output formats is kept as is (raising the SVG format priority in the preferred_mime_types list).

Right now SVG (image/svg+xml) cannot be selected as a valid format for a
diagram if the document output format is latex/context (so PDF as well).

As pandoc can convert SVG into some compatible format using `rsvg-convert`,
This allows the SVG format to be in the `preferred_mime_types` list.

The previous behavior with non-PDF output formats is kept as is (raising
the SVG format priority in the `preferred_mime_types` list).
@tarleb
Copy link
Member

tarleb commented Sep 22, 2023

Thanks for the PR and apologies for the late reply.

I'm not sure I understand why this change would be needed/what the benefits are of allowing SVG for PDF output. Does it just change the converter from inkscape to rsvg-convert, or is there more to it?

@garfvl
Copy link
Author

garfvl commented Sep 29, 2023

For what I understand from the code, inkscape is used to convert pdf to svg, not include SVG into a PDF output of pandoc.

having the diagram generation program able to output SVG and then convert it properly with rsvg-convert allows to include the SVG rasterization with proper dpi/resolution inside the pdf document. For example, using bitmap output for some diagram sources ends in very pixelized rendering in the final PDF generation.

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 this pull request may close these issues.

2 participants