Subject: mailing-list for TeXmacs Users
List archive
From : Giovanni Piredda <address@hidden>- To: address@hidden
- Subject: [TeXmacs] Macros-again
- Date: Sat, 8 Jun 2019 16:15:15 +0200
Dear all,
with a bit of help from Massimiliano (thanks) I think I have understood how to interface a Scheme macro and a TeXmacs macro. I write here to double check that I have understood well and to see if there are other things that I should know.
The key thing is the conversion of macro parameters from tree (as they are in TeXmacs) to Scheme variables and vice-versa. The conversion in one way is performed by the function tree->stree, and in the opposite way by stree->tree.
For example the following function
(tm-define (testFunct str)
(set! str (tree->stree str))
(stree->tree (string-length str)))
when called using
<assign|testTexMac|<macro|str|<extern|testFunct|<arg|str>>>>
seems to work (I have tested it once ;-) ).
Is this generally working or there are some other things that I need to know? The use of <quote-arg|x> for the argument x, which I found in http://www.texmacs.org/tmweb/manual/webman-styling.en.html obtains an effect different from tree->stree, right?
Thanks in advance,
Giovanni
- [TeXmacs] Macros-again, Giovanni Piredda, 06/08/2019
- [TeXmacs] What is the right license for macros?, Giovanni Piredda, 06/10/2019
Archive powered by MHonArc 2.6.19.