mailing-list for TeXmacs Users

Text archives Help


Re: Smarter subscript in math mode


Chronological Thread 
  • From: Zhuyang Wang <address@hidden>
  • To: address@hidden
  • Cc: texmacs-users <address@hidden>
  • Subject: Re: Smarter subscript in math mode
  • Date: Mon, 23 Sep 2019 09:09:58 -0500

Thank you too! Actually, I have a question about "var". "var" does not have an effect in my config, but "tab" does. I believe it is related to lazy loading, but I don't know how to deal with it. My config only contains the code snippet you posted above and nothing else.

On Mon, Sep 23, 2019 at 8:29 AM <address@hidden> wrote:
(kbd-map (:mode in-math?) ("1 var" (insert `(rsub "1"))))

The above code snippet works fine with either "1 var" or "1 tab".

---- On Fri, 20 Sep 2019 23:11:41 +0800 Zhuyang Wang <address@hidden> wrote ----

Hi,

I am wondering if there is a convenient way to turn the numbers after a symbol into a subscript. For example, now I have the following keybinding in my config:

("a 1" (insert '(concat "a" (rsub "1"))))

And then copy and paste for other characters and subscripts. I hope there is a better solution than copy/paste. My current idea is to set up a keybinding for "1 tab", "2 tab", etc, so that the tab will turn the number into a subscript of the previous symbol. But I don't quite know how to move in the document tree (or directly manipulate it). I read the document "Programming routines for editing documents" but still have no idea, like how can I get the tree representing the symbol before the cursor.

Thanks!

Zhuyang





Archive powered by MHonArc 2.6.19.

Top of page