That's what I should have sed earlier...
Mar. 6th, 2006 02:19 amWhen somebody asks you to make a PDF file of problem statements for them, there are two ways to go about it:
1. Manually change the name on the homework, change all of your '\begin{solution}\end{solution}' tags to pagebreaks, remove the final pagebreak, and PDF your LaTeX file.
2. Spend two hours writing a script to do this for you.
Although I was somewhat amused to find that the hardest bit about this was the "remove the final pagebreak" part - I ended up just kludging that by removing the last three lines of the file and then piping the '\end{document}' back in at the LaTeX to PDF stage.
At any rate....next time somebody wants me to PDF their problem statements for them, I'll be ready with a script to do it with. And for my next trick (which will not happen this week), I'll add a nice little argument that lets me specify the assignment number right from the command line.
I must admit it feels rather good to be scripting again, given that I haven't done any significant coding or scripting in a few months. Yay h4xx0ring.
1. Manually change the name on the homework, change all of your '\begin{solution}\end{solution}' tags to pagebreaks, remove the final pagebreak, and PDF your LaTeX file.
2. Spend two hours writing a script to do this for you.
Although I was somewhat amused to find that the hardest bit about this was the "remove the final pagebreak" part - I ended up just kludging that by removing the last three lines of the file and then piping the '\end{document}' back in at the LaTeX to PDF stage.
At any rate....next time somebody wants me to PDF their problem statements for them, I'll be ready with a script to do it with. And for my next trick (which will not happen this week), I'll add a nice little argument that lets me specify the assignment number right from the command line.
I must admit it feels rather good to be scripting again, given that I haven't done any significant coding or scripting in a few months. Yay h4xx0ring.