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


Groups > comp.graphics.apps.gnuplot > #2184 > unrolled thread

help sought with cairolatex terminal

Started byAlex van der Spek <zdoor@xs4all.nl>
First post2013-10-31 15:05 +0000
Last post2013-11-01 09:52 +0000
Articles 3 — 2 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  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

#2184 — help sought with cairolatex terminal

FromAlex van der Spek <zdoor@xs4all.nl>
Date2013-10-31 15:05 +0000
Subjecthelp sought with cairolatex terminal
Message-ID<527271ca$0$15907$e4fe514c@news2.news.xs4all.nl>
My first baby steps with LaTeX and this gnuplot script:

set output 'gnuplotout.tex'
set terminal cairolatex pdf size 3, 3
set title 'this is the first' font "Arial Bold, 14"
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}
\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.

Any help much appreciated...

Alex van der Spek

[toc] | [next] | [standalone]


#2185

FromDan Luecking <LookInSig@uark.edu>
Date2013-10-31 13:41 -0500
Message-ID<cl4579ladht59lokaf60ures4pvrd4qt3f@4ax.com>
In reply to#2184
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

[toc] | [prev] | [next] | [standalone]


#2186

FromAlex van der Spek <zdoor@xs4all.nl>
Date2013-11-01 09:52 +0000
Message-ID<527379f2$0$15928$e4fe514c@news2.news.xs4all.nl>
In reply to#2185
Thanks,

pdflatex did it. All is well now. I learned something along the way!

Alex

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web