Stix fonts in TeXmacs

I’ve searched the web and found tantalising mentions of Stix fonts in TeXmacs.

When I first learned of the Stix fonts, well before they were released, I thought they’d take the world by storm. That hasn’t happened - perhaps what we had was “good enough.”

I saw mention of what I think were 2 different sets of Stix fonts. Differences?

How would I modify my TeXmacs installs to go ‘all-Stix’? Would this be desirable?

Any further thoughts?

Hi @Graeme_C and welcome to the forum.

I think you might do what you want in the following way … which still needs a check to make sure that it is correct (details on the check later).

  • Modify a new blank document by selecting the Stix font (men Document -> Font)
  • Extract the style file that corresponds to your modified document using Tools -> Macros -> Extract style file; save it to a subfolder of styles in your TeXmacs initialization directory
  • Apply to your my-init-buffer.scm the following code
(when (not (buffer-has-name? (current-buffer)))
  (set-style-list (append (get-style-list) '("test-font-02-macros")))
  (buffer-pretend-saved (current-buffer)))

where CustomStyle is the file name (only, you do not need the path, I did not try to see if you can add the path too) under which you saved your style.

Necessary check: I modified the code from Change default font, substituting

(not (buffer-has-name? (current-buffer)))

for

(buffer-newly-created? (current-buffer))

because buffer-newly-created? is not a function defined in the TeXmacs I am using, 2.1.1; I do not know whether my code is ok though: maybe @mgubi, @darcy or @jeroen know.

If you need help with any of the steps please ask.
Finally, maybe the same code can be modified to select a different style for the new files, instead of adding a package, but I still have to try that. With the current code the style package would still be selected if you change styles, and this might or might not be what you want.