9
votes
2answers
166 views

Any way to show LaTeX example code *and* execute it? [duplicate]

In (La)TeX documentation and tutorials, it is common to show a snippet of code next to the output it generates. It might be two minipages side by side, or a code listing followed by boxed output, or ...
7
votes
1answer
197 views

How to output math environment code alongside typeset math?

I have a preamble which defines lots of symbols and a LaTeX document for testing them. In particular, I have source like this: \[\wlength{abc} = 3\] \[\lang{A} = \lang{\varphi}\] \[\kplus{L} \defeq ...
6
votes
1answer
290 views

LaTeX documentation with verbatim environment

I am trying to document some LaTeX macros concerning marginals. I think a good way for the documentation would be the LaTeX code on the verso page and the output on the recto page. So I came up with ...