- From: Giovanni Piredda <address@hidden>
- To: address@hidden
- Subject: Re: requests
- Date: Mon, 17 Jan 2022 22:05:21 +0000
On 08.01.22 20:19, vincent douce wrote:
hi
before i post this on
https://savannah.gnu.org/task/?group=texmacs&func=additem
<https://savannah.gnu.org/task/?group=texmacs&func=additem>
could you tell me if maybe it still exists :
- transform a/b into b/a (with the same type of fraction, "frac",
"dfrac" etc)
I have copied the example in the Scheme developer guide
(define (swap-numerator-denominator t)
(:require (tree-is? t 'frac))
(with p (tree-cursor-path t)
(tree-set! t `(frac ,(tree-ref t 1) ,(tree-ref t 0)))
(tree-go-to t (cons (- 1 (car p)) (cdr p)))
(tree-focus t)))
(define (swap-numerator-denominator t)
(and-with p (tree-outer t)
(swap-numerator-denominator p)))
end of Sect. 3.2, "A worked example", but I did not yet get it to work.
I'll update you when I make a step forward
- requests, vincent douce, 01/08/2022
- Re: requests, Giovanni Piredda, 01/08/2022
- Re: requests, Giovanni Piredda, 01/17/2022
Archive powered by MHonArc 2.6.24.