1

When working in tex files, I follow the rule

One sentence per line

because I think this gives the best diff sets using version control systems (usually mercurial or git) so that one can best see the changes of yourself and others to the file.

Anyway, many of my collaborators follow the rule

break lines after 80 characters

usually because their emacs or vi makes this best to read on screen (and because they are used to do so from the good old days).

I currently believe that, whichever editor people use, it should be possible to have lines displayed however people prefer without introducing newline characters in the source. In particular, one should not force collaborators to also stick to the personally preferred line length by using newline characters.

So my question is:

Are there good reasons for restricting lines to 80 characters when editing tex-files, and introducing newlines to not pass that limit?

This is clearly a soft question and I have not actually checked if this is appropriate to ask here. The reason I do so is that this problem occurs (for me) only when interacting with collaborators on tex files, so I consider it to be very specific to latex collaboration.

  • Two things come to mind: SyncTeX and typesetting sources themselves. On the former: SyncTeX is line-based so having very long lines can be unhelpful. On the latter, this is probably only an issue to package authors but if you try to typeset your code and the lines are longer than about 80 chars they don't fit. Neither of these things feel like answers to me ... – Joseph Wright Oct 25 '16 at 10:58
  • Concerning SyncTeX: I agree if one would keep writing into a single line. But having lines breaking regularly, I wouldn't consider this a problem (and I do use it constantly and it perfectly works). Concerning the typesetting sources: I agree that the "code" should be properly indented (and I have no problems restricting there to 80 characters). I only mean the plain text part with some minor inline math. – Christian Oct 25 '16 at 11:04
  • I don't like "pure" one sentence per line approach, because the auto-wrap feature does not necessarily break the line at the optimal place (if a break needs to occur). So my compromise, when I am not in a typing frenzy, is this: I manually break lines, but sentence continuation lines are indented 2 (or x) spaces. All sentences begin on a new line. – Steven B. Segletes Oct 25 '16 at 11:20