2

I have the following code, which compiles with no errors in the online editor OverLeaf, but it does not compile in the editor TeXworks that I have on my computer.

\documentclass{book}
\usepackage{tikz}
\usepackage{parskip}
\begin{document}


\tikzset{Karl’s grid/.style={help lines,color=blue!50}}

\begin{tikzpicture}

   \draw[Karl’s grid] (-5,-5) grid (5,5);

\end{tikzpicture}

\end{document}

I tried creating a fresh document and ran this code, but it still didn't compile.

Before I ever ran this code, I did mess around a little bit with "help lines" style as in this question, so I am not sure if I possibly changed the help lines style in the package installed on my computer?

The console output says

! Missing \endcsname inserted.
<to be read again> 
                   \OT1\textquoteright 
l.7 ...��s grid/.style={help lines,color=blue!50}}

? 

Any help is appreciated, thanks!

2

Remove special characters like from key name:

\documentclass{book}
\usepackage{tikz}
\usepackage{parskip}
\begin{document}


\tikzset{Karls grid/.style={help lines,color=blue!50}}

\begin{tikzpicture}

   \draw[Karls grid] (-5,-5) grid (5,5);

\end{tikzpicture}

\end{document}
|improve this answer|||||
  • Thanks a lot! If I may ask, did the output console help you diagnose this problem? If so, how? – Ovi Jul 13 '19 at 15:46
  • @Ovi The error is where the line break in the error message is. The second line starts with s grid, so the error must be the letter in front of that – user192672 Jul 13 '19 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.