3 ms·
The issue is less that git treats every paragraph as a single line, and more that git treats every line as a single line and they've put the paragraphs onto one
by jdpage 13y ago
The issue is less that git treats every paragraph as a single line, and more that git treats every line as a single line and they've put the paragraphs onto one line. It turns out that LaTeX actually looks for a double line break between paragraphs, and you can insert single line breaks into paragraphs without having them appear in the output.
So what you actually want to do is put a line break after every sentence and possibly after every clause, so that in the LaTeX source diffs work sanely, while the output looks as normal.
- Stwerp 13y agoI'd argue that what you want to do is write English language as you're accustomed. Paragraphs with multiple sentence in a single line. What you'd like Git (or whatever your diff'ing program) to do is parse the individual sentences as individual lines for version control. To each his own though. I have trained myself to start putting LaTeX sentences on separate lines to accomodate for this, but don't think that this is the best solution.
- VikingCoder 13y agoYou also want to write English, as you normally write English. It'd be nice to have an intermediate step that turned your LaTeX into a canonical form that works well with Git. And then when you are about to edit, converts it back into a nice-looking 80-column text file, or whatever you prefer.