Created
April 25, 2010 19:14
-
-
Save jstepien/378647 to your computer and use it in GitHub Desktop.
A LaTeX file for extracting slides from handouts
This file contains hidden or 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
| n=9;for i in `seq $n`; do pages=$(identify wyklad$i.pdf | tail -n 1 | perl -ne '/^wyklad.*?\[(\d+)/; $_ = $1+1; print'); sed -e s/wyklad1/wyklad$i/g -e s/23/$pages/ < slides.tex > slides$i.tex; done |
This file contains hidden or 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
| \documentclass[a4paper]{article} | |
| \usepackage[landscape,margin=0pt]{geometry} | |
| \usepackage{graphicx,ifthen,calc} | |
| \def\filename{wyklad1} | |
| \def\slidescount{23} | |
| \newcounter{pagecounter} | |
| \newcommand*\insertgraphicsfiles[2]{ | |
| \setcounter{pagecounter}{#1-1} | |
| \whiledo{\value{pagecounter}<#2}{ | |
| \stepcounter{pagecounter} | |
| \includegraphics[height=\textheight,viewport=57 569 287 741,clip,% | |
| page=\the\value{pagecounter}]{\filename} | |
| \includegraphics[height=\textheight,viewport=57 335.5 287 507.5,clip,% | |
| page=\the\value{pagecounter}]{\filename} | |
| \includegraphics[height=\textheight,viewport=57 101.5 287 273.5,clip,% | |
| page=\the\value{pagecounter}]{\filename} | |
| } | |
| } | |
| \pagestyle{empty} | |
| \begin{document} | |
| \begin{center} | |
| \insertgraphicsfiles{1}{\slidescount} | |
| \end{center} | |
| \end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment