Beautiful layout of the marked-up source of a document Below is my explanation for why it is better to have many line feeds, at appropriate places, in the markup source of a document that is likely to be edited by multiple people over a long period of time. Editing: the words By "editing" I mean the mechanical activity of adding, deleting, changing, and rearranging words and symbols in a computer file. Most people waste an enormous amount of time with inefficient editing. This is primarily due to wasting a tiny amount of time, or imposing a small cognitive burden, during each transaction. When that happens a few times in the course of editing a document, then it hardy matters. But when the document will exist for a long time, and be edited many times by multiple people, then those small burdens collectively add up to something significant. What causes these small wasted times and small thought burdens? My answer is: needing to carefully navigate to a particular location in a block of text. In other words, using a mouse. (Or needing to use the arrow keys or repeatedly jumping along words or letters if you use an editor like vi.) Having to accurately point the mouse at a particular location is both a cognitive burden and a time sink. Same for having to switch between the mouse and keyboard. Let's explore this idea by examining what actually happens when you edit. Consider the following objectives: Delete or replace one sentence Rearrange some sentences Delete or replace one word Delete or replace a phrase Delete or replace one clause in a compound sentence Split a compound sentence into two sentences Move a paragraph to another location You accomplish those with a combination of the following actions: 1. Select one line 2. Select several consecutive lines 3. Select one word 4. Select several consecutive words in the middle of a line 5. Search for a word or phrase 6. Cut/copy/paste/replace a selection Think about what your fingers do as you perform those actions. If you have been editing for a long time, and you are skillful with your editing program, then the first three selection activities are very fast, and you can do them with a small number of keystrokes. Even if you use your mouse to do them, it is fast because you don't need to point accurately and you don't need to click and drag: just click reasonably close to what you want, and then multiple click the right number of times. The 6th action is also fast with the keyboard. (If you do those with a mouse then you are wasting a lot of time and also giving yourself a headache from all the careful pointing and clicking. Learn the keyboard shortcuts.) The 4th action, selecting consecutive words inside a line, is the one you want to do as infrequently as possible. That is why it is helpful to start a sentence on a new line, start a new line after punctuation, put parenthetic comments on their own line, etc. Doing that is unlikely to disturb the 5th action: searching. If you look back at the list of objectives, and you agree that those are common editing activities, then it should seem reasonable that suitable structured text source will make that editing easier. And if line feeds generally occur only after punctuation, searching for phrases will still be possible. Editing: the markup The above discussion has some impact on the layout of the markup. For example, a PreTeXt paragraph should be marked up like this:
First sentence. Second sentence.
The point being shown is that the opening and closing "p" tags should be on separate lines from the text in the paragraph. Otherwise, deleting or rearranging those sentences is burdensome. Similarly, the "ol" or "ul" tags should be on their own line. If a list is just a bunch of small items, then it is fine to use one line for each item: