Subject: mailing-list for TeXmacs Users
List archive
From : Giovanni Piredda <address@hidden>- To: address@hidden
- Subject: Re: about shortcuts
- Date: Sat, 28 Aug 2021 17:53:35 +0000
Hi Vincent,
here you are answers to some of your questions (for the ones I am not able to answer, I hope someone else will).
First of all (now that you have become familiar with progs/math/math-kbd.scm ) some TeXmacs source files where one learns other Scheme forms that control the behaviour of the keyboard (as far as I understand, there are a few more Scheme constructs, beyond the ones of these files, for keyboard customization, but not many):
--- progs/texmacs/keyboard/latex-kbd.scm
where one sees the form kbd-commands, which is used to define "Latex-mode" commands
--- progs/utils/library/cpp-wrap.scm
where one reads a list of Scheme forms which generate mathematical expressions (at the end of the file, e.g. (make-fraction), (make-sqrt), (make-tree))
--- progs/math/math-edit.scm
other forms for editing maths (somewhat complex Scheme code, I am not able to understand what it does at the first reading)
Said this ---
question - how to send both alt-s and ctrl-s to the same effect:
(kbd-map
(:mode in-math?)
("A-s" (make-sqrt))
("C-s" (make-sqrt)))
that is, assign the same effect to both key combinations. If you
do this in a Scheme session, TeXmacs responds with the list of
shortcuts that are active for that shortcut.
-- question "how to generate math operators:"
One possibility is with the Scheme function math-big-operator
(which is defined as a Scheme function in math-edit.scm, I did not
read the definition :-) )
(kbd-map
(:mode in-math?)
("C-e" (math-big-operator "sum")))
Another possibility is using the form (make-hybrid), which tells TeXmacs that it should go into hybrid mode (where you insert LaTeX commands, you enter into this mode from the editor by pressing slash). Example:
(kbd-map (:mode in-math?) ("v v" (begin (make-hybrid) (insert "vect")) ))
-- question "remap § and ' into *": I tried
(kbd-map
(:mode in-math?)
("§" "*")
("'" "*")
)
' works, but § is not accepted by TeXmacs when I press it either in math or text (where it should represent itself). I do not know why. Someone does?
-- question "why the shortcut C-& does not have any effect"
it works in equations that contain the equality symbol; if there is no equality symbol, it does not do anything :-)
-- I leave to someone else question 4 (how to transform an integral sign into the [] combination). I think it needs some Scheme :-)
The shortcuts introduced in this message may be a bit complicated
when taken all together but please ask and we can enter into each
detail
Giovanni
- about shortcuts, vincent douce, 08/28/2021
- Re: about shortcuts, Giovanni Piredda, 08/28/2021
- Re: about shortcuts, Giovanni Piredda, 08/28/2021
- Re: about shortcuts, vincent douce, 08/30/2021
- Re: about shortcuts, Giovanni Piredda, 08/30/2021
- Re: about shortcuts, Giovanni Piredda, 08/30/2021
- Re: about shortcuts, vincent douce, 08/30/2021
- Re: about shortcuts, Giovanni Piredda, 08/30/2021
- Re: about shortcuts, vincent douce, 08/30/2021
- Re: about shortcuts, Giovanni Piredda, 08/28/2021
- Re: about shortcuts, Giovanni Piredda, 08/28/2021
Archive powered by MHonArc 2.6.19.