It seems that using align* inside enumerate* results in PDFLaTeX hanging. Can anyone explain the reason and/or suggest a workaround
Minimal example
\documentclass[11pt]{extarticle}
\usepackage[inline, shortlabels]{enumitem}
\usepackage{amssymb, amsmath}
\begin{document}
\begin{enumerate*}
\item
\begin{align*}
abc &= def
\end{align*}
\end{enumerate*}
\end{document}
To explain what I need this for. I use align* to create equations with annotated steps - for example for fill-in-the-blank equation solving. I use the following macro to do so
\newcommand\rightcomment[5][0.3]%
{\begin{tikzpicture}[remember picture,overlay]
\draw[-stealth]
($({pic cs:#4}|-{pic cs:#2})+(#1,0)$)
.. controls +(0.2,-0.05) and +(0.2,0.1) ..
node[right,align=left]{#5}
($({pic cs:#4}|-{pic cs:#3})+(#1,0.1)$);
\end{tikzpicture}%
}
\newcommand\leftcomment[5][-0.1]%
{\begin{tikzpicture}[remember picture,overlay]
\draw[-stealth]
($({pic cs:#4}|-{pic cs:#2})+(#1,0)$)
.. controls +(-0.2,-0.05) and +(-0.2,0.1) ..
node[left,align=right]{#5}
($({pic cs:#4}|-{pic cs:#3})+(#1,0.1)$);
\end{tikzpicture}%
}
\newcommand\twostep[9]{
\begin{align*}
\tikzmark{la#1} #2 &= #3 \tikzmark{ra#1}\\
\tikzmark{lb#1} #5 &= #6 \tikzmark{rb#1}\\
\tikzmark{lc#1} #8 &= #9 \tikzmark{rc#1}
\end{align*}
\leftcomment{la#1}{lb#1}{la#1}{$(#4)$}
\leftcomment{lb#1}{lc#1}{la#1}{$(#7)$}
\rightcomment{ra#1}{rb#1}{ra#1}{$(#4)$}
\rightcomment{rb#1}{rc#1}{ra#1}{$(#7)$}
}
Which is used like:
\twostep{a}{5y + 1}{21}
{-1}{5y}{20}
{\div 5}{y}{4}
This renders output like:
I then use the following macro to layout enumerated questions in a grid in a row-major order
\usepackage{tabto}
\usepackage[inline, shortlabels]{enumitem}
\newenvironment{tabbedenum}[1]
{\noindent\NumTabs{#1}\begin{enumerate*}[itemjoin={\tab}]}{\end{enumerate*}}
Which gives me a nice grid-structure of questions in rows:




alignwould necessarily set its content as a display, thereby disrupting the "nice grid-structure"; it seems counter-intuitive for your usage. – Werner Dec 09 '17 at 16:32align*keeps the typeset math inline as opposed toalign. Actually if I switch foralignI get exactly the same problem. $x = y$ and$$ x = y$$work fine.begin{equation}or\[result in a "bad math environment deliminator" error. – maninalift Dec 09 '17 at 17:13alignis similar toalign*- the former just adds equation numbers while the latter doesn't.$x = y$is consider inline math, while\[...\]sets a single equation in display math mode, just likealign/align*. My original comment merely states that you're switching from inline enumeration (enumerate*) to display math mode, which defeats the style of having an inline enumeration. – Werner Dec 09 '17 at 17:22align*does not set math inline it is a display environment.$is for inline math, – David Carlisle Dec 09 '17 at 17:32