Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.01k stars 957 forks source link

SVG Support #298

Closed aress31 closed 1 year ago

aress31 commented 1 year ago

Could it be possible to include support for title page logo as svg.

Right now whenever trying to set an svg logo I get the following error:

! LaTeX Error: Unknown graphics extension: .svg.
mfhepp commented 1 year ago

This is something you should tackle in your Pandoc build workflow or in the LaTeX setup. It is basically outside the functionality of the template.

See e.g. https://github.com/jgm/pandoc/issues/1793 and https://github.com/pandoc/lua-filters/issues/145.

Solutions:

  1. Search or develop a Pandoc filter in LUA or Python that checks all included images in a LaTeX output and converts and replaces SVG by PDF, e.g. using Inkscape.
  2. Manually create a PDF version of the logo with Inkscape or an online tool.
  3. Use a LaTeX environment that can automatically convert SVG to PDF, see here for details. There is a package Svg on CTAN, but it requires --shell-escape, which can make the TeX files less portable (e.g. for ArXiv submissions) and is less secure.

Option 1 is what most Pandoc filters for adding figures from PlantUML and Graphviz take.

@Wandmalfarbe: I recommend closing this issue.