Skip to content
Snippets Groups Projects
Unverified Commit bae515dc authored by mirabilos's avatar mirabilos Committed by mirabilos
Browse files

add glue for tabu to work with longtable from bookworm/sid

parent 3b7bc1c0
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,61 @@
\let\f@nch@setoffs\fancy@setoffs%
\fi%
% tabu vs. longtable compatibility glue
\@ifpackagelater{longtable}{2020/01/08}{%
\PackageWarning{teckids2style}{%
longtable newer than v4.13, applying\MessageBreak LT gbox hack%
}%
%
% https://github.com/tabu-issues-for-future-maintainer/tabu/issues/26
%
\def\tabuendlongtrial{%
\LT@echunk \global\setbox\LT@gbox \hbox{\unhbox\LT@gbox}\kern\wd\LT@gbox
\LT@get@widths
}%
}{}%
\@ifpackagelater{longtable}{2021/04/18}{}{%
\PackageWarning{teckids2style}{%
longtable older than v4.15, applying\MessageBreak underfull vbox hack%
}%
%
% bugfix for "Underfull \vbox (badness 10000) detected" of longtable / longtabu, see:
% https://tex.stackexchange.com/a/71121
%
\def\LT@start{%
\let\LT@start\endgraf
\endgraf\penalty\z@\vskip\LTpre
\dimen@\pagetotal
\advance\dimen@ \ht\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi
\advance\dimen@ \dp\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi
\advance\dimen@ \ht\LT@foot
\edef\restore@vbadness{\vbadness\the\vbadness\relax}% (added)
\vbadness=\@M% (added)
\dimen@ii\vfuzz
\vfuzz\maxdimen
\setbox\tw@\copy\z@
\setbox\tw@\vsplit\tw@ to \ht\@arstrutbox
\setbox\tw@\vbox{\unvbox\tw@}%
\vfuzz\dimen@ii
\restore@vbadness% (added)
\advance\dimen@ \ht
\ifdim\ht\@arstrutbox>\ht\tw@\@arstrutbox\else\tw@\fi
\advance\dimen@\dp
\ifdim\dp\@arstrutbox>\dp\tw@\@arstrutbox\else\tw@\fi
\advance\dimen@ -\pagegoal
\ifdim \dimen@>\z@\vfil\break\fi
\global\@colroom\@colht
\ifvoid\LT@foot\else
\advance\vsize-\ht\LT@foot
\global\advance\@colroom-\ht\LT@foot
\dimen@\pagegoal\advance\dimen@-\ht\LT@foot\pagegoal\dimen@
\maxdepth\z@
\fi
\ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak
\output{\LT@output}%
}%
}%
\definecolor{teckidsorangedark}{HTML}{FF6600}%
\definecolor{teckidsorangelight}{HTML}{FF9955}%
\definecolor{teckidsbluegradientlight}{HTML}{00CBFA}%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment