Lazy Latex Flow

To get rid of all the annoying compile commands during the daily work with latex, i wrote a little bash script. The following commands were necessary to create the latex document. They should work on all common linux systems:

I also added some more useful features in the script:
nice -n 19 [command];… puts the process in the background, so i can continue working
> 1_base_script_1-run.log; … writes the feedback in a log file
echo (1/6) pdflatex 1 done, go for bibtex …”;… gives me feedback on the progress of the script
cp 1_base.pdf pdf; … copies the output in another directory (here: pdf). I could not scroll the pdf while pdftex generated the new version, so i always looked at the current copy which is updated much faster.

cat 1_base_script_6-run.log | grep error;… i used to ignore the errors, so they accumulated … fatal from time to time. Therefore i made the script spitting them back to me every time it runs.

Of course there are endless ways to pimp the script to your needs … this was ok for me.
Here is the complete bash script (check for unintended line breaks):

About ralf

I studied Geology at University Erlangen and got my PhD (bio-nanotechnology) at TU Dresden. In my spare time i program simulations and tinker around with data prediction methods. Frisbee is my favorite sport and i play guitar when my friends and i meet to make some music.
This entry was posted in coding, latex and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.