peter kint wrote:

% <<<<<<<WARNING>>>>>>>
% PGF/Tikz doesn't support the following mathematical functions:
% tan, cosh, acosh, sinh, asinh, tanh, atanh
% Plotting will be done using GNUPLOT
% GNUPLOT must be installed and you must allow Latex to call external
% programs  by
% Adding the following option to your compiler
% shell-escape    OR    enable-write18
% Example: pdflatex --shell-escape file.tex
Maybe this is some help to you.
My question to you is: How do you add such a command to your compiler?
(I wouldn't know where to start, I'm only using Linux for 3 months now)

(Disclaimer:  I have not tried this myself, since I don't use gnuplot.)

First, you obviously need to have gnuplot installed and working.

In LyX, go to Tools > Preferences > File Handling > Converters and select (highlight) the "LaTeX (pdflatex) -> PDF (pdflatex)" converter. In the "Converter:" entry, change "pdflatex $$i" to "pdflatex --shell-escape $$i" and save it. See if that helps.

If it does, you might consider a fancier solution. You could go to Tools > Preferences > File Handling > File formats and create a new format (let's call it "PDF (with plots)"), then back to ... > Converters and create a "LaTeX (pdflatex) -> PDF (with plots)" converter using the converter syntax above (and return the first converter to its original syntax). You would then use "View > PDF (with plots)" rather than "View > PDF (pdflatex)" to view files with gnuplots in them (and similarly with file export). The reason for doing this would be security -- it would allow shell escapes only for documents where you knew you needed them. FWIW, I think the low security approach is pretty safe unless you have a habit of including raw LaTeX files from unverified sources in your documents.

/Paul

Reply via email to