>Angus Leeming
>Tue, 17 May 2005 14:25:33 -0700
>
>Luis Rivera wrote:

Angus,

I'm sorry I might have stepped on your toe. I apologize. Let me
explain:

>... reLyX generates a horrible mish-mash
>of different file formats that must "somehow" be deciphered by
lyx2lyx. 
>
>tex2lyx generates a completely consistent lyx file, version 241, which
>must
>then be converted back to version 221 so that LyX 1.3.5 can understand
>it.
>

I shall concede that.  I have little knowledge of the arcana of the LyX
format, so I am in no position do decide whether the output of tex2lyx
is equal, better, or worse, than that of reLyX (which, I also concede,
might be a relic ;)  My only point is that reLyX makes some `mish-mash'
intelligible to lyx2lyx, and then you still have to "upgrade" this
mish-mash into LyX 221.  In other words, a two step process is
necessary anyway.

>> I still use the `old' reLyX script, for tex2lyx, in its current
>> incarnation, is too bloated to my taste, and I have to reconvert the
>> output to LyX 221 anyway.
>
>???? tex2lyx is bloated? For what definition of bloated? 

Well: I downloaded the binary from the Wiki page, and it expands to up
to 2.5 Mb, while the existing combo reLyX/lyx2lyx takes about 2Mb
(including the required python/perl libraries and executables).

>Two things that it
>does do, which reLyX does not, is understand most 'reasonable' LaTeX
and
>generate a consistent .lyx file.
>

Having no clue about the consistency of LyX, I must concede the second
point; as for the first, reLyX has had no trouble so far with my rather
idiosyncratic LaTeX files...

To convert my LaTeX files into LyX I made the following batch file
(tex2lyx.bat): 

------------
@echo off
rem Wrapper script for Win32
rem written by Ruurd Reitsma
rem shamelessly hacked by Jose-Luis Rivera
set PERLLIB=%~p0\..\lib
set PYTHONPATH=%~p0\lib;%~p0\dlls
%~p0\perl.exe -S %~p0\reLyX -f %1 %2 %3
ren %~n1.lyx rlx
%~p0\python.exe -S %~p0\..\share\lyx\lyx2lyx\lyx2lyx -t 221 -o %~n1.lyx
rlx
del rlx
set PERLLIB=
set PYTHONPATH=
-----------------------------

then I changed the call in Edit/Preferences/Converters/tex -> LyX, to
`tex2lyx $$i', and voil�!  

I named the batch file `tex2lyx' in the assumption that, someday, this
shall be the name of the right utility to call.

>If you have any substantive problems with tex2lyx, then PLEASE bring
them
>forward. 

I have no substantive problems with tex2lyx, save that it seems to me a
little redundant for Ruurd's distribution.  As I said, all I did was a
little hacking of Ruurd's reLyX.bat file and I got my stuff.  Before
that, I downloaded and tested (succesfully) the experimental tex2lyx
available at the wiki page, then realizing that I had to reformat the
output with lyx2lyx anyway. So I patched a little batch to run lyx2lyx
from console, and then it strucked me that with a little hacking to
Ruurd's original kludge, I could get the two phases
(reLyX/tex2lyx-lyx2lyx) done in one single shot. That's what I did.

> We rely on your feedback to improve it. 

Now I take your suggestion: do you think it viable to have tex2lyx
built into LyX itself, like the converter going the other way
around?This way we could use `lyx --import latex filename.tex', the way
we use `lyx --export latex filename.lyx'). Should I write the
developers suggesting this integration?

>However, please do not
>suggest to people on this list that they use reLyX in preference to
>tex2lyx. reLyX is a broken hack and unsupported nightmare.

I won't do it anymore.  Promise.

Luis.


                
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

Reply via email to