Skip to Content.
Sympa Menu

texmacs-users - Re: Smarter subscript in math mode

Subject: mailing-list for TeXmacs Users

List archive

Re: Smarter subscript in math mode


Chronological Thread 
  • From: address@hidden
  • To: "Zhuyang Wang" <address@hidden>
  • Cc: "texmacs-users" <address@hidden>
  • Subject: Re: Smarter subscript in math mode
  • Date: Mon, 23 Sep 2019 21:29:00 +0800
  • Arc-authentication-results: i=1; mx.zoho.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=address@hidden; dmarc=pass header.from=<address@hidden> header.from=<address@hidden>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569245341; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=Hz8tTsF8IKyipZrvg+G155ml/ON/CwMmcZ7j+Gy03Qg=; b=Rk6PHYFWark08tKMm1y2Vcn0sXypgFsOR4LMm4OVTfLXSrwFS5gpDHe4SiyI8l7cF2DbLZDCE0UC6aJe2kGcHzonZD4ZIV8UBcCkThsdoMzSU5mCzSjIcZZMQceREXyASnG23DVJ9YqpyKYskGu0H0QzLX54X5bQ7JTQojyuNBo=
  • Arc-seal: i=1; a=rsa-sha256; t=1569245341; cv=none; d=zoho.com; s=zohoarc; b=UpE29D6HEC/iT8rZqa2avJDRBLQYTIGmcPH2PAu6iPUiJYQIY4HOUSFA4hYzI5tndBgei7sgznwc/XpMk0WXCOWV7sPOXTdvpSkaN5lYSqB/iT5UXZt6baEEKvmUKoAA493J9Sth3U/NcBOdG/UjSm9Uq96FtqQyslTsOf47sQ4=
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=date:from:to:cc:message-id:in-reply-to:references:subject:mime-version:content-type:user-agent; b=pJCeglSwn1sE8nS6Kydgc3LQKWz9tVFy1ZyAOYNYehJ4nWVeeoyvKqysEpYQXQ1r/KjV/t7qKaRS DSdjjWLqoxwCmhdPrnqRttQyh58sCIN/g2WPsmx0MKBMml5Iq0lM

(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