I would like to get a warning if I define an acronym using the acronym
package and then use the long or short form of the acronym without using the acronym
package's facilities. For example, in this document:
\documentclass{article}
\usepackage{acronym}
\begin{document}
\acrodef{FAQ}{frequently asked question}
Using \ac{FAQ} is fine.
I want to be warned if I use bare ``FAQ'', though.
I also want to be warned if I use ``frequently asked question''.
\end{document}
I would like output of the form:
warning: line 10: "FAQ" used instead of "\ac{FAQ}"
warning: line 11: "frequently asked question" used instead of "\ac{FAQ}"
Would be happy with a solution that uses any combination of LaTeX macros, LuaLaTeX Lua code, or post-processing. Right now I use two crude shell/Perl one-liners that are probably not very robust.
UserWarnRegex
patterns in a chktex local rcfile so at least I get some head start on processing TeX files.grep newacro filename.aux
to get a list of all the acronyms defined.