design some Latex2rtf macros and use them in latex file to control the selection of sources

"zhenjunluo" <[email protected]> Sat, 5 Nov 2005 07:43:07 -0000
Newsgroups gmane.comp.tex.latex.latex2rtf.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C5E1DC.90199EA0
Content-Type: text/plain;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable


Hi, All,

I am a PhD student and I always prefer latex rather than=20
Word. I hope what I will say can represent some major=20
desires of research students.

When we want to convert tex files to rtf files, our=20
purpose is to send a Word file to our supervisors or=20
cooperators who don't use latex. For example my=20
supervisor wants to comment on a rtf/Words file and=20
keep revision tracks. Therefore if I need to discuss with=20
him on a draft of paper or a report, I have to convert my=20
tex file to a rtf file. Then he makes some revisions and I=20
input his revisions into my tex file. A few days later we=20
will have another meeting and I have to convert my tex=20
file to a rtf file again.

The trouble is that for the first meeting I would use=20
latex2rtf to convert a tex file to a rtf file. The generated=20
rtf file normally have some format problems (mostly on=20
tables and figures). So I do some manual works to=20
correct or improve the rtf file. The rtf file is now close to=20
Word file and my supervisor will be happy. But for the=20
next meeting, if I use latex2rtf to convert new version of=20
latex files to rtf files, I have to do similar manual works=20
again. That is annoying especially when one is writing=20
his PhD thesis, there will be many rounds of revisions.=20
As can be seen latex2rtf are not able to remember what=20
I have improved.

Note that what will be changed frequently by the=20
supervisors are mostly plain texts, and they rarely=20
change the figures and tables.=20

So why not give latex2rtf users a change to save and=20
retrieve well-formatted version of figures and tables? Let=20
these figures and tables have their own individual files=20
that independent of latex and latex2rtf. These files may=20
be png files, XML files, Eq codes. What latex2rtf will do=20
is to insert their contents into the correct positions of rtf=20
files.=20

It won't take much time to build up these independent=20
files and the works worth. And such works are once for all. After that =
we=20
don't need to care whether latex2rtf can handle orginal=20
latex codes well or bad.=20

For example the approach used by Scientific Workplace=20
is a good choice, namely by defining some special=20
commented macros in the latex file. This is indeed very=20
convenient. For example

\begin{equation}
%L2RDATA{link=3Deqabc.txt}
...
\end{equation}

\begin{figure}
%L2RDATA{link=3Dfigabc.png,hscale=3D0.4,vscale=3D0.5}
....
\end{figure}

\begin{table}
...
%L2RDATA{link=3Dtababc.xml}
\end{table}

What a user need to do is to produce these files once=20
and organize these files. There are also free tools for=20
converting RTF tables to XML and XML to RTF tables.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

As you and other people have discussed in your mailling list, Microsoft =
doesn't open the standards of Microsoft Equation, and it is hard=20
to produce Microsoft Equation OLE from Latex.

However if we produce some equations within Microsoft Word and save it =
as rtf file,
we can find the ASCII code for the equations, for example:=20

{\*\objclass Equation.DSMT4}{\*\objdata .......}

Therefore my suggestions make sense. Specify Latex2rtf's own macros and =
use them inside a tex file. The macros are commented so=20
won't interfere Latex.=20

For example

\begin{equation}
%L2RDATA{link=3D./eqabc.txt}
...
\end{equation}

=20
This macro will just insert the {\*\objclass Equation.DSMT4}{\*\objdata =
......} into the rtf file.
Such macros will allow Latex users more freedom to make rtf files.=20


Zhenjun Luo
BSc (Hons), MSc, PhD Research student

Department of Mechanical Engineering
King's College London, University of London
Strand, London WC2R 2LS, United Kingdom
Tel:  44 (0) 20 7848 1862
Fax: 44(0) 20 7848 2932
Email:  [email protected]=20





------=_NextPart_000_0007_01C5E1DC.90199EA0
Content-Type: text/html;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Hi, All,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am a PhD student and I always prefer =
latex rather=20
than <BR>Word. I hope what I will say can represent some major =
<BR>desires of=20
research students.<BR><BR>When we want to convert tex files to rtf =
files, our=20
<BR>purpose is to send a Word file to our supervisors or <BR>cooperators =
who=20
don't use latex. For example my <BR>supervisor wants to comment on a =
rtf/Words=20
file and <BR>keep revision tracks. Therefore if I need to discuss with =
<BR>him=20
on a draft of paper or a report, I have to convert my <BR>tex file to a =
rtf=20
file. Then he makes some revisions and I <BR>input his revisions into my =
tex=20
file. A few days later we <BR>will have another meeting and I have to =
convert my=20
tex <BR>file to a rtf file again.<BR><BR>The trouble is that for the =
first=20
meeting I would use <BR>latex2rtf to convert a tex file to a rtf file. =
The=20
generated <BR>rtf file normally have some format problems (mostly on =
<BR>tables=20
and figures). So I do some manual works to <BR>correct or improve the =
rtf file.=20
The rtf file is now close to <BR>Word file and my supervisor will be =
happy. But=20
for the <BR>next meeting, if I use latex2rtf to convert new version of =
<BR>latex=20
files to rtf files, I have to do similar manual works <BR>again. That is =

annoying especially when one is writing <BR>his PhD thesis, there will =
be many=20
rounds of revisions. <BR>As can be seen latex2rtf are not able to =
remember what=20
<BR>I have improved.<BR><BR>Note that what will be changed frequently by =
the=20
<BR>supervisors are mostly plain texts, and they rarely <BR>change the =
figures=20
and tables. <BR><BR>So why not give latex2rtf users a change to save and =

<BR>retrieve well-formatted version of figures and tables? Let <BR>these =
figures=20
and tables have their own individual files <BR>that independent of latex =
and=20
latex2rtf. These files may <BR>be png files, XML files, Eq codes. What =
latex2rtf=20
will do <BR>is to insert their contents into the correct positions of =
rtf=20
<BR>files. <BR><BR>It won't take much time to build up these independent =

<BR>files and the works worth. And such works are once for all. After =
that we=20
<BR>don't need to care whether latex2rtf can handle orginal <BR>latex =
codes well=20
or bad. <BR><BR>For example the approach used by Scientific Workplace =
<BR>is a=20
good choice, namely by defining some special <BR>commented macros in the =
latex=20
file. This is indeed very <BR>convenient. For=20
example<BR><BR>\begin{equation}<BR>%L2RDATA{link=3Deqabc.txt}<BR>....<BR>=
\end{equation}<BR><BR>\begin{figure}<BR>%L2RDATA{link=3Dfigabc.png,hscale=
=3D0.4,vscale=3D0.5}<BR>.....<BR>\end{figure}<BR><BR>\begin{table}<BR>...=
<BR>%L2RDATA{link=3Dtababc.xml}<BR>\end{table}<BR><BR>What=20
a user need to do is to produce these files once <BR>and organize these =
files.=20
There are also free tools for <BR>converting RTF tables to XML and XML =
to RTF=20
tables.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>As you and other people have discussed =
in your=20
mailling list, Microsoft doesn't open the standards of Microsoft =
Equation, and=20
it is hard </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>to produce Microsoft Equation OLE from=20
Latex.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>However if we produce some equations =
within=20
Microsoft Word and save it as rtf file,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>we can find the ASCII code for the =
equations, for=20
example: </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>{\*\objclass Equation.DSMT4}{\*\objdata =

......}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Therefore my suggestions make =
sense.&nbsp;Specify=20
Latex2rtf's own&nbsp;macros and use them&nbsp;inside a tex file. The =
macros are=20
commented so </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>won't interfere Latex. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>For=20
example<BR><BR>\begin{equation}<BR>%L2RDATA{link=3D./eqabc.txt}<BR>....<B=
R>\end{equation}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>&nbsp;</DIV></FONT>
<DIV><FONT face=3DArial size=3D2>This macro will just insert the =
{\*\objclass=20
Equation.DSMT4}{\*\objdata .......} into the rtf file.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Such macros will allow Latex users more =
freedom to=20
make rtf files. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Zhenjun Luo<BR>BSc (Hons), MSc, PhD Research student</DIV>
<DIV>&nbsp;</DIV>
<DIV>Department of Mechanical Engineering<BR>King's College London, =
University=20
of London<BR>Strand, London WC2R 2LS, United Kingdom<BR>Tel:&nbsp; 44 =
(0) 20=20
7848 1862<BR>Fax: 44(0) 20 7848 2932<BR>Email:&nbsp; <A=20
href=3D"mailto:[email protected]">[email protected]</A> </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></DIV>
<DIV><BR></DIV></FONT></BODY></HTML>

------=_NextPart_000_0007_01C5E1DC.90199EA0--


-------------------------------------------------------
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