# How to Split Comment over Multiple Lines in Math-mode

In a proof, I want to split the equations on the left and have a picture on the right using minipages. However for one of the equations on the left, the comment is too long and is too big for the minipage. How can I split the comment so that it goes across two lines? I understand it can be done equations, but not sure how to do it for comments. Below is my code and the output:

\documentclass[a4paper, 11pt]{article}
\usepackage{fullpage}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{mathtools,amsthm}

\begin{document}
\begin{proof}~\\
\begin{minipage}{0.5\textwidth}
\begin{align*}
AB = BD, & AC=CE &\qquad &\textrm{(midpoint of a side)}\\
\angle BAC &= \angle DAE&\qquad &\textrm{(common angle)}\\
\frac {AB}{AD} &= \frac {AC}{AE} = \frac 12\\
\angle ABC & = \angle ADE& \qquad &\textrm{(matching $\angle$ 's, $\Delta ABC \sim\Delta ADE$)}\\
\therefore BC &\| DE& \qquad &\textrm{(corresponding $\angle$'s are $=$)}\\
\frac{BC}{DE} &=\frac 12 & \qquad & \textrm{(matching sides in the same ratio,$\Delta ABC \sim\Delta ADE$)}\\
\therefore BC &= \frac 12 DE && \qedhere
\end{align*}
\end{minipage}
\hfill
\begin{minipage}{0.4\textwidth}
\includegraphics[width=0.9\textwidth,keepaspectratio]{proof.PNG}
\end{minipage}
\end{proof}
\end{document}


As in the above diagram, I want to split the comment at the vertical line and place it on the next line aligned with the other comments.

Thanks for any help!

• i'd try using a \parbox for that comment. sorry, i can't test now -- no available latex installation -- but i'll try to do so tomorrow (unless someone else gets here first). by the way, the qed box is in a really peculiar location; i think that \qedhere has probably never been tested inside a minipage. i'll take a look at that too, – barbara beeton Feb 12 '18 at 1:57

Here is another way, using alignat* instead of align*, alignedfor the longest comment, and adjustbox to control the vertical alignment of the image. Note you don't have to load amsmath if you load mathtools. I also slightly simplified your code (needless to add \qquad on each line):

\documentclass[a4paper, 11pt]{article}
\usepackage{fullpage}
\usepackage{showframe}
\renewcommand{\ShowFrameLinethickness} {0.3pt}
\usepackage{amssymb}
\usepackage{mathtools,amsthm}

\begin{document}

\begin{proof}~\\[-3ex]
\begin{minipage}[t]{0.5\textwidth}
\begin{alignat*}{2}
AB = BD&,\; AC=CE & \quad &\textrm{(midpoint of a side)}\\
\angle BAC &= \angle DAE& &\textrm{(common angle)}\\
\frac {AB}{AD} &= \frac {AC}{AE} = \frac 12 & & \\
\therefore \Delta ABC &\sim \Delta ADE&&\textrm{(SAS; 1:2)}\\
\angle ABC & = \angle ADE& &\textrm{(matching $\angle$ 's, $\Delta ABC \sim\Delta ADE$)}\\
\therefore BC &\| DE& &\textrm{(corresponding $\angle$'s are $=$)}\\
\frac{BC}{DE} &=\frac 12 & & \begin{aligned} & \textrm{(matching sides in the same ratio,}\\%
\therefore BC &= \frac 12 DE & & \qedhere
\end{alignat*}
\end{minipage}
\hfill
\begin{minipage}[t]{0.4\textwidth}
\smash{\adjincludegraphics[width=0.9\linewidth,valign = t, raise = -.25\totalheight]{proof.PNG}}
\end{minipage}
\end{proof}

\end{document}


The following solution uses \parbox directives to permit line breaks in three of the explanatory remarks. The width of each \parbox is set to the length of the string (midpoint of a side).

\documentclass[a4paper,11pt,draft]{article} % remove 'draft' in real doc.
\usepackage{fullpage}
\usepackage{amssymb,mathtools,amsthm}

\newlength\mylength
\settowidth\mylength{(midpoint of a side)}
\newcommand{\mybox}[1]{\parbox[t]{\mylength}{\raggedright #1}}

\begin{document}
\begin{proof}~\newline
\begin{minipage}{0.55\textwidth}
\begin{align*}
AB = BD, & AC=CE &\quad &
\text{(midpoint of a side)}\\
\angle BAC &= \angle DAE &&
\text{(common $\angle$)}\\
\frac {AB}{AD} &= \frac {AC}{AE} = \frac 12\\
\therefore \Delta ABC &\sim \Delta ADE &&
\text{(SAS; 1:2)}\\
\angle ABC & = \angle ADE &&
\mybox{(matching $\angle$\,s,
$\Delta ABC \sim\Delta ADE$)}\\
\therefore BC \,&\|\,DE &&
\mybox{(corresponding $\angle$\,s
are $=$)}\\
\frac{BC}{DE} &=\frac 12 &&
\mybox{(matching sides in the same ratio,
$\Delta ABC \sim\Delta ADE$)}\\
\therefore BC &= \frac 12 DE && \qedhere
\end{align*}
\end{minipage}%
\hfill
\begin{minipage}{0.4\textwidth}
\includegraphics[width=\textwidth,keepaspectratio]{proof.PNG}
\end{minipage}
\end{proof}

\end{document}