0

I am trying to format solutions for an exam paper. enter image description here

Is it possible to remove the padding from the top? The environment this is written in is:

\newenvironment{answer}[1]{%
\begin{solutionordottedlines}[#1]
\begin{minipage}[t][#1]{\textwidth}
}{%
\end{minipage}\end{solutionordottedlines}}

And my code is:

\part[1] initial vertical velocity $\vec{u}_{y}$ of the ball
% 1 mark: case one/two calculation and why
% 1 mark: the implication of them being equal
\begin{answer}{2cm}%

\begin{align} \vec{v}{y}&=\vec{u}{y}+\vec{a}{y}t\ 0&=\vec{u}{y}-9.8\times2.5\ \therefore \vec{u}_{y} &= 9.8\times2.5 = \SI{25.5}{\metre\per\second};\text{up} \end{align} \end{answer}

apathyy
  • 13
  • 2
    Welcome to TeX.SE! Could you extend your code fragments into a small example we can compile please? What document class and packages are you using etc, we can't help without more information. Try adding % comments at the end of the lines in your first fragment, that may help (after \begin{solutionordottedlines}[#1]% and \begin{minipage}[t][#1]{\textwidth}%) – JamesT Aug 30 '23 at 13:04
  • Oh, okay. I'm using the exam package (which to my knowledge is an extension of the article package but for exams). – apathyy Aug 30 '23 at 13:05
  • I think I've figured out a way to balnce out the whitespace at the start of the box but it seems there is a large amount of whitespace at the bottom using the following:
    \usepackage{etoolbox}
    \newcommand{\zerodisplayskips}{%
      \setlength{\abovedisplayskip}{0pt}%
      \setlength{\belowdisplayskip}{0pt}%
      \setlength{\abovedisplayshortskip}{0pt}%
      \setlength{\belowdisplayshortskip}{0pt}}
    \appto{\normalsize}{\zerodisplayskips}
    \appto{\small}{\zerodisplayskips}
    \appto{\footnotesize}{\zerodisplayskips}
    
    – apathyy Aug 30 '23 at 13:07
  • Try with \usepackage{mathtools} with the tag ``\SwapAboveDisplaySkip` – MadyYuvi Aug 30 '23 at 13:28
  • 2
  • It does, thank you! – apathyy Aug 31 '23 at 00:04

0 Answers0