How to choose stix two in TeXmacs?

STIX 2 ( has been around for quite some time. However, I haven’t been able to make it work with TeXmacs. I have installed the font in my machine (Windows), but it does not show up in the format -> font dialogue.

Can I use STIX 2 in TeXmacs?

Have you run the font detection tool? It’s under “Tools → Fonts → Look for more fonts”.

If you can run TeXmacs from the terminal it should tell you which font files it is picking up while doing the font detection. I have STIX 2 installed and it is being picked up by TeXmacs.

If it’s not being picked up, it may not be installed in a directory TeXmacs is looking in. For Windows these should be $TEXMACS_HOME_PATH/fonts/truetype, $TEXMACS_PATH/fonts/truetype and $windir/Fonts.

I don’t have a Windows installation at my disposal, so I can’t say what these path are exactly. You can find out the value of environment variables by inserting a Scheme session into a TeXmacs document and evaluating one of these:

(getenv "TEXMACS_PATH")
(getenv "windir")

Thank you. I used import function in the Font dialogue and now I can choose STIX 2 in TeXmacs.

However, I was expecting STIX 2 showing up here. Maybe there’s no easy way to do this.

That list is coded in TeXmacs/progs/generic/document-menu.scm.

You can add menu items to it by running code like this in a Scheme session:

(menu-bind document-short-font-menu
("Stix2" (init-font "Stix Two Text" "Stix Two Math")))

However, this doesn’t seem to work for me for Stix Two. It does work for other fonts, though. (EDIT: this code doesn’t work in my-ini-texmacs.scm as the menu has not yet been created at that point.)

Something is preventing Stix Two to be selected in general. Even if I select “Stix Two Text” from the more elaborate font selection window, the document gets typeset in Stix1. I can only get text to appear in Stix Two font by selecting text and doing Format → Font for that piece of text.

As for Stix Two not being selected, it seems there are (at least) two ways to set the document font, either through (init-font "Stix Two Text") or through (init-env "font" "Stix Two Text").

init-font contains some code that selects the v1 STIX fonts whenever the font name start with “Stix”. The second command with init-env does change the document fonts to STIX v2.

This probably should be reported as a bug IMO (easiest by you if possible as you have a grasp of the details).

1 Like

Agreed :slightly_smiling_face:

1 Like