In the exam document class, how to use EnvUplevel for solution that spans multiple pages? Here is my code. (It works perfectly if the solution is within a page) (I am using page size a5)
\documentclass[answers]{exam}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
% \Aboxed in the following
\usepackage{mathtools}
% page size
\usepackage{geometry}
\geometry{
papersize={140mm,210mm},
twoside=True,
inner=15mm,
outer=15mm,
bindingoffset=7mm,
top=20mm,
bottom=22.5mm
}
\extrawidth{.5in}
\header{\oddeven{}{\thepage}}%
{{\small 18MAT41 - Jan/Feb 2021}}%
{\oddeven{\thepage}{}}
\footer{}{{\small Visit entuition.org to unlock all QRs}}{}
\begin{document}
\begin{questions}
% Question 1
% \renewcommand{\thequestion}{5}
\question
\begin{parts}
% Question 1a
\part
Show that $w = \log z$, $z \neq 0$ is analytic and hence find $\displaystyle{dw \over dz}$.
% Solution 1a
\begin{EnvUplevel}
\begin{TheSolution}
Given,
[w = \log z \tag{1}]
We know,
[ z = r e^{i \theta} ]
Substituting $z$ in (1),
\begin{align}
w &= \log ( r e^{i \theta}) \
w &= \log r + \log e^{i \theta} \
w &= \log r + i \theta \tag{2}
\end{align}
We know,
[ w = u+ iv \tag{3}]
Comparing (2) and (3),
\begin{align}
u &= \log r & v &= \theta
\end{align}
Partially differentiate with respect to $r$,
\begin{align}
u_r &= {1 \over r} & v_r &= 0 \tag{4}
\end{align}
Partially differentiate with respect to $\theta$,
\begin{align}
u_{\theta} &= 0 & v_{\theta} &= 1 \tag{5}
\end{align}
We know CR equations are,
\begin{align}
r u_r &= v_{\theta} \
r v_r &= -u_{\theta}
\end{align}
From (4) and (5),
\begin{align}
r u_r &= r \cdot {1 \over r} = 1 = v_\theta \
r v_r &= r \cdot 0 = 0 = -u_\theta
\end{align}
The CR equations are satisfied. Hence $w = \log z$ is analytic.\
We know,
[{dw \over dz} = e^{-i \theta}(u_r + iv_r)]
Substituting $u_r$ and $v_r$ from (4),
\begin{align}
{dw \over dz} &= e^{-i \theta} \left( {1 \over r} + i , 0 \right) \
{dw \over dz} &= {1 \over re^{i \theta}} \
\Aboxed{{dw \over dz} &= {1 \over z}}
\end{align}
\end{TheSolution}
\end{EnvUplevel}
\end{parts}
\end{questions}
\end{document}