3

I want to write a "big" equation, not in display-math mode -- as given by the equation environment -- but in inline-math mode, say

$E=mc^2$

How can I enlarge it?

2
  • 1
    Welcome to TeX-SE! Something like \documentclass{article} \usepackage{relsize} \begin{document} $\mathlarger{\mathlarger{\mathlarger{E=mc^2}}}$ compare to $E=mc^2$ \end{document} ? Of course, if you add more or less \mathlargers then the thing will grow less or more.
    – user121799
    Commented May 10, 2019 at 2:49
  • 1
    There is also $\displaystyle E=mc^2$ which should raise the exponent some. The default is \textstyle. Commented May 10, 2019 at 3:43

2 Answers 2

3

Will one of \large, \Large, \LARGE, \huge, or \Huge do? Observe that because these commands are text-mode commands, they must be executed before entering math mode.

enter image description here

\documentclass{article}
\usepackage{xcolor}
\begin{document}
\obeylines
{\tiny $E=mc^2$}
{\scriptsize $E=mc^2$}
{\footnotesize $E=mc^2$}
{\small $E=mc^2$}
{\color{red} $E=mc^2$ --- \texttt{\textbackslash normalsize}} % \normalsize is the default
{\large $E=mc^2$}
{\Large $E=mc^2$}
{\LARGE $E=mc^2$}
{\huge $E=mc^2$}
{\Huge $E=mc^2$}
\end{document}

Note the use of the curly braces to limit the scope of the size-setting switches.

1
  • that helps , thanks a lot
    – Quintis
    Commented May 10, 2019 at 6:29
3

Welcome to TeX.SE! There are different solutions given in the comment section but here's another one that could be less verbose and customizable.

Output

\documentclass{article}
\usepackage{graphicx}% \scalebox

\newcommand{\enlargeMath}[1]{\scalebox{2}{#1}}

\begin{document}
    \noindent Normal font: $X_2^2$\\[1ex]
    enlarged font: \scalebox{2}{$X_2^2$}\\[1ex]
    % or using the \enlargeMath command that we 
    % defined to eliminate the scale factor.
    \enlargeMath{$X_2^2$}
\end{document}
7
  • You may want to mention what the difference is between \scalebox{2}{$X_2^2$} and {\huge$X_2^2$}. Or, maybe more easily, you could discuss the difference between \scalebox{2.06}{X} and {\huge X}. (Hint: It matters that Computer Modern fonts employ optical sizing.)
    – Mico
    Commented May 10, 2019 at 4:24
  • To be honest, I don't know the difference. Kindly explain and if the answer needs to be edited, by all means, go ahead! Commented May 10, 2019 at 4:27
  • \scalebox scales its contents linearly, by the factor given in the first argument. But if you compare the outputs of \scalebox{2.5}{X} and {\Huge X}, notice that the latter letter is drawn more finely, i.e, with thinner strokes; also, the serifs are shorter. Conversely, when comparing the outputs of \scalebox{0.5}{X} and {\tiny X}, notice that the latter letter's strokes are much thicker. Computer Modern fonts employ optical sizing: larger-than-normal letters are drawn with thinner strokes, while smaller-than-normal letters are drawn with heavier strokes. This improves legibility.
    – Mico
    Commented May 10, 2019 at 4:36
  • Thanks for the explanation. In your opinion, when should you use \tiny, \Huge, etc. vs \scalebox? Commented May 10, 2019 at 4:44
  • 1
    If the enlarging steps conform to the factor-1.2 progression (as is the case for \normalsize-\large-\Large etc), and if the font in use employs optical scaling (as is the case for Computer Modern), then it's probably a good idea to employ \large, \Large, etc. If, however, if the required magnification cannot be achieved by \large, \Large, etc, or if the (math) font doesn't employ optical scaling, \scalebox{}{} is more convenient.
    – Mico
    Commented May 10, 2019 at 4:47

You must log in to answer this question.

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