Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
2  
right of is deprecated? –  Marco Daniel Apr 27 '13 at 9:18
4  
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

1 Answer 1

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}

enter image description here

share|improve this answer
    
Hey I was young and I needed money ! :P –  percusse May 3 '13 at 11:41
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 3 '13 at 11:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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