4

I need some help in splitting the mth part inside the parenthesis. I have tried multline, split and all other options but it does not allow me to break it. I can display the entire equation by shrinking overall slide but it makes the font size too small. Any help/suggestion will be highly appreciated.

\begin{frame}[shrink=29]
\frametitle{Supply Model}
\vspace*{0.3cm}
\begin{eqnarray*}
    \underset{p_{jm} \forall j \in S_{m}^{b}}{\text{max}}\left[\sum_{j\in S_{m}^{b}} (p_{jm}-\mu_{jm}-c_{jm})\times M_{m} \times s_{jm}(p)+ 
    \kappa_tm \sum_{j\notin S_{m}^{b}} (p_{jm}-\mu_{jm}-c_{jm})\times M_{m} \times s_{jm}(p)\right]
\end{eqnarray*}
\end{frame}
  • Whatever else you end up doing, please replace \underset{p_{jm} \forall j \in S_{m}^{b}}{\text{max}} with \max_{p_{jm} \forall j \in S_{m}^{b}}. – Mico Jul 1 at 1:22
6

How about something slightly more modern than eqnarray? (Note also that there is no need to use \underset here, \max does that automatically.)

\documentclass{beamer}
\usepackage{mathtools}
\begin{document}
\begin{frame}[t]
\frametitle{Supply Model}
\begin{align*}
\MoveEqLeft[4]   \max_{p_{jm} \forall j \in S_{m}^{b}}\left[\sum_{j\in S_{m}^{b}} (p_{jm}-\mu_{jm}-c_{jm})\times M_{m} \times s_{jm}(p)
\right.\\ 
&\left.{}+
    \kappa_tm \sum_{j\notin S_{m}^{b}} (p_{jm}-\mu_{jm}-c_{jm})\times M_{m} \times s_{jm}(p)\right]
\end{align*}
\end{frame}
\end{document}

enter image description here

Here are two more advanced versions, one by Mico (thanks!), and the other one more for fun (an attempt to move the brackets to the vertical position of the barycenter of the formula, if you don't like it you don't have to use it ;-).

\documentclass{beamer}
\usepackage{mathtools}
\begin{document}
\begin{frame}[t]
\frametitle{Supply Model}
\begin{align*}
\MoveEqLeft[4]   \max_{p_{jm} \forall j \in S_{m}^{b}}
\left[\,\sum_{j\in S_{m}^{b}} (p_{jm}-\mu_{jm}-c_{jm})\times M_{m} \times s_{jm}(p)
\right.\\ 
&\left.{}+
    \kappa_tm \sum_{j\notin S_{m}^{b}} (p_{jm}-\mu_{jm}-c_{jm})\times M_{m} \times s_{jm}(p)\right]
\end{align*}
\begin{align*}
\MoveEqLeft[4]   \max_{p_{jm} \forall j \in S_{m}^{b}}
\raisebox{-4pt}{\Bigg[}\sum_{j\in S_{m}^{b}} (p_{jm}-\mu_{jm}-c_{jm})\times M_{m} \times s_{jm}(p)
\\ 
&{}+
    \kappa_tm \sum_{j\notin S_{m}^{b}} (p_{jm}-\mu_{jm}-c_{jm})\times M_{m} \times s_{jm}(p)
    \raisebox{-4pt}{\Bigg]}
\end{align*}
\end{frame}
\end{document}

enter image description here

  • 3
    +1. To avoid a visual overlap, I would insert \, (thinspace) between \left[ and \sum_{j\in S_{m}^{b}}. – Mico Jul 1 at 1:21
  • 1
    @Mico Yes, thanks! That's a good suggestion. – user121799 Jul 1 at 1:22
4

Here's a solution which (a) uses an align* environment instead of the deprecated eqnarray* environment and (b) performs alignment on the \sum symbols.

enter image description here

\documentclass{beamer}
\begin{document}
\begin{frame}%[shrink=29]
\frametitle{Supply Model}
%\vspace*{0.3cm}
\begin{align*}
    \max_{\substack{p_{jm}\\ \forall j \in S_{m}^{b}}}
    \biggl[\,
    &\sum_{j\in S_{m}^{b}} (p_{jm}-\mu_{jm}-c_{jm})\times M_{m} \times s_{jm}(p)\\
    {}+ \kappa_tm 
    &\sum_{j\notin S_{m}^{b}} (p_{jm}-\mu_{jm}-c_{jm})\times M_{m} \times s_{jm}(p)
    \biggr]
\end{align*}
\end{frame}
\end{document}

Addendum: IMNSHO, an even better solution is available if you're willing to get rid of the four not-really-needed \times directives. By omitting these symbols, the entire formula can be placed on a single line, with a shrinkage of only 10%.

enter image description here

\small % for a 10% linear reduction in font size
\[
    \max_{\substack{p_{jm}\mathstrut\\ \forall j \in S_{m}^{b}}}
    \biggl[\,
    \sum_{j\in S_{m}^{b}} (p_{jm}-\mu_{jm}-c_{jm}) M_{m}  s_{jm}(p)
    + \kappa_tm 
    \sum_{j\notin S_{m}^{b}} (p_{jm}-\mu_{jm}-c_{jm}) M_{m}  s_{jm}(p)
    \biggr]
\]
  • Note also the use of \substack to insert a line break in the argument of \max. That way, it should be clear(er) what the variable is over which the maximization is performed. – Mico Jul 1 at 1:33
  • 1
    +1. Just one comment: in the context of beamer eqnarray is somewhat less deprecated than elsewhere since it allows one to use \paus which AFAIK does not work with align. (That's why I was using "more modern".) – user121799 Jul 1 at 1:33
  • 1
    @marmot - Thanks for this. I was wasn't aware, until now, of this minor redeeming feature of eqnarray in a beamer document. – Mico Jul 1 at 1:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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