Texmaker and TeXstudio ⇒ Call external programs in TeXmaker
Call external programs in TeXmaker
I am trying to make plots in the tikz environment using gnuplot in texmaker. In the tikz/pgf tutorial, it says to enable "calling external programs" using the command line option "shell-escape" or "enable-write18". Does anyone know how to do this?
NEW: TikZ book now 40% off at Amazon.com for a short time.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Call external programs in TeXmaker
Somewhere in TeXmaker there should be the possibility to set options for the LaTeX executables. Search that dialog and add »-shell-escape« (TeX Live) or »--enable-write18« (MiKTeX) to the command line options of the compiler engines (latex, pdflatex, ...).
On Windows as operating system there are some more prerequisites necessary to make it work. On Linux it should run out of the box.
Best regards
Thorsten
On Windows as operating system there are some more prerequisites necessary to make it work. On Linux it should run out of the box.
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Call external programs in TeXmaker
I do have a windows operating system. Do you know the other prerequisites? I added the --enable-write18 (MiKtex) to the command lines of latex and pdflatex, but no luck. Any advice would be helpful.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Call external programs in TeXmaker
There are several steps needed to get this work on a Windows system. I assume that you know basically how to handle your operating system.
- Since Gnuplot comes only in an archive without installer, you have to unpack it manually. I placed it in the standard path for all programs on the system partition of the hard disk.
Your path might look different and you should remember where you once unpacked the archive.
Code: Select all
C:\Program Files\Gnuplot
- The executables are located in the subdirectory bin.
This path has to be added to the »PATH« environment variable of your system. A right click on the desktop symbol »My Computer« (name depends on system language) will show the properties. On one of the tabs (I don't remember the English name, may be »Advanced«) you will find the button for the environment variables. Choose the »PATH« variable and add the above given path (which can look different on your system) to the list.
Code: Select all
C:\Program Files\Gnuplot\bin
- The file »README.Windows« in the archive mentions the executable »pgnuplot.exe«. Rename it to »gnuplot.exe« because packages like pgfplots (as well as gnuplottex) need an executable with this name. Now it might be necessary to restart the system. Check on the command prompt and try to execute »gnuplot«. If the program starts then LaTeX will also find it. If not, restart the system and try again.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10