How to save modification to an environment?

I have a style which I’m building up as I learn how to use TeXmacs. I like to have my environments (like theorem, definition, etc) framed with a background color. This is something I can do from the GUI. However, I’d like to be able to this as a default for all documents that use my style (also because I don’t always want to remember the hex code of the background colors I am using). I was hopping that after making my modifications from the GUI and choosing “edit macro” from the context menu, I would get the modified code. All I get is the default code (without any modifications). I tried surrounding a wide-framed-colored around the environment as a workaround, but this has two problems: (1) the background color extends outside the border, (2) I cannot inserted a table and center it inside said environment. So, my question is, how do I save the modifications I’ve made into my style file so that I don’t have to repeat the procedure every time?

Admitting that I understood what you want.

The modifications are hidden :slight_smile:
Try opening the file with a text editor and looking in the “collection” tag at the end, you should find there the modifications to the environments you did through the gui, each introduced with an “associate” tag.

I never tried to put these “associate” tags in a style file. Also, I am under the impression that you cannot control environments individually using “associate”; if you e.g. change padding through the GUI and correspondingly obtain


all environments that use padding will take a padding-above of 2fn.
Perhaps it is better to collect the settings from the “collection” tag (I think settings coincide with environment variables) and wrap the environments you want to modify inside a with construct; and put the modified environments in the style file.

Thanks as usual. Adding the “ornament-color” property for environments like theorem, definition. However, it did not work for the example environment. Is there some workaround for that?

I investigated a bit and found out that the package framed-theorems (inside packages\customize\theorem) defines in a different way render-remark (on which the example environment is based) and render-enunciation (on which the theorem environment is based).

I copied the definition of render-enunciation onto render-remark, with adaptations, obtaining


And now it is possible to color the background of examples.

It is possible that there are deficiencies in my implementation of render-remark, because I do not understand the logic of the original implementation (see the framed-theorems package), but it is what I am able to do.