## PREP 2015 Question Authoring - Archived

### Solution Displays ### Re: Solution Displays

by Davide Cervone -
Number of replies: 0
Paul's suggestions, here, are good ones; but I do understand the desire for a list of equalities that have reasons aligned toward the right. Unfortunately, PGML currently doesn't have a table syntax (it needs one), but there are LaTeX environments that could serve your purpose. For example,
BEGIN_PGML
[
\begin{aligned}
P(t)  &= A^2xe^{-Ax} \\
&= A^2(xe^{-Ax}) && \text{First pull out the constant of $A^2$} \\
\\
P'(t) &= A^2\left(x'e^{-Ax}+xe^{-Ax}(-Ax')\right) && \text{Product rule and chain rule} \\
&= A^2\left(e^{-Ax}+xe^{-Ax}(-A)\right) && \text{Since $x' = 1$} \\
&= A^2e^{-Ax}(1-Ax) && \text{Pull out common factor}
\end{aligned}
]
END_PGML

will produce a layout that has equations on the left and explanations on the right. Note the use of \text{} to get the explanations, and also the use of $...$ within the text to get back to math mode.

The downside of this is that the text is not in the same font as the surrounding text. But perhaps the layout is more important.

I've attached an image of the resulting alignment. 