Why I need to do this? I'n writting my diploma in laTeX and almost finish them, but I want to use in graph labels and legend the same font that LateX uses.
As I know, the default LaTeX font in CM, so I opened example font from /usr/share/texmf/fonts/type1/public/cm-super and /usr/share/texmf/fonts/type1/public/cm-unicode in font viewer and expect that they support cyrillic.
Next, according to http://gnuplot.sourceforge.net/demo_4.0/fontfile.html, I changed my gnuplot script:
set encoding utf8
set terminal postscript eps enhanced size 8in,5.4in fontfile "./sfci0900.pfb" "SFCI0900" 30
set output "./graph_new_font.eps"
set xlabel "{/SFCI0900 z/L_d}"
set xrange [0:0.1]
set ylabel "{/SFCI0900 Пиковая интенсивность}"
set yrange [0:10]
I view the produced EPS with Evince, but only "z/L_d" font have changed, but ylabel is empty. 🙁 IDIW?
Best Answer
This may be a bit of overkill, but it is the only way I can think of that might be able to accomplish what you want:
That will output the
gnuplot
image to anxfig
image. Next, you can use thefig2tikz
script to conver the.fig
file into a TikZ image:Finally, you can then insert that image into your LaTeX document:
(make sure to
\usepackage{tikz}
in your preamble, of course).Using this method, all of the text in your
gnuplot
image will be rendered by LaTeX itself; no need to mess with fonts. In thegnuplot
file, just type the labels and legends as if you were writing them in LaTeX.