2

I have the following code

\begin{array}{rl}
\textbf{fetcher} : \mathcal{T} &\to \mathcal{T} \\
(P_{\star}, w) &\mapsto \bigcup \limits_{p \in P_{\star}} \left(
{\setstretch{1.25}
\begin{array}{llll}
    best_{b_{R}} \big(& \big( R(p), &w_{R} \cdot \textbf{rank}_{R(p)} \big)&\big)  \ \cup \\
    best_{b_{C}} \big(& \big( C(p), &w_{C} \cdot \textbf{rank}_{C(p)} \big)&\big)  \ \cup \\
    best_{b_{A}} \big(& \big( A(p), &w_{A} \cdot \textbf{rank}_{A(p)} \big)&\big) 
\end{array}}
\right)
\end{array}

which results in

Output

I would however rather have it look like so:

Goal

I am not sure if array is the best choice for this, but I did not find any better way. Is there a way to move the second array down, or should I rather use something else?

  • use \begin{array}[t] so it aligns on the top row and remove the \left( \right) if you don't want them, as in the second image. – David Carlisle Jun 5 '14 at 8:29
  • so easy! would you care to make this an actual answer? – fabian789 Jun 5 '14 at 8:38
3

You don't want array, but aligned:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\functionnameX}[1]{\mathit{#1}}
\newcommand{\functionnameY}[1]{\mathbf{#1}}
\newcommand{\best}{\functionnameX{best}}
\newcommand{\rank}{\functionnameY{rank}}
\newcommand{\fetcher}{\functionnameY{fetcher}}

\begin{document}
\[
\begin{aligned}
\fetcher\colon \mathcal{T} &\to \mathcal{T} \\
(P_{\star}, w)             &\mapsto 
  \bigcup_{p \in P_{\star}}
  \begin{aligned}[t]
    \Bigl[&\best_{b_{R}} \bigl((R(p), w_{R} \cdot \rank_{R(p)})\bigr) \cup {} \\
    &\best_{b_{C}} \bigl((C(p), w_{C} \cdot \rank_{C(p)})\bigr) \cup {}\\
    &\best_{b_{A}} \bigl((A(p), w_{A} \cdot \rank_{A(p)})\bigr)\Bigr]
  \end{aligned}
\end{aligned}
\]
\end{document}

Note \bigl or \Bigr in front of opening delimiters, \bigr or \Bigr for closing ones. I have some doubts about the double parentheses for the argument of best.

Note also how one can obtain uniform appearance of function names by using appropriate definitions in the preamble. Use better names than \functionnameX or \functionnameY so to give them some semantics that help in choosing one or the other.

enter image description here

3

Use \begin{array}[t] so it aligns on the top row and remove the \left( \right) if you don't want them, as in the second image. (If you wanted to put brackets around a top aligned array then the delarray package can help.)

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.