[Tex/LaTex] Too much vertical space before a minipage environment

minipagespacing

How do I get the usual inter-line spacing after "Calculation of the edge length of the octagon" and the contents of the minipage environment? I know how to put the contents of a minipage environment to the left of a TikZ diagram, but I do not insist on using a minipage environment.

\documentclass[10pt]{amsart}
\usepackage{mathtools}

\begin{document}
\noindent \textbf{Calculation of the edge length of the octagon} \\
\noindent \begin{minipage}[t]{4.5in}
\vskip0pt
\noindent \raggedright{The sum of the measures of (interior) angles in the octagon \\
is $(8 - 2)180^{\circ} = 1080^{\circ}$, and so, the measure of the (interior)  \\
angles is $135^{\circ}$. The angles that are supplementary to the \\
(interior) angles of the octagon all have the same measure \\
--- $45^{\circ}$. So, the four right triangles at the corners of the \\
square are isosceles right triangles. If $x$ is the edge length \\
of the octagon,}
\end{minipage}
%
\hspace{-0.25cm}
%
\begin{tikzpicture}[baseline=(current bounding box.north)]

%A regular octagon is drawn.
\draw (0,{3/2-(3/2)*(sqrt(2)-1)}) coordinate (A) -- (0,{3/2+(3/2)*(sqrt(2)-1)}) coordinate (B)
-- ({3/2-(3/2)*(sqrt(2)-1)},3) coordinate (C) -- ({3/2+(3/2)*(sqrt(2)-1)},3) coordinate (D)
--  (3,{3/2+(3/2)*(sqrt(2)-1)}) coordinate (E) -- (3,{3/2-(3/2)*(sqrt(2)-1)}) coordinate (F)
-- ({3/2+(3/2)*(sqrt(2)-1)},0) coordinate (G) -- ({3/2-(3/2)*(sqrt(2)-1)},0) coordinate (H)
-- cycle;

%The vertices of the octagon are typeset.
\node[font=\footnotesize, anchor=east, inner sep=0] at ($(0,{3/2-(3/2)*(sqrt(2)-1)}) +(-0.15,0)$){$A$};
\node[font=\footnotesize, anchor=east, inner sep=0] at ($(0,{3/2+(3/2)*(sqrt(2)-1)}) +(-0.15,0)$){$B$};
\node[font=\footnotesize, anchor=south,inner sep=0] at ($({3/2-(3/2)*(sqrt(2)-1)},3) +(0,0.15)$){$C$};
\node[font=\footnotesize, anchor=south,inner sep=0] at ($({3/2+(3/2)*(sqrt(2)-1)},3) +(0,0.15)$){$D$};
\node[font=\footnotesize, anchor=west,inner sep=0] at ($(3,{3/2+(3/2)*(sqrt(2)-1)}) +(0.15,0)$){$E$};
\node[font=\footnotesize, anchor=west,inner sep=0] at ($(3,{3/2-(3/2)*(sqrt(2)-1)}) +(0.15,0)$){$F$};
\node[font=\footnotesize, anchor=north, inner sep=0] at ($({3/2+(3/2)*(sqrt(2)-1)},0) +(0,-0.15)$){$G$};
\node[font=\footnotesize, anchor=north, inner sep=0] at ($({3/2-(3/2)*(sqrt(2)-1)},0) +(0,-0.15)$){$H$};


%A triangle is inscribed in the octagon.
\draw[dashed] (A) -- (F);
\draw[dashed] (A) -- (C);
\draw[dashed] (C) -- (F);

\node[anchor=north, inner sep=0, font=small, font=\scriptsize] at ($($(A)!0.5!(F)$) +(0,-0.15)$){8};

\end{tikzpicture}
\end{document}

Best Answer

minipages (and \parboxes) are known to have issues with baseline skips. It's easy enough to avoid them in order to obtain what you want (marked B below). If you must use a minipage, then consider adding some \struts without the vertical skips (marked C below). A is the original input provided, while the last set of comparisons shows the similarities between B and C.

enter image description here

\documentclass{article}

\usepackage[margin=1in,landscape]{geometry}

\begin{document}


\noindent
\begin{minipage}[t]{.45\textwidth}
\noindent \textbf{A: Calculation of the edge length of the octagon} \\
\noindent \begin{minipage}[t]{4.5in}
\vskip0pt
\noindent \raggedright{The sum of the measures of (interior) angles in the octagon \\
is $(8 - 2)180^{\circ} = 1080^{\circ}$, and so, the measure of the (interior)  \\
angles is $135^{\circ}$. The angles that are supplementary to the \\
(interior) angles of the octagon all have the same measure \\
--- $45^{\circ}$. So, the four right triangles at the corners of the \\
square are isosceles right triangles. If $x$ is the edge length \\
of the octagon,}
\end{minipage}
\end{minipage}
\hfill
\begin{minipage}[t]{.45\textwidth}
\noindent\textbf{B: Calculation of the edge length of the octagon}

\noindent\raggedright The sum of the measures of (interior) angles in the octagon
is $(8 - 2)180^{\circ} = 1080^{\circ}$, and so, the measure of the (interior)
angles is $135^{\circ}$. The angles that are supplementary to the
(interior) angles of the octagon all have the same measure
--- $45^{\circ}$. So, the four right triangles at the corners of the
square are isosceles right triangles. If~$x$ is the edge length
of the octagon,
\end{minipage}

\bigskip

\noindent
\begin{minipage}[t]{.45\textwidth}
\noindent \textbf{A: Calculation of the edge length of the octagon} \\
\noindent \begin{minipage}[t]{4.5in}
\vskip0pt
\noindent \raggedright{The sum of the measures of (interior) angles in the octagon \\
is $(8 - 2)180^{\circ} = 1080^{\circ}$, and so, the measure of the (interior)  \\
angles is $135^{\circ}$. The angles that are supplementary to the \\
(interior) angles of the octagon all have the same measure \\
--- $45^{\circ}$. So, the four right triangles at the corners of the \\
square are isosceles right triangles. If $x$ is the edge length \\
of the octagon,}
\end{minipage}
\end{minipage}
\hfill
\begin{minipage}[t]{.45\textwidth}
\noindent\strut\textbf{C: Calculation of the edge length of the octagon}

\begin{minipage}[t]{4.5in}
\noindent\strut\raggedright The sum of the measures of (interior) angles in the octagon
is $(8 - 2)180^{\circ} = 1080^{\circ}$, and so, the measure of the (interior)
angles is $135^{\circ}$. The angles that are supplementary to the
(interior) angles of the octagon all have the same measure
--- $45^{\circ}$. So, the four right triangles at the corners of the
square are isosceles right triangles. If~$x$ is the edge length
of the octagon,
\end{minipage}
\end{minipage}

\bigskip

\noindent
\begin{minipage}[t]{.45\textwidth}
\noindent\textbf{B: Calculation of the edge length of the octagon}

\noindent\raggedright The sum of the measures of (interior) angles in the octagon
is $(8 - 2)180^{\circ} = 1080^{\circ}$, and so, the measure of the (interior)
angles is $135^{\circ}$. The angles that are supplementary to the
(interior) angles of the octagon all have the same measure
--- $45^{\circ}$. So, the four right triangles at the corners of the
square are isosceles right triangles. If~$x$ is the edge length
of the octagon,
\end{minipage}
\hfill
\begin{minipage}[t]{.45\textwidth}
\noindent\strut\textbf{C: Calculation of the edge length of the octagon}

\begin{minipage}[t]{4.5in}
\noindent\strut\raggedright The sum of the measures of (interior) angles in the octagon
is $(8 - 2)180^{\circ} = 1080^{\circ}$, and so, the measure of the (interior)
angles is $135^{\circ}$. The angles that are supplementary to the
(interior) angles of the octagon all have the same measure
--- $45^{\circ}$. So, the four right triangles at the corners of the
square are isosceles right triangles. If~$x$ is the edge length
of the octagon,
\end{minipage}
\end{minipage}

\end{document}

A drawback of using minipages is that it doesn't break across the page boundary since the content is boxed.

Related Question