I am encountering problems of implementing gnuplot images in my TeX document. I can actually create a gnuplot image (.tex and .eps file) interactively (separately) and use \input{image} to implement in my document but this is very inconvenient.

I hope one of you would have a look on the code and tell me what's the craic. I am using gnuplot 4.6 patch 4. Latest TeX version, running Ubuntu 14.04 LTE.

raphy=totoc, captions=tableheading,pdftex,parskip=half,openright, 

\usepackage{color}                  % manage foreground/background color, works with graphics package
\usepackage{amsmath}                % Mathematikbefehle
\usepackage{amssymb}                % Unter anderem schöne Mengensymbole
%\usepackage[amssymb]{SIunits}      % Einheiten per Befehl einfügen
\usepackage[pdftitle={Diplomarbeit John - Robert Scholz}, pdfauthor={John - Robert Scholz}, bookmarks=true, pdfborder={0 0 0}]{hyperref}        % klickbare verlinkungen im dokument
\usepackage[utf8]{inputenc}         % translates encoding into latex language
\usepackage[T1]{fontenc}            % al­lows the user to se­lect font en­cod­ings
\usepackage[ngerman, english]{babel}
\sisetup{range-phrase=--}           % Deutsch --> option: [locale=DE], händelt auch alle andere Pakte dazu
\usepackage[babel,german=quotes]{csquotes}  % csquotes einbinden; hauptsächlich um Anführungszeichen in Bibliographie anzupassen
\numberwithin{table}{section}       % Formel-, bilder- und Tabellennummer mit section.nummer
\usepackage{graphicx}               % Grafiken einfügen
\usepackage{epstopdf}               % verwandelt .eps to .pdf on the fly
\usepackage[labelformat=parens,labelfont=normalfont]{subcaption} %Teilbilder
\usepackage{placeins}               % Barieren für figures
%\usepackage{subfigure}             % Teilbilder erzeugen
\usepackage[format=plain, font=small, labelfont=bf,justification=RaggedRight,width=\textwidth]{caption} 
        % ex­tended im­ple­men­ta­tion of the ar­ray and tab­u­lar en­vi­ron­ments
\usepackage{caption}                % customize caption in floating enviroments


    f(x)= x**2
    plot f(x) title "Fitfunktion"

All I get is the actual caption in my document but nothing else, like as the picture itself would miss. I compiled with:

pdflatex --shell-escape document.tex ; pdflatex -shell-escape document.tex ; pdflatex document.tex

Nothing worked. All I got was the terminal warning as follows:

Package gnuplottex Warning: Shell escape not enabled.
(gnuplottex) You'll need to convert the graphs yourself.

[18] Opening gnuplot stream diplomarbeit-gnuplottex-fig1.gnuplot
Package gnuplottex Warning: Please convert diplomarbeit-gnuplottex-fig1.gnuplot manually.

LaTeX Warning: Characters dropped after `\end{gnuplot}' on input line 339.

I'd appreciate your help and hope you forgive me my package chaos.

  • Loading gnuplottex twice causes an error. If I delete the second instance (and add \begin{document} and \end{document}) then your example works fine on my machine. – Ian Thompson Jul 21 '14 at 20:26
  • Ups, actually the first one is commented. I edited it. – Johngoldenboy Jul 21 '14 at 20:29
  • Without [miktex] it works for me, but then I'm using TeXLive. – Ian Thompson Jul 21 '14 at 20:36
  • I actually tried this before but however, it turend out your suggestion made it. I am thankful. – Johngoldenboy Jul 21 '14 at 21:00
  • The miktex option is specific for MiKTeX; you're on Ubuntu, so this is not to be given. – egreg Jul 21 '14 at 22:11

Load each package once only, and don't give the [miktex] option to the gnuplottex pacakge unless you really are using MiKTeX.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.