jilly
23-07-2012, 21:54
Liebe Leute,
seit einiger Zeit schon habe ich das Problem, dass ich meine in gnuplot erstellten graphen nicht so einfach in mein latex dokument einbinden kann. Folgendes Minimalbeispiel:
\documentclass {article}
\usepackage{graphicx}
\begin{document}
hallihallo
\begin{figure}
\input{testbild}
\end{figure}
\end{document}
ich habe im selbigen ordner die dateien: testbild.eps und testbild.tex liegen.
Die fehlermeldung:
! Missing } inserted.
<inserted text>
}
l.7 \end{figure}
Ich benutze das erste Mal latex in Kombination mit gnuplot und weiß nicht wie ich den fehler beheben kann....:confused:
der vollständigkeit halber hier die testbild.tex datei:
% GNUPLOT: LaTeX picture with Postscript
\begingroup
\makeatletter
\providecommand\color[2][]{%
\GenericError{(gnuplot) \space\space\space\@spaces}{%
Package color not loaded in conjunction with
terminal option `colourtext'%
}{See the gnuplot documentation for explanation.%
}{Either use 'blacktext' in gnuplot or load the package
color.sty in LaTeX.}%
\renewcommand\color[2][]{}%
}%
\providecommand\includegraphics[2][]{%
\GenericError{(gnuplot) \space\space\space\@spaces}{%
Package graphicx or graphics not loaded%
}{See the gnuplot documentation for explanation.%
}{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}%
\renewcommand\includegraphics[2][]{}%
}%
\providecommand\rotatebox[2]{#2}%
\@ifundefined{ifGPcolor}{%
\newif\ifGPcolor
\GPcolortrue
}{}%
\@ifundefined{ifGPblacktext}{%
\newif\ifGPblacktext
\GPblacktexttrue
}{}%
% define a \g@addto@macro without @ in the name:
\let\gplgaddtomacro\g@addto@macro
% define empty templates for all commands taking text:
\gdef\gplbacktext{}%
\gdef\gplfronttext{}%
\makeatother
\ifGPblacktext
% no textcolor at all
\def\colorrgb#1{}%
\def\colorgray#1{}%
\else
% gray or color?
\ifGPcolor
\def\colorrgb#1{\color[rgb]{#1}}%
\def\colorgray#1{\color[gray]{#1}}%
\expandafter\def\csname LTw\endcsname{\color{white}}%
\expandafter\def\csname LTb\endcsname{\color{black}}%
\expandafter\def\csname LTa\endcsname{\color{black}}%
\expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}%
\expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}%
\expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}%
\expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}%
\expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}%
\expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}%
\expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}%
\expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}%
\expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}%
\else
% gray
\def\colorrgb#1{\color{black}}%
\def\colorgray#1{\color[gray]{#1}}%
\expandafter\def\csname LTw\endcsname{\color{white}}%
\expandafter\def\csname LTb\endcsname{\color{black}}%
\expandafter\def\csname LTa\endcsname{\color{black}}%
\expandafter\def\csname LT0\endcsname{\color{black}}%
\expandafter\def\csname LT1\endcsname{\color{black}}%
\expandafter\def\csname LT2\endcsname{\color{black}}%
\expandafter\def\csname LT3\endcsname{\color{black}}%
\expandafter\def\csname LT4\endcsname{\color{black}}%
\expandafter\def\csname LT5\endcsname{\color{black}}%
\expandafter\def\csname LT6\endcsname{\color{black}}%
\expandafter\def\csname LT7\endcsname{\color{black}}%
\expandafter\def\csname LT8\endcsname{\color{black}}%
\fi
\fi
\setlength{\unitlength}{0.0500bp}%
\begin{picture}(7200.00,5040.00)%
\gplgaddtomacro\gplbacktext{%
\csname LTb\endcsname%
\put(3599,4312){\makebox(0,0){\strut{}y=0.02}}%
}%
\gplgaddtomacro\gplfronttext{%
\csname LTb\endcsname%
\put(2138,772){\makebox(0,0){\strut{}-600}}%
\put(2626,772){\makebox(0,0){\strut{}-400}}%
\put(3113,772){\makebox(0,0){\strut{}-200}}%
\put(3600,772){\makebox(0,0){\strut{}0}}%
\put(4087,772){\makebox(0,0){\strut{}200}}%
\put(4574,772){\makebox(0,0){\strut{}400}}%
\put(5062,772){\makebox(0,0){\strut{}600}}%
\put(3600,442){\makebox(0,0){\strut{}$x [/mu}m$]}}%
\put(1966,1058){\makebox(0,0)[r]{\strut{}-600}}%
\put(1966,1546){\makebox(0,0)[r]{\strut{}-400}}%
\put(1966,2033){\makebox(0,0)[r]{\strut{}-200}}%
\put(1966,2520){\makebox(0,0)[r]{\strut{}0}}%
\put(1966,3007){\makebox(0,0)[r]{\strut{}200}}%
\put(1966,3494){\makebox(0,0)[r]{\strut{}400}}%
\put(1966,3982){\makebox(0,0)[r]{\strut{}600}}%
\put(1372,2520){\rotatebox{-270}{\makebox(0,0){\strut{}$z [m]$}}}%
\put(5413,1057){\makebox(0,0)[l]{\strut{} 0}}%
\put(5413,1349){\makebox(0,0)[l]{\strut{} 0.1}}%
\put(5413,1642){\makebox(0,0)[l]{\strut{} 0.2}}%
\put(5413,1934){\makebox(0,0)[l]{\strut{} 0.3}}%
\put(5413,2227){\makebox(0,0)[l]{\strut{} 0.4}}%
\put(5413,2519){\makebox(0,0)[l]{\strut{} 0.5}}%
\put(5413,2812){\makebox(0,0)[l]{\strut{} 0.6}}%
\put(5413,3104){\makebox(0,0)[l]{\strut{} 0.7}}%
\put(5413,3397){\makebox(0,0)[l]{\strut{} 0.8}}%
\put(5413,3689){\makebox(0,0)[l]{\strut{} 0.9}}%
\put(5413,3981){\makebox(0,0)[l]{\strut{} 1}}%
}%
Ach ja, ich benutze Texshop version 2.47 auf nem mac, der graph wurde auf einem ubunturechner erstellt...
seit einiger Zeit schon habe ich das Problem, dass ich meine in gnuplot erstellten graphen nicht so einfach in mein latex dokument einbinden kann. Folgendes Minimalbeispiel:
\documentclass {article}
\usepackage{graphicx}
\begin{document}
hallihallo
\begin{figure}
\input{testbild}
\end{figure}
\end{document}
ich habe im selbigen ordner die dateien: testbild.eps und testbild.tex liegen.
Die fehlermeldung:
! Missing } inserted.
<inserted text>
}
l.7 \end{figure}
Ich benutze das erste Mal latex in Kombination mit gnuplot und weiß nicht wie ich den fehler beheben kann....:confused:
der vollständigkeit halber hier die testbild.tex datei:
% GNUPLOT: LaTeX picture with Postscript
\begingroup
\makeatletter
\providecommand\color[2][]{%
\GenericError{(gnuplot) \space\space\space\@spaces}{%
Package color not loaded in conjunction with
terminal option `colourtext'%
}{See the gnuplot documentation for explanation.%
}{Either use 'blacktext' in gnuplot or load the package
color.sty in LaTeX.}%
\renewcommand\color[2][]{}%
}%
\providecommand\includegraphics[2][]{%
\GenericError{(gnuplot) \space\space\space\@spaces}{%
Package graphicx or graphics not loaded%
}{See the gnuplot documentation for explanation.%
}{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}%
\renewcommand\includegraphics[2][]{}%
}%
\providecommand\rotatebox[2]{#2}%
\@ifundefined{ifGPcolor}{%
\newif\ifGPcolor
\GPcolortrue
}{}%
\@ifundefined{ifGPblacktext}{%
\newif\ifGPblacktext
\GPblacktexttrue
}{}%
% define a \g@addto@macro without @ in the name:
\let\gplgaddtomacro\g@addto@macro
% define empty templates for all commands taking text:
\gdef\gplbacktext{}%
\gdef\gplfronttext{}%
\makeatother
\ifGPblacktext
% no textcolor at all
\def\colorrgb#1{}%
\def\colorgray#1{}%
\else
% gray or color?
\ifGPcolor
\def\colorrgb#1{\color[rgb]{#1}}%
\def\colorgray#1{\color[gray]{#1}}%
\expandafter\def\csname LTw\endcsname{\color{white}}%
\expandafter\def\csname LTb\endcsname{\color{black}}%
\expandafter\def\csname LTa\endcsname{\color{black}}%
\expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}%
\expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}%
\expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}%
\expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}%
\expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}%
\expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}%
\expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}%
\expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}%
\expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}%
\else
% gray
\def\colorrgb#1{\color{black}}%
\def\colorgray#1{\color[gray]{#1}}%
\expandafter\def\csname LTw\endcsname{\color{white}}%
\expandafter\def\csname LTb\endcsname{\color{black}}%
\expandafter\def\csname LTa\endcsname{\color{black}}%
\expandafter\def\csname LT0\endcsname{\color{black}}%
\expandafter\def\csname LT1\endcsname{\color{black}}%
\expandafter\def\csname LT2\endcsname{\color{black}}%
\expandafter\def\csname LT3\endcsname{\color{black}}%
\expandafter\def\csname LT4\endcsname{\color{black}}%
\expandafter\def\csname LT5\endcsname{\color{black}}%
\expandafter\def\csname LT6\endcsname{\color{black}}%
\expandafter\def\csname LT7\endcsname{\color{black}}%
\expandafter\def\csname LT8\endcsname{\color{black}}%
\fi
\fi
\setlength{\unitlength}{0.0500bp}%
\begin{picture}(7200.00,5040.00)%
\gplgaddtomacro\gplbacktext{%
\csname LTb\endcsname%
\put(3599,4312){\makebox(0,0){\strut{}y=0.02}}%
}%
\gplgaddtomacro\gplfronttext{%
\csname LTb\endcsname%
\put(2138,772){\makebox(0,0){\strut{}-600}}%
\put(2626,772){\makebox(0,0){\strut{}-400}}%
\put(3113,772){\makebox(0,0){\strut{}-200}}%
\put(3600,772){\makebox(0,0){\strut{}0}}%
\put(4087,772){\makebox(0,0){\strut{}200}}%
\put(4574,772){\makebox(0,0){\strut{}400}}%
\put(5062,772){\makebox(0,0){\strut{}600}}%
\put(3600,442){\makebox(0,0){\strut{}$x [/mu}m$]}}%
\put(1966,1058){\makebox(0,0)[r]{\strut{}-600}}%
\put(1966,1546){\makebox(0,0)[r]{\strut{}-400}}%
\put(1966,2033){\makebox(0,0)[r]{\strut{}-200}}%
\put(1966,2520){\makebox(0,0)[r]{\strut{}0}}%
\put(1966,3007){\makebox(0,0)[r]{\strut{}200}}%
\put(1966,3494){\makebox(0,0)[r]{\strut{}400}}%
\put(1966,3982){\makebox(0,0)[r]{\strut{}600}}%
\put(1372,2520){\rotatebox{-270}{\makebox(0,0){\strut{}$z [m]$}}}%
\put(5413,1057){\makebox(0,0)[l]{\strut{} 0}}%
\put(5413,1349){\makebox(0,0)[l]{\strut{} 0.1}}%
\put(5413,1642){\makebox(0,0)[l]{\strut{} 0.2}}%
\put(5413,1934){\makebox(0,0)[l]{\strut{} 0.3}}%
\put(5413,2227){\makebox(0,0)[l]{\strut{} 0.4}}%
\put(5413,2519){\makebox(0,0)[l]{\strut{} 0.5}}%
\put(5413,2812){\makebox(0,0)[l]{\strut{} 0.6}}%
\put(5413,3104){\makebox(0,0)[l]{\strut{} 0.7}}%
\put(5413,3397){\makebox(0,0)[l]{\strut{} 0.8}}%
\put(5413,3689){\makebox(0,0)[l]{\strut{} 0.9}}%
\put(5413,3981){\makebox(0,0)[l]{\strut{} 1}}%
}%
Ach ja, ich benutze Texshop version 2.47 auf nem mac, der graph wurde auf einem ubunturechner erstellt...