Expository math is content in a Lurch document that is meant to be read for human comprehension but not as part of the logical content of a proof. For instance, a document author might want to add some side comments that include variables, equations, or other expressions, typeset with LaTeX, but that are not intended for the system to grade, interpret, or obey.
For example, if an instructor is writing the rules for a logical system, they might want to show how NOT to use the rules, or how NOT to write expressions, and they don't want their document to contain validation errors, as if there were something wrong with it, when it's really just showing by example what to avoid.
We therefore provide a new type of Atom that functions very similar to the Expression type, with two exceptions. First, the notation used is LaTeX, not Lurch notation. Second, the content is not interpreted by the system for use in validation; more precisely, it is completely ignored during the conversion of a document to LCs, which is then used in validation.
Source
Classes
Methods
install(editor)
Install into a TinyMCE editor instance a new menu item: "Expository math," intended for the Insert menu. It creates an inline atom that can be inserted into the user's document, then initiates editing on it, so that the user can customize it and then confirm or cancel the insertion of it. The inline atom has no mathematical meaning and is ignored during validation, but can be used for expository purposes, hence the name.
We also install a keyboard handler for the $
key, in case the user has
enabled the setting that interprets that key as initiating insertion of an
expository math expression.
Parameters
-
editor
tinymce.Editor
the TinyMCE editor instance into which the new menu item should be installed