5

So, I've read the discussions here and also here but neither seem to solve my problem. I'd like to break a long list of matrices between pages, problem is I'm using an alignedat (and sometimes a gathered) environment inside an equation one, so it is unbreakable, i.e. using \allowdisplaybreaks or \displaybreak doesn't work.

There are a couple of problems in using an align or align* environment instead: the first one is that I want a single tag for the overall matrices, this could be resolved with manually tagging inside align* but it's incredibly tedious because I have the same problem all over my thesis, moreover it's hard to control the position of the tags to keep them centered and they are not automatically realigned if I change something, I'd love a global solution. Another problem is that the matrices I'm writing are 5x5 and for reading simplicity is useful to keep some columns/rows blank when they're not needed. This seems to work fine inside an equation+alignedat environment but not having values in the first column completly breaks the align environment.

The best would be to have a somewhat global (or better yet, something that could be applied to just some chapters) solution. As for the tag I think that the best rendering would be to have the same number tag centered in on the piece that stays at the bottom of the page and in the one tha goes to the new page.

Here an example of what I'd want graphically, just to get an idea. The breaking is automatically managed by latex but the tag isn't... If I modify something and the matrices break on another line I have to manually reposition the tags

\documentclass[a4paper, 11pt, twoside]{report}
\usepackage[T1]{fontenc}        
\usepackage[utf8]{inputenc}     
\usepackage[italian]{babel}     
\usepackage{amsmath, amssymb}

\begin{document}
some long text
\vspace{10cm}
\begingroup
    \allowdisplaybreaks
    \begin{align*}
        C'_{11}-C'_{22}&=\begin{pmatrix}
            1 & 0 & 0 & 0 & 0\\
            0 & -1 & 0 & 0 & 0\\
            0 & 0 & 0 & 0 & 0\\
            0 & 0 & 0 & 0 & 0\\
            0 & 0 & 0 & 0 & 0
        \end{pmatrix},\\[10pt]
        \sqrt{\frac{5}{3}}(C'_{11}+C'_{22})&=\frac{1}{\sqrt{15}}\begin{pmatrix}
            3 & 0 & 0 & 0 & 0\\
            0 & 3 & 0 & 0 & 0\\
            0 & 0 & -2 & 0 & 0\\
            0 & 0 & 0 & -2 & 0\\
            0 & 0 & 0 & 0 & -2
        \end{pmatrix},\stepcounter{equation}\tag{\theequation} \label{Eq:Gen_diag_SU(5)}\\[10pt]
        C'_{33}-C'_{44}&=\begin{pmatrix}
            0 & 0 & 0 & 0 & 0\\
            0 & 0 & 0 & 0 & 0\\
            0 & 0 & 1 & 0 & 0\\
            0 & 0 & 0 & -1 & 0\\
            0 & 0 & 0 & 0 & 0
        \end{pmatrix},\\[10pt]
        \sqrt{\frac{5}{3}}(C'_{33}+C'_{44})&=\frac{1}{\sqrt{15}}\begin{pmatrix}
            -2 & 0 & 0 & 0 & 0\\
            0 & -2 & 0 & 0 & 0\\
            0 & 0 & 3 & 0 & 0\\
            0 & 0 & 0 & 3 & 0\\
            0 & 0 & 0 & 0 & -2
        \end{pmatrix}\tag{\theequation}
    \end{align*}
\endgroup
\end{document}

Here instead the matrices and environments I'm working with

\documentclass[a4paper, 11pt, twoside]{report}
\usepackage[T1]{fontenc}        
\usepackage[utf8]{inputenc}     
\usepackage[italian]{babel}     
\usepackage{amsmath, amssymb}

\begin{document}
\begin{equation}
    \begin{alignedat}{2}
        \Tilde{\lambda}_9&=\begin{pmatrix}
            & & & 1 & 0\\
            & & & 0 & 0\\
            & & & 0 & 0\\
            1 & 0 & 0 & & \\
            0 & 0 & 0 & & 
        \end{pmatrix} &\qquad\qquad
        \Tilde{\lambda}_{10}&=\begin{pmatrix}
            & & & -i & 0\\
            & & & 0 & 0\\
            & & & 0 & 0\\
            i & 0 & 0 & & \\
            0 & 0 & 0 & & 
        \end{pmatrix}\\[10pt]
%
        \Tilde{\lambda}_{11}&=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 1 & 0\\
            & & & 0 & 0\\
            0 & 1 & 0 & & \\
            0 & 0 & 0 & & 
        \end{pmatrix} &\qquad\qquad
        \Tilde{\lambda}_{12}&=\begin{pmatrix}
            & & & 0 & 0\\
            & & & -i & 0\\
            & & & 0 & 0\\
            0 & i & 0 & & \\
            0 & 0 & 0 & & 
        \end{pmatrix}\\[10pt]
%
        \Tilde{\lambda}_{13}&=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 0 & 0\\
            & & & 1 & 0\\
            0 & 0 & 1 & & \\
            0 & 0 & 0 & & 
        \end{pmatrix} &\qquad\qquad
        \Tilde{\lambda}_{14}&=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 0 & 0\\
            & & & -i & 0\\
            0 & 0 & i & & \\
            0 & 0 & 0 & & 
        \end{pmatrix}\\[10pt]
%
        \Tilde{\lambda}_{15}&=\begin{pmatrix}
            & & & 0 & 1\\
            & & & 0 & 0\\
            & & & 0 & 0\\
            0 & 0 & 0 & & \\
            1 & 0 & 0 & & 
        \end{pmatrix} &\qquad\qquad
        \Tilde{\lambda}_{16}&=\begin{pmatrix}
            & & & 0 & -i\\
            & & & 0 & 0\\
            & & & 0 & 0\\
            0 & 0 & 0 & & \\
            i & 0 & 0 & & 
        \end{pmatrix}\\[10pt]
%
        \Tilde{\lambda}_{17}&=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 0 & 1\\
            & & & 0 & 0\\
            0 & 0 & 0 & & \\
            0 & 1 & 0 & & 
        \end{pmatrix} &\qquad\qquad
        \Tilde{\lambda}_{18}&=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 0 & -i\\
            & & & 0 & 0\\
            0 & 0 & 0 & & \\
            0 & i & 0 & & 
        \end{pmatrix}\\[10pt]
%
        \Tilde{\lambda}_{19}&=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 0 & 0\\
            & & & 0 & 1\\
            0 & 0 & 0 & & \\
            0 & 0 & 1 & & 
        \end{pmatrix} &\qquad\qquad
        \Tilde{\lambda}_{20}&=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 0 & 0\\
            & & & 0 & -i\\
            0 & 0 & 0 & & \\
            0 & 0 & i & & 
        \end{pmatrix}
    \end{alignedat}
\end{equation}
\end{document}

1 Answer 1

6

I'd like to suggest that you reconsider insisting on using a single equation number to denote all rows of the multi-row equation environment. (I can't see a good reason for not numbering each row separately.) Making this change would greatly simplify operations, as you could employ align and alignat environments, which permit page breaks (as long as \allowdisplaybreaks has been executed).

Cross-referencing the group six equations by a range of equation numbers is every bit as straightforward as creating a cross-reference to a collectively-numbered group of equations. For instance, if the cleveref package is loaded, the sentence Cross-references to \crefrange{eq:za}{eq:zf}. is typeset as

enter image description here

\documentclass[a4paper, 11pt, twoside]{report}
\usepackage[T1]{fontenc}        
%%\usepackage[utf8]{inputenc} % that's the default nowadays
\usepackage[italian]{babel}     
\usepackage{amsmath, amssymb}
\usepackage[noabbrev]{cleveref} 
\begin{document}
\allowdisplaybreaks % just for this example (create page break after 3rd eq.)

Cross-references to \crefrange{eq:za}{eq:zf}.

\vspace*{10cm}
\begin{alignat}{2}
        \tilde{\lambda}_9
        &=\begin{pmatrix}
            & & & 1 & 0\\
            & & & 0 & 0\\
            & & & 0 & 0\\
            1 & 0 & 0 & & \\
            0 & 0 & 0 & & 
        \end{pmatrix} 
        &\qquad\qquad
        \tilde{\lambda}_{10}
        &=\begin{pmatrix}
            & & & -i & 0\\
            & & & 0 & 0\\
            & & & 0 & 0\\
            i & 0 & 0 & & \\
            0 & 0 & 0 & & 
        \end{pmatrix} \label{eq:za} 
        \\[2\jot]
        \tilde{\lambda}_{11}
        &=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 1 & 0\\
            & & & 0 & 0\\
            0 & 1 & 0 & & \\
            0 & 0 & 0 & & 
        \end{pmatrix} 
        &\qquad\qquad
        \tilde{\lambda}_{12}
        &=\begin{pmatrix}
            & & & 0 & 0\\
            & & & -i & 0\\
            & & & 0 & 0\\
            0 & i & 0 & & \\
            0 & 0 & 0 & & 
        \end{pmatrix} \label{eq:zb} 
        \\[2\jot]
        \tilde{\lambda}_{13}
        &=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 0 & 0\\
            & & & 1 & 0\\
            0 & 0 & 1 & & \\
            0 & 0 & 0 & & 
        \end{pmatrix} 
        &\qquad\qquad
        \tilde{\lambda}_{14}
        &=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 0 & 0\\
            & & & -i & 0\\
            0 & 0 & i & & \\
            0 & 0 & 0 & & 
        \end{pmatrix} \label{eq:zc} 
        \\[2\jot]
        \tilde{\lambda}_{15}
        &=\begin{pmatrix}
            & & & 0 & 1\\
            & & & 0 & 0\\
            & & & 0 & 0\\
            0 & 0 & 0 & & \\
            1 & 0 & 0 & & 
        \end{pmatrix} 
        &\qquad\qquad
        \tilde{\lambda}_{16}
        &=\begin{pmatrix}
            & & & 0 & -i\\
            & & & 0 & 0\\
            & & & 0 & 0\\
            0 & 0 & 0 & & \\
            i & 0 & 0 & & 
        \end{pmatrix} \label{eq:zd} 
        \\[2\jot]
        \tilde{\lambda}_{17}
        &=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 0 & 1\\
            & & & 0 & 0\\
            0 & 0 & 0 & & \\
            0 & 1 & 0 & & 
        \end{pmatrix} 
        &\qquad\qquad
        \tilde{\lambda}_{18}
        &=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 0 & -i\\
            & & & 0 & 0\\
            0 & 0 & 0 & & \\
            0 & i & 0 & & 
        \end{pmatrix} \label{eq:ze} 
        \\[2\jot]
        \tilde{\lambda}_{19}
        &=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 0 & 0\\
            & & & 0 & 1\\
            0 & 0 & 0 & & \\
            0 & 0 & 1 & & 
        \end{pmatrix} 
        &\qquad\qquad
        \tilde{\lambda}_{20}
        &=\begin{pmatrix}
            & & & 0 & 0\\
            & & & 0 & 0\\
            & & & 0 & -i\\
            0 & 0 & 0 & & \\
            0 & 0 & i & & 
        \end{pmatrix} \label{eq:zf}
\end{alignat}
\end{document}
3
  • Honestly I thought about that (even if I didn't know the package cleveref, thanks!) but I don't really like it. The main reason is that the single rows don't have that much of a meaning per se as they have as a group, to me it seems like I'm tagging twice the same "equation"... I wouldn't even tag them as subequations Commented Jul 9 at 14:11
  • @MarcoOlivieri - The converse argument applies as well: What makes you confident that your readers will "get" that a lonely-looking equation number, placed exactly half-way between two groups of three rows of pairs of matrices, somehow applies to the entire set of six rows? Speaking for myself (who else?), it would take me a quite a long time to figure out (if I ever got it...) that that's what's supposed to be going on.
    – Mico
    Commented Jul 9 at 15:35
  • That's why the best solotion, imo, would be to have the same number on both the first and the second page Commented Jul 9 at 16:38

You must log in to answer this question.

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