Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This is a follow-up question to Equations, change the font size

I was trying to have equal font sizes in equations like the ones in the above link. Using \DeclareMathSizes{display size}{text size}{script size}{subscript size} gives me desired effects in article, exam classes but no effect in beamer slides.

Any suggestion please to see the effects in beamer slides!

My MWE is:

\documentclass{beamer}
\usetheme{Warsaw}
\DeclareMathSizes{12}{24}{24}{24}
\begin{document}

\begin{frame}
\frametitle{test equation to have a same font size}
    \[
           x = \frac{1}{x + \frac{1}{x + \frac{1}{x}}}
    \]
\end{frame}

\end{document}

and its output is: enter image description here

share|improve this question
1  
Add the 12pt class option as in my example: \documentclass[12pt]{beamer}, or use \makeatletter\DeclareMathSizes{\@xipt}{24}{24}{24}\makeatother as egreg suggested. . –  Gonzalo Medina Sep 20 '12 at 13:47
    
@Gonzalo Medina, Oh sorry, yes, it works after putting 12pt in class option. Thank you so much for the help. –  Khaaba Sep 21 '12 at 5:34

3 Answers 3

You can use the same method as customizing the normal text size ...

\fontsize{9.5}{7.2}{
 \begin{equation}
\psi = \psi^{s}+\tilde{\psi} 
 \end{equation}  
}
share|improve this answer
    
Should this be a comment to one of the answers? Or what is ment with "same method here"? –  Kurt Aug 8 '13 at 14:36

The default text size used by beamer is 11pt, which must be referred to as \@xipt. Just for an example I tried very big math font sizes, using the Arev fonts to overcome problems in font loading:

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{arevtext,arevmath}
\usefonttheme{professionalfonts}

\makeatletter
\DeclareMathSizes{\@xipt}{50}{40}{30}
\makeatother

\begin{document}
\begin{frame}
Text $m_{a}+t+\sqrt{h}$
\end{frame}
\end{document}

enter image description here

Similar declarations should be made for the other sizes, if you plan to use math in \large, \small or similar contexts.

However, I don't think that changing the math sizes is a good thing to do.


After seeing the minimal example and the real problem you have, I suggest you to use the \cfrac command provided by amsmath.

\documentclass{beamer}
\usetheme{Warsaw}
\usepackage{amsmath}
\begin{document}

\begin{frame}
\frametitle{test equation to have a same font size}
    \[
           x = \cfrac{1}{x + \cfrac{1}{x + \cfrac{1}{x}}}
    \]
\end{frame}

\end{document}

enter image description here

share|improve this answer
    
thank you for reply. –  Khaaba Sep 20 '12 at 14:21
up vote 0 down vote accepted

While methods given by @GonzaloMedina and @egreg work perfectly fine in cases, I have also found another method from wikibook from here-> http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics. Very handy to use command: \everymath{\displaystyle} in the preamble. You can also use in the localized equation like:

\begin{equation}
x = a_0 + \frac{1}{\displaystyle a_1
      + \frac{1}{\displaystyle a_2
      + \frac{1}{\displaystyle a_3 + a_4}}}
\end{equation}

Note: \DeclareMathSizes{display size}{text size}{script size}{subscript size} failed in one of my big beamer file which has tikz along with many other packages.

share|improve this answer
1  
You should check the \cfrac macro provided by amsmath. For this application \DeclareMathSizes is clearly overkill. –  egreg Sep 27 '12 at 14:10
    
@egreg, thank you. I saw that too just now in amsmdoc. Yes, \DeclareMathSizes makes overlapping of numerator and denominator expressions sometimes. –  Khaaba Sep 27 '12 at 14:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.