How can I get a list of available commands on a latex document? -


I do not have much information about latex. I have a list of all the available commands, all standard commands and those "useless" announcements It comes.

I am currently focusing on MiKTeX, so if MiKTeX provides it is absolutely good, otherwise I get the idea of ​​parsing something. Or .def files but I did not understand the syntax behind those files. If parsing is the only solution, then what should I see in those files?

The Parsing Texx code is not the only way to get a list of all the control sequences, among other possibilities :

  • After loading the relevant package, give the reason to TeX to dump its data structures, then parse the dump file; When you run the latex command, it actually happens that the tex binary load latex.fmt is the dump file that was generated by Was parsing all the underlying code of the same binary latex and dumps its data structures;

  • Each time a control sequence is defined, then modify the output of some of the source code in Tex;

  • To run the tax in a latitude debugger, insert a breakpoint where the sequence is inserted in the hash table, and a script indexes the name of the output.

None of these are likely to be a particularly handy solution, but writing a tax-equivalent parser might make itself easier to get started, and See the source code of your tex system.

If your goal is to provide "intellisense" in an editor, then only the list of command sequences is not going to be of great help: when the user type \ ref {, you A list of labels defined in the document should be provided (if the details are not included in the number typing chapter ~ referee { result chapter labels}); For \ settowidth {, a list of length commands; For \ begin {, a list of environments; e.t.c.

You can see what (AMACA mode) does; It has a limited, regexp-based parser that handles common case, and a bunch of package-specific libraries that enhance the functionality.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -