Tikz HowTo

From Cuttlefish Wiki
Jump to: navigation, search

To compile cuttlefish output in tikz:

1 Install pgf (version 2.0[edit]

For ubuntu users, the installation using the synaptics package manager is known to give certain errors. To install it manually:

sudo rm /usr/share/texmf/tex/latex/pgf:
  • Install the new version pgf 2.00:
sudo tar xvz -C /usr/share/texmf/tex/latex/ -f pgf-2.00.tar.gz
  • Update tex information:
sudo texhash
  • Delete pgf-2.00.tar.gz (no longer used) e.g.
rm ~/Desktop/pgf-2.00.tar.gz

2 xkeyval >= 2.5[edit]

To check your xkeyval version you need to look up

/usr/share/texmf-texlive/tex/latex/xkeyval/xkeyval.sty

And in one of the first non-comment lines you will find something like this:

\ProvidesPackage{xkeyval}
[2006/11/18 v2.5f package option processing (HA)]

something greater that 2.5 in the version should work. If you don't have it installed or your version is too old, you can download a suitable one from the SVN folder doc/resources

3 tkz-graph[edit]

You can download tkz-graph from: http://altermundus.fr/pages/downloads/tkz-graph.sty

Unzip the compressed folder to

/usr/share/texmf-texlive/tex/latex

and run

sudo texhash

Additionally you can find more details how to install pgf and tkz-graph in:

(pgf manual) http://www.ctan.org/tex-archive/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf

(tkz-graph doc, in french) http://altermundus.com/downloads/packages/TKZdoc-graph.pdf

Once everything is installed, a general way to get an Encapsulated Post Script from the code is the following:

latex file.tex
dvips file.dvi
ps2epsi file.ps file.eps


If the eps creation does not work, you can generate a pdf with:

pdflatex file.tex

NOTE: latex articles with \usepackage[dvips]{color} have problems finding the bounding box of pdf files


Extra: How to manually install a latex package? Copy the folder to

/usr/share/texmf-texlive/tex/latex

and run

sudo texhash

Back to User documentation