I write some introductory system administration notes for my students.
Some text and some lines of verbatim Unix commands, repeatedly.
I disabled indentation of text paragraphs following
How to disable automatic indentation on new paragraphs?
and set an indentation for the verbatim parts following
How can I indent verbatim blocks?
using verbatim package and redefining \verbatim@processline .
This was a quick hack that worked, now the explaining text starts to the left of verbatim commands.
However, on the long run, it would be nice to have indentation for longer paragraphs. Is there a way to do this? Longer as in at least two lines long.
\noindentwhere you don't want that, changing the setting automatically for short paragraphs is tricky unless you change the markup so that each paragraph text is the argument to some command, so that you can test setting on one line, and if it doesn't fit, re-typeset as a paragraph. (This is exactly what the standard\captiondoes) But evaluating the text twice has other problems, you need to be careful with counters and cross references, to ensure that things don't get incremented twice. – David Carlisle Sep 21 '15 at 13:54