0

I am trying to align 2 equations on a right bracket enviroment. Below is my code and enviroment for Right Cases/Brackets

\documentclass{report}

\newenvironment{rcases}
    {\left.\begin{aligned}}
    {\end{aligned}\right\rbrace}

\begin{document}

        \begin{align*}
            \begin{rcases}
                +:\, & \mathbb{N} \times \mathbb{N} \longmapsto \mathbb{N} \\
                & (x, y) \longmapsto x + y 
            \end{rcases}
            && + \subseteq \mathbb{N} \times \mathbb{N} \\
            && + = \{ (x, y) \,|\, x, y \in \mathbb{N} \} \subseteq \mathbb{N} \times \mathbb{N}
        \end{align*}

\end{document}

I am trying to get

&& + \subseteq \mathbb{N} \times \mathbb{N} \\
&& + = \{ (x, y) \,|\, x, y \in \mathbb{N} \} \subseteq

on the same line or to the same level on the right bracket.

Can someone help me with it?

1

enter image description here

What happens is that the part

& + \subseteq \mathbb{N} \times \mathbb{N}
\\
& + = \{ (x, y) \,|\, x, y \in \mathbb{N} \} \subseteq

Is treated by align* as two different lines. What you want align* to do is treat it as one symbol, which you can do by nesting aligned inside align* environment. You can think of it as illustrated here

enter image description here

\documentclass{report}

\usepackage{amsmath}
\usepackage{amssymb, amsfonts}
\newenvironment{rcases}
    {\left.\begin{aligned}}
    {\end{aligned}\right\rbrace}

\begin{document}



\begin{align*}
    \begin{rcases}
        +:\, & \mathbb{N} \times \mathbb{N} \longmapsto \mathbb{N}
    \\
        & (x, y) \longmapsto x + y 
    \end{rcases}
    \quad
    \begin{aligned}
        & + \subseteq \mathbb{N} \times \mathbb{N}
    \\
        & + = \{ (x, y) \,|\, x, y \in \mathbb{N} \} \subseteq
    \end{aligned}
\end{align*}

\end{document}
  • But I need those 2 things aligned left, not right – Arszilla Sep 20 '18 at 20:37
  • Amazing. Thank you. Mind explaining what you did here so I can understand it better (As I am a newbie in TeX) – Arszilla Sep 20 '18 at 20:44
0

The rcases environment is already defined by mathtools (which extends amsmath). I propose to use the alignatenvironment, which gives you full control on the spacing between the two groups of alignment:

\documentclass{report}

\usepackage{mathtools}
\usepackage{amssymb}

\begin{document}

\begin{alignat*}{2}
 & \begin{rcases}
        \begin{aligned}
        +:\, & \mathbb{N} \times \mathbb{N} \longmapsto \mathbb{N}
        \\
        & (x, y) \longmapsto x + y \strut
        \end{aligned}
    \end{rcases}
 & \qquad &
        \begin{aligned}
       & + \subseteq \mathbb{N} \times \mathbb{N}
        \\
        & + = \{ (x, y) \,|\, x, y \in \mathbb{N} \} \subseteq \strut
        \end{aligned}
\end{alignat*}

\end{document} 

enter image description here

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.