Define persistent LaTeX macros
With KaTeX, if my understanding of \gdef
is correct, one should be able to define persistent commands in between messages. See for instance KaTeX's doc.
The default behaviour of the Gitter webapp is to reset the LaTeX context between messages, making commands such as \gdef\H{\mathcal{H}}
useful only for one message.
Suggestions
- Let users create their commands with
\def
and let this commands last only for one session (until logout/quit the webpage). - Have chatroom setting where admins can define macros, and where users can view which commands have been defined.
- Commands
\gdef
and\global\def
are permanently added to the list of available macros.
Additional suggestions
- Have two different environments to typeset LaTeX formulas (check KaTeX's autorender API):
- one "inline" environment, surrounded by
$ nice formula $
or\\( nice formula \\)
for instance ; - one (or two) "displaystyle" environments, surrounded by
$$ nice formula $$
or\\[ nice formula \\]
for instance.
- one "inline" environment, surrounded by