Skip to content

Commit

Permalink
convert svg to pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
mli committed Nov 24, 2017
1 parent 4f26ab4 commit 04ced00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@ TEX=build/_build/latex/gluon_tutorials_zh.tex
SVG=$(wildcard img/*.svg)
GIF=$(wildcard img/*.gif)

build/_build/latex/%.png: img/%.svg
build/_build/latex/%.pdf: img/%.svg
@mkdir -p $(@D)
convert $< $@

build/_build/latex/%_00.pdf: img/%_00.pdf
@mkdir -p $(@D)
cp $< $@

PDFIMG = $(patsubst img/%.svg, build/_build/latex/%.png, $(SVG)) \
PDFIMG = $(patsubst img/%.svg, build/_build/latex/%.pdf, $(SVG)) \
$(patsubst img/%.gif, build/_build/latex/%_00.pdf, $(GIF))

pdf: $(DEPS) $(OBJ) $(PDFIMG)
@echo $(PDFIMG)
make -C build latex
sed -i s/\.svg/\.png/ $(TEX)
sed -i s/\.svg/\.pdf/ $(TEX)
sed -i s/\}\.gif/\_00\}.pdf/ $(TEX)
sed -i s/{tocdepth}{0}/{tocdepth}{1}/ $(TEX)
cd build/_build/latex && xelatex gluon_tutorials_zh.tex && xelatex gluon_tutorials_zh.tex
Expand Down

0 comments on commit 04ced00

Please sign in to comment.