2

I am trying to set a document similar to the formatting below enter image description here

Immediately below is my MWE using wrapfig package to attain the above.

\documentclass[10pt]{article}
\usepackage[portrait, a5paper, hmargin=0.75in,
  vmargin={0.88in, 0.94in}]{geometry}
\usepackage{amsmath, float, lettrine, pgfplots, wrapfig}
\pgfplotsset{compat=1.18, enlargelimits, axis lines=none,
  xtick=\empty, ytick=\empty}

\begin{document}
% Figure 6
\begin{wrapfigure}{r}{0.5\textwidth}
    \centering
    \vspace{-2.5cm}
    \pgfplotsset{width=1.36\linewidth}
    \begin{tikzpicture}[font=\small]
        \newcommand\R{1} 
        \newcommand\thet{30} 
        \begin{axis}[
            axis equal=true,
            xmin={\R * cos(180 - \thet)},xmax={\R * cos(\thet)},
            ymin={\R * sin(\thet)},ymax={\R/sin(\thet)}]    

            \addplot [black,domain = {\thet}:{5*\thet}, samples=201,
            ] ({\R * cos(x)}, {\R * sin(x)});

            \draw[-] ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)}) -- ({\R *
                    cos(\thet)}, {\R * sin(\thet)});
            \draw[-] ({\R * cos(\thet)}, {\R * sin(\thet)}) -- (0, {\R});
            \draw[-] (0, {\R}) -- ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)});
            \draw[-] ({\R * cos(180 -\thet)}, {\R * sin(180 - \thet)}) -- (0,
                    {\R/cos(2*\thet)});
            \draw[-] (0, {\R/sin(\thet)}) -- ({\R * cos(\thet)}, {\R * sin(\thet)});
            \draw[-] ({\R * tan(\thet)}, {\R}) -- ({\R * tan(180 - \thet)}, {\R});

            \node [anchor=north] at ({\R * cos(180 - \thet)}, {\R * sin(180 -
                    \thet)}) {A};
            \node [anchor=north] at (0, {\R}) {B};
            \node [anchor=north] at ({\R * cos(\thet)}, {\R * sin(\thet)}) {C};
            \node [anchor=south] at (0, {\R / sin(\thet)}) {E};
            \node [anchor=east] at ({\R * tan(180 - \thet)}, {\R}) {F};
            \node [anchor=west] at ({\R * tan(\thet)}, {\R}) {G};
        \end{axis}
    \end{tikzpicture}
    \vspace{-0.5mm}
    \lettrine[lines=1, loversize=-0.5]{\small F}{ig.} {\small 6}
\end{wrapfigure}

\vspace*{1.5cm}

II.\ $\triangle FEG > \frac{1}{2} \triangle ABC$, 
\\ 
where $ABC$ is the greatest triangle in the segment.

% Figure 7
\begin{wrapfigure}{r}{0.5\textwidth}
    \centering
    \vspace{-4.4cm}
    \pgfplotsset{width=1.36\linewidth}
    \begin{tikzpicture}[font=\small]
        \newcommand\R{1}
        \newcommand\thet{30}
        \begin{axis}[axis equal=true,
            xmin={\R * cos(180 - \thet)},xmax={\R * cos(\thet)},
            ymin={\R * sin(\thet)},ymax={\R}]   

            \addplot [black, domain = {\thet}:{5*\thet}, samples=201,
            ] ({\R * cos(x)}, {\R * sin(x)});

            \draw[-] ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)}) -- ({\R *
                    cos(\thet)}, {\R * sin(\thet)});
            \draw[-] ({\R * cos(\thet)}, {\R * sin(\thet)}) -- (0, {\R});
            \draw[-] (0, {\R}) -- ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)});

            \node [anchor=north] at ({\R * cos(180 - \thet)}, {\R * sin(180 -
                    \thet)}) {A};
            \node [anchor=south] at (0, {\R}) {B};
            \node [anchor=north] at ({\R * cos(\thet)}, {\R * sin(\thet)}) {C};
        \end{axis}
    \end{tikzpicture}
    \vspace{-1mm}
    \lettrine[lines=1, loversize=-0.5]{\small F}{ig.} {\small 7}
\end{wrapfigure}

%\vspace{2.7cm}
\vspace{5.5cm}

III.\ $\frac{\text{segment }ACB}{\triangle ACB} > \frac{4}{3}$, provided the
segment is less than the semi-circle.
\\
This theorem had already been given by Hero.

% Figure 8
\begin{wrapfigure}{r}{0.5\textwidth}
    \centering
    \vspace{-4.4cm}
    \pgfplotsset{width=1.36\linewidth}
    \begin{tikzpicture}[font=\small]
        \newcommand\R{1}
        \newcommand\thet{30}
        \begin{axis}[axis equal=true,
            xmin={\R * cos(180 - \thet)},xmax={\R * cos(\thet)},
            ymin={\R * sin(\thet)},ymax={\R/sin(\thet)}]    

            \addplot [black, domain = {\thet}:{5*\thet}, samples=201,
            ] ({\R * cos(x)}, {\R * sin(x)});

            \draw[-] ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)}) -- ({\R *
                    cos(\thet)}, {\R * sin(\thet)});
            \draw[-] ({\R * cos(\thet)}, {\R * sin(\thet)}) -- (0, {\R/sin(\thet)});
            \draw[-] (0, {\R/cos(2*\thet)}) -- ({\R * cos(180 -\thet)}, {\R *
                    sin(180 - \thet)});

            \node [anchor=north] at ({\R * cos(180 - \thet)}, {\R * sin(180 -
                    \thet)}) {A};
            \node [anchor=south] at (0, {\R}) {B};
            \node [anchor=north] at ({\R * cos(\thet)}, {\R * sin(\thet)}) {C};
            \node [anchor=south] at (0, {\R / sin(\thet)}) {T};
        \end{axis}
    \end{tikzpicture}
    \lettrine[lines=1, loversize=-0.5]{\small F}{ig.} {\small 8}
\end{wrapfigure}

\vspace{2cm}

IV.\  $\frac{\text{segment }ACB}{\triangle ATC} < \frac{2}{3}$.
\end{document}

Instead, I am having trouble with placement of figures generated. This is what I end up with the MWE. enter image description here

What is the fix for this formatting? Any help is greatly appreciated. Thank you.

2
  • 2
    Don't use wrapfigure for this. Instead I'd use 6 minipage environments.
    – Skillmon
    Commented Sep 5 at 9:32
  • @Skillmon, would it be possible to give a MWE with the minipage environment?
    – bhache
    Commented Sep 5 at 9:36

2 Answers 2

3

The following places your contents without the need of wrapfig or any manual \vspaces using just a bunch of minipage environments. I didn't take a closer look on any of your other code, this is just about the placement.

\documentclass[10pt]{article}

\usepackage[portrait, a5paper, hmargin=0.75in,
  vmargin={0.88in, 0.94in}]{geometry}
\usepackage{amsmath, lettrine, pgfplots}
\pgfplotsset{compat=1.18, enlargelimits, axis lines=none,
  xtick=\empty, ytick=\empty}

\begin{document}
% Figure 6
\noindent
\begin{minipage}{.48\linewidth}
  II.\ $\triangle FEG > \frac{1}{2} \triangle ABC$,
  \\
  where $ABC$ is the greatest triangle in the segment.
\end{minipage}\hfill
\begin{minipage}{0.48\textwidth}
    \centering
    \pgfplotsset{width=1.36\linewidth}
    \begin{tikzpicture}[font=\small]
        \newcommand\R{1}
        \newcommand\thet{30}
        \begin{axis}[
            axis equal=true,
            xmin={\R * cos(180 - \thet)},xmax={\R * cos(\thet)},
            ymin={\R * sin(\thet)},ymax={\R/sin(\thet)}]

            \addplot [black,domain = {\thet}:{5*\thet}, samples=201,
            ] ({\R * cos(x)}, {\R * sin(x)});

            \draw[-] ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)}) -- ({\R *
                    cos(\thet)}, {\R * sin(\thet)});
            \draw[-] ({\R * cos(\thet)}, {\R * sin(\thet)}) -- (0, {\R});
            \draw[-] (0, {\R}) -- ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)});
            \draw[-] ({\R * cos(180 -\thet)}, {\R * sin(180 - \thet)}) -- (0,
                    {\R/cos(2*\thet)});
            \draw[-] (0, {\R/sin(\thet)}) -- ({\R * cos(\thet)}, {\R * sin(\thet)});
            \draw[-] ({\R * tan(\thet)}, {\R}) -- ({\R * tan(180 - \thet)}, {\R});

            \node [anchor=north] at ({\R * cos(180 - \thet)}, {\R * sin(180 -
                    \thet)}) {A};
            \node [anchor=north] at (0, {\R}) {B};
            \node [anchor=north] at ({\R * cos(\thet)}, {\R * sin(\thet)}) {C};
            \node [anchor=south] at (0, {\R / sin(\thet)}) {E};
            \node [anchor=east] at ({\R * tan(180 - \thet)}, {\R}) {F};
            \node [anchor=west] at ({\R * tan(\thet)}, {\R}) {G};
        \end{axis}
    \end{tikzpicture}
    \lettrine[lines=1, loversize=-0.5]{\small F}{ig.} {\small 6}
\end{minipage}

\noindent
\begin{minipage}{.48\linewidth}
  III.\ $\frac{\text{segment }ACB}{\triangle ACB} > \frac{4}{3}$, provided the
  segment is less than the semi-circle.
  \\
  This theorem had already been given by Hero.
\end{minipage}\hfill
% Figure 7
\begin{minipage}{0.48\textwidth}
    \centering
    \pgfplotsset{width=1.36\linewidth}
    \begin{tikzpicture}[font=\small]
        \newcommand\R{1}
        \newcommand\thet{30}
        \begin{axis}[axis equal=true,
            xmin={\R * cos(180 - \thet)},xmax={\R * cos(\thet)},
            ymin={\R * sin(\thet)},ymax={\R}]

            \addplot [black, domain = {\thet}:{5*\thet}, samples=201,
            ] ({\R * cos(x)}, {\R * sin(x)});

            \draw[-] ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)}) -- ({\R *
                    cos(\thet)}, {\R * sin(\thet)});
            \draw[-] ({\R * cos(\thet)}, {\R * sin(\thet)}) -- (0, {\R});
            \draw[-] (0, {\R}) -- ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)});

            \node [anchor=north] at ({\R * cos(180 - \thet)}, {\R * sin(180 -
                    \thet)}) {A};
            \node [anchor=south] at (0, {\R}) {B};
            \node [anchor=north] at ({\R * cos(\thet)}, {\R * sin(\thet)}) {C};
        \end{axis}
    \end{tikzpicture}
    \lettrine[lines=1, loversize=-0.5]{\small F}{ig.} {\small 7}
\end{minipage}

\noindent
\begin{minipage}{.48\linewidth}
  IV.\  $\frac{\text{segment }ACB}{\triangle ATC} < \frac{2}{3}$.
\end{minipage}\hfill
% Figure 8
\begin{minipage}{0.48\linewidth}
    \centering
    \pgfplotsset{width=1.36\linewidth}
    \begin{tikzpicture}[font=\small]
        \newcommand\R{1}
        \newcommand\thet{30}
        \begin{axis}[axis equal=true,
            xmin={\R * cos(180 - \thet)},xmax={\R * cos(\thet)},
            ymin={\R * sin(\thet)},ymax={\R/sin(\thet)}]

            \addplot [black, domain = {\thet}:{5*\thet}, samples=201,
            ] ({\R * cos(x)}, {\R * sin(x)});

            \draw[-] ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)}) -- ({\R *
                    cos(\thet)}, {\R * sin(\thet)});
            \draw[-] ({\R * cos(\thet)}, {\R * sin(\thet)}) -- (0, {\R/sin(\thet)});
            \draw[-] (0, {\R/cos(2*\thet)}) -- ({\R * cos(180 -\thet)}, {\R *
                    sin(180 - \thet)});

            \node [anchor=north] at ({\R * cos(180 - \thet)}, {\R * sin(180 -
                    \thet)}) {A};
            \node [anchor=south] at (0, {\R}) {B};
            \node [anchor=north] at ({\R * cos(\thet)}, {\R * sin(\thet)}) {C};
            \node [anchor=south] at (0, {\R / sin(\thet)}) {T};
        \end{axis}
    \end{tikzpicture}
    \lettrine[lines=1, loversize=-0.5]{\small F}{ig.} {\small 8}
\end{minipage}
\end{document}

enter image description here

1
  • Thanks a lot for typing up the answer @Skillmon. Makes it way easier without the manual vspace refinements.
    – bhache
    Commented Sep 5 at 10:46
2

I'm not sure why this works, but taking inspiration from this post, this is the output I get. enter image description here

The idea is to wrap all three figures within one wrapfigure environment.

\documentclass[10pt]{article}
\usepackage[portrait, a5paper, hmargin=0.75in,
  vmargin={0.88in, 0.94in}]{geometry}
\usepackage{amsmath, float, lettrine, pgfplots, wrapfig}
\pgfplotsset{compat=1.18, enlargelimits, axis lines=none,
  xtick=\empty, ytick=\empty}

\begin{document}
% Figure 6
\begin{wrapfigure}{r}{0.5\textwidth}
  \centering
  \vspace{-2.5cm}
  \pgfplotsset{width=1.36\linewidth}
  \begin{tikzpicture}[font=\small]
    \newcommand\R{1}
    \newcommand\thet{30}
    \begin{axis}[
        axis equal=true,
        xmin={\R * cos(180 - \thet)},xmax={\R * cos(\thet)},
        ymin={\R * sin(\thet)},ymax={\R/sin(\thet)}]

      \addplot [black,domain = {\thet}:{5*\thet}, samples=201,
      ] ({\R * cos(x)}, {\R * sin(x)});

      \draw[-] ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)}) -- ({\R *
          cos(\thet)}, {\R * sin(\thet)});
      \draw[-] ({\R * cos(\thet)}, {\R * sin(\thet)}) -- (0, {\R});
      \draw[-] (0, {\R}) -- ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)});
      \draw[-] ({\R * cos(180 -\thet)}, {\R * sin(180 - \thet)}) -- (0,
      {\R/cos(2*\thet)});
      \draw[-] (0, {\R/sin(\thet)}) -- ({\R * cos(\thet)}, {\R * sin(\thet)});
      \draw[-] ({\R * tan(\thet)}, {\R}) -- ({\R * tan(180 - \thet)}, {\R});

      \node [anchor=north] at ({\R * cos(180 - \thet)}, {\R * sin(180 -
          \thet)}) {A};
      \node [anchor=north] at (0, {\R}) {B};
      \node [anchor=north] at ({\R * cos(\thet)}, {\R * sin(\thet)}) {C};
      \node [anchor=south] at (0, {\R / sin(\thet)}) {E};
      \node [anchor=east] at ({\R * tan(180 - \thet)}, {\R}) {F};
      \node [anchor=west] at ({\R * tan(\thet)}, {\R}) {G};
    \end{axis}
  \end{tikzpicture}
  \vspace{-0.5mm}
  \lettrine[lines=1, loversize=-0.5]{\small F}{ig.} {\small 6}
  \bigskip
  % Figure 7
  \vspace{1.5cm}
  \pgfplotsset{width=1.36\linewidth}
  \begin{tikzpicture}[font=\small]
    \newcommand\R{1}
    \newcommand\thet{30}
    \begin{axis}[axis equal=true,
        xmin={\R * cos(180 - \thet)},xmax={\R * cos(\thet)},
        ymin={\R * sin(\thet)},ymax={\R}]

      \addplot [black, domain = {\thet}:{5*\thet}, samples=201,
      ] ({\R * cos(x)}, {\R * sin(x)});

      \draw[-] ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)}) -- ({\R *
          cos(\thet)}, {\R * sin(\thet)});
      \draw[-] ({\R * cos(\thet)}, {\R * sin(\thet)}) -- (0, {\R});
      \draw[-] (0, {\R}) -- ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)});

      \node [anchor=north] at ({\R * cos(180 - \thet)}, {\R * sin(180 -
          \thet)}) {A};
      \node [anchor=south] at (0, {\R}) {B};
      \node [anchor=north] at ({\R * cos(\thet)}, {\R * sin(\thet)}) {C};
    \end{axis}
  \end{tikzpicture}
  \vspace{-1mm}
  \lettrine[lines=1, loversize=-0.5]{\small F}{ig.} {\small 7}
  \bigskip
  % Figure 8
  \vspace{1.5cm}
  \pgfplotsset{width=1.36\linewidth}
  \begin{tikzpicture}[font=\small]
    \newcommand\R{1}
    \newcommand\thet{30}
    \begin{axis}[axis equal=true,
        xmin={\R * cos(180 - \thet)},xmax={\R * cos(\thet)},
        ymin={\R * sin(\thet)},ymax={\R/sin(\thet)}]

      \addplot [black, domain = {\thet}:{5*\thet}, samples=201,
      ] ({\R * cos(x)}, {\R * sin(x)});

      \draw[-] ({\R * cos(180 - \thet)}, {\R * sin(180 - \thet)}) -- ({\R *
          cos(\thet)}, {\R * sin(\thet)});
      \draw[-] ({\R * cos(\thet)}, {\R * sin(\thet)}) -- (0, {\R/sin(\thet)});
      \draw[-] (0, {\R/cos(2*\thet)}) -- ({\R * cos(180 -\thet)}, {\R *
          sin(180 - \thet)});

      \node [anchor=north] at ({\R * cos(180 - \thet)}, {\R * sin(180 -
          \thet)}) {A};
      \node [anchor=south] at (0, {\R}) {B};
      \node [anchor=north] at ({\R * cos(\thet)}, {\R * sin(\thet)}) {C};
      \node [anchor=south] at (0, {\R / sin(\thet)}) {T};
    \end{axis}
  \end{tikzpicture}
  \lettrine[lines=1, loversize=-0.5]{\small F}{ig.} {\small 8}
\end{wrapfigure}

\vspace*{1.0cm}

II.\ $\triangle FEG > \frac{1}{2} \triangle ABC$,
\\
where $ABC$ is the greatest triangle in the segment.

\vspace{4.75cm}

III.\ $\frac{\text{segment }ACB}{\triangle ACB} > \frac{4}{3}$, provided the
segment is less than the semi-circle.
\\
This theorem had already been given by Hero.

\vspace{4cm}

IV.\  $\frac{\text{segment }ACB}{\triangle ATC} < \frac{2}{3}$.
\end{document}
New contributor
MPa is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
0

You must log in to answer this question.

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