4

I have the following problem. I use the subequations environment together with the align environment and the command \allowdisplaybreaks to display the equations over several pages. This is my MWE:

\documentclass{article}
\usepackage{mathtools}

\begin{document}
    \begin{subequations}
        {\allowdisplaybreaks
        \begin{align}
            &a &= b\label{one}\\
            &b &= c\label{two}
        \end{align}}
    \end{subequations}
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua \ref{one} and \ref{two}.
\end{document}

Unfortunately, I now have the problem with the small indent after the subquations. The trick with the % after the label did not work. What else could work?

0

2 Answers 2

3

You are adding a spurious space after the closing brace } you are using to make a group around {align}: that's where you should put the %.

    \begin{subequations}
        {\allowdisplaybreaks
        \begin{align}
            &a &= b\label{one}\\
            &b &= c\label{two}
        \end{align}}%  <<==================== HERE
    \end{subequations}

On the other hand, environments—and therefore {subequations}—form a group, so you can lose the braces altogether.

\documentclass{article}
\usepackage{amsmath}

\begin{document}
Text\par
\vspace{17cm}
Text text text text text text text text text text text text text
text text text text text text text text text text text text text
text text text text text text text text text text text text text
\begin{subequations}
   \allowdisplaybreaks
   \begin{align}
   &a &= b\label{one}\\
   &b &= c\label{two}
   \end{align}
\end{subequations}
Text \ref{one} and \ref{two}.

\vspace{14cm}
\begin{align}
a\\b\\c\\d\\e\\f\\g\\h\\i
\end{align}

\end{document}

enter image description here

(The snapshot should make clear that the first display is broken across pages, while the second on isn't.)

3

The recommendation is to set \allowdisplaybreaks in the document preamble when you're writing the document.

When you're in the final revision phase, remove \allowdisplaybreaks and examine the problematic displays, adding \displaybreak before the \\ that ends the line after which you judge a break is fine.

If you don't want to follow the recommendation, you should, in my opinion, define a suitable environment:

\documentclass{article}
\usepackage{mathtools}

\usepackage{lipsum} % for filler text

\newenvironment{breakdisplays}{\allowdisplaybreaks}{\ignorespacesafterend}

\begin{document}

\lipsum[2]
\begin{subequations}
\begin{breakdisplays}
  \begin{align}
    a &= b\label{one}\\
    b &= c\label{two}
  \end{align}
\end{breakdisplays}
\end{subequations}
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna 
aliqua \eqref{one}~and~\eqref{two}.

\lipsum[3-5]
\begin{breakdisplays}
  \begin{align}
    a &= b \\
    b &= c \\
    a &= b \\
    b &= c \\
    a &= b \\
    b &= c \\
    a &= b \\
    b &= c \\
    a &= b \\
    b &= c \\
    a &= b \\
    b &= c \\
    a &= b \\
    b &= c \\
  \end{align}
\end{breakdisplays}
\lipsum[20]

\end{document}

output

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .