Cfr. <https://github.com/latex3/latex2e/issues/1907#issuecomment-3745256830>

I'm attaching a MWE with the issue reported.
With the code proposed by davidcarlisle everything works fine.

Many thanks in advance,
Domenico

% !TeX TS-program = lualatex
% !TeX encoding = UTF-8 Unicode
% !TeX spellcheck = it_IT
% !TeX root = longtable.tex

\documentclass[b5paper]{memoir}
\usepackage{longtable}

% \ExplSyntaxOn
% \makeatletter
% \def\LT@output{%
%   \ifnum\outputpenalty <-\@Mi
%     \ifnum\outputpenalty > -\LT@end@pen
%       \LT@err{floats~ and~ marginpars~ not~ allowed~ in~ a~ longtable}\@ehc
%     \else
%       \setbox\z@\vbox{\unvbox\@cclv}%
%       \ifdim \ht\LT@lastfoot>\ht\LT@foot
%         \dimen@\pagegoal
%         \advance\dimen@\ht\LT@foot
%         \advance\dimen@-\ht\LT@lastfoot
%         \ifdim\dimen@<\ht\z@
%           \setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vskip 0pt plus \maxdimen minus \normalbaselineskip}%was vss
%           \@makecol
%           \@expl@@@mark@update@singlecol@structures@@
%           \@outputpage
%           \global\vsize\@colroom
%           \setbox\z@\vbox{\box\LT@head}%
%         \fi
%       \fi
%         \unvbox\z@\box\ifvoid\LT@lastfoot\LT@foot\else\LT@lastfoot\fi
%         \UseTaggingSocket{tbl/longtable/foot}
%     \fi
%   \else
%     \setbox\@cclv\vbox{\unvbox\@cclv\copy\LT@foot\vskip 0pt plus \maxdimen minus \normalbaselineskip}% was vss
%     \UseTaggingSocket{tbl/longtable/foot}
%     \@makecol
%     \@expl@@@mark@update@singlecol@structures@@
%     \@outputpage
%       \global\vsize\@colroom
%     \copy\LT@head\nobreak
%   \fi}
% \makeatother
% \ExplSyntaxOff

\begin{document}
\begin{longtable}{llll}
	\caption{Test}\\
	\toprule
	\textbf{b} & \textbf{b} & \textbf{b} & \textbf{b}\\
	\midrule
	\endfirsthead
	\toprule
	\textbf{b} & \textbf{b} & \textbf{b} & \textbf{b}\\
	\midrule
	\endhead
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	\midrule
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	\midrule
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	\midrule
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	\midrule
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	\midrule
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	CC & CC & a & a\\
	\midrule
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	\midrule
	a & a & a & a\\
	& a & a & a\\
	& a & a & a\\
	& a & a & a\\
	\midrule
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	\midrule
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	\midrule
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	a & a & a & a\\
	\bottomrule
\end{longtable}
\end{document}

%%% Local Variables:
%%% coding: utf-8
%%% mode: LaTeX
%%% TeX-engine: luatex
%%% TeX-master: "longtable"
%%% End:
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to