Skip to content

Quarto extension / Pandoc Lua Filter to handle SVG files depending on output format

License

Notifications You must be signed in to change notification settings

sokotim/handle-svgs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Handle-svgs Extension For Quarto

This filter adds .pdf or .emf to the end of SVG file paths (depending on the output format) and tries to generate the according file via Inkscape if it doesn't exist.

![](drawing.svg)

will become

![](drawing.svg.pdf)

for latex, pdf and beamer output or

![](drawing.svg.emf)

for pptx and docx output.

Installing

quarto add sokotim/handle-svgs

This will install the extension under the _extensions subdirectory. If you're using version control, you will want to check in this directory.

Using

Install Inkscape and make sure it's in the PATH.

Add handle-svgs.lua to your YML header or _quarto.yml.

Example

Here is the source code for a minimal example: example.qmd.

To see this filter in action render it to docx and pdf:

quarto render .\example.qmd --to docx,pdf

About

Quarto extension / Pandoc Lua Filter to handle SVG files depending on output format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages