I have small table where I enter equation (already written in a file). To make the high of the table smaller, I'd like to squeeze the white space above the equation in the table cells more. But all my attempts fail. Here is screen shot
Here is the code
\documentclass[12pt]{article}
\usepackage{breqn}
\usepackage{amssymb,amsmath,amsthm,enumitem}
%\usepackage{array}
\setlength\belowdisplayshortskip{\belowdisplayskip}
%\setlength{\abovedisplayskip}{-3pt}
%\setlength{\belowdisplayskip}{-3pt}
\begin{document}
\begin{tabular}{|p{.6in}|p{5in}|}\hline
ODE&\begin{gather}
\boxed{y^{\prime}-1-2 x=0}
\end{gather}
With initial conditions
$
\begin{aligned}
[y \left(0\right) = 3]
\end{aligned}
$\ \hline
program solution&
\begin{dmath}
y \left(x \right) = x^{2}+x +3
\end{dmath}
Verified OK. \ \hline
Maple solution&\begin{dmath}
y \left(x \right) = x^{2}+x +3
\end{dmath}\ \hline
\end{tabular}
\end{document}
I use lualatex to compile.
How to push these equation up more in order to reduce the overall high of the table? So it shows up something like this (using manual editing)
This way the table is shorter and I can fit more of these on one page. Note that I can't edit the equations themselves as these are already generated externally. I could only edit the table itself and what is around the equations, but not the equations themselves.



alignenvironment at top of page/minipage. – barbara beeton Oct 09 '22 at 21:42