slatex / sTeX

A semantic Extension of TeX/LaTeX
49 stars 9 forks source link

The sdefinition environment should subsume \symdef #349

Open Jazzpirate opened 1 year ago

Jazzpirate commented 1 year ago

A pattern occuring often is

\symdef{foo}[...]{...}

\begin{sdefinition}[for=foo]
 A \definame{foo} is...

where the following definition duplicates all the data already given in the \symdef.

  1. sdefinition should generate the symbol declaration instead.
  2. Since definition environments often introduce several symbols, it should be able to do for for multiple symbols at once

This requires that all (optional and mandatory: notation, type, definiens, precedence, args, precarg) arguments to \symdef need to be provided either

  1. as arguments to the sdefinition-environment (for possibly multiple symbols), or
  2. as arguments to \definame/\definiendum/\definiens, or
  3. as markup of text in the definition body (like \definiens) (also relevant: #326 )

One can probably find examples making a case for any one of them.

Jazzpirate commented 1 year ago

also relevant for \inlinedef