Sven Schreiber wrote:
> Georg Baum wrote:
>> Because LyX 1.4 _always_ needs the extension: There is always one
>> "master" version of the graphic that is referenced in the .lyx file. The
>> others are created by the converter mechanism from the master file if
>> needed. LyX will not output the extension in the .tex file to maintain
>> portability, but it needs it in the .lyx file.
>
> That's great, I didn't know that. I agree it's the right thing to do. Is
> it documented somewhere? (well, probably in the main user guide....?)
I don't know.
>> Therefore tex2lyx looks for existing files and adds the extension if it
>> finds one. What is missing here is a commandline switch for tex2lyx that
>> tells wether the document is for "normal" latex or pdflatex. This should
>> not be difficult to implement, you are welcome to do that if you know a
>> bit of C++ ;-)
>
> Wait a minute, if lyx preserves the portability, why would you need such
> a switch? If I understand correctly, the "master" document is just used
> as input to convert for preview display, right? Then I think the
> situation is just fine "as is".
No. The master graphics is used as master for everything. Consider the
following situation: The LyX file includes a figure "a.xyz". Converters
exist from xyz -> eps and xyz -> png. The .tex file contains always
\includegraphics{a} (actually almost always, if you want to know the
details read
http://www.lyx.org/cgi-bin/viewcvs.cgi/lyx-devel/src/insets/insetgraphics.C?rev=HEAD&content-type=text/vnd.viewcvs-markup,
look for prepareFile). When you export to pdf using pdflatex, the file
a.png is created. When you export to ps, the file a.eps is created. a.xyz
is always the master, not only for preview, but also for export. Of course
there may be the special case that xyz = pdf or xyz = eps etc.
BTW, I am talking about LyX 1.4 here, it is slightly different in 1.3.
> Which one? The one I suggested about relyx and then tex2lyx (and that
> doesn't exist yet)?
The fact that tex2lyx creates an additional ERT for \bibliographystyle that
should be deleted.
Georg