gnuplottex:转换失败

gnuplottex:转换失败

收到此错误:

Package gnuplottex Warning: Conversion of ap-gnuplottex-fig1.gnuplot failed.
Package gnuplottex Warning: Please convert ap-gnuplottex-fig1.gnuplot manually.

最小示例:

\documentclass[14pt,a4paper]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage[T1,T2A]{fontenc}
\usepackage[english,russian]{babel}

\usepackage{gnuplottex}
\begin{document}
\begin{gnuplot}
set terminal epslatex color size 14cm,12cm

plot x**2
\end{gnuplot}
\end{document}

我使用 texmaker

pdflatex 命令:

pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex

答案1

您需要将终端和终端选项指定为环境选项gnuplottex

\begin{gnuplot}[terminal=epslatex,terminaloptions={color size 14cm,12cm}]

而且你还需要这个xcolor包。完整工作示例:

\documentclass[14pt,a4paper]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage[T1,T2A]{fontenc}
\usepackage[english,russian]{babel}

\usepackage{xcolor}

\usepackage{gnuplottex}
\begin{document}
\begin{gnuplot}[terminal=epslatex,terminaloptions={color size 14cm,12cm}]
plot x**2
\end{gnuplot}
\end{document}

相关内容