I have a list, where the item content is supposed to be systems of two linear equations, grouped with a big left brace. I would like the top equation from the system to have the same baseline as the item number. The problem is that the brace always centers on the main line (the line of the item number). So even if I succeed at getting the equations top-aligned, the brace is still mis-centered.
This question was closed as a duplicate of this question. If you think that this is a duplicate, please read below to see where I explicitly demonstrate that the answers there do not help. (And besides, it's really a different question even if you feel an answer there applies here.)
Here is what I would try first:
\begin{enumerate}
\item
$\left\{
\begin{aligned}
x &= 0\\
y &= 1
\end{aligned}
\right.$
\end{enumerate}
centers the system so that it is too high. The first equation is not on the same baseline as the item number. (Screen shot below.) So I try top-aligning:
\begin{enumerate}
\item
$\left\{
\begin{aligned}[t]
x &= 0\\
y &= 1
\end{aligned}
\right.$
\end{enumerate}
Now the top equation is aligned where I want it, but the brace is too tall. (Screen shot below.) This is because the brace remains centered on the first line, and grows in both directions to encompass content, including the "down-shifted" aligned
environment. So I try using vcenter
after reading some tex.se posts:
\begin{enumerate}
\item
$\left\{\vcenter{\hbox{$
\begin{aligned}[t]
x &= 0\\
y &= 1
\end{aligned}$}}
\right.$
\end{enumerate}
and the output is just like the first try. (Screen shot below.)
Here is a screen shot of these three tries, respectively.
Is it possible to do what I am trying to do?
EDIT: It's been suggested that this question is a duplicate of this one. At this point, this questions is even closed because of this misunderstanding.
That question is not this question, and I see no way to adapt the answers there to answer this. But to demonstrate that I really am looking into that question and its answers and demonstrate that things just don't work out, here is what it looks like if you try the highest-voted answer there:
\usepackage[fleqn]{amsmath}
\newcommand\mathitem{\item\leavevmode\vspace*{-\dimexpr\baselineskip+\abovedisplayskip\relax}}
\begin{enumerate} %
\mathitem \begin{align*}
x&=0\\
y&=1
\end{align*}
\end{enumerate}
(Screen shot below.) This uses actual display mode, not inline math with displaystyle. And there is no way to get the big left brace. So I try the following. Note I do not expect the following to work, since this answer from the other question is designed for display mode math, not inline math (that happens to use displaystyle):
\usepackage[fleqn]{amsmath}
\newcommand\mathitem{\item\leavevmode\vspace*{-\dimexpr\baselineskip+\abovedisplayskip\relax}}
\begin{enumerate} %
\mathitem $\left\{\begin{aligned}
x&=0\\
y&=1
\end{aligned}\right.$
\end{enumerate}
It does not work. It looks like my original example. Screen shot below of these last two tries:
Now I look at the accepted answer to that question, which uses macros like \Longunderstack
from a certain package. This macro is stacking math vertically. I fail to see how it can be used to get aligned equations and a big left brace. It appears you feed this macro math content, so I try:
\begin{enumerate} %result looks fine, but code ugly
\item
% FOR SIMPLE REGULAR-HEIGHT STACKS
\Longunderstack{\begin{aligned}
x&=0\\
y&=1
\end{aligned}}
\item
% FOR IRREGULAR HEIGHT STACKS IN \textstyle
\Shortunderstack{\begin{aligned}
x&=0\\
y&=1
\end{aligned}}
\item
% FOR IRREGULAR HEIGHT STACKS IN \displaystyle
\tabbedShortunderstack{\begin{aligned}
x&=0\\
y&=1
\end{aligned}}
\end{enumerate}
The third item here causes compilation to fail. If I remove the third item, I get:
Braces aside, this is not top-aligned. So I try without the aligned
:
\begin{enumerate} %result looks fine, but code ugly
\item
% FOR SIMPLE REGULAR-HEIGHT STACKS
\Longunderstack{x=0\cr y=1}
\item
% FOR IRREGULAR HEIGHT STACKS IN \textstyle
\Shortunderstack{x=0\cr y=1}
\end{enumerate}
Better, but the equals signs are not really aligned, so this won't help when I apply it to more general equations. It looks like this:
But now, how am I supposed to get the brace back in without the aligned
or some similar array environment?
So I tried the answers from the other post. And as I've argued in the comments, they don't work, and never would have worked. Because that question is a different question. That question is about vertical space from display mode math. My question is about how an extensible brace gets centered and its height gets computed.
aligned
is a display environment, even if you incorrectly use it in$
. So you should combine your first approach with one of the duplicate's answers. (And look into thecases
environment.)\[...\]
. I'm sorry I am failing to get people to see this. Anyway have you read the "duplicate's" answer? It uses special aligned equation environments from a certain package, and there is no way to get\left\{...\right.
into those special environments. At least no obvious way from the way those answers are written.aligned
is a display environment". It does use\displaystyle
.\displaystyle
is not the same thing as display mode. Display mode, among other things, puts the math on its own centered line with surrounding vertical space. That is not a factor in anything happening in my question, and I think you are confusing\displaystyle
with display mode.