[OS X TeX] LaTeX -> Word?

Bruno Voisin bvoisin at mac.com
Tue Apr 20 10:26:40 EDT 2004


Le 20 avr. 04, à 15:32, Thomas Schröder a écrit :

> What I want is a way to convert my LaTeX files into Word files which  
> should work autamatically for the most part.

I think there just isn't any such thing. If you really need to produce  
Word output, with no compromise on the quality of this output (as far  
as Word allows quality, that is) and no extensive manual editing, then  
you'd be better off using Word from the beginning, probably.

> If I still have to adjust a few things manually than that's OK, and I  
> can also live with having to replace all of the images with better  
> quality ones. But all the other things like table of contents,  
> references, bibliography, footnotes, math, greek symbols, German  
> language, figures, tables, tabulars, index, nomenclature should work  
> automatically because if they don't than I guess I'd be faster doing  
> it by hand.

See above.

>> I don't know Word, but I can only suggest that the related program  
>> TtM (costs for Windows, free for Linux---possibly compilable on Mac  
>> OS X) could be used, which translates TeX to HTML + MathML. Then use  
>> the MathML to generate Word's equations.
>
> I guess that TtM has the same shortcomings that TtH has i.e. limited  
> support for macros and packages, foreign languages, greek symbols etc.

Following Will's post, I went to the TtM page and tried the online  
conversion with a plain TeX excerpt of mine (less than 2000 characters,  
as required). Converting to XML and viewing the result in Mozilla gives  
better-looking output that I would have expected. The resulting XML  
code is appended at the end of this message (save it as a .xml file and  
open it with Mozilla).

However, that's just plain TeX, not LaTeX, and that doesn't solve the  
LaTeX -> Word issue, anyway.

>> I wouldn't have a clue if Word's scripting ability is up to this kind  
>> of translation/transformation, however.
>
> I don't really think that Word's scripting ability would be necessary  
> for this. What I don't know is if Word actually understands MathML. I  
> don't think so because if it did then you wouldn't have to use  
> OpenOffice as an intermediate step in creating Word files with fully  
> editable math formulas.

I tried opening both .html and .xml files created by TtM in both Word  
and OpenOffice, with limited success. Word can read bot HTML and XML  
and interprets its content, OpenOffice interprets the HTML and reads  
the XML as ASCII text, but none of them seems to interpret the formulae  
as formulae.

Bruno

<?xml version="1.0"?>
<!DOCTYPE html    PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
            "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="GENERATOR" content="TtM 3.59" />
<style type="text/css">
  div.p { margin-top: 7pt; }
  span.roman {font-family: serif; font-style: normal; font-weight:  
normal;}
</style>


<title> Translation </title>
</head>
<body>

<h1 align="center">Translation </h1>
<h2>You entered the following TeX</h2>

<pre>
We apply generalized function theory along the lines described, e.g.,  
by Ffowcs
Williams \& Hawkings (1969) or Farassat (1977). We define Heaviside  
step
functions according to $H(t) = 1$ for $t > 0$ and $0$ for $t <  
0$, and $H_V({\bf
x}) = 1$ for ${\bf x} \in V$ and $0$ for ${\bf x} \notin V$. Writing $L  
=
(\partial^2/\partial t^2)\nabla^2+N^2\nabla_{\rm h}^2$ we have then, for
$\tilde\chi({\bf x},t) = H_V({\bf x})H(t)\chi({\bf x},t)$,
$$
   \eqalign{L\tilde\chi({\bf x},t)
   & =H_V({\bf x})H(t)q({\bf x},t)+H_V({\bf x})
     [\nabla^2\chi_1({\bf x})\delta(t)+\nabla^2\chi_0({\bf  
x})\delta'(t)]\cr
   \noalign{\smallskip}
   & \qquad{}+H(t)\biggl\{\biggl({\partial^2\over\partial t^2}
     {\partial\chi\over\partial n}+N^2{\partial\chi\over\partial n_{\rm  
h}}
     \biggr)({\bf x},t)\delta_S({\bf x})+{\partial\over\partial n}\biggl[
     {\partial^2\chi\over\partial t^2}({\bf x},t)\delta_S({\bf x})\biggr]
     \cr
   & \qquad\qquad{}+N^2{\partial\over\partial n_{\rm h}}[\chi({\bf  
x},t)
     \delta_S({\bf x})]\biggr\}\cr
   & \qquad{}+{\partial\chi_1\over\partial n}({\bf x})\delta_S({\bf  
x})
     \delta(t)+{\partial\chi_0\over\partial n}({\bf x})\delta_S({\bf x})
     \delta'(t)+{\partial\over\partial n}[\chi_1({\bf x})\delta_S({\bf  
x})]
     \delta(t)\cr
   & \qquad\qquad{}+{\partial\over\partial n}[\chi_0({\bf x})
     \delta_S({\bf x})]\delta'(t),\cr}
$$
with $\delta_S({\bf x})$ the Dirac delta function of support $S$.

</pre>
This entire page was translated in real time by TtM.
<hr />

<h2>TtM Output</h2>We apply generalized function theory along the lines  
described, e.g., by Ffowcs
Williams & Hawkings (1969) or Farassat (1977). We define Heaviside  
step
functions according to
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>H</mi><mo stretchy="false">(</mo><mi>t</mi><mo  
stretchy="false">)</mo><mo>=</mo><mn>1</mn></mrow></math> for

<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>t</mi><mo>></mo><mn>0</mn></mrow></math> and
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>0</mn></mrow></math> for
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>t</mi><mo><</mo><mn>0</mn></mrow></math>, and
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>H</mi></mrow><mrow><mi>V</mi></mrow>

</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo  
stretchy="false">)</mo><mo>=</mo><mn>1</mn></mrow></math> for
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi fontweight="bold"  
fontstyle="normal">x</mi><mo>∈</mo><mi>V</mi></mrow></math> and
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mn>0</mn></mrow></math> for

<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi fontweight="bold"  
fontstyle="normal">x</mi><mo>∉</mo><mi>V</mi></mrow></math>.  
Writing
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>L</mi><mo>=</mo><mo stretchy="false">(</mo>
<msup><mrow><mo>∂</mo></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo>/</mo><mo>∂</mo>
<msup><mrow><mi>t</mi></mrow><mrow><mn>2</mn></mrow>

</msup>
<mo stretchy="false">)</mo>
<msup><mrow><mo>∇</mo></mrow><mrow><mn>2</mn></mrow>
</msup>
<mo>+</mo>
<msup><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow>
</msup>

<msubsup><mrow><mo>∇</mo></mrow><mrow><mi  
fontstyle="normal">h</mi> </mrow>
<mrow><mn>2</mn></mrow></msubsup>

</mrow></math> we have then, for

<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mover><mrow><mi>χ</mi></mrow>
<mo>~</mo></mover>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo>,</mo><mi>t</mi><mo  
stretchy="false">)</mo><mo>=</mo>
<msub><mrow><mi>H</mi></mrow><mrow><mi>V</mi></mrow>

</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo><mi>H</mi><mo  
stretchy="false">(</mo><mi>t</mi><mo  
stretchy="false">)</mo><mi>χ</mi><mo stretchy="false">(</mo><mi  
fontweight="bold" fontstyle="normal">x</mi><mo>,</mo><mi>t</mi><mo  
stretchy="false">)</mo></mrow></math>,
<br />
<table width="100%"><tr><td align="center">
     <math xmlns="http://www.w3.org/1998/Math/MathML">

     <mstyle displaystyle="true"><mrow>
<mtable align="right" width="80%">
<mtr><mtd columnalign="right" columnspan="1"><mrow><mi>L</mi>
<mover><mrow><mi>χ</mi></mrow>
<mo>~</mo></mover>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo>,</mo><mi>t</mi><mo  
stretchy="false">)</mo></mrow>
</mtd><mtd columnalign="left">
<mrow><mo>=</mo>

<msub><mrow><mi>H</mi></mrow><mrow><mi>V</mi></mrow>
</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo><mi>H</mi><mo  
stretchy="false">(</mo><mi>t</mi><mo  
stretchy="false">)</mo><mi>q</mi><mo stretchy="false">(</mo><mi  
fontweight="bold" fontstyle="normal">x</mi><mo>,</mo><mi>t</mi><mo  
stretchy="false">)</mo><mo>+</mo>

<msub><mrow><mi>H</mi></mrow><mrow><mi>V</mi></mrow>
</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo><mo  
stretchy="false">[</mo>
<msup><mrow><mo>∇</mo></mrow><mrow><mn>2</mn></mrow>
</msup>

<msub><mrow><mi>χ</mi></mrow><mrow><mn>1</mn></mrow>
</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo><mi>δ</mi><mo  
stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mo>+</mo>

<msup><mrow><mo>∇</mo></mrow><mrow><mn>2</mn></mrow>
</msup>

<msub><mrow><mi>χ</mi></mrow><mrow><mn>0</mn></mrow>
</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo  
stretchy="false">)</mo><mi>δ</mi><mo>'</mo><mo  
stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mo  
stretchy="false">]</mo></mrow>
</mtd></mtr>

<mtr><mtd columnspan="6">
<div class="p"><!----></div>
</mtd></mtr>
<mtr><mtd columnalign="right" columnspan="1"><mrow></mrow>
</mtd><mtd columnalign="left">
<mrow><mi>      </mi><mo>+</mo><mi>H</ 
mi><mo stretchy="false">(</mo><mi>t</mi><mo  
stretchy="false">)</mo><mrow><mo> </mo><mo>{</mo></mrow><mrow><mo>  
</mo><mo>(</mo></mrow>
<mfrac><mrow>
<msup><mrow><mo>∂</mo></mrow><mrow><mn>2</mn></mrow>

</msup>
</mrow>
<mrow><mo>∂</mo>
<msup><mrow><mi>t</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow>
</mfrac>

<mfrac><mrow><mo>∂</mo><mi>χ</mi></mrow>
<mrow><mo>∂</mo><mi>n</mi></mrow>
</mfrac>
<mo>+</mo>
<msup><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow>

</msup>

<mfrac><mrow><mo>∂</mo><mi>χ</mi></mrow>
<mrow><mo>∂</mo>
<msub><mrow><mi>n</mi></mrow><mrow><mi fontstyle="normal">h</mi></mrow>
</msub>
</mrow>
</mfrac>
<mrow><mo> </mo><mo>)</mo></mrow><mo stretchy="false">(</mo><mi  
fontweight="bold" fontstyle="normal">x</mi><mo>,</mo><mi>t</mi><mo  
stretchy="false">)</mo>

<msub><mrow><mi>δ</mi></mrow><mrow><mi>S</mi></mrow>
</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo><mo>+</mo>
<mfrac><mrow><mo>∂</mo></mrow>
<mrow><mo>∂</mo><mi>n</mi></mrow>
</mfrac>
<mrow><mo> </mo><mo>[</mo></mrow>
<mfrac><mrow>
<msup><mrow><mo>∂</mo></mrow><mrow><mn>2</mn></mrow>

</msup>
<mi>χ</mi></mrow>
<mrow><mo>∂</mo>
<msup><mrow><mi>t</mi></mrow><mrow><mn>2</mn></mrow>
</msup>
</mrow>
</mfrac>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo>,</mo><mi>t</mi><mo  
stretchy="false">)</mo>
<msub><mrow><mi>δ</mi></mrow><mrow><mi>S</mi></mrow>

</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo><mrow><mo>  
</mo><mo>]</mo></mrow></mrow>
</mtd></mtr>
<mtr><mtd columnalign="right" columnspan="1"><mrow></mrow>
</mtd><mtd columnalign="left">
<mrow><mi>      </mi><mi>   
    </mi><mo>+</mo>
<msup><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow>
</msup>

<mfrac><mrow><mo>∂</mo></mrow>
<mrow><mo>∂</mo>
<msub><mrow><mi>n</mi></mrow><mrow><mi fontstyle="normal">h</mi></mrow>
</msub>
</mrow>
</mfrac>
<mo stretchy="false">[</mo><mi>χ</mi><mo stretchy="false">(</mo><mi  
fontweight="bold" fontstyle="normal">x</mi><mo>,</mo><mi>t</mi><mo  
stretchy="false">)</mo>
<msub><mrow><mi>δ</mi></mrow><mrow><mi>S</mi></mrow>

</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo><mo  
stretchy="false">]</mo><mrow><mo> </mo><mo>}</mo></mrow></mrow>
</mtd></mtr>
<mtr><mtd columnalign="right" columnspan="1"><mrow></mrow>
</mtd><mtd columnalign="left">
<mrow><mi>      </mi><mo>+</mo>
<mfrac><mrow><mo>∂</mo>
<msub><mrow><mi>χ</mi></mrow><mrow><mn>1</mn></mrow>
</msub>

</mrow>
<mrow><mo>∂</mo><mi>n</mi></mrow>
</mfrac>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo>
<msub><mrow><mi>δ</mi></mrow><mrow><mi>S</mi></mrow>
</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo><mi>δ</mi><mo  
stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mo>+</mo>

<mfrac><mrow><mo>∂</mo>
<msub><mrow><mi>χ</mi></mrow><mrow><mn>0</mn></mrow>
</msub>
</mrow>
<mrow><mo>∂</mo><mi>n</mi></mrow>
</mfrac>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo>
<msub><mrow><mi>δ</mi></mrow><mrow><mi>S</mi></mrow>
</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo  
stretchy="false">)</mo><mi>δ</mi><mo>'</mo><mo  
stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo><mo>+</mo>

<mfrac><mrow><mo>∂</mo></mrow>
<mrow><mo>∂</mo><mi>n</mi></mrow>
</mfrac>
<mo stretchy="false">[</mo>
<msub><mrow><mi>χ</mi></mrow><mrow><mn>1</mn></mrow>
</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo>
<msub><mrow><mi>δ</mi></mrow><mrow><mi>S</mi></mrow>
</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo><mo  
stretchy="false">]</mo><mi>δ</mi><mo  
stretchy="false">(</mo><mi>t</mi><mo stretchy="false">)</mo></mrow>

</mtd></mtr>
<mtr><mtd columnalign="right" columnspan="1"><mrow></mrow>
</mtd><mtd columnalign="left">
<mrow><mi>      </mi><mi>   
    </mi><mo>+</mo>
<mfrac><mrow><mo>∂</mo></mrow>
<mrow><mo>∂</mo><mi>n</mi></mrow>
</mfrac>
<mo stretchy="false">[</mo>
<msub><mrow><mi>χ</mi></mrow><mrow><mn>0</mn></mrow>
</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo>

<msub><mrow><mi>δ</mi></mrow><mrow><mi>S</mi></mrow>
</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo><mo  
stretchy="false">]</mo><mi>δ</mi><mo>'</mo><mo  
stretchy="false">(</mo><mi>t</mi><mo  
stretchy="false">)</mo><mo>,</mo></mrow>
</mtd></mtr>
</mtable>
</mrow>
     </mstyle></math>

</td></tr></table>
<br />

with
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub><mrow><mi>δ</mi></mrow><mrow><mi>S</mi></mrow>
</msub>
<mo stretchy="false">(</mo><mi fontweight="bold"  
fontstyle="normal">x</mi><mo stretchy="false">)</mo></mrow></math> the  
Dirac delta function of support
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow><mi>S</mi></mrow></math>.

<br /><br /><hr /><small>File translated from
T<sub><font size="-1">E</font></sub>X
by <a href="http://hutchinson.belmont.ma.us/tth/">
T<sub><font size="-1">T</font></sub>M</a>,
version 3.59.<br />On 20 Apr 2004, 06:45.</small>
</body></html>

-----------------------------------------------------
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the MacOSX-TeX mailing list