[OS X TeX] Tex to rtf converter
Claus Gerhardt
gerhardt at math.uni-heidelberg.de
Thu Aug 5 12:30:04 EDT 2010
Allow me to add to the confusion by referring to an old latex2rtf macro of mine, from 2003, which runs latex2rtf on the tex file and opens the result in MS Word. The macro has been updated some time ago, since nowadays all the non-standard shell scripts that I use are residing in ~/Library/Flashmode/bin.
According to my experience latex2rtf only works on fairly plain tex files, I only used it successfully on bibliographies, and it chokes on everything slightly more complex.
The macro is copied below. Googling, out of curiosity, for "macro, latex2rtf" also revealed a corresponding droplet by Ramon.
Thus, I would encourage using Google as a first resort for answering any questions.
Claus
-- Applescript
-- Apply only to an already saved file.
-- Claus Gerhardt, Dec. 2003
(* The subroutine setnamebbedit returns baseName, texName, pdfName, namePath, dirName, dirNameunquoted, and saves the document of window texName.
*)
tell application "TeXShop"
get path of document of window 1
set fileName to result
end tell
set scriptPath to (do shell script "dirname " & "~/Library/TeXShop/Scripts/ex")
set scriptPath to scriptPath & "/setnamets.scpt"
set scriptName to POSIX file scriptPath as alias
set scriptLiB to (load script scriptName)
tell scriptLiB
set {baseName, texName, pdfName, namePath, dirName, dirNameunquoted, logName, logPath, rtfName} to setnamets(fileName)
end tell
try
set shellScript to "cd " & dirName & ";"
set shellScript to shellScript & "~/Library/Flashmode/bin/latex2rtf " & " -S " & texName
do shell script shellScript
end try
set theRTF to POSIX file rtfName as alias
tell application "Microsoft Word"
activate
open theRTF
end tell
More information about the MacOSX-TeX
mailing list