A am looking for a package or a simple method for typesetting blocks of pseudocode or just pre-formatted text. I know about the multitude of packages for typesetting algorithms, but all I need is a way to control the indentation and line breaks. Being able to mark indented blocks with a vertical line would be nice too (this one is done with algorithm2e):
I do not want to use an extra level of indirection by defining LaTeX commands for all pseudocode terms I am going to use (
\ExtractNextElementFrom, etc), I want to write algorithms as plain nested prose.
It should also be possible to use basic formatting (like emphasis) and math mode inside.
I would also like to be able to strip an equal amount of indentation from all lines (to distinguish source indentation from the layout indentation).
I am currently wondering if I can achieve this with some tabulating environment, or by defining my own environment for inserting an indented block inside another indented block... Is there a better way?