Weird font bugs?

I got two weird font issues recently in the beamer or projector style.

  1. The font is sans-serif for inline math, but serif for displayed math. I can’t get it back to the default behavior by choosing Default or manually choose TeXmacs Computer Modern Sans

  2. If I choose STIX font, the square root sign becomes corrupted.

This is for an existing document. No problem at all if I open a new document.

Are you able to post a “minimum example” by copy-pasting its file content in a message?

This is the source code of a minimal example.

I just found the problem with the Default font is solved if I remove the preamble, which I copied from in order to set displayed style for all inline math. Is there a problem with this preamble? Nevertheless, the STIX font problem persists even I delete the preamble.

The problem with the square root can be solved by choosing a specific math font rather than default.

Thanks for posting the image of the document. Are you able to post (in place of the image) the file content itself? You can do it if you open the .tm file with a text editor, then copy its contents and paste them in a message in a code block. Then I and others can copy-paste the file contents into a document in our own computers.

This is the content of the file.







The definitions of the math environments for the beamer style are different from the ones for the generic style, I think. I do not understand how they work, and I am not able to go into the details, this said I started from the definition of the math tag for the beamer style and I set it to have the math-display environment variable as true, in the following way:


and now both inline math and display math are serif and inline math is display.
I hope that this is what you want.
I used the macro editor as in to see the definitions and figure out what seemed sensible to change.

For the STIX font let us see if anyone else answers, I do not understand anything about how fonts work.

1 Like

Great! Indeed the definitions are different! The macro editor is really useful.Thanks!

I was experimenting on the macro editor and the shortcut creator. However, I can’t remove the shortcuts. I click the Remove then OK. But the shortcut still exists and reappear if I open the shortcut editor again. And I didn’t find which file the shortcut is saved. The only way now it to delete the whole .TeXmacs folder.

For the Shortcuts editor pls. see the thread Inserting footnotes via keyboard shortcuts and in particular this post and this post, the conclusion was that it does not work.
The way to save your own shortcuts is through the personal initialization file my-init-texmacs.scm; pls. see the beginning of [wiki] Assorted code snippets to customize TeXmacs' behaviour for how to edit that file. If you are not able to find out on your own the syntax for writing your own shortcuts please ask.

I have made some shortcuts in my-init-texmacs.scm. I thought the editor would be more convenient.

1 Like