- From: TeXmacs <address@hidden>
- To: address@hidden
- Subject: Re: My (so far short) experience with TeXmacs and a question about shortcuts
- Date: Wed, 30 Jun 2021 00:14:31 +0200
Hi Pierre-Henri,
On Sun, Jun 27, 2021 at 09:21:24AM +0200, Pierre-Henri Jondot wrote:
>
For matrices, the shortcuts C-arrows to add new lines and columns is
>
absolutely needed, but by default it conflicts with macos already defined
>
shortcuts ( it changes spaces). I tried emacs style keymapping in TeXmacs,
>
but it didn't help much as I lost the ability to enter a large centered
>
math equation. Indeed, option+$ on a french layout gives the euro € char.
Yes, the keyboard under MacOS is somewhat a pain.
I personally redefined many built-in shortcuts using
the joint modifier keys Control+Option+Command,
so that they never conflict with TeXmacs.
>
It might be there is an easy way to adjust standard keyboard shortcuts, but
>
to be honest, I've not been able to find it yet. I had some hope with the
>
Tools->Keyboard->Edit shortcuts (something like that I suppose in English)
>
but I couldn't find how one uses that...
Yes, documentation is missing on this issue;
the integrated shortcut editor is fairly new.
Basically, you can attach Scheme commands to shortcuts,
like you did with kbd-map. Also, when you are inside
an environment such as 'theorem', you can create
a shortcut for inserting that environment using
Focus -> Preferences -> Create shortcut
In general, it still assumes that you know the appropriate
Scheme commands, which might not be extremely user-friendly
for newcomers. Ideas for a simpler interface are welcome.
>
I went the easy way for the time being, disabling macos shortcuts, and
>
staying with Mac OS style for keyboard shortcuts within TeXmacs.
>
>
Then I configured a few shortcuts by adding to my-init-texmacs.scm :
>
>
(kbd-map
>
("t t t" (make 'theorem))
>
("f f f" (make 'folded-env))
>
("p p p" (make 'proposition))
>
("e e e" (make 'exercise))
>
("s s s" (make 'solution*))
>
)
>
>
It works... somewhat, but is most probably not the right way to do it...
Yes, this is perfectly reasonable. The only minor thing I see is that,
with your scheme to repeat the same letter thrice, you may quickly
run out of letters.
>
especially as regards the folded-env... It works like this : I hit three
>
times f, then enter, then I add my theorem or exercise, then I unfold and
>
add the solution or demonstration (for which I'll need another shortcut of
>
course, but I'm not there yet...)
Note that you may use the shortcut C-* (Emacs profile) to unfold.
>
That was not what I had in mind. I wanted to use the capslock which I
>
redefined, with the help of Karabiner, to serve as a shift+control+option
>
modifier (which I then use in karabiner to have quicker access to \ [ ] { }
>
which are a bit of a pain on a macos keyboard...), so I would have liked
>
that hitting capslock-f (which translates to shift+control+command-f) to
>
begin a folded environment. Instead I hit thrice f for the time being,
>
which is quite usable, but I'd be curious to know what I would have needed
>
to write for it to work. I tried quite a few things, but I was not
>
successful.
If you manage to let TeXmacs receive the correct keyboard code,
then you may look at the file 'prefix-kbd.scm'
which defines default rewriting rules of this kind.
Best wishes, --Joris
Archive powered by MHonArc 2.6.19.