Last active
February 6, 2018 04:48
-
-
Save sinkuu/33dc4cb72e7bec752c02aa4c5f21673e to your computer and use it in GitHub Desktop.
図をつくるやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SVG = $(wildcard figs/*.svg) | |
SVG_PDF = $(patsubst %.svg,%.pdf,$(SVG)) | |
PLOT = $(wildcard plots/*.plt) | |
PLOT_TEX = $(patsubst %.plt,%.tex,$(PLOT)) | |
all: $(PLOT_TEX) $(SVG_PDF) | |
%.pdf: %.svg | |
inkscape -z -D --export-pdf="$@" $? --export-latex | |
# inkscapeが相対パスを考慮してくれない問題への対策 | |
sed -i -e "s/\(includegraphics\[.*\]{\)/\1figs\//g" $@_tex | |
%.tex: %.plt | |
gnuplot -e "set output '$(notdir $@)'" -e "cd 'plots'" $(notdir $?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment