LaTeX error "I do not know the key '/tikz/thik' and I am going to ignore it. Perhaps you misspelled it": cause and fix
An option in square brackets of a TikZ or pgfplots command is not known. The message shows the option as a path: /tikz/thik is the option thik of TikZ. If the option had a value, the message adds "to which you passed" and the value. TikZ ignores the option and draws without it.
Why it happens
- The option has a typo, for example
thikinstead ofthickorline widhtinstead ofline width. - The option comes from a TikZ library that is not loaded. The node shape
diamondneeds the libraryshapes.geometric, anddecoration=...needs adecorationslibrary. - A color name is used as option, as in
\draw[darkblue], and the color is not defined. TikZ then looks for an option of that name. - An axis option of pgfplots has a typo, for example
xlableinstead ofxlabel. The message still shows the path/tikz/xlable.
How to fix it
- Read the last part of the path in the message and correct that option.
- Load the library in the preamble, for example
\usetikzlibrary{shapes.geometric}. - Define a color before you use it as an option:
\definecolor{darkblue}{RGB}{0,0,120}.
A document that produces the message
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[thik, red] (0,0) -- (2,1);
\end{tikzpicture}
\end{document}The corrected document
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[thick, red] (0,0) -- (2,1);
\end{tikzpicture}
\end{document}Both documents were compiled with pdfLaTeX from TeX Live 2023. The first produces the message, the second compiles without an error.
Finding the line in the editor
The editor lists every error and warning of a compile run with file and line. Select an entry and the cursor jumps to that line. See Error list with jump to the line.
Related pages
- Package
tikz - Package
pgfplots - How-to Draw with TikZ in LaTeX
- Error Undefined color `darkgreen'