Hi,

Stuart Henderson wrote on Sat, Sep 26, 2015 at 10:14:46AM +0100:
> On 2015/09/25 21:12, Michael Reed wrote:

>> Sentences should start on a new line; not sure if it makes a
>> difference in mandoc's output, but it's done in the vast majority
>> of manuals (perhaps a stylistic choice).

Right now, it is mostly a stylistic choice; but note that having
a uniform style in the source code makes life easier for people
working with the source code, in particular reviewing and editing.

[ Talking about new line versus two spaces in the input ]
> It doesn't make a difference in output,

That is true, at least right now.

However, it does make a difference in the parse tree.  When an input
line ends with punctuation ending a sentence, the last parse tree
node on the line gets an end-of-sentence flag set.  I just committed
a diff that lets you see the flag in -Ttree output.

Right now, the only thing that is done with that flag is increasing
inter-sentence spacing in formatted terminal, PostScript, and PDF
output.  However, it would easily be possible to disable that
additional spacing if somebody wants french spacing (not implemented
right now to avoid feature bloat), while adding two spaces to the
input line after the end of the sentence and starting the next
sentence on the same line unconditionally forces the two spaces.

Besides, if search tools would not just report "this word occurs
in this page" but also "this word occurs in this sentence of this
page", that flag would make it easy to implement.  Not a very
pressing feature, but not inconceivable that something like that
might happen at some point in the future.

So the difference is a bit like the difference between "Fl x"
and "Sy \-x":  Semantic vs. physical markup, "this is a command
line option" versus "prepend a traditional minus sign and use
bold font", "this is the end of a sentence" versus "put two
blank characters here".

> but it reduces the amount of reformatting done when changes are made,
> so it often makes diffs easier to read.

Indeed.

Yours,
  Ingo

Reply via email to