1

What I want to do is to include two lines at the begging in an one-line equation, just like in the following picture.

enter image description here

Does anyone have any idea in order to achieve it? Thanks a lot.

  • \max_{x\in\mathcal{J}(k)}\left\{... – David Carlisle Apr 2 '14 at 13:27
  • 1
    \max requires amsmath. for a more general discussion of math operators, see newcommand vs. DeclareMathOperator. for a list of operators defined in this way, see the amsmath documentation -- texdoc amsmath on a tex live system. – barbara beeton Apr 2 '14 at 13:32
  • 1
    Depending on how new you are to LaTeX, note that barbara's comment about amsmath means that you need \usepackage{amsmath} in the preamble of your document. – Steven B. Segletes Apr 2 '14 at 13:34
  • 1
    @barbarabeeton try latex \\show\\max :-) – David Carlisle Apr 2 '14 at 13:46
  • 1
    @Werner Ehm, I don't think this question is about the vertical bar, but about the max with subscript. – Torbjørn T. Apr 2 '14 at 17:55
1

Using mathtools (that loads amsmathanyway) and its DeclarePairedDelimiterX command, you can have a better spacing for |, and a better control on the size of the braces:

    \documentclass[12pt,a4paper,leqno]{article}

\usepackage[utf8]{inputenc}
\usepackage{amssymb, mathtools}
\usepackage{textcomp} 

\DeclarePairedDelimiterX{\set}[2]{\{}{\}}{#1 \delimsize\vert #2}
\newcommand*\Set[1]{\set*{#1}}
\DeclarePairedDelimiter\abs{\lvert}{\rvert}

\let\emptyset\varnothing    

\begin{document} 
\begin{align}
\tag*{With \texttt{\textbackslash Big}:}       &  \max_{\mathbf x \in \mathcal J(\mathbf K)}\!{\set[\Big]{\sum_{i\in I}\mathcal G_{i  \abs{C_i}}(\mathbf{\Pi}_i, y_i, \emptyset)}{(\mathbf\Pi, y_i)\in \mathcal N(\mathbf x_i)}} \\
\tag*{With \texttt{\textbackslash bigg}:}       & \max_{\mathbf x \in \mathcal J(\mathbf K)}\!{\set[\bigg]{\sum_{i\in I}\mathcal G_{i  \abs{C_i}}(\mathbf{\Pi}_i, y_i, \emptyset)}{(\mathbf\Pi, y_i)\in \mathcal N(\mathbf x_i)}}\\
\tag*{With an implicit \texttt{\textbackslash left}:}        & \max_{\mathbf x \in \mathcal J(\mathbf K)}\!{\Set{\sum_{i\in I}\mathcal G_{i  \abs{C_i}}(\mathbf{\Pi}_i, y_i, \emptyset)}{(\mathbf\Pi, y_i)\in \mathcal N(\mathbf x_i)}}
\end{align}

\end{document} 

enter image description here

3

enter image description here

Please always post a complete document not just a fragment:

\documentclass[12pt]{article}

\begin{document}


\[
\max_{x\in\mathcal{J}(k)}\left\{ \sum_a^b something \middle| something\right\}
\]

\end{document}
  • I'd say that the outer fences a excessively large and the \middle| needs spacing around it. My solution to a similar problem tex.stackexchange.com/a/167749/3929 – daleif Apr 2 '14 at 14:04
  • @daleif yes, agreed. and something shouldn't be set in math italic, but I decided not to address those here and concentrate on the question about the subscript to max. – David Carlisle Apr 2 '14 at 14:09

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.