> On 31 Oct 2022, at 21:02, Dan <[email protected]> wrote:
> 
> I am trying to plot data from a csv file using TikZ but the system can't seem 
> to find the file location.  Is there a specific folder I need to put this 
> file in, or is there a way I can set a default folder for LyX to look for?
> 
> Thanks!
> 
> -Dan
> -- 
> lyx-users mailing list
> [email protected]
> http://lists.lyx.org/mailman/listinfo/lyx-users

I assume you are using a raw latex inset in LyX.  Have you tried an absolute 
path?  If you produce a pdf, then LyX creates a temporary  LaTeX document in a 
directory for temporary files first and then processes this LaTeX document in 
order to create a pdf.  As far as I know (but I may be mistaken), raw LaTeX 
input is copied verbatim into this LaTeX File.  As the temporary directory is 
normally different from the directory of your LyX file, it would not find csv 
files with a relative path.  You can set the folder for your temporary files in 
the preferences, but this is a general setting and not a per document setting. 
So I would not recommend doing so for finding your csv file. 

I think, a better approach would be to produce a pdf for your plot outside LyX 
and then to read the pdf into LyX as a figure.  Advantages: the figure input 
dialog does accept relative paths, you can use an editor which is better suited 
to do LaTeX work (syntax highlighting etc), if you have a large document with 
many files the LyX compilation is much faster because it does not have to 
process TikZ (which is slow) every time.

Marcus

-- 
lyx-users mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to