Subject: mailing-list for TeXmacs Users
List archive
From : Giovanni Piredda <address@hidden>- To: Massimiliano Gubinelli <address@hidden>
- Cc: address@hidden
- Subject: Re: Conditional definition of Scheme functions and typesetting of trees
- Date: Wed, 18 Nov 2020 00:05:00 +0100
On 17.11.20 22:32, Massimiliano Gubinelli wrote:
Dear Giovanni,Hi Max,
On 17. Nov 2020, at 19:25, Giovanni Piredda <address@hidden> wrote:You should give more info. In which sense the macros "are used"? Scheme
I have defined a Scheme function with the following:
(tm-define (unitSpacer) ; default, will be used in regular text
`(hspace "0.5spc"))
(tm-define (unitSpacer)
(:require (in-math?))
"*")
As far as I understand, the first definition is the default and it is
overridden by the second when I am in math.
In my tests, this happens only in open documents. At the first opening of a
document, only the first definition is used. Does anyone have a hint on what
is happening? Developers ;-) ?
macros can be evaluated in two ways, essentially: either due to input from the user
(e.g. keypress) or because you put some \extern markup in the document and TeXmacs is
typesetting it, in particular evaluating the markup language and arrives to your macro.
I think scheme code in \extern markup is evaluated every time is needed, you
do not have much control of that.
Can you explain how you use those macros?
I call them inside an \extern primitive ( from the .tm source, <assign|SI|<xmacro|input|<extern|SIScheme|<quote-arg|input>>>>)
The code you wrote
(concat (text "a") "*" (text "b"))
works for me too, and it works even if I modify it with the (with "math-font-shape" ...) . I will investigate more and write again (hopefully with the solution).
- Conditional definition of Scheme functions and typesetting of trees, Giovanni Piredda, 11/17/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Giovanni Piredda, 11/17/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Massimiliano Gubinelli, 11/17/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Giovanni Piredda, 11/18/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Massimiliano Gubinelli, 11/17/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Giovanni Piredda, 11/17/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Giovanni Piredda, 11/17/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Massimiliano Gubinelli, 11/18/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Massimiliano Gubinelli, 11/18/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Giovanni Piredda, 11/18/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Massimiliano Gubinelli, 11/18/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Giovanni Piredda, 11/18/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, TeXmacs, 11/18/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Giovanni Piredda, 11/18/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Massimiliano Gubinelli, 11/18/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Giovanni Piredda, 11/18/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Massimiliano Gubinelli, 11/18/2020
- Re: Conditional definition of Scheme functions and typesetting of trees, Giovanni Piredda, 11/17/2020
Archive powered by MHonArc 2.6.19.