# Add vertically-aligned text between two enumerate items

I'd like to get something like this:

MWE:

\documentclass{article}

\begin{document}
\begin{enumerate}
\item $Y^2 - 1 = 0$ \quad (text)
\item $Y^2 + 1 = 0$ \quad (text)
\end{enumerate}
\end{document}


How about a simple \raisebox, wrapped in a macro taking into account \itemsep and \parsep values (thanks to circumscribe, I have change to \glueexpr, since all involved lengths are glues, not ordinary lengths!)

\documentclass{article}

\usepackage{enumitem}

\newcommand{\raisecontent}[1]{%
\raisebox{\glueexpr\baselineskip/2+\parsep/2+\itemsep/2+\lineskip/2}[\ht\strutbox][\ht\strutbox]{#1}%
}

\begin{document}
\begin{enumerate}
\item $Y^2 - 1 = 0$
\item $Y^2 + 1 = 0$ \raisecontent{\quad (text)}
\end{enumerate}

\begin{enumerate}[itemsep=40pt]
\item $Y^2 - 1 = 0$
\item $Y^2 + 1 = 0$ \raisecontent{\quad (text)}
\end{enumerate}

\end{document}

• Working in progress... – user31729 Feb 9 '19 at 12:00
• @Circumscribe: Thanks, I totally forgot about \glueexpr.... – user31729 Feb 9 '19 at 12:21
• @Circumscribe: I changed and apparently the slight vertical shift is removed. Thanks again – user31729 Feb 9 '19 at 12:30
• – Circumscribe Feb 9 '19 at 12:58
• @Circumscribe: Oh, I thought \itemsep etc. would be normal length 'registers' and skip's' – user31729 Feb 9 '19 at 14:52

Another solution, based on tabularx and listliketab, which emulates list environments within tables:

\documentclass{article}
\usepackage{tabularx, listliketab, multirow}

\begin{document}

\storestyleof{enumerate}
\begin{listliketab}
\newcounter{tabenum}\setcounter{tabenum}{0}
\tabitem & $Y^2 - 1 = 0$ & \multirow{2}{=}{(Text)}\\
\tabitem & $Y^2 + 1 = 0$