Enrico Forestieri wrote: > BigG writes: >> I have LyX 1.6.4 installed in cygwin on W2K, and LyXWindows 1.6.4 on W2K on >> another box. When I >> use beamerlyxexample1.lyx, warnings about missing graphics are generated. > [...] >> The PDF generated is fine, but missing the four knight images, and the ICSI >> logo. This is what I >> would expect. However, the relevant image files are actually there in the >> same directory as >> beamerlyxexample1.lyx. For example, >> >> $ ls -w 80 /usr/local/share/lyx/examples/beam* >> /usr/local/share/lyx/examples/beamer-g4-mask.jpg* >> /usr/local/share/lyx/examples/beamer-g4.jpg* >> /usr/local/share/lyx/examples/beamer-icsi-logo.pdf* >> /usr/local/share/lyx/examples/beamer-knight1-mask.png* >> /usr/local/share/lyx/examples/beamer-knight1.png* >> /usr/local/share/lyx/examples/beamer-knight2-mask.png* >> /usr/local/share/lyx/examples/beamer-knight2.png* >> /usr/local/share/lyx/examples/beamer-knight3-mask.png* >> /usr/local/share/lyx/examples/beamer-knight3.png* >> /usr/local/share/lyx/examples/beamer-knight4-mask.png* >> /usr/local/share/lyx/examples/beamer-knight4.png* >> /usr/local/share/lyx/examples/beamerlyxexample1.lyx* >> >> Why can't pdflatex find them? > > This is a known pgf bug: > http://sourceforge.net/tracker/index.php?func=detail&aid=1336165&group_id=92412&atid=600660 > > A patch has been proposed, but it has not still been applied: > http://sourceforge.net/tracker/index.php?func=detail&aid=1447974&group_id=92412&atid=600662 > The patch is defunct, as the source has now moved on somewhat. I've monkeyed with pgfcoreimage.code.tex and produced the following replacement for p...@findfile:
\def\...@findfile#1:#2+#3{% \...@findfile@inner#1:#2+{\in...@path#3} \ifx\...@filename\pgfutil@empty{ \...@findfile@inner#1:#2+{#3} } \fi } \def\...@findfile@inner#1:#2+#3{ \pgfu...@iffileexists{#3#1}% {\PackageInfo{pgf}{Found file #3#1\MessageBreak} \xdef\...@filename{#3#1}}% {\PackageInfo{pgf}{Failed to find #3#1\MessageBreak} \def\...@mightbeempty{#2}% \ifx\...@mightbeempty\pgfutil@empty\else% \...@findfile@inner#2+{#3}% \fi } } The idea is to do two searches; one with in...@path prepended, and one without. (This is necessary to find *all* the required files.) Unfortunately, as it stands it won't work. This is because in the TeX file which LyX produces, the input path is defined by the following line: \def\in...@path{{/usr/local/share/lyx/examples//}} The problem is caused by the double braces. By the time the full path string is passed to pgfu...@iffileexists, it looks like, for example, {/usr/local/share/lyx/examples}beamer-knight1.png The braces left behind invalidate the path. So I have two questions: a) is there a way in TeX to remove the outer pair of braces (I've tried all sorts of tactics, but being a relative newcomer to TeX, I've failed.) b) is there a good reason for the double braces to be there in the first place? (I'm sure there is, but I thought I'd better ask anyway. If I edit one pair away in the TeX file output by LyX, then my patch above seems to work fine.) Bill Gordon ://sneakemail.com