Jun 27, 2024

Convert LaTeX to Image

We can convert a LaTeX file to SVG in two steps:

latexmk -lualatex $< pdf2svg $< $@

I have written a Makefile to automate the process:

SVG := $(patsubst %.tex,%.svg,$(wildcard *.tex)) all: $(SVG) %.pdf: %.tex latexmk -lualatex $< rm $*.aux $*.fdb_latexmk $*.fls $*.log %.svg: %.pdf pdf2svg $< $@