Lisp macro define-text-object is quite involved. In this overview, we use the call shown in fig:define-kronecker to illustrate the various steps. A call to macro define-text-object performs the following steps:
[LVerbatim695]
If the corresponding macro takes [tex2html_wrap5500] arguments, i.e., [tex2html_wrap5502] in fig:define-kronecker, then the new object type is defined to have a slot arguments. This slot will hold a list containing the result of processing the [tex2html_wrap5504] arguments of the La)TeX macro call.
[LVerbatim703]
where variable number-args is bound to the value of the number-args keyword argument in the lexical scope in which the function definition is evaluated. Functions process-argument-as-math and process-argument-as-text apply the recursive descent parser to their argument; the former parses mathematical content, the latter processes plain text.
[LVerbatim716]
We take advantage of the generic dispatch provided by CLOS and define an instance of the above method with its arguments reversed -this avoids having to remember the order of arguments to function argument when writing rendering rules.
[LVerbatim722]
[LVerbatim726]
This specifies that the macro being defined takes [tex2html_wrap5516] arguments and calls to it should be processed using function kronecker-expand.