Over a million developers have joined DZone.

Makefile For Images In Latex

DZone's Guide to

Makefile For Images In Latex

Free Resource
This is a Makefile to build images for use by pdflatex from .gnuplot command files and .py python scripts. It is supposed that the gnuplot/python files produce .eps images when launched

all: sinus.pdf sincos.pdf sine.pdf sine2.pdf sincos2.pdf bode.pdf

.PHONY: all clean

# we want all .gnuplot files to be 'made' into .eps files
# the % replaces any name
# in the rule: 	$< replaces the source
# 				$@ replaces the target
# example: convert $< $@
%.eps: %.gnuplot
	gnuplot < $<

%.eps: %.py
	python $<

%.pdf: %.eps
	epstopdf $<
	rm -f *.eps *.pdf

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}