> On 1 Nov 2022, at 13:35, Dan <[email protected]> wrote: > > Thanks for the reply. You are correct, using TikZ to make graphs like the > ones I am doing would be a waste of time during compiling. Actually, I'm > doing it the reverse way. At the moment I'm trying to learn TikZ and I'm > using LyX as my platform. I work on several help Forums and to learn TikZ > I'm building a set of pdfs that I can use as diagrams (instead of having to > search all over the internet to find a good picture.) LyX is good for that > because it is very flexible. The project I'm working on at the moment is to > graph the electric field lines and the equipotential surfaces due to a > specific charge distribution. LyX obviously isn't designed for that level of > computation so I'm making a data file in Excel that I can save as a csv and > import as data to LyX to make a permanent pdf. So I'm not actually writing a > document and putting TikZ generated diagrams into it, I'm using LyX to make a > single diagram which I will then save as a pdf. > > Unfortunately I currently have no idea what an "absolute path" is. (I'm kind > of a noobie when it comes to anything beyond basic use of my programs.) But > that gives me a place to start a search, so thank you! > > -Dan >
With "absolute path" I mean the path from the root directory to the csv file, so the complete path to the file in the file system. But to be honest, I really think that If you are only interested in producing plots, LyX is not the best tool. LyX is fantastic software for producing written documents, and it is easy to include plots and pictures. But it is not the best program to produce stand-alone plots. My advice would be to get a good editor with a nice LaTeX environment. “Emacs" with the library “auctex" or "Visual Studio Code" with the plugin "LaTeX Workshop" are great free choices for Linux, Mac or Windows. If you never have worked directly with LaTeX before, you will find a minimal plotting example in the first tutorial of the official documentation of TikZ and PGF (PGF manual) . Marcus > On Tue, Nov 1, 2022 at 1:15 AM Marcus Kriele <[email protected] > <mailto:[email protected]>> wrote: > > > > On 31 Oct 2022, at 21:02, Dan <[email protected] > > <mailto:[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] <mailto:[email protected]> > > http://lists.lyx.org/mailman/listinfo/lyx-users > > <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
