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

SVG included with \includegraphics ? #3722

Closed
anfelor opened this issue Jun 3, 2017 · 2 comments
Closed

SVG included with \includegraphics ? #3722

anfelor opened this issue Jun 3, 2017 · 2 comments

Comments

@anfelor
Copy link

anfelor commented Jun 3, 2017

While trying to convert

```{.plantuml format="svg" caption="Fancy uml diagram" width="70%"}
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml
\\``` -- needed for github, ignore the two backslashes

with pandoc slides.md -t beamer -o slides.pdf --filter pandoc-plantuml-filter
gives

pandoc: Unable to convert `dba2905531256f9ebf116f41123f91f40a6e51e9.svg' for use with pdflatex.
! LaTeX Error: Unknown graphics extension: .svg.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.82 \end{frame}

pandoc: Error producing PDF

I first thought this was due to \includesvg not handling file extensions well, but apparently pandoc converts it into this latex:

\begin{frame}

\begin{figure}[htbp]
\centering
\includegraphics{dba2905531256f9ebf116f41123f91f40a6e51e9.svg}
\caption{ }
\end{figure}

\end{frame}

A modified version of pandoc-plantuml-filter, which removes the file extension for svg files fails with

pandoc: Unable to convert `dba2905531256f9ebf116f41123f91f40a6e51e9' for use with pdflatex.
! LaTeX Error: File `dba2905531256f9ebf116f41123f91f40a6e51e9' not found.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.122 \end{frame}

pandoc: Error producing PDF

The Reveal.js version works fine (compiling without errors and embedding the svg image)
and the beamer version works with png, but the images are of low quality, so I would like to get svg to work.


I assume the issue is that pandoc is including SVGs with \includegraphics instead of \includesvg.

pandoc 1.16.0.2
Compiled with texmath 0.8.4.1, highlighting-kate 0.6.1.
@ickc
Copy link
Contributor

ickc commented Jun 4, 2017

A few problems with this issue:

  1. duplicate of Support SVG images in multiple formats #1793
  2. pandoc version used is too old. For any bug reports, you should test against with the latest pandoc version, and even better, latest commit from the master branch (e.g. from pandoc-extras/pandoc-nightly). What's the point of bug report if you don't know if it has been already fixed?
  3. your example is not minimal enough, and uses a "3rd party" filter. This makes replicating bugs difficult and time consuming.

I suggest you should close this issue and watch for #1793.

@anfelor anfelor closed this as completed Jun 4, 2017
@jgm
Copy link
Owner

jgm commented Jun 4, 2017 via email

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

No branches or pull requests

3 participants