Document Classestikzset : Undefined control sequence

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
u05agt
Posts: 2
Joined: Sat Nov 15, 2008 12:50 am

tikzset : Undefined control sequence

Post by u05agt »

Hi,

I'm a Latex newbie just trying to get to grips with TikZ, using Kile on OpenSuSE 11. I am working through the pgfmanual and after some early successes I am now hitting a brick wall. The following code:

Code: Select all

\documentclass{article}
\usepackage{tikz}
\begin{document}
	\begin{tikzpicture}
		\tikzset{grid1/.style=very thin,color=blue!50}
		\tikzset{axis1/.style=thin}
  		\draw[grid1] (-1.4,-1.4) grid (1.4,1.4);
  		\draw[axis1] (-1.5,0) -- (1.5,0);
  		\draw[axis1] (0,-1.5) -- (0,1.5);
  		\draw (0,0) circle (1cm);
	\end{tikzpicture}
\end{document}
Gives the following errors:
tikz1.tex => tikz1.dvi (latex)
[LaTeX] finished with exit status 1
tikz1.tex:7:Undefined control sequence. \tikzset
tikz1.tex:8:Undefined control sequence. \tikzset
tikz1.tex:9:Package tikz Error: I do not know what to do with the option ``grid1''. \draw[grid1]
tikz1.tex:10:Package tikz Error: I do not know what to do with the option ``axis1''. \draw[axis1]
tikz1.tex:11:Package tikz Error: I do not know what to do with the option ``axis1''. \draw[axis1]
[/quote]

Any help would be greatly appreciated.

Sandy

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

tikzset : Undefined control sequence

Post by localghost »

It seems that your version of pgf/TikZ is outdated. Insert the \listfiles command as very first line into your example and start a run. Search the log file for the section between *File List* and *********** where all used files are listed and post this list here. So we will be able to check the used version. The current version of pgf/TikZ is 2.00 and can be found on CTAN.

Since you are using openSUSE 11.0, you can include the "Publishing" repository from the openSUSE Build Service with YaST [1]. There you will find RPM packages for TeX Live 2008. Click on the "Mirror" link and you may find a server in your home country.

[1] openSUSE Build Service - Publishing


Best regards and welcome to the board
Thorsten¹
u05agt
Posts: 2
Joined: Sat Nov 15, 2008 12:50 am

Re: tikzset : Undefined control sequence

Post by u05agt »

Thanks for that Thorsten. I looked at the output from \listfiles and it would appear that my installation is indeed out of date. I added the Publishing repository ... successful ... but any attempts to upgrade my installation since, failed with errors stating the repo type could not be determined. Graphical YaST also seems to now be broken. Something fundamentally wrong with my opensuse box. I will do a re-install of the OS and work through the tutorials again, this time with an up-to-date pgf installation. Any problems I'll let you know.

Thanks again for the advice.

Sandy
Post Reply