Archive for October 5th, 2008

thesis writing

Not sure what this is, but might be interesting: thesis blog.

Add comment October 5th, 2008

sweave / latex compile script

Ah, just because I got tired of typing latex; bibtex; latex; latex; dvipdf every single time I wrote a little script a few months ago to do that. Of course, the script is super simple:
latex $1; bibtex $1; latex $1; latex $1; dvipdf $1; cleanup
whereby cleanup refers to another little script that just deletes all Latex’s intermediary files. (Perhaps there is a Latex setting to have them saved in an entirely different place anyway, wouldn’t there be?)

Later I added one for the rare occasion that I use Sweave as well to integrate R code into my Latex files. Now I am also starting to become a fan of the pic language to add diagrams to my files and it also integrates very well with Latex. So now I upgraded my script a little and just post it here in the odd case that it turns out to be useful for someone else as well. The Sweave version:

#!/bin/sh

R CMD Sweave $1

fn=c`date +"%M%S"`

pic -t $1.tex > $fn.tex
rm $1.tex

latex $fn
bibtex $fn
latex $fn
latex $fn

dvipdf $fn $1.pdf

rm *.aux
rm $fn*

I had tried Sweave earlier but was not too satisfied, since most things I was estimating took too long to have them run every time I compile my text. But now I have been working on a document with a lot of straightforward regressions, several plots, and several diagrams, and the final layout is only of importance as an internal working document - not for publication - so I have been making heavy use of both Sweave and pic and I am really enthousiast about the result.

Add comment October 5th, 2008


Calendar

October 2008
M T W T F S S
« Sep   Nov »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Posts by Month

Posts by Category