1

I have a TikZ diagram to the right of a minipage environment. I have some text that I want under the minipage environment. The interline spacing is about half of the other interline spacing.

I don't insist on using a minipage here. I just want the appropriate typesetting.

\documentclass{amsart}
\usepackage{mathtools}

\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{calc,intersections}

\usepackage{pgfplots}
\pgfplotsset{compat=1.11}

\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in} \setlength{\textwidth}{6.1in}
\setlength{\topmargin}{0.0in} \setlength{\textheight}{9in}


\begin{document}



\noindent \begin{minipage}[t]{4.875in}
\noindent \raggedright{\textbf{1.) }The following figure depicts three congruent semicircles bounded by another \\
semicircle; the diameters of the three smaller semicircles cover the diameter of \\
the bigger semicircle, and each of the three smaller semicircles is tangent to \\
two other semicircles at the endpoints of its diameter. \textit{A} is the area of \\
of the region enclosed by the three smaller semicircles and \textit{B} is the area}
\end{minipage}
%
\hspace{-0.25cm}
%
\raisebox{0mm}[0mm][0mm]
{
\begin{tikzpicture}[baseline=(current bounding box.north west)]

\coordinate (O) at (0,0);
\draw[fill=blue!50] (-1.5,0) -- (1.5,0) arc (0:180:1.5) -- cycle;
%
\draw[fill=yellow] (-3/2,0) -- (-1/2,0) arc (0:180:1/2) -- cycle;
\draw[fill=yellow] (-1/2,0) -- (1/2,0) arc (0:180:1/2) -- cycle;
\draw[fill=yellow] (1/2,0) -- (3/2,0) arc (0:180:1/2) -- cycle;

\draw[fill] (O) circle (1.5pt);


\end{tikzpicture}
} \\
the region enclosed by the big semicircle but outside the three smaller semicircles. Compute the ratio of $A : B$.


\end{document}
1

2 Answers 2

2

You want to look at How to keep a constant baselineskip when using minipages (or \parboxes)? but there's a much better alternative:

\documentclass{amsart}
\usepackage{mathtools}

\usepackage{wrapfig}

\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{calc,intersections}

\usepackage{pgfplots}
\pgfplotsset{compat=1.11}

\setlength{\oddsidemargin}{0.0in}
\setlength{\evensidemargin}{0.0in} \setlength{\textwidth}{6.1in}
\setlength{\topmargin}{0.0in} \setlength{\textheight}{9in}


\begin{document}

\noindent
\begin{minipage}[t]{4.875in}\raggedright
\textbf{1.)} The following figure depicts three congruent semicircles 
bounded by another semicircle; the diameters of the three smaller 
semicircles cover the diameter of the bigger semicircle, and each of 
the three smaller semicircles is tangent to two other semicircles at 
the endpoints of its diameter. $A$ is the area of of the region 
enclosed by the three smaller semicircles and $B$ is the area\par
\xdef\tpd{\the\prevdepth}
\end{minipage}\hfill
\raisebox{0mm}[0mm][0mm]{%
  \begin{tikzpicture}[baseline=(current bounding box.north west)]

  \coordinate (O) at (0,0);
  \draw[fill=blue!50] (-1.5,0) -- (1.5,0) arc (0:180:1.5) -- cycle;
  %
  \draw[fill=yellow] (-3/2,0) -- (-1/2,0) arc (0:180:1/2) -- cycle;
  \draw[fill=yellow] (-1/2,0) -- (1/2,0) arc (0:180:1/2) -- cycle;
  \draw[fill=yellow] (1/2,0) -- (3/2,0) arc (0:180:1/2) -- cycle;

  \draw[fill] (O) circle (1.5pt);
  \end{tikzpicture}
}

\prevdepth=\tpd
\noindent
the region enclosed by the big semicircle but outside the three smaller 
semicircles. Compute the ratio of $A : B$.

\bigskip

\begin{wrapfigure}[4]{r}{3.2cm}
  \vspace{-\baselineskip}
  \begin{tikzpicture}[baseline=(current bounding box.south west)]

  \coordinate (O) at (0,0);
  \draw[fill=blue!50] (-1.5,0) -- (1.5,0) arc (0:180:1.5) -- cycle;
  %
  \draw[fill=yellow] (-3/2,0) -- (-1/2,0) arc (0:180:1/2) -- cycle;
  \draw[fill=yellow] (-1/2,0) -- (1/2,0) arc (0:180:1/2) -- cycle;
  \draw[fill=yellow] (1/2,0) -- (3/2,0) arc (0:180:1/2) -- cycle;

  \draw[fill] (O) circle (1.5pt);
  \end{tikzpicture}
\end{wrapfigure}
\noindent
\textbf{1.)} The following figure depicts three congruent semicircles 
bounded by another semicircle; the diameters of the three smaller 
semicircles cover the diameter of the bigger semicircle, and each of 
the three smaller semicircles is tangent to two other semicircles at 
the endpoints of its diameter. $A$ is the area of of the region 
enclosed by the three smaller semicircles and $B$ is the area
the region enclosed by the big semicircle but outside the three smaller 
semicircles. Compute the ratio of $A : B$.

\end{document}

enter image description here

8
  • I am looking at your first display. The interline spacing is correct ... but now I would like "two" to be typeset on the fourth line and "the region" to be typeset on the fifth line. Commented Dec 17, 2018 at 23:20
  • What does \par\xdef\tpd{\the\prevdepth} instruct LaTeX to do? Commented Dec 17, 2018 at 23:21
  • @AgalnamedDesire Did you read the linked question and answer? I would never alternate ragged right (with manual breaking) for a text such as this. The first way is as wrong as it can be, I added it just for showing the method for preserving the baseline skip.
    – egreg
    Commented Dec 17, 2018 at 23:22
  • What is the difference between using \raggedright and manual line breaking? Commented Dec 17, 2018 at 23:27
  • I will look at your explanation in the link now. Commented Dec 17, 2018 at 23:27
1

it is not very clear to me what you like to obtain. see, if the my guessing is close to your goal:

enter image description here

for above result i use the wrapfig package:

\documentclass[dvipsname]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc, intersections}

\usepackage{wrapfig}

\begin{document}
\begin{wrapfigure}{r}{0.25\textwidth}
    \begin{tikzpicture}
\draw[fill=blue!50] (-1.5,0) -- (1.5,0) arc (0:180:1.5) -- cycle;
%
\draw[fill=yellow] (-3/2,0) -- (-1/2,0) arc (0:180:1/2) -- cycle;
\draw[fill=yellow] (-1/2,0) -- (1/2,0) arc (0:180:1/2) -- cycle;
\draw[fill=yellow] (1/2,0) -- (3/2,0) arc (0:180:1/2) -- cycle;

\draw[fill] (0,0) circle (1.5pt);
    \end{tikzpicture}
\end{wrapfigure}
\noindent\textbf{1.)}
The following figure depicts three congruent semicircles bounded by another
semicircle; the diameters of the three smaller semicircles cover the diameter 
of the bigger semicircle, and each of the three smaller semicircles is tangent 
to two other semicircles at the endpoints of its diameter. $A$ is the area of
of the region enclosed by the three smaller semicircles and $B} is the area
the region enclosed by the big semicircle but outside the three smaller 
semicircles. Compute the ratio of $A : B$.
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .