Skip to Content.
Sympa Menu

texmacs-users - Re: Conditional definition of Scheme functions and typesetting of trees

Subject: mailing-list for TeXmacs Users

List archive

Re: Conditional definition of Scheme functions and typesetting of trees


Chronological Thread 
  • From: Giovanni Piredda <address@hidden>
  • To: address@hidden
  • Subject: Re: Conditional definition of Scheme functions and typesetting of trees
  • Date: Tue, 17 Nov 2020 21:36:16 +0100

It does seem that there is something not ok in the interaction between the macro I wrote and the typesetter. Sometimes it is even able to modify the appearance of text *preceding* it, I have figured out how to reproduce the behaviour (it depends on how one moves the cursor, which as far as I see should not influence the typesetting process); I wonder if I should submit a bug report: please let me know.

G.

On 17.11.20 19:25, Giovanni Piredda wrote:
I post this here because I think that while being about Scheme in TeXmacs is still of general interest. I have found a way of circumventing both issues (which may be ok, in case I will ask about this in another post) but I am curious to know the reason of the behaviours I observe.

First issue.

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 ;-) ?

===

Second issue.

In math mode, the program I wrote outputs groups of letters, each wrapped in a <with|math-font-shape|right primitive, and interleaved with the character "*".

Example of output, copied from the terminal using (display ...)

<tree 2 <with|math-font-shape|right|kg>*<with|math-font-shape|right|m>>

I call this from a TeXmacs macro in math mode and I get a typeset output where the asterisk appears as such (while I would like it to be interpreted as an implicit multiplication)

If I copy the output from the terminal, strip the outermost <tree primitive and place it inside a math primitive (opening the .tm file with a text editor) the asterisks do not appear (as I thought they shouldn't).

Again, suggestions?





Archive powered by MHonArc 2.6.19.

Top of Page