On 02/17/2011 07:05 PM, Kuba Ober wrote:
Now I'm trying to add graphics to the page header in the document preamble, and
I'd
like to be able somehow to refer to the graphics file exported by LyX. What I
need
is a way of knowing that file foo.eps got exported as baz_bar_foo.eps to the
temp
directory.
This also applies to not being able to, say, have an \includegraphics{foo} in a
LaTeX inset: LyX only processes graphics insets when exporting files, it does
not detect manually inserted \includegraphics.
A solution to my problem would be either:
1. how to "predict" (perhaps LyX could insert a macro for each exported file?)
exported graphics file's name.
There's a specific routine in the LyX source that produces this
"mangled" filename. You can have a look at it if you want to see how it
works.
2. how to force LyX to automagically process \includegraphics{} in LaTeX insets,
document preamble, etc.
It's kind of LyX's policy that you are on your own as far as ERT, etc,
is concerned. Parsing this stuff would be very difficult.
That said, if the graphic is in some location LaTeX knows about---e.g.,
the same directory as the LaTeX file, or somewhere else that LaTeX can
find it---then LaTeX will find it just as if you were running LaTeX
manually on the file. So you don't need to refer to LyX's exported file
but can just refer to your original.
rh