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.

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.)

share|improve this question
It's not necessary to sign your questions (as there is already a box with your username below it) or to begin them with a greeting. –  Speravir Jan 20 at 0:40
A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). –  Speravir Jan 20 at 0:42
add comment

3 Answers

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).

share|improve this answer
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 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 at 9:54
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer


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.