# How to fit a large equation that goes out of the page?

I have the following equation

$$Ep = (Required Personality Level of Each Resource - Assigned Personality Level of each Resources) \times (da\textsubscript{i})$$


but it is too large as is. How should I write it so it can fit nicely on the page?

• Is the hyphen between “Resource” and “Assigned” meant to be a minus sign? – egreg Nov 25 '18 at 14:38

Mathematical symbols where created to represent the meaning of longer descriptive words in a short form for easy inclusion in complex formulas with possible repetition. I would choose a suitable symbol/character to represent that long sentence like this (choose your own descriptive symbol):

\documentclass{article}
\begin{document}

$$Ep = P_l \times da_i,$$
%
where $P_l =$ Required Personality Level of Each Resource-Assigned Personality Level of all Resources

\end{document}


• I would go a step further, and say "where $P_l$ is the required personality ...", explaining in words what the symbol is. There's no gain to using math here. – Teepeemm Nov 25 '18 at 21:45

break your long text into two lines:

\documentclass{article}

\begin{document}
$$Ep = \left(\begin{tabular}{l} Required Personality Level of Each Resource-\\ Assigned Personality Level of each Resources \end{tabular}\right) \times (da_{i})$$
\end{document}

• no other option is available? – Iftikhar Ahmad Nov 25 '18 at 14:14
• what option? you can't store elephant into suitcase ... or do you like to make equation invisible small? – Zarko Nov 25 '18 at 14:22

no other option is available?

Another option is to use \resizebox. This will automatically shrink the size of the equation to make it fit. Ofcourse, for very long equation, the font will become too small to read without zooming in. But it is an option and you asked for another option. The accepted answer method would be my first choice.

\documentclass[12pt]{article}

\usepackage{graphicx}
\usepackage{amsmath}

\begin{document}

$$\resizebox{\textwidth}{!} {% Ep = (\text{Required Personality Level of Each Resource - Assigned Personality Level of each Resources}) \times (da\textsubscript{i})% }$$

\end{document}


Hope you are looking for autobreak option in display math? If yes, refer the below tag:

\documentclass{book}
\usepackage{amsmath}
\usepackage{autobreak}

\begin{document}

\allowdisplaybreaks

\begin{align}
\begin{autobreak}
Ep =
(Required Personality Level of Each Resource - Assigned Personality
Level of each Resources)
\times (da\textsubscript{i})
\end{autobreak}
\end{align}

\end{document}


By using amsmath I can think of two more options: you can use

• multiline (justified multiline formula)
• split (allows to align about certain character without bulky tabular construction)

environments. Note that text in math equations is typically upright; I also adapted subscript notation to use in math environment:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{multline}
Ep = (\text{Required Personality Level of Each Resource}\\
- \text{Assigned Personality Level of each Resources}) \\
\times (da_\mathrm{i})
\end{multline}

$$\begin{split} Ep &= (\text{Required Personality Level of Each Resource}\\ &- \text{Assigned Personality Level of each Resources}) \\ &\times (da_\mathrm{i}) \end{split}$$

\end{document}


If your equation does not fit on a single line, then the multline environment probably is what you need:

\begin{multline}
first part of the equation \\
= second part of the equation
\end{multline}


If you also need some alignment respect to the first part, you can use split:

$$\begin{split} first part &= second part #1 \\ &= second part #2 \end{split}$$


Both environments require the amsmath package.

See also aligned as pointed out in an answer below.