Some of the Macaulay2 documentation is written in this format.
i1 : ///-- We can compute $(x+y)^3$ as follows.
R = QQ[x,y]
(x+y)^3
///
o1 = -- We can compute $(x+y)^3$ as follows.
R = QQ[x,y]
(x+y)^3
|
i2 : tutorial oo
+-----------+
o2 = {We can compute $(x+y)^3$ as follows., |R = QQ[x,y]|}
+-----------+
|(x+y)^3 |
+-----------+
o2 : List
|
i3 : peek oo
o3 = {TEX{"We can compute $(x+y)^3$ as follows."}, TABLE{class => examples,
------------------------------------------------------------------------
TR{TD{ExampleItem{"R = QQ[x,y]"}}}, TR{TD{ExampleItem{"(x+y)^3"}}}}}
|