#### 3.8.2 pdfc format

When exporting to that format, the program is asking for a name of the pdf file that is created, let us call it Toto.pdf . The graphic is then exported using pgf format in a file called file.pgf in the TeXgraph temp directory. The script CompilePdf.sh under linux et CompilePdf.bat under windows is then launched with two arguments: The number 1, followed by the filename Toto.

The linux script is like the following (similar to the windows version):

#!/bin/sh
cat > CompilePdf.tex <<EOF
\documentclass[11pt,frenchb]{article}
\usepackage[utf8]{inputenc}
\usepackage[upright]{fourier}
\usepackage{pgf,amssymb,amsmath,amsfonts,babel}
\usepackage[a4paper,margin=0cm,pdftex]{geometry}
\usepackage[active,tightpage]{preview}
\pagestyle{empty}
\begin{document}
\newcounter{compt}
\setcounter{compt}{1}
\loop
\begin{preview}
\input{frame\thecompt.pgf}%
\end{preview}
\ifnum \thecompt<$1\addtocounter{compt}{1} \repeat \end{document} EOF pdflatex -interaction=nonstopmode CompilePdf.tex cp -f CompilePdf.pdf$2.pdf

That script is creating the file CompilePdf.tex as we can read in the script. The file is put in the temp directory, then the compilation is launched with pdflatex. The value 1 means that there is only one image to create. (the same script is used to create animated graphics)