Texmaker and TeXstudioCall external programs in TeXmaker

Information and discussion about Texmaker, an integrated LaTeX environment for several platforms, and the related TeXstudio
Post Reply
howard
Posts: 8
Joined: Fri Oct 23, 2009 8:55 am

Call external programs in TeXmaker

Post by howard »

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?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Call external programs in TeXmaker

Post by localghost »

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
howard
Posts: 8
Joined: Fri Oct 23, 2009 8:55 am

Re: Call external programs in TeXmaker

Post by howard »

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.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Call external programs in TeXmaker

Post by localghost »

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.

    Code: Select all

    C:\Program Files\Gnuplot
    Your path might look different and you should remember where you once unpacked the archive.
  • The executables are located in the subdirectory bin.

    Code: Select all

    C:\Program Files\Gnuplot\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.
  • 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.
I guess these steps shouldn't be too difficult for you. As already said they only require a basic knowledge of the operating system. The file »README.Windows« describes another process how to supplement the environment variables. But I think these few steps should do.
Post Reply