I am using a class file that defines commands to change the font and font sizes for normal text for different sections of the document, but it leaves the math mode and equation font and font sizes unchanged. Consequently, in one of the sections, all the math is huge compared to the text (and in the wrong font). How do I change the font and font size for all the math in a particular section?
Asked
Active
Viewed 4,217 times
9
2 Answers
3
I just found something over at Stack Overflow that works for me:
\begingroup
\fontsize{7pt}{9pt}\selectfont
<whatever>
\endgroup
2
The first number in \DeclareMathSizes shows which point size have you used in your document class. for example, if you have a preamble \documentclass[12pt]{book}, the first number in \DeclareMathSizes should be 12, i.e. \DeclareMathSizes{12}{...}{...}{...}.
But unfortunately, there is inconsistency between document classes with 11 point size and \DeclareMathSizes. So, if you have a preamble \documentclass[11pt]{...}, you have to use \DeclareMathSizes{10.95}{...}{...}{...} to take effect.
smh
- 1,271
-
-
Yeah,
\DeclareMathSizesdoesn't do anything for me. The main text is 7pt in the section I'm trying to modify, but\DeclareMathSizes{7}{7}{6}{5}, for example, doesn't change anything. – Big Dogg Dec 27 '12 at 04:24 -
As you know, we have only three predefined point sizes for a whole document: 10pt, 11pt, and 12pt.
\DeclareMathSizesworks only with these three point sizes, i.e.\DeclareMathSizes{10}{}{}{},\DeclareMathSizes{10.95}{}{}{}, and\DeclareMathSizes{12}{}{}{}. So, you have to use one of these three commands to take effect. – smh Dec 27 '12 at 07:45 -
@smh -- if you look in the the file
fontmath.ltxthere are a lot more instances of\DeclareMathSizes, and this is what makes the cm math fonts work properly in footnotes et al.fontmath.ltxwas generated fromfontdef.dtx; i haven't yet found a pdf output file for this, but reading the comments in the.dtxis highly informative. among other things, it suggests creating a localfontmath.cfgfile if one is using fonts other than computer modern. – barbara beeton Dec 27 '12 at 14:28
\font\somefont=\frutiger at 7ptand then a command defining a section\def\somesection{\vskip6pt \parskip=8pt \somefont}. Then in the main document the section is enclosed in\begin{somesection}and\end{somesection}commands. – Big Dogg Dec 26 '12 at 23:15\font. :( – egreg Dec 26 '12 at 23:21