Fix formatting of nested lists.
Improve display of code in pdf output.