Closed DanGrayson closed 3 years ago
Try:
importFrom_Core {"separateM2output"}
beginDocumentation()
s = "\ni1 : 4 * 4\n\no1 = 16\n\ni2 : 12 + 16;\n\ni3 : 11\n\no3 = 11\n\ni4 : \n"
document { Key => "foo", TABLE flatten {"class" => "examples", TR \ TD \ PRE \ separateM2output s} };
help foo
Maybe separateM2output would need to be renamed into something and exported, but this doesn't seem like a common enough occurrence to make it worth that.
Perhaps this should also be added here: https://github.com/Macaulay2/M2/blob/1e47260755100936bafd60d64013672dedd3941f/M2/Macaulay2/packages/SimpleDoc.m2#L246-L248
There should be a way to generate canned examples, which duplicates the internal method for making examples in documentation, namely this:
The point is to get those nice lines between the individual input/output triples, as in