Skip to Content.
Sympa Menu

texmacs-users - [TeXmacs] Look left and right around plugin-input-converters rules?

Subject: mailing-list for TeXmacs Users

List archive

[TeXmacs] Look left and right around plugin-input-converters rules?


Chronological Thread 
  • From: "Duncan Smith" <address@hidden>
  • To: address@hidden
  • Subject: [TeXmacs] Look left and right around plugin-input-converters rules?
  • Date: Mon, 29 Sep 2008 15:00:02 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=ENcA1CUnfuHTgmAiAhPKEWV5RP5375vHqhAebz0Y7rsQgrO364jIhTTC6a7F3/OoLJ RBcGXzJK9PJ6t27cC2hSHfK3orpUtD0aMwZkLEmyAAogBsGoalfWaC+Fid7ZKqDaXK/s hjwGB6dyHqqgueYlkRWEuVfXs1W8Bf7yPrLho=

Hi,

I'm writing a plug-in to map some of the symbols found in math-menu.scm across to Maxima in a natural way, rather than simply substitute a math symbol for another token, I'd like to use the context of the surrounding items, for e.g.

(this example relates to the Maxima plug-in, but in general is applicable to any plug-in)

(plugin-configure maxima-relations
  (:require #t))
(plugin-input-converters maxima
  ("<neq>" "is(not equal(lval,rval))"))

(%i1) 1 = / 2; /* = / are the keystrokes to generate the <neq> symbol */
Incorrect syntax: is is not an infix operator
1 is(
(%i1)

What I'd really like is for the <neq> symbol to get converted to:

is(not equal(1, 2));

Is it possible to refer to the operands in the conversion rule, or maybe you can use a RegEx to identify which tokens to the left and right of the operator will be consumed and re-arranged in the output?

Many thanks,

Duncan






Archive powered by MHonArc 2.6.19.

Top of Page