Hi Ian, ropers wrote on Sun, Jul 07, 2019 at 12:28:37AM +0200:
> And no, don't ask me how much of my weekend I wasted figuring out how > to suppress mandoc's insistence upon two spaces after the 'i.e.' just > because there's a period at the end of a line. Ouch, sorry about that. Actually, it's not a mandoc(1) thing, the behaviour was inherited from groff. But indeed, it doesn't appear to be explained in the mandoc documentation, even though it's a somewhat common trap for the unwary. It was a typical case of someone too familiar with the subject missing an aspect that needs to be explained. Ironically, so far, it was only explained in the groff_man(7) manual page, in the "Zero-width space" list entry. Obviously, no one should have to read that manual page. So, i committed the following fix. The place where this is explained in detail (including an example) is roff(7) because this is really a roff thing and not specific to manual pages. Then again, since the page people are advised to study foremost is mdoc(7), i also put a hint there. It fits well enough below "Delimiters" because this detail is really an example of a delimiter in need of escaping. Thanks for the report, Ingo Log Message: ----------- explain escaping of end-of-sentence characters; missing info reported by Ian <ropers at gmail dot com> on misc@ Modified Files: -------------- mandoc: mdoc.7 roff.7 Revision Data ------------- Index: roff.7 =================================================================== RCS file: /home/cvs/mandoc/mandoc/roff.7,v retrieving revision 1.113 retrieving revision 1.114 diff -Lroff.7 -Lroff.7 -u -p -r1.113 -r1.114 --- roff.7 +++ roff.7 @@ -315,12 +315,18 @@ delimiters The proper spacing is also intelligently preserved if a sentence ends at the boundary of a macro line. .Pp +If an input line happens to end with a period, exclamation or question +mark that isn't the end of a sentence, append a zero-width space +.Pq Sq \e& . +.Pp Examples: .Bd -literal -offset indent -compact Do not end sentences mid-line like this. Instead, end a sentence like this. A macro would end like this: \&.Xr mandoc 1 \&. +An abbreviation at the end of an input line needs escaping, e.g.\e& +like this. .Ed .Sh REQUEST SYNTAX A request or macro line consists of: Index: mdoc.7 =================================================================== RCS file: /home/cvs/mandoc/mandoc/mdoc.7,v retrieving revision 1.278 retrieving revision 1.279 diff -Lmdoc.7 -Lmdoc.7 -u -p -r1.278 -r1.279 --- mdoc.7 +++ mdoc.7 @@ -3005,6 +3005,13 @@ in the same way as a plain .Sq \&| character. Using this predefined string is not recommended in new manuals. +.Pp +Appending a zero-width space +.Pq Sq \e& +to the end of an input line is also useful to prevent the interpretation +of a trailing period, exclamation or question mark as the end of a +sentence, for example when an abbreviation happens to occur +at the end of a text or macro input line. .Ss Font handling In .Nm