A Bash script for making a video out of your LaTeX paper. Assuming your paper is under Mercurial version control, the script compiles and compares every revision of your document and makes a video showing the evolution of the whole writing process.
The following software is required for the project to work
- A working LaTeX environment with pdflatex
- ImageMagick suite
The code runs with the following syntax:
./evolution.sh <repository dir> <grid size>
<repository dir>is the directory containing your LaTeX document
<grid size>is an argument looking like "10x5", meaning that the final video will show rows of 10 pages and columns of 5 for a total of 50 pages
The script will run for a long time, and eventually will output a file called 'out.mp4' with the evolution of your document commit to commit. In addition, a directory called 'img' contains all the source images, in case you want to generate a video with different parameters.
- The code can fail for several reasons, and there is no check for those
conditions. This is because
bibtexwill probably fail (since not every commit is guaranteed to compile to a well-formed document), so "safety" Bash switches remain disabled until then
- The Unicode arrow symbol may not display correctly in some environments
- If a version fails to compile, the end result is an almost entirely red paper. When no output is produced, the code should skip to the next revision