I came across an astonishing piece of text, which is called "Beautiful Code, Compelling Evidence" by J. R. Heard. I was wondering if there is a package or something that allows me to present my code similar to how J. R. Heard presented his code.
I would like line numbering though, but I figured first I need to find what he used to create a formatting like this. Note: the code is Haskell, but I would like to use it for pseudocode.
PS: it would be ideal if line numbering can be done after the vertical line. But I was also wondering whether it is possible to literally fix the width of the left column.
An example from his amazing work is shown below:
Thanks for your time and effort to help me!
Best Answer
I didn't use the Haskell highlighting offered by
listings
, because it highlights too many words (like List, etc.) which are not highlighted in the example.Adapting Martin Scharrer's answer to a similar question one can obtain a simpler version: