0

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!

push33n
  • 115
  • As a suggestion, create an environment which changes the linespacing to double space, and which modifies the left margin. What you are trying to do sounds unnecessarily complicated. – Kraigolas Mar 26 '20 at 18:08
  • You're right! That does sound like a better way of thinking about it. – push33n Mar 26 '20 at 18:13
  • Here there are a way to format every line as you want, but for your case it would be like use a Rube Goldberg machine, so I agree with the first comment. – Fran Mar 26 '20 at 19:45
  • A command \obeylines is defined in plain.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
  • Welcome to TeX.SX! It would be great if you could show us the command that you have as this will both show what you want (e.g. the amount of indentation), and give people something to start from. Posting a minimal working example that indicates what you are trying to do makes it easier for people to understand what you want and it makes it easier for people to help you. –  Mar 26 '20 at 20:48

0 Answers0