-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Embedded SVG in PDF #265
Comments
FWIW, if But, it general, handling multiple image types is a pain in markdown. One option could be to use TeX like smart extension completion. For example, in LaTeX
will search for |
Yes, I'm told that ConTeXt should be able to handle svg, but I've not been able to get it to work so far. Full details of what I tried are at http://groups.google.com/group/pandoc-discuss/browse_thread/thread/5ec939abcc8e1361 The magic incantation So I doubt this is a particularly portable way to make this work. |
As I commented on that thread, the error is because TL packages almost a year old version of ConTeXt. In any case, ConTeXt is simply calling |
Thanks for the update. I don't know Haskell and don't have the bandwidth to learn, so writing an export filter isn't an option for me. Using sed + a Makefile gets the job done for standalone use, but unfortunately doesn't work within gitit. |
Just a nudge to say that including SVG in documents is a sorely missed feature. |
I think that this issue should be closed. LaTeX doesn't support SVG natively; you need to convert the file with an external tool. It's not something pandoc can do anything about.
See the Note also: It would not be hard to write a filter (in Haskell or python) that converted each .svg image referenced in the source to PDF, and converted the images to link to the PDF version instead of SVG. See |
Here is the filter I wrote, based on jgm tip : https://gist.github.com/jeromerobert/3996eca3acd12e4c3d40 |
Thanks Jerome, Would you mind giving a sample of how your filters should be used (i.e. how Say for example you are generating PDF from Markdown and using a Latex Thanks again for sharing, On Sun, Aug 3, 2014 at 2:09 PM, Jerome Robert [email protected]
|
@jacobus - the documentation for using filters can be seen here. To use this specific filter you will need a command such as
The filter is then applied after the originally document is parsed and before being converted to latex. |
Thank you very much :-) On Sun, Aug 3, 2014 at 2:40 PM, mpickering [email protected] wrote:
|
@jeromerobert and @mpickering, I wonder whether it would be feasible that pandoc could automatically invoke the filter when it detects that an SVG image has to be included in a PDF file using LaTeX. |
Can anybody write filter, that will use rsvg-convert tool from librsvg package? I have no expirience in filter writing to pandoc... |
+++ Merder Kim [Apr 25 15 01:58 ]:
If you post on pandoc-discuss, someone may be able to help |
It seems that neither latex nor pandoc support the svg format that our build status indicator come in: jgm/pandoc#265 And it probably isn't appropriate for static documentation anyway. So remove the image from 25_developer.md
It seems that neither latex nor pandoc support the svg format that our build status indicator come in: jgm/pandoc#265 And it probably isn't appropriate for static documentation anyway. So remove the image from 25_developer.md
It seems that neither latex nor pandoc support the svg format that our build status indicator come in: jgm/pandoc#265 And it probably isn't appropriate for static documentation anyway. So remove the image from 25_developer.md
This still seems to be a relevant problem... Particularly for automatic pdf generation from project README files which typically have svg badges... |
… This still seems to be a relevant problem... Particularly for automatic
pdf generation from project README files which typically have svg
badges...
—
You are receiving this because you commented.
Reply to this email directly, [1]view it on GitHub, or [2]mute the
thread.
References
1. #265 (comment)
2. https://github.com/notifications/unsubscribe-auth/AAAL5KphCzd4jTi9XHxZ8jYkea2rtHN_ks5s0ipMgaJpZM4BJZiZ
|
Ah, I guess in my use case I need to first download the image... |
@hoxnox Thanks for the tip, librsvg is actually a very nice alternative to inkscape for being so much smaller to install. I think, based on @jeromerobert's work you just need to change the line
to something like
I personally converted it to ps instead of pdf and further used ps2eps to create eps. |
The syntax:
works for generating HTML pages, but not for PDF. LaTeX barfs with
Unknown graphics extension: .svg
It would be really useful to support this. SVG is a standard, portable vector image format which is natively editable by tools such as inkscape.
Currently I have a workaround which is to convert the SVG to PDF externally, but this also requires the markdown source to be changed to

by piping throughsed
. At worst, this could perhaps be done as a (pandoc or gitit) plugin.The text was updated successfully, but these errors were encountered: