Zentral makefile include for chapters of script
This commit is contained in:
@@ -1,21 +1,12 @@
|
||||
BASENAME=pointprocesses
|
||||
|
||||
PYFILES=$(wildcard *.py)
|
||||
PYPDFFILES=$(PYFILES:.py=.pdf)
|
||||
|
||||
GPTFILES=$(wildcard *.gpt)
|
||||
GPTTEXFILES=$(GPTFILES:.gpt=.tex)
|
||||
|
||||
|
||||
all: pdf slides thumbs
|
||||
|
||||
include ../../chapter.mk
|
||||
|
||||
# script:
|
||||
pdf : $(BASENAME)-chapter.pdf
|
||||
$(BASENAME)-chapter.pdf : $(BASENAME)-chapter.tex $(BASENAME).tex ../../header.tex $(GPTTEXFILES) $(PYPDFFILES)
|
||||
CHAPTER=$$(( $$(sed -n -e '/contentsline {chapter}/{s/.*numberline {\([0123456789]*\)}.*/\1/; p}' $(BASENAME).aux) - 1 )); \
|
||||
PAGE=$$(sed -n -e '/contentsline {chapter}/{s/.*numberline {.*}.*}{\(.*\)}{chapter.*/\1/; p}' $(BASENAME).aux); \
|
||||
sed -i -e "s/setcounter{page}{.*}/setcounter{page}{$$PAGE}/; s/setcounter{chapter}{.*}/setcounter{chapter}{$$CHAPTER}/" $(BASENAME)-chapter.tex
|
||||
pdflatex -interaction=scrollmode $< | tee /dev/stderr | fgrep -q "Rerun to get cross-references right" && pdflatex -interaction=scrollmode $< || true
|
||||
pdf : chapter
|
||||
|
||||
|
||||
# slides:
|
||||
@@ -31,31 +22,15 @@ $(BASENAME)-handout.pdf: $(BASENAME)-slides.tex $(GPTTEXFILES)
|
||||
pdfnup --nup 2x4 --no-landscape --paper a4paper --trim "-1cm -1cm -1cm -1cm" --outfile $@ thumbsfoils.pdf # 1-19
|
||||
rm thumbsfoils.*
|
||||
|
||||
watchpdf :
|
||||
while true; do ! make -q pdf && make pdf; sleep 0.5; done
|
||||
|
||||
watchslides :
|
||||
while true; do ! make -q slides && make slides; sleep 0.5; done
|
||||
|
||||
# python plots:
|
||||
$(PYPDFFILES) : %.pdf: %.py
|
||||
python $<
|
||||
|
||||
# gnuplot plots:
|
||||
$(GPTTEXFILES) : %.tex: %.gpt whitestyles.gp
|
||||
gnuplot whitestyles.gp $<
|
||||
epstopdf $*.eps
|
||||
|
||||
|
||||
clean :
|
||||
rm -f *~
|
||||
rm -f $(BASENAME).aux $(BASENAME).log
|
||||
rm -f $(BASENAME)-chapter.aux $(BASENAME)-chapter.log $(BASENAME)-chapter.out
|
||||
clean : cleanchapter
|
||||
rm -f $(BASENAME)-slides.aux $(BASENAME)-slides.log $(BASENAME)-slides.out $(BASENAME)-slides.toc $(BASENAME)-slides.nav $(BASENAME)-slides.snm $(BASENAME)-slides.vrb
|
||||
rm -f $(PYPDFFILES) $(GPTTEXFILES)
|
||||
|
||||
cleanall : clean
|
||||
rm -f $(BASENAME)-chapter.pdf $(BASENAME)-slides.pdf $(BASENAME)-handout.pdf
|
||||
cleanall : clean cleanchapter
|
||||
$(BASENAME)-slides.pdf $(BASENAME)-handout.pdf
|
||||
|
||||
|
||||
help :
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
\lstset{inputpath=../code}
|
||||
\graphicspath{{figures/}}
|
||||
|
||||
\setcounter{page}{99}
|
||||
\setcounter{chapter}{7}
|
||||
\typein[\pagenumber]{Number of first page}
|
||||
\typein[\chapternumber]{Chapter number}
|
||||
\setcounter{page}{\pagenumber}
|
||||
\setcounter{chapter}{\chapternumber}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: pointprocessscetchA.tex
|
||||
%%Creator: gnuplot 4.6 patchlevel 4
|
||||
%%CreationDate: Mon Nov 23 13:45:26 2015
|
||||
%%CreationDate: Sat Nov 28 12:01:31 2015
|
||||
%%DocumentFonts:
|
||||
%%BoundingBox: 50 50 373 135
|
||||
%%EndComments
|
||||
@@ -430,10 +430,10 @@ SDict begin [
|
||||
/Title (pointprocessscetchA.tex)
|
||||
/Subject (gnuplot plot)
|
||||
/Creator (gnuplot 4.6 patchlevel 4)
|
||||
/Author (grewe)
|
||||
/Author (jan)
|
||||
% /Producer (gnuplot)
|
||||
% /Keywords ()
|
||||
/CreationDate (Mon Nov 23 13:45:26 2015)
|
||||
/CreationDate (Sat Nov 28 12:01:31 2015)
|
||||
/DOCINFO pdfmark
|
||||
end
|
||||
} ifelse
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: pointprocessscetchB.tex
|
||||
%%Creator: gnuplot 4.6 patchlevel 4
|
||||
%%CreationDate: Mon Nov 23 13:46:59 2015
|
||||
%%CreationDate: Sat Nov 28 12:01:32 2015
|
||||
%%DocumentFonts:
|
||||
%%BoundingBox: 50 50 373 237
|
||||
%%EndComments
|
||||
@@ -430,10 +430,10 @@ SDict begin [
|
||||
/Title (pointprocessscetchB.tex)
|
||||
/Subject (gnuplot plot)
|
||||
/Creator (gnuplot 4.6 patchlevel 4)
|
||||
/Author (grewe)
|
||||
/Author (jan)
|
||||
% /Producer (gnuplot)
|
||||
% /Keywords ()
|
||||
/CreationDate (Mon Nov 23 13:46:59 2015)
|
||||
/CreationDate (Sat Nov 28 12:01:32 2015)
|
||||
/DOCINFO pdfmark
|
||||
end
|
||||
} ifelse
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user