How do I redefine the equation
and align
environment to use a font size of 9.0pt
? I found this nice solution (apart from starting a new paragraph after applying it), allowing me to define the font size of a single equation
or align
environment:
\begingroup\makeatletter\def\f@size{9.0}\check@mathfonts
\def\maketag@@@#1{\hbox{\m@th\normalsize\normalfont#1}}
\begin{equation}
...
\end{equation}\endgroup
or without adjusting the equation number is fine as well:
\begingroup\makeatletter\def\f@size{9.0}\check@mathfonts
\begin{equation}
...
\end{equation}\endgroup
I like to apply this globally without using different environment names.
Edit: some compilable example (though I have to use a different document class):
\documentclass[10pt,a4paper]{scrartcl}
\usepackage{amsmath}
\begin{document}
This is some text.
\begingroup\makeatletter\def\f@size{5.0}\check@mathfonts
\def\maketag@@@#1{\hbox{\m@th\normalsize\normalfont#1}}
\begin{equation}
P = NP
\end{equation}\endgroup
\end{document}
etoolbox
, it has macros such as\AtBeginEnvironment
and\AtEndEnvironment
which you can use for this. Better, though, to use\fontsize{}{}\selectfont
, I think.\AtBeginEnvironment{equation}{\begingroup\makeatletter\def\f@size{5.0}\check@mathfonts} \AtEndEnvironment{equation}{\endgroup}
, but it doesn't compile: \check only allowed in math mode, missing $, you can't use \eqno in horizontal mode, etc. ?\makeatletter
inside. Put it outside with\makeatother
afterwards.