-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.sh
executable file
·28 lines (22 loc) · 944 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
#
# Script to prepare final PDFs for presentation and print.
#
# Usage sh build.sh <lectureNumberAsString>
fileprefix="FS2023-Vorlesung-" # the start of generated PDFs
tmpfilename="tmplecturefile" # don't have any files called like this!
printfilename=$fileprefix$1-print.pdf
overlayfilename=$fileprefix$1-overlay.pdf
printf "\\documentclass[aspectratio=1610,onlymath,handout]{beamer}\n\n" > $tmpfilename.tex
tail -n +3 lecture-$1.tex >> $tmpfilename.tex
pdflatex $tmpfilename.tex
pdflatex $tmpfilename.tex
mv $tmpfilename.pdf $printfilename
# pdfjam --nup 2x2 --outfile $printfilename $tmpfilename.pdf
printf "\\documentclass[aspectratio=1610,onlymath]{beamer}\n\n" > $tmpfilename.tex
tail -n +3 lecture-$1.tex >> $tmpfilename.tex
pdflatex $tmpfilename.tex
pdflatex $tmpfilename.tex
mv $tmpfilename.pdf $overlayfilename
rm $tmpfilename.*
printf "\n\n*** Finished creating files '$overlayfilename' and '$printfilename' ***\n\n"