1

I am making a paper for students and I have the following code.

\documentclass{article}
\usepackage{mathtools}
\usepackage{graphicx}

\begin{document}
\begin{enumerate
    \item In the figure, both \(PNO\) and \(ANB\) are straight lines, and \(AN=NB\). Prove that
    \begin{minipage}[t]{0.5\textwidth}
        \begin{tasks}
            \task \(PA=PB,\)
            \task \(\angle PAN = \angle PBN\)
        \end{tasks}
    \end{minipage}\begin{minipage}[t]{0.5\textwidth}
        \includegraphics[scale=1.1]{Circle9.png}
    \end{minipage}
\end{document}

enter image description here

What I wanted to do was make the (a) and (b) on the left and the image on the right but I can't seem to do this, especially with enumerate and task. Any ideas? I don't have to use minipage but I've tried \vspace{-4em} without using minipage but it moves the text below it up. I've also tried \\[-4em] but doesn't push the image up. Any ideas? Thanks

2

Here are two ways: one with minipages, the other within tasks. in the second method, we have to set the figure depth to 0 pt, and have to compensate this with a vertical space to avoid overlapping with the following text.

\documentclass{article}
\usepackage{mathtools}
\usepackage{adjustbox}
\usepackage{tasks}

\begin{document}

\begin{enumerate}
    \item In the figure, both \(PNO\) and \(ANB\) are straight lines, and \(AN=NB\). Prove that \\
          \begin{minipage}[t]{0.5\linewidth}
              \begin{tasks}[item-indent=0pt]
                  \task \(PA=PB,\)
                  \task \(\angle PAN = \angle PBN\)
              \end{tasks}
          \end{minipage}
          \begin{minipage}[t]{0.5\linewidth}
              \raisebox{-\height}[0ex]{ \includegraphics[scale=0.5]{eulercircle-sa}}
          \end{minipage}
    \item In the figure, both \(PNO\) and \(ANB\) are straight lines, and \(AN=NB\). Prove that%
          \begin{tasks}[item-indent=0pt](2)
              \task \(PA=PB,\)
              \task[]\adjustimage{valign=bottom, scale=0.5,raise= -0.9\height, set depth=1.5ex}{eulercircle-sa}
              \task \(\angle PAN = \angle PBN\)
          \end{tasks}
          \vspace{18ex}
    \item In the figure, both \(PNO\) and \(ANB\) are straight lines, and \(AN=NB\). Prove that%
\end{enumerate}

\end{document} 

enter image description here

  • Thanks this is very clear. I like the second method better. – Matthew Tang Dec 27 '16 at 3:39
2
\documentclass{article}
\usepackage{float}
\usepackage{graphicx}
\begin{document}


\begin{minipage}{0.45\textwidth}
\begin{itemize}
\item[a)] \(PA=PB,\)
\item[b)] \(\angle PAN = \angle PBN\)
\end{itemize}
\end{minipage} \hfill 
\begin{minipage}{0.5\textwidth}
\includegraphics[width=3.5in]{cmshcal_responsefunction}
\end{minipage} 

\end{document}

enter image description here

  • Why package float? Why not using package enumitem to do the itemize stuff? – Johannes_B Dec 28 '16 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.