0

I want to create a .texdocument with Gnuplot to insert in my Latexdocument with the following code

reset
set terminal epslatex color size 12cm, 9cm font 'Helvetica,16'
set output "test.tex"
set xlabel "X"
set ylabel "Y"
set key off

plot  "Data.txt"
set output

When I include the created File test.texeither with \inputor \include in my main Latex document it can't compile. It says that basically in every line of code is a undefined control sequence. I can't find the reason for that.

Thanks for Your help!

closed as unclear what you're asking by giordano, Heiko Oberdiek, Andrew, user13907, Svend Tveskæg Jun 27 '15 at 19:41

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.

  • Just as a test, try adding the standalone option to set terminal, and then compile file test.tex. Does it work? – giordano Jun 26 '15 at 15:19
  • it actually does now compile. it has one error concerning the font size. What does standalone do? – McLawrence Jun 26 '15 at 15:28
  • It creates a standalone file which can be compiled alone (no need to include inside another document). Try removing the font specification from the set terminal line. – giordano Jun 26 '15 at 15:51
  • He still has the same error: File 'size16.clo' not found! Could not set font size. – McLawrence Jun 26 '15 at 16:25
  • Do you still get that error with this line: set terminal epslatex color size 12cm, 9cm? LaTeX by default supports only from 10 to 12 points font size, 16 is not allowed. – giordano Jun 26 '15 at 17:01
1

In order to better understand what's the problem, it's useful to create a standalone .tex file, instead of a file to be included in another document. This can be achieved by adding the standalone option to the set terminal line:

set terminal epslatex ... standalone

Regarding the problem with the font size, LaTeX supports by default font sizes from 10 to 12 points, so 16 is too large. Replace your set terminal line with the following:

set terminal epslatex color size 12cm, 9cm font 'Helvetica' standalone

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