4
votes
1answer
59 views

Tabular in dtx documentation

How to make table in .dtx documentation with vertical bars? % \begin{tabular}{c|c} % |sf| & \emph{mathsf}\\ % \end{tabular} fails, because |foo| is magic for verbatim.
10
votes
2answers
421 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
246 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
362 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 ...