![]() |
Structured variants | ![]() |
When creating an environment like a theorem, an equation or a list, it frequently happens that one would like to change the environment a posteriori. The keyboard shortcuts ⌥⇥ and ⌥⇧⇥ allow you to cycle through the list of structured variants of the innermost tag, in forward or backward direction, respectively.
For instance, assuming that you are inside a theorem, pressing ⌥⇥ several times will change the theorem into a proposition, a lemma, a corollary, a conjecture, and finally back into a theorem. The ⌥⇧⇥ key allows you to cycle in the reverse direction: theorem \(\rightarrow\) conjecture \(\rightarrow\) corollary \(\rightarrow\) lemma \(\rightarrow\) proposition \(\rightarrow\) theorem.
In the case of mathematical formulas, the ⌥⇥ shortcut allows you to change an inline formula such as \(a^2 + b^2 = c^2\) into the displayed formula
while taking care of potential “trailing spaces and punctuation signs”.
TeXmacs also provides the ⎋# shortcut for turning numbered environments into unnumbered environments and vice versa. This works for most common environments like theorems, remarks, tables, equations, etc. Notice that ⎋# also turns an unnumbered itemize environment into an enumeration and vice versa, whereas ⌥⇥ allows you to cycle between the available kinds of list items (bullets, dashes, arrows, etc.).
Folding and unfolding provides yet another example of an interesting way to toggle between several environments. Inside a computer algebra session such as
factor (x^15 - 1)
Pari]
you may click on “Pari]” in order to fold the output (only the input remains visible) and click once again in order to unfold back to the original state. The ⎋* shortcut achieves the same effect. There various other foldable environments, most of which are available through Insert\(\rightarrow\)Fold.