1

How can I insert a left brace over multiple lines on both sides of the brace? I made a mockup of what I would like:

mockup

Requirements:

  • I would want to be able to use the alignment character & on the equations of either side of the brace, to align them vertically as well.
  • Each horizontal line must share the same base line, just like in \[x\ 1+2y\]. That is, x must have the same base line as 1+2y.

Ps. The equations I have here don't make sense, but it's for something more complicated that I have in mind.

Here's a pseudo-code / starting code (note this does not produce the above picture..)

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
    1 &+ 2y \\
    3 &+ x
\end{align*}
\end{document}
  • @Zarko I want the x to be in line with the 1+2y, and the y to be in line with 3+x. That only gives me one side of the brace? – ksgj1 Apr 14 '17 at 5:05
1

Like this?

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{aligned} x \\ y \end{aligned}%
    \left\{\begin{aligned}  1 & + 2y \\ 
                            3 & + x \end{aligned}\right.
\]
\end{document}
  • Almost, but the first line doesn't seem to be in line on both sides of the brace. That is, x seems a little lower than 1+2y. Also y seems a little higher than 3+x, or are they already in line? – ksgj1 Apr 14 '17 at 5:18
  • See the base line between x and 1+2yin this code: \[x 1+2y\] – ksgj1 Apr 14 '17 at 5:21
  • @ksgj1, see if is now better. – Zarko Apr 14 '17 at 5:25
  • Thanks for the attempts, Zarko. :) I want to be able to use the alignment tab & to align the + also (see my pseudocode). If I do so in the matrix environment, I'll get unwanted spaces. Also, your current code has a extra \] at the end. – ksgj1 Apr 14 '17 at 5:31
  • above is my last attempt ... – Zarko Apr 14 '17 at 5:39

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.