diff --git a/filter.lua b/filter.lua new file mode 100644 index 0000000..33b915b --- /dev/null +++ b/filter.lua @@ -0,0 +1,11 @@ +function Image(el) + if FORMAT == "latex" then + -- convert svg to pdf + if string.sub(el.src, -4) == '.svg' then + local pdfName = string.gsub(el.src, "svg", "pdf") + pandoc.pipe('inkscape.exe', { el.src, '--export-filename', pdfName}, '') + el.src = pdfName + return el + end + end +end \ No newline at end of file diff --git a/report.qmd b/report.qmd index 9574dcb..ff48a9b 100644 --- a/report.qmd +++ b/report.qmd @@ -16,6 +16,9 @@ bibliography: citations.bib execute: cache: true + +filters: + - filter.lua --- ## Introduction