# Is there a nag package for TikZ?

It turns out that I've been using several deprecated commands, such as \tikzstyle and right of. Is there any way to have TikZ or pdfLaTeX warn in those cases, such as nag does?

-
right of is deprecated? – Marco Daniel Apr 27 '13 at 9:18
I learnt that yesterday. See Difference between “right of=” and “right=of” in PGF/TikZ – Tim N Apr 27 '13 at 9:23
Thanks. Interesting. – Marco Daniel Apr 27 '13 at 9:33

Borrowing an example that uses \tikzstyle by percusse at tikzstyle default node text with fill color I show below how you can redefine the deprecated command to place a warning in the log or alternately, in the console and log. In this MWE, I have the redefinition in the file itself. But if you're like me, you have your own style file of oft-used macros that \usepackage{mycommands} in just about everything.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
%%%%%%%%%%%%%%%%%
%%% PUT THIS IN YOUR OWN STYLE FILE
\let\svtikzstyle\tikzstyle
% LOG FILE ONLY:
%\def\tikzstyle{\wlog{WARNING: tikzstyle is used}\svtikzstyle}
% CONSOLE AND LOG FILE:
\def\tikzstyle{\typeout{WARNING: tikzstyle is used}\svtikzstyle}
%%%%%%%%%%%%%%%%%
% borrowed example from answer by percusse
\tikzstyle{stuff_nofill}=[rectangle,draw,font={A}]
\tikzstyle{stuff_fill}=[rectangle,draw,fill=black!20,minimum
size=1.4em,label={center:A}]
\begin{document}
\begin{tikzpicture}
\node at (0,1) [stuff_nofill] {};
\node at (0,0) [stuff_fill] {};
\end{tikzpicture}
\end{document}


-
Hey I was young and I needed money ! :P – percusse May 3 '13 at 11:41
@percusse I can anonymize the example, if it will help you sleep at night ;^S p.s. Anyhow, look at me. I'm still using 1980's vintage jove editor. – Steven B. Segletes May 3 '13 at 11:44