1

I'd like to change the font size of align blocks. I've tried to change it by using \large, but this also changes the equation numbering. The second approach was to use \declaremathsizes in combination with \everymath{\displaystyle} before the document starts. But this requires to use the command each and every time. I don't know why, but using the command didn't change the text at all. These are my code snippets so far:

style.sty:

...
\RequirePackage{amssymb, amsmath}
\DeclareMathSizes{20}{28}{22}{28} 
...

main.tex:

...
\everymath{\displaystyle}
\begin{document}
...
this is some random text to compare the font sizes between equations and normal text...

large
{\large
\begin{align}
    \hat{r}_{ui} &= r_{ui} - \bar{r_u} \\[10pt]
    \hat{r}_{ui} &= r_{ui} - \bar{r_u} 
\end{align} 
}%

normalsize
{\normalsize
\begin{align}
    \hat{r}_{ui} &= r_{ui} - \bar{r_u} \\[10pt]
    \hat{r}_{ui} &= r_{ui} - \bar{r_u} 
\end{align} 
}%

using \$ ...\$
$\hat{r}_{ui} = r_{ui} - \bar{r_u}$ \\

nothing specified
\begin{align}
    \displaystyle \hat{r}_{ui} &= r_{ui} - \bar{r_u} \\[10pt]
    \hat{r}_{ui} &= r_{ui} - \bar{r_u} 
\end{align} 

enter image description here

I've just found this etoolbox This changes the font sizes everywhere but doesn't seem to be recommended.

2
  • Please always post complete test documents so people can see the issue and test answers\DeclareMathSizes{20}{28}{22}{28} would only affect the math if the current text size was 20pt Commented Jun 1, 2020 at 8:47
  • Ahh ok! I've changed it according to my standard font size and it now works.
    – Arktius
    Commented Jun 2, 2020 at 15:14

1 Answer 1

1

\DeclareMathSizes{12}{14}{10}{8} solved it. Make sure that the first parameter is equal to your used standard text font size.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .