Hello,
I created this scheme function called Tab-Val-Ligne-1 which works very well in the Scheme sessions and also with a keyboard shortcut using an executable foldable scheme …
I use Python to make a table of values which is written in latex and which fits into TexMacs via the clipboard.
Here are the scheme functions used:
Here is a link to the python script: https://drive.google.com/file/d/16PIja9739t84MCCkSXGPt6t4zmpFu7cN/view?usp=sharing
(define (ext-perso a b)`(kbd-map (,a (begin (insert '(with “info-flag” “detailed” (flag ,b “red”)))(make-script-input* “scheme” “default”) (insert (string-append “(” ,b " )"))(go-to-previous)))))
(tm-define (tab-val-ligne-1 expression a b h arrondi_x arrondi_y)
(begin
(system (string-append "python3 /home/biz/Documents/autre-script/tab-val-ligne-1.py "
" \ " " expression " \ " "
(number->string a) " "
(number->string b) " "
(number->string h) " "
(number->string arrondi_x) " "
(number->string arrondi_y)));; Importer le tableau LaTeX depuis le presse-papier (clipboard-paste-import "latex" "primary")
))
(eval(ext-perso “’ ’ ’ t v l 1” “tab-val-ligne-1”))
However, I tried to create an external macro in TexMacs from the Scheme Tab-Val-Ligne-1 function and all my attempts have failed: either TexMacs closes, or there are errors of arguments.
<assign|tab-val-ligne-1|<macro|expression|a|b|h|arrondi_x|arrondi_y|<extern|tab-val-ligne-1|<arg|expression>|<arg|a>|<arg|b>|<arg|h>|<arg|arrondi_x>|<arg|arrondi_y>>>>
I tried with instructions unquote and quasi as in other examples found on the forum or in packages, but nothing worked!
Before building the macro, maybe you have to improve the Tab-Val-Ligne-1 function? To be able to use it with the macro extern.
I think this macro extern is complicated to use and I am not a programmer.
Thank you very much for your possible help and especially for this sensational software that all mathematics teachers should know and use.