[OS X TeX] Droplatexdiff available.

Daniel Becker daniel.becker at uni-rostock.de
Mon May 8 23:36:33 CEST 2006


Hallo,

thanks for the dropscript that makes latexdiff easier to use.

A while ago Jung-Tsung Shen provided an apple-script for the same  
task that one can use from within texshop and that asks you for  
choosing the old version (assuming that you are working on the new  
version and now you want to mark the changes you made.) It has the  
advantage that the old and the new version do not need to be in the  
same directory.

The prerequisite is that latexdiff is available in /usr/local/bin/,  
while the dropscript is independent from that.

For me, his script is very useful. The only problem it didn't solve  
is that it does not work properly on TeX-projects that are nested  
with several .tex-files put together by various \include commands,  
but this problem is independent from the tricks you apply to run

latexdiff oldfile.tex newfile.tex >difffile.tex

Below I pasted Jung-Tsung Shen's script as I have it in the TexShop  
MacroEditor.

Daniel



---Applescript direct

--AppleScript (for texshop)

property diffFile : "diff.tex"
set newFile to #FILEPATH#
set sourcePath to quoted form of POSIX path of newFile
set theFile to (choose file with prompt "Select the old version:")
set modifiedPath to get quoted form of POSIX path of theFile
set targetPath to POSIX path of newFile
do shell script "/usr/local/bin/latexdiff " &  modifiedPath & " " &  
sourcePath & ">" & (quoted form of (targetPath & diffFile))

set macPath to POSIX file (targetPath & diffFile)
tell application "TeXShop"
	try
		open macPath
	end try
end tell
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list