Different font size for text and math

When using different fonts for text and math, their size may not mix well. My workaround is to customize the font size using font-base-size for math, equation etc.

However, this is imperfect: inside math the texts such as the infix or are not of the same size as the text outside. Can we set the math font size on a higher level so such that it only affects math expressions? A size option for math in the font customization dialog would be great.

2 Likes

The best that I have been able to do is

(kbd-map (:mode in-math?) ("math $" (insert-go-to `(with "font-base-size" "12" (text "")) (list 2 0 0))))

where you have to adjust the value after "font-base-size" to your wish.
The original definition of “math $” is

(kbd-map (:mode in-math?) ("math $" (make 'text)))

but I don’t understand how the make form works.

What is the key press for "math $"?

It is Alt-$
I kept the same notation as in the default shortcut, which you can find in progs/math/math-kbd.scm in the TeXmacs installation folder.

My workaround now is to edit the macro for infix or or text in math to change their font sizes.

1 Like

Happy that you found a way.
Could you please tell me what is infix? I entered it as a macro and it is not defined.

The macro is infix-or. The shortcut is space or space. There are other similar macros called
textual operators

2 Likes