Word-to-LaTeX Manual

This manual replaces the former PDF manual. Not all parts of the old manual have already been transformed here. If you cannot find anything, please try the PDF manual or do not hesitate to ask at .

1. Introduction

1.1 Features

Word-to-LaTeX converts allows for converting all parts of Word documents including footnotes, font styles, equations, images, etc. The full list of features follows.

Input formats

• doc
• docx
• rtf

Output formats

• LaTeX – default conversion mappings can be easily changed to match various TeX flavours (e.g., plain TeX or ConTeXt)
• XML – default conversion mappings can be easily changed to match the XML format required by you. The output XML file can be later transformer in whatever format you need by applying a custom XSLT transformation (e.g., some customers use a XSLT transformation to create DocBook or HTML from Word files using Word-to-LaTeX)

User interface

• Microsoft Word Add-in – Word-to-LaTeX is built into Word as an add-in. The add-in is the fastest of all Word-to-LaTeX user interfaces.
• Standalone converter – the same user interface as the Microsoft Word Add-in. The conversion is a little bit slower.
• Command-line converter – allows for batch conversion

Images

• Converts all kinds of images (vector, raster)
• Embedded objects like Excel graphs are also converted
• Images are saved in EPS or PNG format
• Image titles are converted

• Paragraphs marked as headings using the Word built-in styles are recognized
• All heading levels are converted
• Tables of contents are converted

Equations

• Microsoft Office 2007-2010 equations supported out of the box
• Equation Editor, MathType, and Word EQ Fields are converted when you have MathType installed (otherwise, these equations can be converted to EPS images)
• Numbered equations are also converted
• References to numbered equations can be automatically recognized in input documents

Lists

• Ordered lists
• Unordered lists
• Nested lists

Tables

• Plain tables
• Complex tables with merged cells
• Table titles are converted

Font styles

• Bold
• Italic
• Small caps
• Subscript
• Superscript
• Uppercase
• Underline
• Strikethrough
• Sans-serif font families (e.g., Arial)
• Typewriter font familes (e.g., Courier)

Special characters

• Latin special characters, Cyrillic, Greek, etc.
• Converted using special commands (e.g. \v{s} for š) or left as they are in UTF-8

Footnotes, Endnotes

• Endnotes can be converted to bibliography items

Styles

• Conversion mappings can be defined for Word paragraph and character styles (e.g., the style named code can be mapped to verbatim environment)
• Style definition can be created for each Word paragraph and character style

References

• Bookmarks are converted
• References and page references to bookmarks are also converted

Colors

• Converts color text
• Converts hightlighted text
• Color backrounds in table cells can be converted
• Text borders are converted

Alignment, Indentation

• Paragraph aligments and indentations can be converted

Various features

• Line break and page break are converted
• Page size and page margins is correctly in the output file
• Editable document preamble

Sample Document

A short Word document below shows the key Word-to-LaTeX features. You can see that Word-to-LaTeX correctly transformed:

• page size – using geometry package
• document metadata – \author and \title commands
• headings – \section and \subsection commands
• various font styles – \textit, \textbf, \texttt, and other commands
• lists including nested lists – see \begin{itemize} and \item commands
• equations – both inline and displayed equations
• accents – \^, \", \v, and other commands
• footnotes
• images – both vector and raster
Original Word document [DOC] [PDF] Converted LaTeX document [TEX] [PDF]

Here is the complete LaTeX listings created by Word-to-LaTeX. You can download in by clicking the TEX link. You can also download the Word-to-LaTeX configuration that was used to convert this document.

Converted LaTeX file [TEX], Image 1 [EPS], Image 2 [EPS], Configuration for Word-to-LaTeX [XML]

\documentclass[12pt]{article}
\usepackage[dvips]{graphicx}
\usepackage{ulem}
\usepackage{amsmath}
\usepackage{palatino}
\usepackage[T1]{fontenc}
\author{Michal Kebrt}
\title{Word-to-LaTeX Sample Document}
\usepackage[paperwidth=595pt,paperheight=841pt,top=28pt,right=70pt,bottom=49pt,left=70pt]{geometry}
\setlength{\parskip}{10pt}
\setlength{\parindent}{0pt}
\pagestyle{empty}

\begin{document}
\section{Font Styles}

Vehicula \textit{italic }odio nec lacus fringilla \textsc{SmallCaps}
sodales est tristique. \uline{Underline} commodo
\textbf{\textit{bolditalic}} nunc, euismod \texttt{typewriter} lacinia
non. \uppercase{ALLCAPS} sit amet egestas eros m$^{2}$.

\subsection{Lists and Special Characters}

\begin{itemize}
\item ar\^{e}te, f\"{o}rv\aa{}nad, \v{z}lut\'{y}, s\o{}ndag, k\r{u}\v{n},
s\l{}ycha\'{c}, Dzi\k{e}kuj\k{e}, ense\~{n}ar, Le\~{a}o, Dovi\dj{}enja
\begin{itemize}
\item w\"{u}nscht, gro\ss{}e,~Bet\"{a}tigung, k\"{o}rperlicher, englez\u{a},
a\u{g}a\c{c}, ayd\i{}nl\i{}k
\end{itemize}

\end{itemize}

\subsection{Equations}

Lorem $\sqrt{a^2+b^2}$  ipsum
${\left(x+a\right)}^n=\sum_{k=0}^n\binom{n}{k}x^ka^{n-k}$ dolor sit
amet $\frac{dy}{dx}$ eli.

$f\left(x\right)=a_0+\sum_{n=1}^{\infty{}}\left(a_n\cos{\frac{n\pi{}x}{L}}+b_n\sin{\frac{n\pi{}x}{L}}\right)$

\section{Table}

Lorem ipsum dolor sit amet, \textbf{consectetur} adipiscing elit.

\vspace{3pt} \noindent
\begin{tabular}{|p{101pt}|p{101pt}|p{101pt}|p{101pt}|}
\hline
abcd
& $e^{-ti\theta{}}$ & $A=\pi{}r^2$ & $\max_{0\leq{}x\leq{}1}{xe^{-x^2}}$ \\
\hline
123
&
456
&
\textbf{789}
&
123
\\
\hline
\end{tabular}
\vspace{2pt}
\section{Images}

Excel graph embedded in the document (\textbf{vector} \textit{image}).

\includegraphics[width=281pt]{img-1.eps}

Donald Knuth\footnote{computer scientist and Professor Emeritus at
\textbf{Stanford} University} \textendash{} creator of  T$_{E}$X
(\textbf{raster} \textit{image}).

\includegraphics[width=56pt]{img-2.eps}
\end{document}


2. Installation

2.1 Requirements

Before proceeding with the installation, please make sure that your system meets the following requirements. Word-to-LaTeX runs on Windows operating systems and requires Mirosoft Office to be installed on the host machine. These versions are supported.

Microsoft Windows Microsoft Office
• Windows 71
• Windows Vista1
• Windows XP1
• Windows 2000
• Windows Server 20031
• Windows Server 20081

1 including 64-bit version

• Office 20102
• Office 2007
• Office 2003
• Office XP (2002)

2 including Office 2010 64-bit (use Word-to-LaTeX 64-bit only in this case)

When you need to convert mathematical formulas created in so called Equation Editor (which was the default editor in Microsoft Office 2003 and older) or in the MathType editor, you must have MathType installed. There is no need to have MathType installed to convert formulas created in the default mathematical editor in Microsoft Office 2007 and 2010 .

Linux and Mac

Word-to-LaTeX does not run on Linux and Mac operating systems. The only possible way of running Word-to-LaTeX on a different operating systems is to create a virtual machine inside a non-Windows operating system and then install Microstt Windows, Microsft Office, and Word-to-LaTeX inside that virtual machine. You can use Parallels, VirtualBox, or any other virtualization product to create a virtual machine.

2.2 Installing

2. Make sure that Microsoft Word is not running.
3. Unpack the installation .zip archive (contains setup.exe file and one .msi file)
4. Run setup.exe file. You may verify the origin of the file by checking that it was published by Michal Kebrt who is the person representing Word-to-LaTeX.
5. Word-to-LaTeX requires the .NET Framework to be installed on your machine. The .NET Framework slowly becomes a standard for Windows applications. If you do not have the .NET Framework installed, you will be asked to do it which will take a few minutes. After the .NET Framework has been installed, restart Windows and continue from the step 4.
6. Follow the instructions provided by the installation program.

Word-to-LaTeX EPS Printer

Word-to-LaTeX EPS Printer allows for exporting figures and other objects embedded in Word documents to EPS. The EPS format is a usual way of of insterting figures in LaTeX documents.

Word-to-LaTeX EPS Printer is installed together with the Word-to-LaTeX converter. In order to export figures correctly, the printer has to use A4 as a default paper size. Please follow these steps to check whether it is set up correctly.

1. Open Devices and Printers

2. Right click Word-to-LaTeX EPS Printer and select Printing Preferences

4. Select A4 Paper Size and click OK, and then click Apply

The upgrading process comprises of two actions. First you have to uninstall the previous Word-to-LaTeX version. Then you will follow the installation instructions.

2.4 Uninstalling

To uninstall Word-to-LaTeX from your computer go to and select Word-to-LaTeX. Before uninstalling, make sure that Microsoft Word is not running.

3. Running

Security Settings

Microsoft Word has a strict policy for add-ins and templates installed by a third party software. If you have the most strict policy set, Word-to-LaTeX add-in is likely not to appear in Microsoft Word. To resolve this issue, follow these steps.

Microsoft Office 2010

1. Run Microsoft Word
2. Click the tab in the upper left corner and then click
3. Click , click , and then click
4. Select , then click , and then again
5. Restart Microsoft Word
6. A security warning will appear, click the link
7. Click the button and select
8. Verify that Word-to-LaTeX.dot is signed1 by Michal Kebrt (person representing Word-to-LaTeX), and select , and click

Microsoft Office 2007

1. Run Microsoft Word
2. Click the round in the upper left corner and then click
3. Click , click , and then click
4. Select , then click , and then again
5. Restart Microsoft Word
6. A security warning will appear, click
7. Verify that Word-to-LaTeX.dot is signed1 by Michal Kebrt (person representing Word-to-LaTeX), check , and click

Microsoft Office XP/2003

1. Run Microsoft Word
2. Select from the main menu
3. Check security level and click .
4. Restart Microsoft Word
5. A security warning will appear. Verify that macro is signed1 by Michal Kebrt (person representing Word-to-LaTeX).
6. Check and click

1 Word-to-LaTeX add-in is signed by a trusted certificate from Comodo.

Opening Word-to-LaTeX

Using the Word-to-LaTeX Word add-in is by far the most convenient. Just open the document (doc, docx, rtf) in Microsoft Word and then click the Word-to-LaTeX icon . In Word 2000-2003 you will find the icon on the command bar, in Word 2007-2010 go to the ribbon tab as seen on the screenshot below.

Running Word-to-LaTeX in Microsoft Word 2010

After the clicking icon, Word-to-LaTeX main window will appear and allow you to convert the active document. See the next section for instructions on how to continue with the conversion.

No Word-to-LaTeX icon

If you do not see any Word-to-LaTeX icon in Microsoft Word, please verify that Word-to-LaTeX.dot file is located in C:\Program Files\Microsoft Office\Office14\Startup (or a similar location depending on your Microsoft Office version). If is not present there, copy it from C:\Program Files\Word-to-LaTeX into that Startup folder and restart Microsoft Word.

3.3 Converting Documents

After you run Word-to-LaTeX (either from Word Add-in or by clicking Word-to-LaTeX icon on your Desktop or in Start menu), the following window will appear. If you want to quickly start and do not need special customization for your document, do these steps.

1. Select input file by clicking next to the field. When you use the Word Add-in, the active document will always be preselected.
2. Select the output file by clicking next to the field. If you leave the output file empty, the input filename appended with .tex will be used.
3. Click the button
4. You can see conversion progess in the text box below.

Conversion tab

Error occured during conversion

If a problem occurs during the conversion, you will be notified in progress text box. Please let us know to and attach the document that failed to convert. We will do our best to resolve the issue.

Closing Word-to-LaTeX window

Did you know that you can close Word-to-LaTeX just by pressing key.

Every single Microsoft Word document is different. Different documents use different font sizes, some documents use hard-coded tabs for indenting, some authors do it more clever using styles, somebody uses built-in styles for headings, somebody not, etc. The huge variety of Word documents is the reason why it is good to consider changing the default Word-to-LaTeX configuration for each document you convert. Often only a few small changes may produce a much better (and usually cleaner) output file.

Various options can be set on all tabs following the tab. They all will be described in more detail later. Here are a few notes and tips regarding the Word-to-LaTeX configurations.

• The last used configuration is automatically loaded at startup.
• Before running conversion by pressing the button, the current configuration is saved automatically. There is no need to save it manually.
• You can tweak the configuration for your document by repeating these steps
1. Change a configuration option (e.g., the alignment of paragraphs in the menu)
2. Convert the document by pressing
3. See how the output file has been affected by the change in the configuration. Use Notepad, TeXnicCenter, or any other text editor to open output files.

If you need to save the configuration for future use (e.g., for a document of a same kind you will convert later), click in the main menu which will save the current configuration in a XML file. To load the previously saved configuration select from the main menu and select the configuration file.

If you want to reset the configuration to a default state, click in the main menu and select one of the options.

• – special characters (e.g., š) are converted to special LaTeX commands (e.g., \v{s}).
• – most of the special characters are kept as they are (e.g., š will be š in the output file)
• – most of the special characters are kept as they are (e.g., Д will be Д in the output file), special commands in the preamble for Cyrillic documents
• – most of the special characters are kept as they are (e.g., will be in the output file), special commands in the preamble for Chinese, Japanese, and Korean documents
• – Word documents will be converted in a custom XML format

3.3 Command-line Converter

When you need to convert tons of files using Word-to-LaTeX, the command-line converter will help you a lot as it works with the same configuration files as the graphical converter. Therefore, you will usually prepare and tweak the configuration using the graphical interface, save it to a file, and let the command-line converter work. It is very easy to call Word-to-LaTeX from a batch script or any other program or system (e.g., a CMS system).

You will find word-to-latex.exe executable in the Word-to-LaTeX folder (usually c:\Program Files\Word-to-LaTeX). It can be executed like this:

word-to-latex.exe -i inputFile [-o outputFile] [-opt confFile]

The only required option is -i. When the output file is omitted, the input file name appended with .tex extension is used as the output file. If the configuration file is not specified, <path>\config\latex-config.xml will be used (where <path> is the folder where word-to-latex.exe is located). The command-line converter will produce the same progress information you know from the graphical converter.

Option Description
-i path to the input file
-o path to the output file
-opt path to the configuration file

4.1 Evaluating

Before you purchase a Word-to-LaTeX license key, you can evaluate it for 14 days. This allows you to make sure that Word-to-LaTeX fits your needs. If you have any kind of comment during the evaluation period, or you have a problem with installing the converter or converting some document, please let us know to . We are always open to suggestions and are happy to implement additional features users would like to see in Word-to-LaTeX.

The evaluation version has only a few limitations which, of course, disappear after you purchase a license key.

• Up to 5 Microsoft Word 2007-2010 Equations are converted.
• Up to 10 paragraphs are converted unmodified. All other paragraphs may have a few characters misplaced.

Please follow these steps to obtain a license key. It is a question of 5 minutes to make a full version from your evaluation version.

1. Go to Word-to-LaTeX register page and select the number of licenses. You will redirected to a secure payment gateway.
2. After you have paid, you will receive your license key in a few minutes by email.
3. When you have the license key, open Word-to-LaTeX and select from the main menu
4. Enter the license key and press

Register Word-to-LaTeX

5. Troubleshooting & FAQ

You will find the list of most common problems that sometimes happen with Word-to-LaTeX. If none of these suggestions helps you, please let us know and we will glad to help you.

5.1 Repair Microsoft Word

Microsoft Word sometimes gets corrupted (the corruption itself has nothing in common with the Word-to-LaTeX installation) which causes various MS Word add-ins and templates, including Word-to-LaTeX, to stop working. The corruption of MS Word usually causes one of the following messages to appear.

• Unable to cast COM object of type 'Word.ApplicationClass' to interface type 'Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
• Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80040154
• Runtime error 2147024894 (80070002).
• Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
• Run-time error '429': ActiveX component can't create object.

To repair MS Word and make Word-to-LaTeX work, do the following steps. Please keep in mind that "repair" is not the same as "reinstall". Your MS Word installation will stay unaffected and nothing will be lost.

1. Go to the Windows Control Panel and select Add/Remove Programs.
2. Find Microsoft Office item in the list and click the Change button.
3. Select Repair and proceed