When a new macro is created (typically with
\newenvironment), it requires the user to come up with a name and a definition.
The name should only consist of letters (or use arguments) and be unique.
However, sometimes when I add a new package to the document, it turns out the name of my macro coincides the name defined by the new package.
For instance, this recently happened when I added
ulem package, which resulted in unexpected behavior due to my previously defined
On top of that, when collaborating with other users who may leave their own macro definitions anywhere in the code, it would be nice to be able to instantly check whether there is no two different macros with the same name.
Currently, the only way to check for the uniqueness of my macro name is to perform a full-text search for "
\myNewMacroName" or "
\myNewEnvironmentName" on all doc files for 3000+ packages and all *.tex files in the current project.
This is of course doable, but is quite time-consuming and annoying.
Is there a faster and more robust way of assuring the unique and correct name for the new macro? Probably an add-on or built-in checker that would operate like a code-completion aid, but specifically for a customized LaTeX environment.