Home » Questions » Computers [ Ask a new question ]

How do I manage newlines in Latex?

How do I manage newlines in Latex?

So, maybe I missed something completely when I started using Latex, but I have a difficult managing newlines in the Latex source. I have to put hard returns at the end of lines because even powerful editors like Emacs or Vim don't seem to manage that (at least out of the box).

Asked by: Guest | Views: 300
Total answers/comments: 2
bert [Entry]

I'm not certain I understand what you are asking, but it is possible that longlines-mode in emacs will gve you the behavior that you want.
bert [Entry]

"For me, LaTeX source is, well, source. I got accustomed to cut lines at ""logical points"" (after punctuation, keep a phrase together on a line, ...). It helped me to catch errors like ""an dog"" or ""a animal"" or even ""the the phrase"". Splitting the text this way, and using indentation to reflect structure, makes longer text source much more readable. It also makes much editing of the text be shuffling lines around, and editors have good commands for that.

Later I came to use version control heavily, and there having changes be mostly lines added/deleted wholesale, not a full paragraph replaced just because a word was added to a line, becomes essential when the text (and its history) grow.

For the same reason you don't fill your C code, don't fill LaTeX."