How do you merge two cells together in the table?

I have been using TeXmacs to submit some of my assignments and one feature I don’t seem to know how to do is merging two cells together in a table and get a bigger cell. How can I do this ?

Hi @hamorabi and welcome to the forum.
There is a button that comes up when at least one cell is selected on the right for the table button set, for joining the selected cells (to me it makes sense starting from two selected cells, but it appears when only one cell is selected as well). Please see image. With the mouse over the button you should see also the corresponding keyboard shortcut.

After you have joined cells, there is another button for splitting them that appears when your cursor is in the joined cells.

1 Like

@pireddag, thanks for pointing that out. I’m surprised I didn’t notice it.

I’m currently trying to go through the manual, but I’m still in the beginning chapters. I wonder if you can shed some light on these questions:

  1. How do I add the section number to the equation label ? So, in section 1, if I have equation 1, I want the equation label to be (1.1) instead of (1).

  2. Sometimes when making some notes that involve a lot of python code, I find myself typing \python-code a lot. How can I assign a keyboard shortcut for that ?

  3. Is it possible to universally change the font color of all equation objects at once?

Thank you.

Right click, select Preferences, then “Prefix by section number”

For a start, check sect. 12.4 of the manual, “Creating your own keyboard shortcuts”; the customizations are to be inserted in the file my-init-texmacs.scm (by the way @mgubi and @sadhen I think we need a FAQs section :wink: ) and since some default keyboard shortcuts may be activated after the execution of my-init-texmacs.scm then this post may be of help: Change system's default shortcut for symbols

I think you need to modify the macros that define the environment for that. You can see the general idea in
For changing the text color, one wraps the code of a macro in a with tag, using as parameters color and the desired color (for the environment variables controlled using with see

Here is an example for the equation tag (corresponds to numbered equations):


Place this on your preamble (Document->Part->Create preamble) using Edit->Paste from->TeXmacs.

Then you will have to experiment a bit (probably add the local environment variable to all the environments you use: I added it to equation* only and the equation number is left black). BTW the editor for source code has non-intuitive (and not documented) behaviours, please do not be discouraged.

Please write if you need more help with any of these (or other) things.


1 Like

@pireddag, I can’t thank you enough for answering all of my questions. One very last question, if you don’t mind.

I’m a linux user, running the Plasma environment. I am using a dark theme, but texmacs (version 2.1) doesn’t seem to respect it. As you can see the text (such as title) in the third row is very hard to see. Is there some hidden setting for choosing the default theme ?

Sorry, I do not know how to fix that. Perhaps @mgubi (who uses a Mac) or @jeroen (who I think uses Linux) are able to help.

Currently TeXmacs does not support Dark mode. Probably this issue will be resolved at some point after we pass to Qt5/6.

@pireddag I just tried your solution and it works very strange.

I have a table with 7 columns and 3 rows (a header row and 2 normal rows), so it looks like this:

| 1   | 2   | 3   | 4   | 5   | 6   | 7   |
| --- | --- | --- | --- | --- | --- | --- |
| aaa | aaa | aaa | aaa | aaa | aaa | aaa |
| bbb | bbb | bbb | bbb | bbb | bbb | bbb |

And I need to merge cells 2 and 3, so the table should be

| 1   |     2     | 3   | 4   | 5   | 6   |
| --- | --- | --- | --- | --- | --- | --- |
| aaa | aaa | aaa | aaa | aaa | aaa | aaa |
| bbb | bbb | bbb | bbb | bbb | bbb | bbb |

I select cells 2 and 3, click the button Join selected cells, but it produces something completely different:

|     1     |     2     |     3     | 4   |
| --- | --- | --- | --- | --- | --- | --- |
| aaa | aaa | aaa | aaa | aaa | aaa | aaa |
| bbb | bbb | bbb | bbb | bbb | bbb | bbb |

Here is how it looks in TeXmacs:


Do you have the same issue? Why it happens?

Hi @texmacs_2021 and welcome to the forum
I do not have the same issue, please see the screenshot below:

If you post a short TeXmacs document where a table behaves like in your screenshot, maybe we will understand what happens. To post the document you have to copy its contents using a text editor and paste them in a message within a code block (the forum does not accept TeXmacs files as attachments).

Thanks. This is strange, now the problem is gone. I will post the code here if this happens again.