2010/2/7 Paul A. Rubin <ru...@msu.edu>: > Jason Waskiewicz wrote: >> >> I've been using Tikz graphics in my LyX files for some time now, with >> success, I might add. >> >> Recently, I tried to include sparklines in two different LyX files. An >> example of what I mean can be found at: >> http://www.texample.net/tikz/examples/temperature-and-rain-sparklines/ >> They do not appear. With the first one, I simply exported the file as >> LaTeX and was able to use it that way. My most recent project is part of a >> much larger project with many files and the idea of switching entirely to >> LaTeX sounds like too much work. I like the visual advantages of LyX, but >> these sparklines only seem to work in pure LaTeX. >> >> Does anyone have any suggestions to make it work? If it helps, I've tried >> this in the Tufte book and handout classes as well as the Memoir class. I've >> even tried a standalone article class with only the graphic in it. >> >> Can I make it work or must I turn to LaTeX? >> >> --Jason Waskiewicz >> Bowman County High School >> > > You need to use an absolute path to the data files. I just set up Fauske's > example in LyX. After changing > > \def\temperaturedata{data/temperaturesOslo.txt} > \def\raindata{data/rainOslo.txt} > > to > > \def\temperaturedata{/temp/sparklines/temperaturesOslo.txt} > \def\raindata{/temp/sparklines/rainOslo.txt} > > (and putting the data in C:\temp\sparklines on Windows) it worked. My LyX > file is attached. > > The problem is that LyX generates the DVI or PDF file in a temporary working > directory. It exports the LaTeX version of your LyX doc to that working > directory, and it knows to export graphics files that you inserted the usual > way, but it doesn't recognize the data files here, so they don't get copied > to the working directory -- which is fine if you use an absolute path, but a > problem is you use a relative path. > > /Paul >
This is next example that LyX should have a user configurable file copier for advanced users. One of its abilites should be putting proper file paths in places where it is needed. -- Manveru jabber: manv...@manveru.pl gg: 1624001 http://www.manveru.pl