Package pgfkeys Error: I do not know the key '/tikz/<key>' and I am going to ignore it. Perhaps you misspelled it.

A TikZ option is misspelled, is a color that was never defined, or belongs to a TikZ library that is not loaded with \usetikzlibrary.

Help centre › LaTeX errors › Commands and packages · Error: the build stops or the output is wrong

What the log says

! Package pgfkeys Error: I do not know the key '/tikz/thik' and I am going to ignore it. Perhaps you misspelled it.

See the pgfkeys package documentation for explanation.
l.5 \draw[->, thik] (0,0) -- (2,0);

Also printed as: Package pgfkeys Error: I do not know the key '/tikz/<key>'

What it means

Everything in the square brackets of a TikZ command is a key, looked up under /tikz/. This one is not defined, so TikZ ignores it and carries on; the drawing comes out without that style. TikZ also tries an unknown single word as a color name, so an undefined color ends up here too.

Causes and fixes

Most common first. Each example is a complete document; the first fails with this message, the second is the same document fixed.

1. The option is misspelled

Check the spelling against the TikZ manual: thick, dashed, rounded corners, minimum width. Keys use spaces, not hyphens or camel case.

Fails
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[->, thik] (0,0) -- (2,0);
\end{tikzpicture}
\end{document}
Fixed
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[->, thick] (0,0) -- (2,0);
\end{tikzpicture}
\end{document}

2. A color name that has not been defined

A bare word in the options is tried as a color. Define it in the preamble, for example \definecolor{paperblue}{RGB}{31,90,166}, or use a predefined name such as blue.

Fails
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[paperblue, thick] (0,0) circle (1);
\end{tikzpicture}
\end{document}
Fixed
\documentclass{article}
\usepackage{tikz}
\definecolor{paperblue}{RGB}{31,90,166}
\begin{document}
\begin{tikzpicture}
\draw[paperblue, thick] (0,0) circle (1);
\end{tikzpicture}
\end{document}

3. The key belongs to a TikZ library that is not loaded

Many keys come from libraries: drop shadow needs shadows, below=of and on grid need positioning, decorate styles need decorations.pathmorphing. Add \usetikzlibrary{…} to the preamble.

Fails
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[draw, fill=white, drop shadow] {Input};
\end{tikzpicture}
\end{document}
Fixed
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows}
\begin{document}
\begin{tikzpicture}
\node[draw, fill=white, drop shadow] {Input};
\end{tikzpicture}
\end{document}

4. A pgfplots option used in a plain tikzpicture

Keys such as xlabel, ymin or grid=major belong to an axis environment from pgfplots, not to \draw or tikzpicture. Put them in \begin{axis}[…].

In Manulyx

The editor shows the error beside the line with an explanation, including the colour case: if the word is meant to be a colour, define it in the preamble.

Write in Manulyx for free · Journal templates

More in commands and packages

Every example on this page was compiled with pdfLaTeX to check that it fails and is fixed as described. All LaTeX errors