0

The command latexdef -l -p amsmath gives all the macros created by amsmath.

Has anyone used it to build a command name "database" for all TeX Live macros? If not, I will build a basic JSON file.

Why?

This could help LaTeX developers to avoid, in their API, name conflicts, or to indicate them.

projetmbc
  • 13,315
  • if contemplating adding a command, or finding use of command I just do grep -r '\ccmd' /usr/local/texlive/2023/texmf-dist/tex – David Carlisle Apr 13 '23 at 08:07
  • This kind of command is not very useful. Try for example grep -r '\\then' /usr/local/texlive/2023/texmf-dist/tex. It will be not hard to just build all the names-packages-classes found by combining in a long time-consuming combination of tlmgr list --only-installed , latexdef -l -p ... and latexdef -l -p ... . – projetmbc Apr 13 '23 at 08:12
  • often we want to know where it is used, not just where it is defined, eg "will making this command robust break existing packages" means finding every use. Search for \\then\b if you want \then but not \thenormalizedbodyfontsize – David Carlisle Apr 13 '23 at 08:27
  • @DavidCarlisle This is a good thing. I'll think about it, but I'd like to avoid name conflicts first before coding. – projetmbc Apr 13 '23 at 08:32
  • Try \next and see what happens – egreg Apr 13 '23 at 08:58
  • @egreg My idea is just to avoid name conflict. The \next gives a lot of lines, but that can be still useful using a dedicated tool. – projetmbc Apr 13 '23 at 09:40
  • Not exactly what you're looking for, but there's texfindpkg which uses texstudio completion files as a command list. Still has issues to work out though (see the discussion in the chat here) – mbert Apr 13 '23 at 14:23
  • Considering that just one package as todonotes that have just a few user commands, this display also many not documented commands for internal use and of all the dependencies, but over all, that three are 6402 packages in CTAN, and increasing, .... in one word: ouch! – Fran Apr 13 '23 at 18:08
  • This is why I think about a DB. – projetmbc Apr 13 '23 at 19:40

0 Answers0