1

I want to use gnuplottex, but even example from documentation don't work.

\documentclass[a4paper]{article}

    \usepackage{gnuplottex}
    \begin{document}
    \begin{figure}%
        \centering%
        \begin{gnuplot}[terminal=latex, terminaloptions=rotate]
            set key box top left
            set key width 4
            set sample 1000
            set xr [-5:5]
            set yr [-1:1]
            set xlabel ’$x$-label’
            set ylabel ’$y$-label’
            plot sin(x) w l lc 1 t ’$\sin(x)$’,\cos(x) w l lc 2 t ’$\cos(x)$’,\
            tan(x) w l lc 3 t ’$\tan(x)$’,\
            tanh(x) w l lc 4 t ’$\tanh(x)$’
        \end{gnuplot}
        \caption{This is a simple example using the latex-terminal.}%
        \label{pic:latex}%
    \end{figure}%
    \end{document}

log file with [miktex]{gnuplottex}

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9) (preloaded format=pdflatex 2016.4.25)  26 MAY 2016 15:17
entering extended mode
**234234.tex
(C:\Users\MASAMUTRE\Documents\texi\234234.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for loaded.
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size10.clo"
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\gnuplottex\gnuplottex.sty"
Package: gnuplottex 2015/12/13 v0.9.1 gnuplot graphs in LaTeX

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty"
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks14
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\trig.sty"
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg"
File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
)
Package graphics Info: Driver file: pdftex.def on input line 91.

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"
File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX

("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty"
Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"
Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\moreverb\moreverb.sty"
Package: moreverb 2008/06/03 v2.3a `more' verbatim facilities

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\verbatim.sty"
Package: verbatim 2003/08/22 v1.5q LaTeX2e package for verbatim enhancements
\every@verbatim=\toks15
\verbatim@line=\toks16
\verbatim@in@stream=\read1
)
\tab@position=\count88
\tab@size=\count89
\listing@line=\count90
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ifthen.sty"
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\catchfile.sty"
Package: catchfile 2011/03/01 v1.6 Catch the contents of a file (HO)

("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty"
Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)

("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package etexcmds Info: Could not find \expanded.
(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
(etexcmds)             that some package has redefined \expanded.
(etexcmds)             In the latter case, load this package earlier.
))
\verbatim@out=\write3
runsystem(echo t > "w18-test-2016526917.tex")...executed.

runsystem(del "w18-test-2016526917.tex")...executed.

Package gnuplottex Info: Automatically converting gnuplot files. on input line 
110.
\c@fignum=\count91
)
(C:\Users\MASAMUTRE\Documents\texi\234234.aux)
LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.

("C:\Program Files (x86)\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count92
\scratchdimen=\dimen105
\scratchbox=\box26
\nofMPsegments=\count93
\nofMParguments=\count94
\everyMPshowfont=\toks17
\MPscratchCnt=\count95
\MPscratchDim=\dimen106
\MPnumerator=\count96
\makeMPintoPDFobject=\count97
\everyMPtoPDFconversion=\toks18
) Opening gnuplot stream 234234-gnuplottex-fig1.gnuplot
runsystem(gnuplot 234234-gnuplottex-fig1.gnuplot)...executed.



Package gnuplottex Warning: Conversion of 234234-gnuplottex-fig1.gnuplot failed
.


Package gnuplottex Warning: Please convert 234234-gnuplottex-fig1.gnuplot manua
lly.

Opening gnuplot stream 234234-gnuplottex-fig2.gnuplot
runsystem(gnuplot 234234-gnuplottex-fig2.gnuplot)...executed.



Package gnuplottex Warning: Conversion of 234234-gnuplottex-fig2.gnuplot failed
.


Package gnuplottex Warning: Please convert 234234-gnuplottex-fig2.gnuplot manua
lly.

(C:\Users\MASAMUTRE\Documents\texi\234234.aux) ) 
Here is how much of TeX's memory you used:
 1349 strings out of 495352
 18819 string characters out of 3182689
 66498 words of memory out of 3000000
 4548 multiletter control sequences out of 15000+200000
 3640 words of font info for 14 fonts, out of 3000000 for 9000
 14 hyphenation exceptions out of 8191
 34i,1n,21p,255b,69s stack positions out of 5000i,500n,10000p,200000b,50000s

No pages of output.
PDF statistics:
 0 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

which gives log file

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9) (preloaded format=pdflatex 2016.4.25)  26 MAY 2016 08:57
entering extended mode
**234234.tex
(C:\Users\MASAMUTRE\Documents\texi\234234.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for loaded.
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size10.clo"
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\gnuplottex\gnuplottex.sty"
Package: gnuplottex 2015/12/13 v0.9.1 gnuplot graphs in LaTeX

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty"
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks14
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\trig.sty"
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg"
File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
)
Package graphics Info: Driver file: pdftex.def on input line 91.

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"
File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX

("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty"
Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"
Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count87
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\moreverb\moreverb.sty"
Package: moreverb 2008/06/03 v2.3a `more' verbatim facilities

("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\verbatim.sty"
Package: verbatim 2003/08/22 v1.5q LaTeX2e package for verbatim enhancements
\every@verbatim=\toks15
\verbatim@line=\toks16
\verbatim@in@stream=\read1
)
\tab@position=\count88
\tab@size=\count89
\listing@line=\count90
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ifthen.sty"
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
)
("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\catchfile.sty"
Package: catchfile 2011/03/01 v1.6 Catch the contents of a file (HO)

("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty"
Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)

("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package etexcmds Info: Could not find \expanded.
(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
(etexcmds)             that some package has redefined \expanded.
(etexcmds)             In the latter case, load this package earlier.
))
\verbatim@out=\write3
runsystem(touch w18-test-2016526537.tex)...executed.

runsystem(rm -f w18-test-2016526537.tex)...executed.

runsystem(rm -f "234234.gnuploterrors")...executed.



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

\c@fignum=\count91
) (C:\Users\MASAMUTRE\Documents\texi\234234.aux)
LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.

("C:\Program Files (x86)\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count92
\scratchdimen=\dimen105
\scratchbox=\box26
\nofMPsegments=\count93
\nofMParguments=\count94
\everyMPshowfont=\toks17
\MPscratchCnt=\count95
\MPscratchDim=\dimen106
\MPnumerator=\count96
\makeMPintoPDFobject=\count97
\everyMPtoPDFconversion=\toks18
) Opening gnuplot stream 234234-gnuplottex-fig1.gnuplot

Package gnuplottex Warning: Please convert 234234-gnuplottex-fig1.gnuplot manua
lly.

Opening gnuplot stream 234234-gnuplottex-fig2.gnuplot

Package gnuplottex Warning: Please convert 234234-gnuplottex-fig2.gnuplot manua
lly.


! Package catchfile Error: File `234234.gnuploterrors' not found.

See the catchfile package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.16 \end{document}

Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

)
Runaway argument?
\ifx \gnuploterrors@ \@empty \else \PackageWarningNoLine {gnuplottex}\ETC.
! File ended while scanning use of \gnuploterrors@eatpar.
<inserted text> 
                \par 
<*> 234234.tex

I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

! Emergency stop.
<*> 234234.tex

*** (job aborted, no legal \end found)


Here is how much of TeX's memory you used:
 1347 strings out of 495352
 18740 string characters out of 3182689
 66486 words of memory out of 3000000
 4548 multiletter control sequences out of 15000+200000
 3640 words of font info for 14 fonts, out of 3000000 for 9000
 14 hyphenation exceptions out of 8191
 34i,0n,21p,255b,67s stack positions out of 5000i,500n,10000p,200000b,50000s
!  ==> Fatal error occurred, no output PDF file produced!

I wrote pdflatex.exe --shell-escape foo.tex and use true example but errors there is enter image description here I got that errors.I got error about .gnuploterrors even if wrote nothing. enter image description here

I put --shell-escape but it didn't take any effect. serghersdhdrhdtyhn

closed as unclear what you're asking by user31729, egreg, Stefan Pinnow, Zarko, Mensch Aug 21 '16 at 20:53

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • You're using the wrong quotes – user31729 May 25 '16 at 17:31
  • Copying code from PDF often goes wrong. Better type it yourself. This way you also learn more. – Henri Menke May 25 '16 at 17:35
  • 1
    Apart from the wrong quotes, the error messages seem to be telling that the -shell-escape option is not really enabled. Can you show the first ten lines of the log file? – egreg May 25 '16 at 17:47
  • @Christian Hupfer,@Henri Menke,@egreg- this code wont complike even with normal quotes. I show log. – JHZTME UIBNA May 25 '16 at 18:51
  • 1
    Do you have GNUPlot installed? (I note you are on Windows so this may not be the case) – Joseph Wright May 25 '16 at 20:03
5

Inspecting the ' quotes in the OP they seem to be wrong. I replaced them using ordinary ASCII ' quote characters.

In addition, --shell-escape must be enabled, i.e. run pdflatex --shell-escape foo.tex

% arara: pdflatex: { shell: yes }
\documentclass[a4paper]{article}

    \usepackage{gnuplottex}
    \begin{document}
    \begin{figure}%
        \centering%
        \begin{gnuplot}[terminal=latex, terminaloptions=rotate]
            set key box top left
            set key width 4
            set sample 1000
            set xr [-5:5]
            set yr [-1:1]
            set xlabel '$x$'
            set ylabel '$y$'
            plot sin(x) w l lc 1 t '$\sin(x)$',\
            cos(x) w l lc 2 t '$\cos(x)$',\
            tan(x) w l lc 3 t '$\tan(x)$',\
            tanh(x) w l lc 4 t '$\tanh(x)$'
        \end{gnuplot}
        \caption{This is a simple example using the latex-terminal.}%
        \label{pic:latex}%
    \end{figure}%
    \end{document}

enter image description here

Note

\usepackage[utf8]{inputenc} does not cure the problem.

  • % arara: pdflatex: { shell: yes } would be a nice addition. – Henri Menke May 25 '16 at 17:33
  • @HenriMenke: Thanks, added. (First time I use arara really -- don't tell Paulo ;-)) – user31729 May 25 '16 at 17:36
  • @ChristianHupfer It's not only a problem of quotes; I get the same exact errors as the OP when I run pdflatex without -shell-escape. – egreg May 25 '16 at 17:39
  • @egreg: According to the screen-shot, --shell-escape seems to be enabled – user31729 May 25 '16 at 17:41
  • I wrote pdflatex --shell-escape foo.tex in commands and tried to compile your code and got same errors. – JHZTME UIBNA May 25 '16 at 18:48

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