Hello,
I hope I do it correctly and I help you with this information. Please excuse me if this is my fault of wrong dealing with gnuplot.
Using cairolatex there is a error(I think). Following code I used in gnuplot4.6.6 under windows:
set encoding utf8
set terminal cairolatex pdf input
set output 'gp0037.tex'
rpar(R1,R2)=((R1 > 0.0) ? ((R2 > 0.0) ? ((R1 * R2)/(R1 + R2)) : 0.0) : 0.0)
set xrange [0:10]
set xlabel "\(R_1\)"
set ylabel "\(R_{\textrm{ges}}\)"
set key left top
set grid
show grid
plot rpar(x,10.0) title "\(R_{\textrm{ges}}\)"
A gp0037.tex file and a gp0037.pdf file were created. Including the gp0037.tex file with
\begin{figure}%
{\centering%
\input{gp0037.tex}\caption{Mein Diagramm}\label{fig:mein-diagramm}%
}%
\end{figure}
in an existing tex-project there will be errors. In the struct{} section for the legend, y- and x-label there isn`t a math-environment opend for them(the $$ are missing. for example instead of $R_i$ only R_i is written.)
Is this a bug of gnuplot/cairolatex or is this my fault in any way? Can I solve this problem by my own?
Regads,
Gabriel
(fb.mail@gmx.de)
Diff:
gnuplot simply outputs the strings you provide. It does not attempt to guess wether they are math-mode or not. So you have to mark it yourself:
Also, tic labels are normally output in text-mode. To change that you have to change their format like in
Looking at the tex file should give you a hint what's going wrong. One line looks like
If you have the labels in double quotes, you must escape the backslashes in order to get the correct output:
or you use single quotes