# Changing font size in equations changes superscript size in text (LATeX)

I used \DeclareMathSizes{12}{20}{14}{10} to make my equations larger than the default output of LATeX (the parameters mean, as far as I understand, {font size}{equation regular text size}{equation superscript size}{supersuperscript size}). However, the superscripts outside the equation environment also became 14pt font! I thought that the \DeclareMathSizes command would only affect the content of my equations. Is there a way to change the superscript size in math mode without affecting the parameters for rest of my text?

EDIT: Here is a minimal example that reproduces my problem, note that changing the third parameter also influences what happens to the superscript outside the equation. Is this normal? How can I stop this from happening?

\documentclass[12pt,oneside,letterpaper,titlepage]{article}
\DeclareMathSizes{12}{20}{14}{10}

\begin{document}
...modulation by Ca\textsuperscript{2+}...

$$\sigma^2 = iI - \frac{I^2}{N}$$
\end{document}


**SECOND EDIT/FINAL SOLUTION: I ended up following a suggestion to do something much simpler: I just used the \LARGE command on my equation. Here's the same example as above, using \LARGE instead of \DeclareMathSizes:

\documentclass[12pt,oneside,letterpaper,titlepage]{article}

\begin{document}
...modulation by Ca\textsuperscript{2+}...

$$\LARGE{\sigma^2 = iI - \frac{I^2}{N}}$$
\end{document}

• Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. – Adam Liter Mar 13 '14 at 4:35
• Subscripts and superscripts math mode? Also, it would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that reproduces the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. – Peter Grill Mar 13 '14 at 4:43
• You can use \Large inside the equation and make it big. Is that acceptable? The equation numbers too will be enlarged though. – user11232 Mar 13 '14 at 7:26
• It is not recommended to use \DeclareMathSizes inside your document. Either follow @HarishKumar's suggestion or take a look at: tex.stackexchange.com/q/160437/27635 – karlkoeller Mar 13 '14 at 9:48
• Thanks for your suggestions and help!! I ended up using Harish Kumar's suggestion. I reedited my question to include the final solution in case anyone might find it helpful. – iishida Mar 14 '14 at 2:15

The Problem lies within the definition of \textsuperscript that uses math mode.

\DeclareRobustCommand*\textsuperscript[1]{%
\@textsuperscript{\selectfont#1}}
\def\@textsuperscript#1{%
{\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}}


A possible workaround is redefining the actual command so that it will not get in the way with your equations, this needs graphicx:

\renewcommand{\textsuperscript}[1]{\raisebox{0.8ex}{\scalebox{0.66}{#1}}}


Or this needs relsize

\renewcommand{\textsuperscript}[1]{\raisebox{0.8ex}{\smaller{#1}}}


I admit that this is just an easy workaround emulating the typrsetting of superscripts. It might be possible, that modern typography defines super/subscript in a certain way.

This also works with various enlargements of text sizes. This MWE also emulates a textsubscript:

\documentclass[12pt,oneside,letterpaper,titlepage]{article}
\DeclareMathSizes{12}{20}{14}{10}

%% Solution 1
\usepackage{relsize} %smaller
\renewcommand{\textsuperscript}[1]{\raisebox{0.8ex}{\smaller{#1}}}
\newcommand{\textsubscript}[1]{\raisebox{-0.4ex}{\smaller{#1}}}

%% Solution 2
%%\usepackage{graphicx} %scalebox
%%\renewcommand{\textsuperscript}[1]{\raisebox{0.8ex}{\scalebox{0.66}{#1}}}
%%\newcommand{\textsubscript}[1]{\raisebox{-0.4ex}{\scalebox{0.66}{#1}}}

\begin{document}
...modulation by Ca\textsuperscript{2+}...
...soluted in water H\textsubscript{2}O...\\
\tiny Ca\textsuperscript{2+}
\scriptsize Ca\textsuperscript{2+}
\footnotesize Ca\textsuperscript{2+}
\small Ca\textsuperscript{2+}
\normalsize Ca\textsuperscript{2+}
\large Ca\textsuperscript{2+}
\Large Ca\textsuperscript{2+}
\LARGE Ca\textsuperscript{2+}
\huge Ca\textsuperscript{2+}
\Huge Ca\textsuperscript{2+}
\normalsize

$$\sigma^2 = iI - \frac{I^2}{N}$$
\end{document}


• I got your answer just now and wanted to include in my document to have equal font sizes of subscript and superscript of \left. ... \right|_{t_0}^{t_1} but it gives ! LaTeX Error: Command \textsubscript already defined. Or name \end... illegal, see p.192 of the manual. Any suggestion please! – Khaaba Nov 6 '16 at 15:59