pdflecture() { cat BeamerLecture.tex ${*%.*}.tex | sed -e "s/^%LECTURE%//" > yap.tex pdflatex yap.tex cp yap.pdf ${*%.*}Lecture.pdf /bin/rm yap.tex yap.pdf } pdfnote() { cat BeamerLecture.tex ${*%.*}.tex | sed -e "s/^%NOTE%//" > yap.tex pdflatex yap.tex pdfnup --paper letterpaper --nup 1x2 yap.pdf --outfile ${*%.*}Note.pdf /bin/rm yap.tex yap.pdf } pdfclass() { cat BeamerLecture.tex ${*%.*}.tex | sed -e "s/^%CLASS%//" > yap.tex pdflatex yap.tex # # If you need a class output that is not 2up'ed #cp yap.pdf ${*%.*}Class.pdf # pdfnup --paper letterpaper --nup 1x2 yap.pdf --outfile ${*%.*}Class2up.pdf /bin/rm yap.tex yap.pdf } pdfpost2up() { cat BeamerLecture.tex ${*%.*}.tex | sed -e "s/^%POST%//" > yap.tex pdflatex yap.tex pdfnup --paper letterpaper --nup 1x2 yap.pdf --outfile ${*%.*}Post2up.pdf /bin/rm yap.tex yap.pdf } pdfpost() { cat BeamerLecture.tex ${*%.*}.tex | sed -e "s/^%POST%//" > yap.tex pdflatex yap.tex cp yap.pdf ${*%.*}Post.pdf /bin/rm yap.tex yap.pdf } pdfall() { pdflecture $* pdfclass $* pdfpost $* pdfpost2up $* pdfnote $* }