On 06/23/2018 05:24 PM, John White wrote:
On Saturday, June 23, 2018 2:34:50 PM PDT Paul A. Rubin wrote:On 06/21/2018 02:05 PM, John White wrote:When inserting a pdf graphic into a template, and saving the file, the next time I open the template, I have to re-insert the graphic, even though the graphic is in the same template folder. However, if I open the same lyx template in dolphin, it opens with the graphic shown. Anyone know how I can save the template in such a manner as will show when opened from lyx' with "new from template"? JohnAre you using absolute (not relative) paths to the graphics? Relative paths will not work, because the new document you are creating will live in the LyX temp directory, not in the templates directory. I don't seem to have a problem as long as I use absolute paths. PaulPaul, Thaniks for the suggestion. However I am using absolute path (/home/ johwhi/.lyx/templates). BUT, you gave me an idea. I moved the lyx file and the associated pdf to a non-hidden path (/home/documents/lyx and it opens fine (shows the graphic). However if I point in preferences to the new non-hidden path, it still won't show the graphic if I open with "new from templates." I have to just "open" it for the graphic to show. AND, if I reconfigure after putting the new path into preferences, it reverts to the former .lyx hidden template file, i.e.. I can't save the non-hidden template path. Hopes this makes sense. I am using 2.3.0 on debian stretch. John
John,First, please bottom-post on replies going to the list, so that things appear in chronological order. I moved your reply to the bottom here.
Second, hidden v. non-hidden path should not matter. As long as the path to the image is absolute and the directory and file are readable by the user account, it should work. I've attached a minimal example, using a banner image from LyX's image directory (for portability). I saved it in my ~/.lyx/templates directory. Any time I do New from Template and select that file, the image displays just fine, both in the GUI and when I compile to PDF. I did not do any tweaking of preferences. FYI this is using LyX 2.3.0 on Linux Mint. Try parking this in your local templates directory, then use it as a template and see if the image works. If so, maybe it's something about how you are including the graphics in your template.
As far as reconfiguring changing paths, did you do Save rather than Apply after changing the path? I just tried tweaking my templates path, saved it, exited LyX, started LyX, reconfigured, exited LyX, started LyX and the tweaked template directory was still there.
Paul
test.lyx
Description: application/lyx