On Mon, Mar 30, 2015 at 8:12 PM, Enrico Forestieri <for...@lyx.org> wrote:
> On Sun, Mar 29, 2015 at 11:07:35PM +0200, Kornel Benko wrote:
>
>> This is a recipe to observe creation of files in lyx-source
>>
>> 1.) copy {lyx-source}/lib/doc/Math.lyx to a local directory, say ~/lyx/test/.
>>       This is not needed, but shows that the behaviour does not depend on
>>       the path of Math.lyx
>> 2.) use your lyx from the build directory to open the file
>> 3.) File->Export->LaTeX(LuaLaTeX)
>>
>> Now go to the lyx-source
>> # git status
>>
>> You see many untracked .pdf files like e.g. 
>> lib/images/math-macro-remove-greedy-param.pdf
>
> I think this is the expected behavior. When you export to latex, in order
> to ensure compilation, all images gets converted to a format that latex
> understands. If you reference a svg image and export to pdflatex, this
> image has to be converted. On the other hand, if you reference a png image
> no conversion is needed, because pdflatex can deal with pngs.
>
> Note that it means nothing that you saved elsewhere the document, because
> full paths are still used to point to the original images (that are not
> moved alongside the document, or that are always found in the lyx installation
> directory for the icon info inset). Also note that the icon info inset is
> simply equivalent to the graphics inset.
>
> This is nothing new, I think, and you should have got the same result if
> you tried exporting to plain latex in the case of png icons, because in
> this case all pngs should be converted to postscript. However, nobody
> seems producing dvi or postscript output for the lyx documentation and
> thus this was going unnoticed when the icons were in png format.
>
> This only occurs if you first export to latex, but of course you can always
> produce output directly from lyx, because in this case all images are
> copied to the temporary directory.
>
> In conclusion, if your document references an image located in a directory
> where you have no writing rights, you cannot export your document to latex
> without incurring in those shortcomings. Nothing new.

Thank you for this clear explanation of what's going on.

It seems there is an enhancement that we can do. For example, we could
have a user-friendly dialog about not having write permissions to the
directory where an image is stored. The only alternative I can think
of is to change the path of the image to the same directory where the
.tex file is exported to.

Scott

Reply via email to