How to name custom commands so that they will not be same as LaTeX commands or same as commands from packages that I may install in future? Maybe there some rules of naming or tips and tricks that I can use in naming of custom commands?

  • 2
    Add a prefix like your first name \vsl.... – AndréC Sep 2 '18 at 13:31
  • 1
    Good question. Internal macros often use a specific prefix that should be unique across packages to avoid clashes (internal macros of etoolbox start with \etb@, those of lontable with \LT@, the @ is a common marker for internal names, macros with an @ in the name can not be used in the document without \makeatletter/\makeatother), but there is no official register of these prefixes, so uniqueness can't even be guaranteed there. Package macros for end users normally don't use a prefix, so they flow more naturally. ... – moewe Sep 2 '18 at 15:12
  • ... If you use a prefix like \vasili for you macros you are probably fine. But theoretically it is possible that you will go on to load a package that defines macros starting with \vasili... as well. – moewe Sep 2 '18 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.