Five lemma, ASCII art, and Unicode
A few days ago I wrote about creating ASCII art in Emacs using ditaa. Out of curiosity, I wanted to try making the Five Lemma diagram. [1]
The examples in the ditaa site all have arrows between boxes, but you don't have to have boxes.
Here's the ditaa source:
Aa ---> Aa ---> Aa ---> Aaf ---> Aa| | | | | | fa | fa | fa | faf | fa | | | | | v v v v v Ba ---> Ba ---> Ba ---> Baf ---> Ba
and here's the image it produces:
It's not pretty. You could make a nicer image with LaTeX. But as the old saying goes, the remarkable thing about a dancing bear is not that it dances well but that it dances at all.
The trick to getting the subscripts is to use Unicode characters 0x208n for subscript n. As I noted at the bottom of this post, ditaa isn't strictly limited to ASCII art. You can use Unicode characters as well. You may or may not be able to see the subscripts in the source code they are not part of the most widely supported set of characters.
* * *
[1] The Five Lemma is a diagram-chasing result from homological algebra. It lets you infer properties the middle function f from properties of the other f's.