Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using LyX and have created a document that includes numerous images. I'm wondering if it's possible to reference the path and file name to the images in LyX so that when I compile and create my PDF document, the new images with the same file name as the old file name referenced in the document will be displayed?

For example, when I originally create my document I will have a reference to myimage1.pdf. When I compile my document I see myimage1.pdf just fine as I would expect. However, my LyX document contains some code that executes external program code that generates new graphics when LyX the document is compiled and the PDF generated. After generating a new PDF, I'd like my LyX document to pull in the newly created myimage1.pdf. Currently, LyX seems to be rending the document with the old image. When I generate the document a second time, it pulls in the correct images (presumably because the new myimpage1.pdf is available initially at run-time). Is there any way to get this to work without have the image available in advance of generating my PDF?

share|improve this question
1  
TeX will grab whatever is available in the form of myimage1.pdf at the time of compilation. Are you saying that you change myimage1.pdf during compilation? –  Werner Sep 9 '13 at 5:21
    
Yes, myimage1.pdf changes at compile time. –  Mark Lamias Sep 9 '13 at 5:51
    
@Werner This would need some more info and a small example. When I am thinking about embedded R code (i.e. sweave or knitr), this should be handled as expected, i.e code executed and graph generated and inserted. Other code might have different approaches. Without further info, I would suggest to look at the copiers in LyX, or the command line compilation of the LyX document, so that you could e.g. run it twice? –  Rainer Sep 11 '13 at 7:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.