Equation numbers and point sizes

Enrico Forestieri <[email protected]> Thu, 10 Nov 2005 14:48:07 +0100
Newsgroups gmane.comp.tex.latex.latex2rtf.devel
Message-ID <[email protected]>
Hi all!

I think I found a couple of bugs in latex2rtf.

The first one is related to numbered equations. After an equation array
whose last equation is not numbered, all subsequent equations will not be
numbered in RTF. To have them numbered again, another equation array with
a numbered last equation must be entered.

This is demonstrated by the following latex document:

--------- begin l2rtest.tex ---------------

\documentclass[12pt]{article}

\begin{document}
This is a numbered equation:
\begin{equation}
y=3Df(x).
\end{equation}

The last equation of the eqnarray is not numbered:
\begin{eqnarray}
y_{1} & =3D & f_1(x)\\
      & =3D & f[g(x)].\nonumber
\end{eqnarray}

From now on, the equations in RTF are not numbered anymore:
\begin{equation}
a=3Db
\end{equation}

But after having an equation array with the last equation numbered:
\begin{eqnarray}
y_2 & =3D & z_2\nonumber \\
y_3 & =3D & z_3
\end{eqnarray}

they will be numbered again:
\begin{equation}
c=3Dd
\end{equation}

\end{document}

--------- end l2rtest.tex ---------------


I solved this bug by the following patch:


--- equation.c.orig 2005-11-09 20:17:48.000000000 +0100
+++ equation.c  2005-11-10 14:08:26.000000000 +0100
@@ -420,6 +420,7 @@
             diagnostics(4, "PrepareRtfEquation -- equation");
             g_equation_column =3D 5;  /* avoid adding \tabs when finishi=
ng */
             g_show_equation_number =3D TRUE;
+       g_suppress_equation_number =3D FALSE;
             fprintRTF("\\par\\par\n\\pard");
             fprintRTF("\\tqc\\tx%d\\tqr\\tx%d", b, width);
             fprintRTF("\\tab ");
@@ -441,6 +442,7 @@
         case EQN_ARRAY:
             diagnostics(4, "PrepareRtfEquation --- eqnarray");
             g_show_equation_number =3D TRUE;
+       g_suppress_equation_number =3D FALSE;
             g_processing_eqnarray =3D TRUE;
             g_processing_tabular =3D TRUE;
             g_equation_column =3D 1;
@@ -465,6 +467,7 @@
         case EQN_ALIGN:
             diagnostics(4, "PrepareRtfEquation --- align");
             g_show_equation_number =3D TRUE;
+       g_suppress_equation_number =3D FALSE;
             g_processing_eqnarray =3D TRUE;
             g_processing_tabular =3D TRUE;
             g_equation_column =3D 1;


The second bug is also demonstrated by the above latex document: latex2rt=
f
does not respect the 12pt option and the document is always converted in
RTF using 10pt fonts.

However, I was not able to track down this bug :-(

--
Enrico





-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php