Appearance
Quick Input of Fractions with Numerator 1
In math mode, we want to generate a fraction with 1 as the numerator and automatically position the cursor in the denominator by typing the key sequence 1
/
, enabling seamless input of the denominator.
You can implement this functionality in the following way:
Click Tools → Developer Tools to activate the Developer menu
Click Developer → Open my-init-texmacs.scm
Add the following code at the end of the file
scheme
(kbd-map (:mode in-math?)
("1 /" (begin (math-insert `(frac "1" ""))
(go-to-previous-word))))
- Restart Liii STEM
Now you can smoothly input a fraction with 1 as the numerator in math mode by typing 1
/
, with the cursor automatically positioned in the denominator for immediate editing.
The original article was published on September 13, 2019, on the WordPress blog at http://tmml.wiki. On April 30, 2022, it was published as the first article on Mogan Planet. This version includes moderate revisions.