Uwe Stöhr wrote:

> When the user imports a .tex-file, the lyx-file produced by tex2lyx is
> immediately stored in the same directory where the .tex-file is. LyX
> converts this file via lyx2lyx to a format readable by LyX 1.3.x and
> opens it. When the user sees that a lyx-file is created he might close
> LyX without saving the lyx-file opened by LyX. In this case the stored
> LyX file is in a different format than the one of the installed
> LyX-version.

Why is this a problem? The user does not need to know at all what the format
of the file is. What matters is the fact that LyX can open it. So keep
always a suitable version of lyx2lyx in lib/lyx2lyx, and you are done.

> To put it in a nutshell we currently have this situation:
> 
> 1) convert test.tex -> test.lyx (format xxx) (tex2lyx)
> 2) convert tmp_dir/xxxx_test.lyx (format xxx) ->
>     tmp_dir/xxxx_test_new.lyx (format yyy) (lyx2lyx)
> 3) load tmp_dir/xxxx_test_new.lyx (format yyy) in LyX,
>     when the user sves this file it is copied to the directory of
>     test.tex
> 
> In this scheme the user gets a lyx-file in format xxx when he don't
> press the save-button in LyX.
> 
> I discussed this topic with José and we came to the conclusion that this
> sheme should avoid this problem:
> 
> 1) convert test.tex -> tmp_dir/xxxx_test.lyx (format xxx) (tex2lyx)
> 2) convert tmp_dir/xxxx_test.lyx (format xxx) ->
>     tmp_dir/xxxx_test_new.lyx (format yyy) (lyx2lyx)
> 3) load tmp_dir/xxxx_test_new.lyx (format yyy) in LyX,
>     when the user sves this file it is copied to the directory of
>     test.tex

I like 1) and 2), because it avoids overwriting the original .tex file with
Export->Latex, but instead of 3) I would simply keep an unnamed document.
Besides that: What happens with master/child documents?

> So simply the first step need to be changed. Is this scheme OK or is
> there a reason why tex2lyx's output is immediately stored in the working
> directory?

I guess that there is no reason besides the fact that it was simple to
implement.


Georg

Reply via email to