[Tex/LaTex] Increase spacing after minipage

equationsminipagespacing

Hello i am using a line of code to draw 2 equations next to eachother using \minipage{}:

\begin{minipage}{0.5\textwidth}
\small
\begin{equation}\label{e3}
\begin{split}
\frac{\mathrm d x'}{\mathrm d t} &= \frac{\mathrm d x}{\mathrm d t} - \frac{\mathrm d}    {\mathrm d t}(ut)\\
\frac{\mathrm d x'}{\mathrm d t} &= \frac{\mathrm d x}{\mathrm d t} - u \, \frac{\mathrm d}{\mathrm d t}(t)\\
\frac{\mathrm d x'}{\mathrm d t} &= \frac{\mathrm d x}{\mathrm d t} - u \, \frac{\mathrm d t}{\mathrm d t}\\
v' &= v - u
\end{split}
\end{equation}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\small
\begin{equation}\label{e4}
\begin{split}
\frac{\mathrm d x}{\mathrm d t} &= \frac{\mathrm d x'}{\mathrm d t} + \frac{\mathrm d}{\mathrm d t}(ut)\\
\frac{\mathrm d x}{\mathrm d t} &= \frac{\mathrm d x'}{\mathrm d t} + u \, \frac{\mathrm d}{\mathrm d t}(t)\\
\frac{\mathrm d x}{\mathrm d t} &= \frac{\mathrm d x'}{\mathrm d t} + u \, \frac{\mathrm d t}{\mathrm d t}\\
v &= v' + u
\end{split}
\end{equation}
\end{minipage}

After compiling, using PDFLaTeX i get a resulting document which looks like this:
too small spacing after minipage

What can i do to increase vertical spacing after minipage, which is very small? I would also like to know, how can i take care of an annoying \small comand which i have to put inside every \minipage{} for my equations to look smaller? Can it be done in preamble?

Thank you.

Best Answer

Below there's one possible solution; the key ideas were:

  1. I used the solution given in How to keep a constant baselineskip when using minipages (or \parboxes)? to guarantee spacing after the minipages.

  2. Before the minipages I used \smallskip\nointerlinespacing.

  3. I defined a newenvironment sminipage (to apply \small inside minipage); the optional argument (set by default to t) controls the alignment of the minipage and the mandatory argument sets the width of the minipage.

I also made some other modifications to improve your code:

  1. I removed the spurious blank space after the first \end{minipage}.

  2. I defined a \Pder command to facilitate the writing of the partial derivatives.

The idea was to obtain (approximately) the same spacing around the equations inside the minipage as the one used for regular equations not inside a minipage (I added a regular equation environment at the end just for comparison purposes):

    \documentclass{article}
    \usepackage{amsmath}
    \usepackage[nopar]{lipsum}% just to generate text for the example

    \newcommand\Pder[2]{%
      \frac{\mathrm{d}#1}{\mathrm{d}#2}}

    \newenvironment{sminipage}[2][t]
      {\minipage[t]{#2}\small}
      {\endminipage}

    \begin{document}

    \lipsum*[4]\par\smallskip\nointerlineskip
    \noindent\begin{sminipage}[t]{0.5\textwidth}
    \begin{equation}\label{e3}
    \begin{split}
    \Pder{x'}{t} &= \Pder{x}{t} - \Pder{\phantom{x}}{t} (ut) \\
    \Pder{x'}{t} &= \Pder{x}{t} - u\,\Pder{\phantom{x}}{t} (t) \\
    \Pder{x'}{t} &= \Pder{x}{t} - u\,\Pder{t}{t} \\
    v' &= v - u
    \end{split}
    \end{equation}
    \end{sminipage}%
    \begin{sminipage}{0.5\textwidth}
    \begin{equation}\label{e4}
    \begin{split}
    \Pder{x}{t} &= \Pder{x'}{t} - \Pder{\phantom{x}}{t} (ut) \\
    \Pder{x}{t} &= \Pder{x'}{t} - u\,\Pder{\phantom{x}}{t} (t) \\
    \Pder{x}{t} &= \Pder{x'}{t} - u\,\Pder{t}{t} \\
    v &= v' + u
    \end{split}
    \end{equation}\null
    \par\xdef\tpd{\the\prevdepth}
    \end{sminipage}

    \prevdepth\tpd
    \noindent\lipsum[2]
    \begin{equation}
    a=b
    \end{equation}
    \lipsum[4]

    \end{document}

![enter image description here][1]

I defined now (as was requested in a comment) a new environment eqmpage which basically is a top aligned minipage with constant width of \linewidth which automates all the preparations mentioned above:

\documentclass{article}
\usepackage{amsmath}
\usepackage[nopar]{lipsum}% just to generate text for the example

\newcommand\Pder[2]{%
  \frac{\mathrm{d}#1}{\mathrm{d}#2}}

\newenvironment{sminipage}[2][t]
  {\minipage[t]{#2}\small}
  {\endminipage}

\newenvironment{eqmpage}
  {\par\smallskip\nointerlineskip%
    \noindent\minipage[t]{\textwidth}}
  {\par\xdef\tpd{\the\prevdepth}\endminipage\par\prevdepth\tpd}

\begin{document}

\lipsum*[4]

\begin{eqmpage}
\begin{sminipage}[t]{0.5\textwidth}
\begin{equation}\label{e3}
\begin{split}
\Pder{x'}{t} &= \Pder{x}{t} - \Pder{\phantom{x}}{t} (ut) \\
\Pder{x'}{t} &= \Pder{x}{t} - u\,\Pder{\phantom{x}}{t} (t) \\
\Pder{x'}{t} &= \Pder{x}{t} - u\,\Pder{t}{t} \\
v' &= v - u
\end{split}
\end{equation}
\end{sminipage}%
\begin{sminipage}{0.5\textwidth}
\begin{equation}\label{e4}
\begin{split}
\Pder{x}{t} &= \Pder{x'}{t} - \Pder{\phantom{x}}{t} (ut) \\
\Pder{x}{t} &= \Pder{x'}{t} - u\,\Pder{\phantom{x}}{t} (t) \\
\Pder{x}{t} &= \Pder{x'}{t} - u\,\Pder{t}{t} \\
v &= v' + u
\end{split}
\end{equation}\null
\end{sminipage}
\end{eqmpage}
\noindent\lipsum[2]
\begin{equation}
a=b
\end{equation}
\lipsum[4]

\end{document}
Related Question