GNU TeXmacsUser manualReferenceAboutEnglish·Français·中文
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

\(\displaystyle a^2 + b^2 = c^2\)

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

Pari]

factor (x^15 - 1)

%1 = \({\color{blue}{\left( \begin{array}{cc} x - 1 & 1\\ x^2 + x + 1 & 1\\ x^4 + x^3 + x^2 + x + 1 & 1\\ x^8 - x^7 + x^5 - x^4 + x^3 - x + 1 & 1 \end{array} \right)}}\)

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.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".