I define a macro to make red colors in a preamble of a file as follows (in TeXmacs scheme format):
(assign "red-color" (macro "body" (with "color" "red" (arg "body"))))
Then I define a keyboard shorctcut in my-init-texmacs.scm
for this macro as follows.
("M-1" (make 'red-color))
This works as expected for that specific document. However, I would like to make this work globally for any document. One option is to create a style file or package and apply it when needed, but I prefer a global solution. I tried placing the macro definition in my-init-texmacs.scm
or my-init-buffer.scm
, but it was unsuccessful.
Additionally, I have a related question: how can I define a “temporary” shortcut that works only for a specific document or style? This would be useful in situations like composing a paper on electromagnetics where I want EE
to expand to <b-up-E>
for that particular paper but have a different expansion for other papers.