How to write a verbatim form of an equation on the left and its output form on the right inside a box?
Asked
Active
Viewed 114 times
2
1 Answers
8
With tcolorbox and the listings library you can show the verbatim form of your equation.
you have just to add listing side text in the option of tcblisting environment
\documentclass{article}
\usepackage{tcolorbox}
\tcbuselibrary{listings}
\begin{document}
\begin{tcblisting}{listing side text}
\[f(x)=\frac{1}{\ln x - x^2}\]
\end{tcblisting}
\end{document}
to obtain

Salim Bou
- 17,021
- 2
- 31
- 76
\documentclass{...}and ending with\end{document}. As well, I think that this has been asked before, but I'm unable to find the other post now... – yo' Nov 01 '14 at 15:35