[OS X TeX] how to convert .doc to .TEX?
Bob Kerstetter
bkerstetter at mac.com
Tue Jan 18 05:23:18 CET 2005
On Jan 17, 2005, at 2:32 PM, Luc Feitknecht wrote:
> Hi there,
>
> I have some MSWord documents which I would like to use from now on in
> LaTeX. Has anyone made good experience with that RTF2Latex converter
> dropled which seemed to work fine in MacOS 9 (classic)? Or is there
> any more recent tool helping me not having to re-enter these
> documennts for Latex?
> Regards
>
> Luc
>
I format all Word docs with styles. When converting to LaTeX, I search
for a style, such as Heading 1, and replace it with \section{^&}, for
example. For Bullet Lists and Number Lists the replacement is \item ^&.
For bold text the replacement is \textbf{^&}. The ^& is the found text
in Word X. I also convert smart quotes to `` and '' and apostrophes to
'. There are probably some other things I am forgetting.
The final find and replace looks for paragraph marks followed by
closing curly brackets, ^p}, and replaces them with curly brackets
followed by paragraph marks, }^p. This puts the }'s on the correct
lines for sections, subsections, etc. You have to do this because Word
formats the paragraph marks {CR's) at the end of paragraphs. The means
the }s get put on the next line when doing the find and replace. The
before and after is like this:
\section{text
}
\section{text}
When someone sends a Word doc manually formatted, I convert by
searching for text attributes and replacing with LaTeX control
sequences. For example, I might convert Helvetica 18 Bold Italic text
to \section{^&}.
If you do Word to LaTeX a lot, and are more or less consistent in Word
document formatting, you can put the Word find-replace commands into a
Word VBA macro.
When all conversions are done, I save as plain text, open in TeXShop,
convert all \r's to \n's then clean up any junk.
It's a not a perfect conversion, but good enough for most conversions.
--------------------- 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 Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the macostex-archives
mailing list