Am Sonntag, 13. August 2006 08:42 schrieb Jens Noeckel:

> All this will become less important once LyX is more scriptable, but  
> for now being part of the export menu seems to make such a function  
> much easier to use. I personally will just use a workaround for this  
> issue for now (wrapping lyx in an additional script that puts figures  
> into comments before exporting), but there are some more points that  
> may be worth considering:

Note that having an extra lfun does not necessarily mean that it will not 
show up in the export menu (although Jean-Marc probably meant that). It 
has the advantage that we do not need to duplicate file formats.

> If you don't put bare latex export into the Export menu, this would  
> imply that you consider it more important to have ASCII text export,  
> than to export the latex format on which LyX itself is based.

Yes, I do consider that more important, because we have the LaTeX export 
with figures. Then comes ASCII (very lossy, but very easy to import 
elsewhere), and then comes LaTeX without figures.

> One should also consider the following: There is a latex IMPORT menu  
> item, but none of the present two latex EXPORT functions are really  
> the inverse of that import. Importing a latex file "original.tex" and  
> then exporting it again, you will in general lose some or all of the  
> information about what graphics formats had been present in  
> "original.tex" (because of the suffix-stripping).

The suffix-stripping has nothing to do with the data loss (apart from that 
I acknowledged on the list and in bugzilla that we need to change that, so 
you are beating a dead horse). Even if it is not stripped you do not know 
whether fig.eps was the original figure in the LyX file, or whether that 
was e.g. fig.tgo.
The LyX->LateX conversion is lossy because the LaTeX file format can not 
store all information that is in the LyX file format, so you can't do a 
100% roundtrip in all cases.
Neither a bare latex export nor the latex export with figures can therefore 
be the 100% inverse of the import function.
The text above refers to the LyX->LaTeX->LyX roundtrip. The 
LaTeX->LyX->LaTeX roundtrip has no dataloss because of suffix-stripping 
(tex2lyx emulates the LaTeX serach algorithm for figures). Try it out.

> A bare (or "raw") latex export option would allow the user to get a  
> tex file that is unambiguously related to the initial file  
> "original.tex", and in that sense form the proper inverse of the  
> LaTeX import function. After all, a user might expect that Export and  
> Import should have this reciprocity property.

That is an academic expectation. The LyX file format can store more 
information than the LaTeX file format. This is not specific to LyX, many 
programs have export and import options for file formats that can only 
store parts of the original information.


Georg

Reply via email to