In Emacs 23 TeX mode, subscripts and superscripts are displayed in smaller fonts. How can I configure Emacs to turn off this feature and use the same font size for all input?
This is easy to turn off using
(setq tex-fontify-script nil)
.emacs. You can also access it using
customize-mode <ENTER> tex-mode <ENTER> and scrolling down to "Tex Fontify Script" and clicking on "Toggle".
There are also two control variables which you can set to neutral values to disable the fontification, for example if you just want to make it smaller without raising or lowering, or if you want to keep the raising and lowering without it getting smaller.
; This sets the amount of raising/lowering
(setq tex-font-script-display '(0 0))
; This sets how small the font is made relative to the text
(setq tex-suscript-height-ratio 1)
(Note: suscript is not a typo, it is used to mean "superscript" and "subscript" by
tex-fontify-script, both of these variables may be customised using
Now, as far as I've been able to figure out, customising the font face with
customize-face doesn't seem to work. The height can be altered, but the raising and lowering values are overridden by the code in
tex-mode, which raises or lowers the text regardless. This happens in the function
tex-font-lock-suscript. If there is a way to turn that off by setting a custom face then that would be another way of doing this job, but I wasn't able to figure out the correct value.