Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2185

Re: help sought with cairolatex terminal

From Dan Luecking <LookInSig@uark.edu>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: help sought with cairolatex terminal
Date 2013-10-31 13:41 -0500
Organization A noiseless patient Spider
Message-ID <cl4579ladht59lokaf60ures4pvrd4qt3f@4ax.com> (permalink)
References <527271ca$0$15907$e4fe514c@news2.news.xs4all.nl>

Show all headers | View raw


On 31 Oct 2013 15:05:46 GMT, Alex van der Spek <zdoor@xs4all.nl>
wrote:

>My first baby steps with LaTeX and this gnuplot script:

Your main problem is latex's failure to find the file. 
But there are other things you will need to deal with.

>
>set output 'gnuplotout.tex'
>set terminal cairolatex pdf size 3, 3
>set title 'this is the first' font "Arial Bold, 14"

The documentation for cairolatex says that the text 
and font are handled by latex, so you need to use 
latex's font selection syntax. 

There is no Arial support in my version of TeX, so the 
following example uses Helvetica. I experimented with 
various things and settled on

  set terminal cairolatex pdf size 3, 3 font "phv, 12" 
  set title '\large\textbf{this is the first}' font ",14"

Then my test file contains:

  \documentclass[12pt]{article}
  \usepackage{graphicx}
  \usepackage[T1]{fontenc}
  \begin{document}

  \input gnuplotout

  \end{document}

Note that cairolatex terminal does not seem to pass the size 
part of the font options to the output, and uses them only 
for spacing purposes. The gnuplotout.tex file contain 
  \fontfamily{phv}\selectfont 
which switches to Helvetica, but there is no size switch. 
Hence the 12pt class option in the tex document file to get 
12pt in the normal text, and the \large command to get 14pt 
in the title.


>set xlabel 'Hello x'
>set ylabel 'hello y'
>
>plot sin(x), cos(x)
>
>unset out
>
>Then my LaTeX document. (I did put the required packages in the pre-able).
>
>\begin{figure}
>\input{gnuplotout.tex}
>\includegraphics[scale=1]{gnuplotout.pdf}

Only \input{gnuplotout.tex} is to be used. That file already 
contains the actual \includegraphics command.

>\end{figure}
>
>The latex compiler complains about two things:
>
>1. It cannot find the 'gnuplotout.tex' file.
>2. There is no BoundingBox in the pdf file.
>
>Yet the dvi output does contain all the text (not the graph). A pdf 
>version (by dvipdfm) contains both although offset from each other.

If you are using a PDF figure, you need to be compiling with 
pdflatex, and there should be no .dvi file, only a .pdf.

As for finding the file, see if you can locate it yourself 
(along with gnuplotout.pdf) and move both to the directory 
where you are processing your document file.


Dan
To reply by email, change LookInSig to luecking

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

help sought with cairolatex terminal Alex van der Spek <zdoor@xs4all.nl> - 2013-10-31 15:05 +0000
  Re: help sought with cairolatex terminal Dan Luecking <LookInSig@uark.edu> - 2013-10-31 13:41 -0500
    Re: help sought with cairolatex terminal Alex van der Spek <zdoor@xs4all.nl> - 2013-11-01 09:52 +0000

csiph-web