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?
Asked
Active
Viewed 295 times
15
1 Answers
3
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}

Steven B. Segletes
- 237,551
-
-
1@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 03 '13 at 11:44
right ofis deprecated? – Marco Daniel Apr 27 '13 at 09:18