I'm writing a document where I have many code blocks like so:
\begin{align}
d = \sqrt{ (x'-x)^2 }
\end{align}
\begin{minted}{latex}
d = \sqrt{ (x'-x)^2 }
\end{minted}
So the first line renders the latex code, and the second shows the source. Is there any way of wrapping this whole thing in its own environment? For example, it would look like:
\begin{eqnexample}
d = \sqrt{ (x'-x)^2 }
\end{eqnexample}
Thoughts?

