I'm trying to make an environment which indents every line inside a certain amount, and which inserts newlines in between lines automatically. As of right now, I have a command which does this but I have to put it at the front of every line. I'm struggling to make an environment which applies the command to every line automatically. What I'm envisioning is something like a foreach loop, but instead of iterating over a list of numbers, it iterates over each line in an environment? Is this possible?
Thank you!
\obeylinesis defined inplain.tex. This could be adapted as you wish. I don't know that anyone has implemented this for LaTeX. – barbara beeton Mar 26 '20 at 20:06