# Unexpected error message (Undefined control sequence. l.18 \xwm@secstopagerange)

The following basic TikZ code is throwing the compilation error via PDFLaTeX:

("C:\fakepath\AppData\Local\Programs\MiKTeX
2.9\tex/generic/pgf/frontendla yer/tikz/libraries\tikzlibrarytopaths.code.tex"))) (Test.aux !
Undefined control sequence. l.18 \xwm@secstopagerange
{{10000}{19}} ?


Here's an MWE.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (B) at (10,0);

\draw (A) -- (B);
\end{tikzpicture}
\end{document}


After updating packages in MikTeX, I get the following error:

("C:\fakepath\AppData\Local\Programs\MiKTeX 2.9\tex/generic/pgf/frontendla
yer/tikz/libraries\tikzlibrarytopaths.code.tex"))) (Test.aux
! Undefined control sequence.
l.18 \xwm@secstopagerange
{{10000}{19}}
?


I am not sure why. Please explain the reason for the error.

• Off-topic: Congrats on passing the 5k rep mark!! – Mico Apr 18 '19 at 3:31
• When did you most recently update your MikTeX distribution? I don't have MikTeX; on MacTeX2019, your code compiles without fuss. – Mico Apr 18 '19 at 3:32
• @Mico thanks :) – subham soni Apr 18 '19 at 6:59

I can only reproduce the issue if I load the xwatermark package, compile the document and then recompile after removing the package.
Just remove the .aux file or go past the error. In the next LaTeX run there will be no problem.