1

I am working with a long table placed sideways using the longtable and pdflscape packages.

While I have no trouble with the table formatting while it remains on the first page, it sort of breaks down once it goes on to the second page.

My code is:

\documentclass[a4paper, 11pt, oneside]{article}
\usepackage{longtable}
\usepackage{rotating}
\usepackage{tabularx}
\usepackage{pdflscape}
\usepackage{arydshln}


\newcommand{\Mj}{M_{\bar{J}}}
\newcommand{\Hkj}{H_{\mathcal{K}\bar{J}}}
\newcommand{\Mkj}{M_{\mathcal{K}\bar{J}}}
\newcommand{\Hekj}{\left( \Hkj - \eta_{\mathcal{K}  \bar{J}}\right)}


\begin{document}

\begin{landscape}
\begin{center}

\begin{longtable}{|c|c|c|c|c|c|}

%% Headers and footers

\caption{}\label{tab: Glue1 }\\
\hline
\textbf{Terms in} $\bm{\delta D_{\mu}M_{\bar{J}}^{(\Lambda_{1})}}$ & \textbf{Terms in} $\bm{\delta D_{\mu}M_{\bar{J}}^{(\alpha_{3})}}$ & \multicolumn{2}{|c|}{\textbf{in }$\bm{\delta D_{\mu}M_{\bar{J}}}$ \textbf{t.b.t.}} & \multicolumn{2}{|c|}{\textbf{in }$\bm{\delta D_{\mu}M_{\bar{J}}}$ \textbf{a.c.}} \\ \hline
\endfirsthead
  
 \multicolumn{6}{c}%
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\hline  \textbf{Terms in} $\bm{\delta D_{\mu}M_{\bar{J}}^{(\Lambda_{1})}}$ & \textbf{Terms in} $\bm{\delta D_{\mu}M_{\bar{J}}^{(\alpha_{3})}}$ & \multicolumn{2}{|c|}{\textbf{in }$\bm{\delta D_{\mu}M_{\bar{J}}}$ \textbf{t.b.t.}} & \multicolumn{2}{|c|}{\textbf{in }$\bm{\delta D_{\mu}M_{\bar{J}}}$ \textbf{a.c.}} \\ \hline
\endhead
 
  
  
\hline \multicolumn{6}{|r|}{{Continued on next page}} \\ \hline
\endfoot

\hline \hline
\endlastfoot

   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%% Bloque 1
   \multirow{2}{*}{-} & $i \lambda^{(\alpha_{1})}\partial_{\mu} \Phi^{(\alpha_{2})}_{\bar{J}}$ & \multirow{2}{*}{$i\lambda_{\mathcal{K}} \star \partial_{\mu}\Mj$} & \multirow{2}{*}{\eqref{eq: deltaDmuMjtbt1}} & \multirow{2}{*}{$i\lambda_{\mathcal{K}} \star \partial_{\mu}\Mj$} & \multirow{12}{*}{\eqref{eq: deltaDmuMjac1}} \\
     & $-i \lambda^{(\alpha_{2})}\partial_{\mu} \Phi^{(\alpha_{1})}_{\bar{J}}$ & & & & \\ \cline{1-5}
    
    %%%%% Bloque 2
    \multirow{4}{*}{-} & $-g \lambda^{(\alpha_{1})}A_{\mu}^{(-\alpha_{1})} \Phi^{(\alpha_{3})}_{\bar{J}}$ & \multirow{2}{*}{$g \partial^{\mathcal{K}}\lambda \star A_{\mu} \star \Mj \, +$} & \multirow{2}{*}{\eqref{eq: deltaDmuMjtbt4}} & \multirow{4}{*}{$-g \lambda \star A_{\mu} \star \Mj$} & \\
     & $-g \lambda^{(\alpha_{1})}A_{\mu}^{(-\alpha_{1})} \Phi^{(\alpha_{3})}_{\bar{J}}$ & & & & \\ \cdashline{2-4}
     & $g A_{\mu}^{(\alpha_{3})}\lambda^{(\alpha_{1})} \Phi^{(-\alpha_{1})}_{\bar{J}}$ & \multirow{2}{*}{$-g \partial^{\mathcal{K}}A_{\mu} \star \lambda \star \Mj $} & \multirow{2}{*}{\eqref{eq: deltaDmuMjtbt7}} & & \\ 
     & $g A_{\mu}^{(\alpha_{3})}\lambda^{(\alpha_{2})} \Phi^{(-\alpha_{2})}_{\bar{J}}$ & & & & \\ \cline{1-5}
    
    %%%%% Bloque 3  
    \multirow{3}{*}{-} & \multirow{2}{*}{$-g \alpha_{2m} \lambda^{(\alpha_{1})}A_{\mu}^{m(0)} \Phi^{(\alpha_{2})}_{\bar{J}}$} & $ig A_{\mu}^{\mathcal{K}} \star \partial_{\mathcal{K}}\lambda  \star \Mj \, +$ & \multirow{2}{*}{\eqref{eq: deltaDmuMjtbt5}} & \multirow{3}{*}{$ig\lambda \star A_{\mu}^{\mathcal{K}} \star \partial_{\mathcal{K}}\Mj$} & \\
     & & $ig A_{\mu}^{\mathcal{K}} \star \lambda  \star \partial_{\mathcal{K}}\Mj \, +$ & & & \\ \cdashline{3-4}
     &$g \alpha_{1m} \lambda^{(\alpha_{2})}A_{\mu}^{m(0)} \Phi^{(\alpha_{1})}_{\bar{J}}$ & $-ig \partial_{\mathcal{K}}\lambda \star A_{\mu}^{\mathcal{K}} \star \Mj$ & \eqref{eq: deltaDmuMjtbt2} &  &\\ \cline{1-5}  
     
    %%%%% Bloque 4
    \multirow{3}{*}{-} & \multirow{2}{*}{$g \alpha_{2m} \lambda^{(\alpha_{1})}A_{\mu}^{(\alpha_{2})} \Phi^{m(0)}_{\bar{J}}$} & $-ig A_{\mu}\star \Hekj \star \partial^{\mathcal{K}}\lambda   \, +$ & \eqref{eq: deltaDmuMjtbt3} & \multirow{3}{*}{$-ig\lambda \star \partial^{\mathcal{K}} A_{\mu} \star \Hekj$} & \\ \cdashline{3-4} 
     & & $-ig \partial^{\mathcal{K}}\lambda \star A_{\mu} \star \Hekj     \, +$ & \multirow{2}{*}{\eqref{eq: deltaDmuMjtbt6}} & & \\
     & $-g \alpha_{1m} \lambda^{(\alpha_{2})}A_{\mu}^{(\alpha_{1})} \Phi^{m(0)}_{\bar{J}}$ & $-ig \lambda \star \partial^{\mathcal{K}}A_{\mu} \star \Hekj$ & & & \\ \hline 



   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%% Bloque 1
   $i \Lambda_{1\mathcal{K}}\lambda^{\mathcal{K}(0)}\partial_{\mu} \Phi^{1}_{\bar{J}}$ & $i \alpha_{3m} \lambda^{m(0)} \partial_{\mu}\Phi^{(\alpha_{3})}_{\bar{J}} $ & $\lambda_{\mathcal{K}} \star \partial^{\mathcal{K}}\partial_{\mu} \Mj $ & \eqref{eq: deltaDmuMjtbt1} & $\lambda_{\mathcal{K}} \star \partial^{\mathcal{K}}\partial_{\mu} \Mj $ & \multirow{6}{*}{\eqref{eq: deltaDmuMjac2}} \\ \cline{1-5}
   
    %%%%% When I add this part, table breaks down.   
    %%%%% Bloque 2
   \multirow{2}{*}{-} & $-g \alpha_{3m} \lambda^{m(0)}A_{\mu}^{(\alpha_{1})} \Phi^{(\alpha_{2})}_{\bar{J}}$ & $ig \lambda^{\mathcal{K}} \star \partial_{\mathcal{K}}A_{\mu} \star \Mj$ & \eqref{eq: deltaDmuMjtbt2} & $ig \lambda_{\mathcal{K}} \star \partial^{\mathcal{K}}A_{\mu} \star \Mj \, + $ & \\ \cdashline{3-4}
   & $g \alpha_{3m} \lambda^{m(0)}A_{\mu}^{(\alpha_{2})} \Phi^{(\alpha_{1})}_{\bar{J}}$ & $ig A_{\mu} \star \lambda_{\mathcal{K}} \star \partial^{\mathcal{K}} \Mj$ & \eqref{eq: deltaDmuMjtbt3} & $ig \lambda_{\mathcal{K}} \star A_{\mu} \star \partial^{\mathcal{K}}\Mj $ & \\ \cline{1-5}
   
   
   %%%%% Bloque 3
  $-g \Lambda_{1\mathcal{K}}\lambda^{\mathcal{K}(0)} \Lambda_{1m}A_{\mu}^{m(0)}  \Phi^{1}_{\bar{J}}$ & $-g \alpha_{3m} \lambda^{m(0)}\alpha_{3\mathcal{K}}A_{\mu}^{\mathcal{K}(0)} \Phi^{(\alpha_{3})}_{\bar{J}}$ & $g A_{\mu}^{\mathcal{K}} \star \lambda_{\mathcal{P}} \star \partial_{\mathcal{K}} \partial^{\mathcal{P}}\Mj$ & \eqref{eq: deltaDmuMjtbt5} & $g \lambda_{\mathcal{K}} \star A_{\mu}^{\mathcal{P}} \star \partial^{\mathcal{K}} \partial_{\mathcal{P}}\Mj$ & \\ \cline{1-5}
  
  
   %%%%% Bloque 4
  $-\sqrt{2} g \Lambda_{1\mathcal{K}}\lambda^{\mathcal{K}(0)} A_{\mu}^{(\alpha_{3})}  \Phi^{4}_{\bar{J}}$ & \multirow{2}{*}{$g \alpha_{3m} \lambda^{m(0)}\alpha_{3\mathcal{K}}A_{\mu}^{(\alpha_{3})} \Phi^{\mathcal{K}(0)}_{\bar{J}}$} & $-g \lambda^{\mathcal{P}} \star \partial^{\mathcal{K}} \partial_{\mathcal{P}}A_{\mu} \star \Hekj \, +$ & \eqref{eq: deltaDmuMjtbt6} & $-g \lambda_{\mathcal{K}} \star \partial^{\mathcal{K}} \partial_{\mathcal{P}}A_{\mu} \star \left(H_{\mathcal{P}\bar{J}} - \eta_{\mathcal{P}\bar{J}}\right) \, + $ &  \\ \cdashline{3-4}
  $-\sqrt{2} g \Lambda_{1\mathcal{K}}\lambda^{\mathcal{K}(0)} A_{\mu}^{(\alpha_{1})} \Phi^{2}_{\bar{J}}$ & & $-g  \partial^{\mathcal{K}} A_{\mu} \star \lambda^{\mathcal{P}} \star \partial_{\mathcal{P}}\Hekj $ & \eqref{eq: deltaDmuMjtbt7} & $-g\lambda_{\mathcal{K}} \star \partial_{\mathcal{P}}A_{\mu} \star \partial^{\mathcal{K}}\left(H_{\mathcal{P}\bar{J}} - \eta_{\mathcal{P}\bar{J}} \right)  $ & \\ \hline

   
   \hline

\end{longtable}
\end{center}
\end{landscape}

\end{document}

There are some references which will make no sense but that is unimportant. The horrendous result is:

A horrible table.

Any clues as to why vertical lines go on to behave like this?

Thank you

7
  • What are the values of \textwidth and \textheight in your document? Alternatively, could you tell us how wide the margins are?
    – Mico
    Commented Sep 5 at 8:54
  • \textwidth = 452.9679 pt and \textheight=975.21193
    – 4815162342
    Commented Sep 5 at 17:14
  • Something would appear to be wildly off in your document setup. It specifies a4paper, for a \paperheight (not \textheight) equal to 297mm. Yet you also report \textheight=975.2pt, or 342.75mm. What's going on?
    – Mico
    Commented Sep 5 at 17:29
  • I checked the width and height with \the\textwidth and \the\textheight, is that not right? :(
    – 4815162342
    Commented Sep 5 at 17:48
  • You've reported, basically, that \textheight is about 45mm larger than \paperheight. That's seriously problematic.
    – Mico
    Commented Sep 5 at 17:50

1 Answer 1

2

Your MWE (Minimal Working Example) is not complete. Missed are some package (amsmath, b1, multirow). Adding them I can I can reproduce your problem and also see, that table is wider than \textheight, consequently it spill out at top of page. This can be fixed by reducing font size in table to small and \tabcolsep for 4pt. After this fix table is fit to one page and your problem disappear:

\documentclass[a4paper, 11pt, oneside]{article}
\usepackage{pdflscape}

\usepackage{longtable}
\usepackage{tabularx}
\usepackage{arydshln}

\usepackage{amsmath}        % <--- missed
\usepackage{bm}             % <--- missed
\usepackage{multirow}       % <--- missed

\newcommand{\Mj}{M_{\bar{J}}}
\newcommand{\Hkj}{H_{\mathcal{K}\bar{J}}}
\newcommand{\Mkj}{M_{\mathcal{K}\bar{J}}}
\newcommand{\Hekj}{\left( \Hkj - \eta_{\mathcal{K}  \bar{J}}\right)}

\begin{document}

\begin{landscape}
\small
\setlength\tabcolsep{4pt}
\setlength\extrarowheight{4pt}
\begin{longtable}{|c|c| c|c| c|c|}

%% Headers and footers

\caption{}
\label{tab: Glue1 }\\
    \hline
\textbf{Terms in} $\bm{\delta D_{\mu}M_{\bar{J}}^{(\Lambda_{1})}}$ & \textbf{Terms in} $\bm{\delta D_{\mu}M_{\bar{J}}^{(\alpha_{3})}}$ & \multicolumn{2}{|c|}{\textbf{in }$\bm{\delta D_{\mu}M_{\bar{J}}}$ \textbf{t.b.t.}} & \multicolumn{2}{|c|}{\textbf{in }$\bm{\delta D_{\mu}M_{\bar{J}}}$ \textbf{a.c.}} \\ \hline
\endfirsthead
  
 \multicolumn{6}{c}%
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\hline  \textbf{Terms in} $\bm{\delta D_{\mu}M_{\bar{J}}^{(\Lambda_{1})}}$ & \textbf{Terms in} $\bm{\delta D_{\mu}M_{\bar{J}}^{(\alpha_{3})}}$ & \multicolumn{2}{|c|}{\textbf{in }$\bm{\delta D_{\mu}M_{\bar{J}}}$ \textbf{t.b.t.}} & \multicolumn{2}{|c|}{\textbf{in }$\bm{\delta D_{\mu}M_{\bar{J}}}$ \textbf{a.c.}} \\ \hline
\endhead
  
\hline \multicolumn{6}{|r|}{{Continued on next page}} \\ %\hline
\endfoot

\hline %\hline
\endlastfoot

   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%% Bloque 1
   \multirow{2}{*}{-} & $i \lambda^{(\alpha_{1})}\partial_{\mu} \Phi^{(\alpha_{2})}_{\bar{J}}$ & \multirow{2}{*}{$i\lambda_{\mathcal{K}} \star \partial_{\mu}\Mj$} & \multirow{2}{*}{\eqref{eq: deltaDmuMjtbt1}} & \multirow{2}{*}{$i\lambda_{\mathcal{K}} \star \partial_{\mu}\Mj$} & \multirow{12}{*}{\eqref{eq: deltaDmuMjac1}} \\
     & $-i \lambda^{(\alpha_{2})}\partial_{\mu} \Phi^{(\alpha_{1})}_{\bar{J}}$ & & & & \\ \cline{1-5}
    
    %%%%% Bloque 2
    \multirow{4}{*}{-} & $-g \lambda^{(\alpha_{1})}A_{\mu}^{(-\alpha_{1})} \Phi^{(\alpha_{3})}_{\bar{J}}$ & \multirow{2}{*}{$g \partial^{\mathcal{K}}\lambda \star A_{\mu} \star \Mj \, +$} & \multirow{2}{*}{\eqref{eq: deltaDmuMjtbt4}} & \multirow{4}{*}{$-g \lambda \star A_{\mu} \star \Mj$} & \\
     & $-g \lambda^{(\alpha_{1})}A_{\mu}^{(-\alpha_{1})} \Phi^{(\alpha_{3})}_{\bar{J}}$ & & & & \\ \cdashline{2-4}
     & $g A_{\mu}^{(\alpha_{3})}\lambda^{(\alpha_{1})} \Phi^{(-\alpha_{1})}_{\bar{J}}$ & \multirow{2}{*}{$-g \partial^{\mathcal{K}}A_{\mu} \star \lambda \star \Mj $} & \multirow{2}{*}{\eqref{eq: deltaDmuMjtbt7}} & & \\ 
     & $g A_{\mu}^{(\alpha_{3})}\lambda^{(\alpha_{2})} \Phi^{(-\alpha_{2})}_{\bar{J}}$ & & & & \\ \cline{1-5}
    
    %%%%% Bloque 3  
    \multirow{3}{*}{-} & \multirow{2}{*}{$-g \alpha_{2m} \lambda^{(\alpha_{1})}A_{\mu}^{m(0)} \Phi^{(\alpha_{2})}_{\bar{J}}$} & $ig A_{\mu}^{\mathcal{K}} \star \partial_{\mathcal{K}}\lambda  \star \Mj \, +$ & \multirow{2}{*}{\eqref{eq: deltaDmuMjtbt5}} & \multirow{3}{*}{$ig\lambda \star A_{\mu}^{\mathcal{K}} \star \partial_{\mathcal{K}}\Mj$} & \\
     & & $ig A_{\mu}^{\mathcal{K}} \star \lambda  \star \partial_{\mathcal{K}}\Mj \, +$ & & & \\ \cdashline{3-4}
     &$g \alpha_{1m} \lambda^{(\alpha_{2})}A_{\mu}^{m(0)} \Phi^{(\alpha_{1})}_{\bar{J}}$ & $-ig \partial_{\mathcal{K}}\lambda \star A_{\mu}^{\mathcal{K}} \star \Mj$ & \eqref{eq: deltaDmuMjtbt2} &  &\\ \cline{1-5}  
     
    %%%%% Bloque 4
    \multirow{3}{*}{-} & \multirow{2}{*}{$g \alpha_{2m} \lambda^{(\alpha_{1})}A_{\mu}^{(\alpha_{2})} \Phi^{m(0)}_{\bar{J}}$} & $-ig A_{\mu}\star \Hekj \star \partial^{\mathcal{K}}\lambda   \, +$ & \eqref{eq: deltaDmuMjtbt3} & \multirow{3}{*}{$-ig\lambda \star \partial^{\mathcal{K}} A_{\mu} \star \Hekj$} & \\ \cdashline{3-4} 
     & & $-ig \partial^{\mathcal{K}}\lambda \star A_{\mu} \star \Hekj     \, +$ & \multirow{2}{*}{\eqref{eq: deltaDmuMjtbt6}} & & \\
     & $-g \alpha_{1m} \lambda^{(\alpha_{2})}A_{\mu}^{(\alpha_{1})} \Phi^{m(0)}_{\bar{J}}$ & $-ig \lambda \star \partial^{\mathcal{K}}A_{\mu} \star \Hekj$ & & & \\ \hline 



   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%% Bloque 1
   $i \Lambda_{1\mathcal{K}}\lambda^{\mathcal{K}(0)}\partial_{\mu} \Phi^{1}_{\bar{J}}$ & $i \alpha_{3m} \lambda^{m(0)} \partial_{\mu}\Phi^{(\alpha_{3})}_{\bar{J}} $ 
        & $\lambda_{\mathcal{K}} \star \partial^{\mathcal{K}}\partial_{\mu} \Mj $ 
            & \eqref{eq: deltaDmuMjtbt1} 
                & $\lambda_{\mathcal{K}} \star \partial^{\mathcal{K}}\partial_{\mu} \Mj $ 
                    & \multirow{6}{*}{\eqref{eq: deltaDmuMjac2}}    % <--- culprit
                        \\ \cline{1-5}
   
    %%%%% When I add this part, table breaks down.   
    %%%%% Bloque 2
   \multirow{2}{*}{-} & $-g \alpha_{3m} \lambda^{m(0)}A_{\mu}^{(\alpha_{1})} \Phi^{(\alpha_{2})}_{\bar{J}}$ & $ig \lambda^{\mathcal{K}} \star \partial_{\mathcal{K}}A_{\mu} \star \Mj$ & \eqref{eq: deltaDmuMjtbt2} & $ig \lambda_{\mathcal{K}} \star \partial^{\mathcal{K}}A_{\mu} \star \Mj \, + $ & \\ \cdashline{3-4}
   & $g \alpha_{3m} \lambda^{m(0)}A_{\mu}^{(\alpha_{2})} \Phi^{(\alpha_{1})}_{\bar{J}}$ & $ig A_{\mu} \star \lambda_{\mathcal{K}} \star \partial^{\mathcal{K}} \Mj$ & \eqref{eq: deltaDmuMjtbt3} & $ig \lambda_{\mathcal{K}} \star A_{\mu} \star \partial^{\mathcal{K}}\Mj $ & \\ \cline{1-5}
   
   
   %%%%% Bloque 3
  $-g \Lambda_{1\mathcal{K}}\lambda^{\mathcal{K}(0)} \Lambda_{1m}A_{\mu}^{m(0)}  \Phi^{1}_{\bar{J}}$ & $-g \alpha_{3m} \lambda^{m(0)}\alpha_{3\mathcal{K}}A_{\mu}^{\mathcal{K}(0)} \Phi^{(\alpha_{3})}_{\bar{J}}$ & $g A_{\mu}^{\mathcal{K}} \star \lambda_{\mathcal{P}} \star \partial_{\mathcal{K}} \partial^{\mathcal{P}}\Mj$ & \eqref{eq: deltaDmuMjtbt5} & $g \lambda_{\mathcal{K}} \star A_{\mu}^{\mathcal{P}} \star \partial^{\mathcal{K}} \partial_{\mathcal{P}}\Mj$ & \\*
  \cline{1-5}
  

   %%%%% Bloque 4
  $-\sqrt{2} g \Lambda_{1\mathcal{K}}\lambda^{\mathcal{K}(0)} A_{\mu}^{(\alpha_{3})}  \Phi^{4}_{\bar{J}}$ 
    & \multirow{2}{*}{$g \alpha_{3m} \lambda^{m(0)}\alpha_{3\mathcal{K}}A_{\mu}^{(\alpha_{3})} \Phi^{\mathcal{K}(0)}_{\bar{J}}$} 
        & $-g \lambda^{\mathcal{P}} \star \partial^{\mathcal{K}} \partial_{\mathcal{P}}A_{\mu} \star \Hekj \, +$ 
            & \eqref{eq: deltaDmuMjtbt6} & $-g \lambda_{\mathcal{K}} \star \partial^{\mathcal{K}} \partial_{\mathcal{P}}A_{\mu} \star \left(H_{\mathcal{P}\bar{J}} - \eta_{\mathcal{P}\bar{J}}\right) \, + $ 
                &  \\ \cdashline{3-4}
  $-\sqrt{2} g \Lambda_{1\mathcal{K}}\lambda^{\mathcal{K}(0)} A_{\mu}^{(\alpha_{1})} \Phi^{2}_{\bar{J}}$ 
    &   
        & $-g  \partial^{\mathcal{K}} A_{\mu} \star \lambda^{\mathcal{P}} \star \partial_{\mathcal{P}}\Hekj $ 
            & \eqref{eq: deltaDmuMjtbt7} 
                & $-g\lambda_{\mathcal{K}} \star \partial_{\mathcal{P}}A_{\mu} \star \partial^{\mathcal{K}}\left(H_{\mathcal{P}\bar{J}} - \eta_{\mathcal{P}\bar{J}} \right) $ 
                    & \\ 
    \hline

\end{longtable}
\end{landscape}

\end{document}}

enter image description here

In your original code the culprit for troubles is use of the \multirow{6}{*}{...} cell. Longtable doesn't allow that it can be split between two pages, consequently it split out of text area at bottom of table.

To my opinion your table doesn't look nice (see above images), nicer result you can get by you use of the longtblr of tabularray package. IN this case table is split between two pages. For it I suggest to table break manually so, that part where is multirow cell which span six rows is on the next page. This is achieved by terminating those rows with \\*:

\documentclass[a4paper, 11pt, oneside]{article}
\usepackage{longtable}
\usepackage{pdflscape}

\usepackage{tabularray}
\UseTblrLibrary{amsmath, booktabs}   
\usepackage{bm}          

\newcommand{\Mj}{M_{\bar{J}}}
\newcommand{\Hkj}{H_{\mathcal{K}\bar{J}}}
\newcommand{\Mkj}{M_{\mathcal{K}\bar{J}}}
\newcommand{\Hekj}{\left( \Hkj - \eta_{\mathcal{K}  \bar{J}}\right)}

\begin{document}
    \begin{landscape}
\begin{longtblr}[
caption = {},
  label = {tab:glue1}
                ]{vlines,
                  colsep  = 4pt,
                  colspec = { *{3}{Q[c, mode=math]} Q[c] Q[c, mode=math] Q[c] },
                  row{1}  = {font=\bfseries, mode=text},
                  rowsep  = 3pt,
                  rowhead = 1
                  }
%% column eaders
    \toprule
Terms in $\bm{\delta D_{\mu}M_{\bar{J}}^{(\Lambda_{1})}}$ 
    &   Terms in $\bm{\delta D_{\mu}M_{\bar{J}}^{(\alpha_{3})}}$ 
        &   \SetCell[c=2]{}   in $\bm{\delta D_{\mu}M_{\bar{J}}}$ t.b.t.
            &   &   \SetCell[c=2]{}   in $\bm{\delta D_{\mu}M_{\bar{J}}}$ a.c.    
                    &   \\
    \midrule
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% Bloque 1
\SetCell[r=2]{} -
    &   i \lambda^{(\alpha_{1})}\partial_{\mu} \Phi^{(\alpha_{2})}_{\bar{J}}
        &   \SetCell[r=2]{} -i\lambda_{\mathcal{K}} \star \partial_{\mu}\Mj 
            &   \SetCell[r=2]{} \eqref{eq: deltaDmuMjtbt1} 
                &   \SetCell[r=2]{} -i\lambda_{\mathcal{K}} \star \partial_{\mu}\Mj
                     &  \SetCell[r=2]{} \eqref{eq: deltaDmuMjac1}              
                        \\
    & -i \lambda^{(\alpha_{2})}\partial_{\mu} \Phi^{(\alpha_{1})}_{\bar{J}} 
        &   &   &   &   \\ 
    \midrule
%%%%% Bloque 2
\SetCell[r=4]{} -
    &   -g \lambda^{(\alpha_{1})}A_{\mu}^{(-\alpha_{1})} \Phi^{(\alpha_{3})}_{\bar{J}}
        &   \SetCell[r=2]{} g \partial^{\mathcal{K}}\lambda \star A_{\mu} \star \Mj \, +
            &   \SetCell[r=2]{} \eqref{eq: deltaDmuMjtbt4}
                &   \SetCell[r=4]{}     -g \lambda \star A_{\mu} \star \Mj
                    &   \\
    &   -g \lambda^{(\alpha_{1})}A_{\mu}^{(-\alpha_{1})} \Phi^{(\alpha_{3})}_{\bar{J}}
        &   &   &   &   \\ 
    \cmidrule[dashed]{2-4}
    &   g A_{\mu}^{(\alpha_{3})}\lambda^{(\alpha_{1})} \Phi^{(-\alpha_{1})}_{\bar{J}}
        &   \SetCell[r=2]{} -g \partial^{\mathcal{K}}A_{\mu} \star \lambda \star \Mj 
            &   \eqref{eq: deltaDmuMjtbt7}
                &   &   \\ 
     &  g A_{\mu}^{(\alpha_{3})}\lambda^{(\alpha_{2})} \Phi^{(-\alpha_{2})}_{\bar{J}}
        &   &   &   &   \\ 
     \midrule
%%%%% Bloque 3  
\SetCell[r=3]{} -
    &   \SetCell[r=2]{} -g \alpha_{2m} \lambda^{(\alpha_{1})}A_{\mu}^{m(0)} \Phi^{(\alpha_{2})}_{\bar{J}}
        &   ig A_{\mu}^{\mathcal{K}} \star \partial_{\mathcal{K}}\lambda  \star \Mj \, +
            &   \SetCell[r=2]{} \eqref{eq: deltaDmuMjtbt5} 
                &   \SetCell[r=3]{} ig\lambda \star A_{\mu}^{\mathcal{K}} \star \partial_{\mathcal{K}}\Mj
                    &   \\
    &   &   ig A_{\mu}^{\mathcal{K}} \star \lambda  \star \partial_{\mathcal{K}}\Mj \, +
            &   &   &   \\ 
     \cmidrulee[dashed]{3-4}
     &  g \alpha_{1m} \lambda^{(\alpha_{2})}A_{\mu}^{m(0)} \Phi^{(\alpha_{1})}_{\bar{J}}
        &   -ig \partial_{\mathcal{K}}\lambda \star A_{\mu}^{\mathcal{K}} \star \Mj
            & \eqref{eq: deltaDmuMjtbt2} 
                &   &   \\ 
     \cline[dashed]{1-5}  
%%%%% Bloque 4
\SetCell[r=3]{} -
    &   \SetCell[r=2]{} g \alpha_{2m} \lambda^{(\alpha_{1})}A_{\mu}^{(\alpha_{2})} \Phi^{m(0)}_{\bar{J}}
        &   -ig A_{\mu}\star \Hekj \star \partial^{\mathcal{K}}\lambda   \, +
            &   \eqref{eq: deltaDmuMjtbt3} 
                &   \SetCell[r=3]{} -ig\lambda \star \partial^{\mathcal{K}} A_{\mu} \star \Hekj
                    &   \\
     \cmidrule{1-5}  
    &   &   -ig \partial^{\mathcal{K}}\lambda \star A_{\mu} \star \Hekj     \, +
            &   \SetCell[r=2]{} \eqref{eq: deltaDmuMjtbt6}
                &    &  \\
     &  -g \alpha_{1m} \lambda^{(\alpha_{2})}A_{\mu}^{(\alpha_{1})} \Phi^{m(0)}_{\bar{J}}
        &   -ig \lambda \star \partial^{\mathcal{K}}A_{\mu} \star \Hekj
            &   &   &   \\ 
     \midrule
     
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% C2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
that it is moved to next page, its rows are terminated by ``*
%%%%% Bloque 1
i \Lambda_{1\mathcal{K}}\lambda^{\mathcal{K}(0)}\partial_{\mu} \Phi^{1}_{\bar{J}}
    &   i \alpha_{3m} \lambda^{m(0)} \partial_{\mu}\Phi^{(\alpha_{3})}_{\bar{J}}
        &   \lambda_{\mathcal{K}} \star \partial^{\mathcal{K}}\partial_{\mu} \Mj 
            &   \eqref{eq: deltaDmuMjtbt1} 
                &   \lambda_{\mathcal{K}} \star \partial^{\mathcal{K}}\partial_{\mu} \Mj
                    &   \SetCell[r=6]{} \eqref{eq: deltaDmuMjac2}   
                        \\*
    \cmidrule{1-5}
    %%%%% When I add this part, table breaks down.   
%%%%% Bloque 2
\SetCell[r=2]{} -
    &   -g \alpha_{3m} \lambda^{m(0)}A_{\mu}^{(\alpha_{1})} \Phi^{(\alpha_{2})}_{\bar{J}}
        &   ig \lambda^{\mathcal{K}} \star \partial_{\mathcal{K}}A_{\mu} \star \Mj
            & \eqref{eq: deltaDmuMjtbt2} 
                &   ig \lambda_{\mathcal{K}} \star \partial^{\mathcal{K}}A_{\mu} \star \Mj \, + 
                    &   \\*
    \cmidrule[dashed]{3-4}
    &   g \alpha_{3m} \lambda^{m(0)}A_{\mu}^{(\alpha_{2})} \Phi^{(\alpha_{1})}_{\bar{J}}
        &   ig A_{\mu} \star \lambda_{\mathcal{K}} \star \partial^{\mathcal{K}} \Mj
            & \eqref{eq: deltaDmuMjtbt3} 
                &   ig \lambda_{\mathcal{K}} \star A_{\mu} \star \partial^{\mathcal{K}}\Mj 
                    &   \\* 
%%%%% Bloque 3
-g \Lambda_{1\mathcal{K}}\lambda^{\mathcal{K}(0)} \Lambda_{1m}A_{\mu}^{m(0)}  \Phi^{1}_{\bar{J}}
    &   -g \alpha_{3m} \lambda^{m(0)}\alpha_{3\mathcal{K}}A_{\mu}^{\mathcal{K}(0)} \Phi^{(\alpha_{3})}_{\bar{J}}
        &   g A_{\mu}^{\mathcal{K}} \star \lambda_{\mathcal{P}} \star \partial_{\mathcal{K}} \partial^{\mathcal{P}}\Mj
            & \eqref{eq: deltaDmuMjtbt5} 
                &   g \lambda_{\mathcal{K}} \star A_{\mu}^{\mathcal{P}} \star \partial^{\mathcal{K}} \partial_{\mathcal{P}}\Mj
                    &   \\*
    \cmidrule{1-5}
%%%%% Bloque 4
-\sqrt{2} g \Lambda_{1\mathcal{K}}\lambda^{\mathcal{K}(0)} A_{\mu}^{(\alpha_{3})}  \Phi^{4}_{\bar{J}}
    &   \SetCell[r=2]{} g \alpha_{3m} \lambda^{m(0)}\alpha_{3\mathcal{K}}A_{\mu}^{(\alpha_{3})} \Phi^{\mathcal{K}(0)}_{\bar{J}}
        &   -g \lambda^{\mathcal{P}} \star \partial^{\mathcal{K}} \partial_{\mathcal{P}}A_{\mu} \star \Hekj \, +
            &   \eqref{eq: deltaDmuMjtbt6} 
                &   -g \lambda_{\mathcal{K}} \star \partial^{\mathcal{K}} \partial_{\mathcal{P}}A_{\mu} \star 
                    \left(H_{\mathcal{P}\bar{J}} - \eta_{\mathcal{P}\bar{J}}\right) \, + 
                    &   \\*
    \cmidrule[dashed]{3-4}
-\sqrt{2} g \Lambda_{1\mathcal{K}}\lambda^{\mathcal{K}(0)} A_{\mu}^{(\alpha_{1})} \Phi^{2}_{\bar{J}} 
    &   &   -g  \partial^{\mathcal{K}} A_{\mu} \star \lambda^{\mathcal{P}} \star \partial_{\mathcal{P}}\Hekj 
            &   \eqref{eq: deltaDmuMjtbt7} 
                &   -g\lambda_{\mathcal{K}} \star \partial_{\mathcal{P}}A_{\mu} \star \partial^{\mathcal{K}}
                    \left(H_{\mathcal{P}\bar{J}} - \eta_{\mathcal{P}\bar{J}} \right) 
                    &   \\ 
    \bottomrule
\end{longtblr}
    \end{landscape}
\end{document}

longtblr

2
  • Thank you so much Zarko. I am sorry I missed those packages. While I do get a "better" result with the additions you made, I still get very strange vertical gaps at the very beginning (just below the headers) and end of the table. I find it confusing because I have several portrait longtables with big multirow cells and they behave just fine at page splitting. I should also mention I kept working on this table and now it is even longer. I will make sure to use longtblr for the final version :-)
    – 4815162342
    Commented Sep 5 at 17:09
  • 1
    I would give attention to the second example where is employed longtable package. It gives far better result than solution using longtable . Also its code is shorter and clearer.😊😊
    – Zarko
    Commented Sep 5 at 17:26

You must log in to answer this question.

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