[TxMt] PracTex journal tips, revision control and academic workflow

Charilaos Skiadas cskiadas at gmail.com
Tue Feb 19 20:39:55 UTC 2008


Hi Jeff,
On Feb 19, 2008, at 1:45 PM, Jeff Newman wrote:

> Hello Haris,
>
> On 18-Feb-08, at 9:11 AM, Charilaos Skiadas wrote:
>
>> For LaTeX documents at least, there is the wonderful latexdiff  
>> package, which will effectively do word-by-word comparison and  
>> produce a pdf file for you that shows the differences that have  
>> occurred in the document in a wonderful way, [snip]
>
> Do you have latexdiff set up to run as a command from within  
> textmate? If so would you mind sharing how you got this working to  
> compare the current version of your book with an archived version  
> in subversion?

Actually the script I have compares the current version with a backed  
up copy, so it doesn't actually try to resurrect an older subversion  
version, though in theory it could do that. The script I use follows.  
I have saved it as an executable .sh file in the same level as my  
book. It goes through all the tex files in the directory below it,  
and runs the diff between these and the files in the directory with  
the backed up version. So it's not a perfect solution, but it does  
serve my needs. I then run a manual compile on the corresponding  
book.tex file. Hope this is of some help, at least give you some  
ideas. Feel free to ask me about it.

pushd ..
# mkdir bookdiffs
FILES=`ls BookChaos2007/*.tex`
for file in $FILES
do
   oldfile=${file/BookChaos2007/BookChaos2007Backup12-19-2007/}
   resfile=${file/BookChaos2007/bookdiffs/}
   /Users/haris/Desktop/latexdiff/latexdiff-so "$oldfile" $file >  
$resfile
   # /Users/haris/Desktop/latexdiff/latexdiff-so --allow-spaces  
"$oldfile" $file > $resfile
done
popd

> thank you.
>
> Jeff

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College







More information about the textmate mailing list