I just (re?)discovered nag.sty. is this a (TUG-endorsed?) authoritative tool to get all of us away from non-recommended use of latex, or just the work of the author? given that latex never seems to deprecate packages, voluntary standards may be a way forward. (I love tools that tighten up the syntax of latex documents, especially if they could help me maintain externally-parseable documents.)


nag is a contributed package like most others, it has no special standing. But TUG doesn't endorse packages anyway (LaTeX itself isn't endorsed by TUG either for that matter). LaTeX (that is, the members of the latex 3 project responsible for maintaining LaTeX) can't really deprecate any packages except any they have written themselves (and even deprecating those can be hard).

  • big pity...I wish we had authoritative style guides and checkers in the midst of obsolete packages and guides all over the web. – ivo Welch Jan 20 '14 at 4:45
  • @ivoWelch you could say the latex book is the authoritative statement of latex syntax, but since the point of packages is to extend the syntax, and the design of latex tries to make it easy to be extended with packages, this doesn't really help. – David Carlisle Jan 20 '14 at 9:54

I only discovered nag recently and so read the documentation not long ago.

I think the question is not whether nag is 'just the work of the author' or whether it has some sort of institutional backing. nag is authoritative insofar as the reasons for its complaints are good ones. These are things you can assess for yourself since they are thoroughly documented.

First, the l2tabu option complains about deprecated coding as listed in the document of the same name. These concern changes from LaTeX 2.09 to LaTeX2e. As such, the reasons for thinking the new commands improvements over the old ones are set out in that document. Whether nag's complaints should be regarded as authoritative is a question of assessing those reasons in this case.

Second, nag's documentation is explicit: it will complain about things which are really perfectly fine and it will not complain about some things which are not. So some of its complaints are necessarily ones you have to make a judgement about. For example, it will complain about the use of \def rather than \newcommand but adds that if you know why you need the former, the complaint probably doesn't apply to you. This is because although \newcommand is preferable when it can do the job, it cannot always do the job. Sometimes, you need to use the lower level commands. If you know why, you probably also know the risks. If, on the other hand, you are using \def without knowing why or considering the risks, probably you shouldn't be doing it.

Other options to nag, such as orthodox, are in a slightly different category since there is nothing technically wrong with their use. They just are probably not what you wanted, so nag is just, in a sense, making it easier to figure out why your code doesn't work as expected.


No, it's not authoritative by a long shot. (I think I would know that. ;) ) It's just one in a series of tools around that topic, along with, for example Markus Kohm's texidate, with the single benefit that it runs within your code, offline.

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.