add tag
Anonymous 8536
I use this code
```
\documentclass[11pt,a4paper]{article}
\usepackage[hmargin=1.7cm, vmargin={1.8cm,1.7cm}]{geometry}
\usepackage{ninecolors}
\usepackage{tabularray}
\UseTblrLibrary{amsmath, booktabs, counter,
	diagbox, siunitx,  varwidth}
\usepackage{tasks}
\sisetup{output-decimal-marker={,}}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage{amsmath}
\newcommand{\hackequation}[1]{%
	\unskip\vspace{0.5\abovedisplayskip}\newline
	\makebox[\linewidth]{$\displaystyle#1$}\vspace{0.5\belowdisplayskip}%
}

\newcommand{\hackequationnumber}[1]{%
	\unskip\vspace{0.5\abovedisplayskip}\newline
	\parbox{\linewidth}{%
		\setlength{\abovedisplayshortskip}{0pt}%
		\setlength{\belowdisplayshortskip}{0pt}%
		\noindent\begin{equation}#1\end{equation}%
	}\vspace{0.5\belowdisplayskip}%
}

\newcounter{prob}
\newcounter{subprob}

\NewTableCommand\firstsubproblem[1]{\SetRow{bg=gray9}%
	\SetCell[r=#1]{h, cmd={\setcounter{subprob}{0}\stepcounter{prob}\theprob~\stepcounter{subprob}\alph{subprob})}, bg=white}}
\NewTableCommand\subproblem[1]{\SetRow{bg=gray9}%
	\SetCell[r=#1]{h, cmd={\theprob~\stepcounter{subprob}\alph{subprob})}, bg=white}}
\NewTableCommand\problem[1]{\setcounter{subprob}{0}\SetRow{bg=gray9}%
	\SetCell[r=#1]{h, cmd={\stepcounter{prob}\theprob}, bg=white}}

\begin{document}
	\begin{longtblr}[
		caption={A longtable, 2024 --2025}]{hlines, vlines,
			colspec = {Q[c,h,font=\bfseries] 
				X[h, preto=\begin{minipage}{\linewidth}, appto=\end{minipage}] 
				Q[c, si={table-format=1.2}]},
			cell{2-Z}{1} = {cmd=\the\numexpr\arabic{rownum}-1},
			row{1} = {c, bg=yellow9, font=\bfseries, mode=text},
			rowsep = 5pt,
			hspan=minimal,
			rowhead = 1,
		}
Order & \centering Contents   & Points    \\

\problem{4} &    Problem with 4 lines    &  \textbf{0,6}  \\
& The first & \num{0.2} \\ 
& The second & \num{0.2} \\
& The thirt & \num{0.2}  \\

\problem{3}

&  This is an equation
$\hackequation{y=\dfrac{x^2 + 3x + 2}{x+3}.}$   &  \textbf{0,6}  \\
& The first & \num{0.2} \\ 
& The second & \num{0.2} \\

\problem{4}	&  This is an equation with label $\hackequationnumber{y=f(x) = x^3 + 3x^2 + 1}$ at the point $x = -1$. &  \textbf{0,8}  \\
& The first & \num{0.2} \\ 
& The second & \num{0.2} \\
& The thirt & \num{0.2}  \\

\firstsubproblem{4} &  The first subproblem  & \textbf{0,6} \\
& The first & \num{0.2} \\ 
& The second & \num{0.2} \\
& The thirt & \num{0.2}  \\
\subproblem{4} & The second subproblem &  \textbf{0,6} \\
& The first & \num{0.2} \\ 
& The second & \num{0.2} \\
& The thirt & \num{0.2}  \\
\subproblem{4} & The second subproblem &  \textbf{0,6} \\
& The first & \num{0.2} \\ 
& The second & \num{0.2} \\
& The thirt & \num{0.2}  \\
\problem{4}	&  This is an equation with label $\hackequationnumber{y=f(x) = x^3 + 3x^2 + 1}$ at the point $x = -1$. &  \textbf{0,8}  \\
& The first & \num{0.2} \\ 
& The second & \num{0.2} \\
& The thirt & \num{0.2}  \\
\end{longtblr} 
\end{document}
 
```
I get
![image.png](/image?hash=354ebd4061f2e32cc6c7b4d027a3dd68cf54a36edbda187c61a411abf533a2de)

It seems there is a large white space at the end of the table. How can I make the blank space smaller? 

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.