How to include multiple interlinked cls files?

Hi,
I am using TexMacs to write an article for a journal. The journal supplies 3 cls files, one of which is to be set as documentclass. I am fine if TexMacs is not able to import the full cls, but I would like it to import the basic styles. In particular things like font-size and page-border, so that I can write the equations in a way that the line-breaks are at the right points.

Searching for “Texmacs style file” leads me to https://www.texmacs.org/tmweb/manual/webman-style.en.html, where I read the sectio " 1.Writing a simple style package". I followed the instructions, just that I did not create a new file but used the File -> Import -> Latex Class function and then saved it to $HOME/.TeXmacs/packages as a ts file.

But under Documents, there is no “Packges”:

Does anyone know how to achieve what I want to do?

Best

Asides: The sentence about $HOME/.TeXmacs/styles is confusing me, as I thought I should save the file to $HOME/.TeXmacs/packages? What does that remark here mean?
Furthermore, “Notice that the button Texts in the file browser corresponds to the directory”, this is not true for me, the File browser just opens into my home directoy.

Hi @jacob. At the bottom of the menu in your screenshot, is there an item saying “Add package” (i,e, Document -> Style -> Add package). There should also be a + icon on the toolbar next to where you choose the document style.

1 Like

Thank you @jeroen, You are right, it is in the Style dropdown. Maybe I was a bit too tired yesterday, I could have checked that.

Now I have one problem left. The journal gave me 3 files: 2 cls files and a sty file. In Latex I just have to import one of the cls files which imports the rest in the right way. How do I get texmacs to do this? I tried exporting all three files to .ts under packages and also putting the raw file there and hoping that the main cls file that I converted to ts can import it. So far neither worked.

Do you know how to make this work?

My current feeling about this kind of workflows is that the time you put in hacking it is much more what does take to replicate in idiomatic TeXmacs the LaTeX result by “eyesight” and some peek at the code the style. This is how the other styles (like ams article, etc…) works. It is really only a question of few parameters and some decoration choices. Not worth the time spend, you are not learning anything useful to master better your current tool.

If you still go this way I suggest anyway, once the import done, to write your own TeXmacs style looking at the parameters imported, so to simplify away the code.

1 Like