From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (mandoc.bsd.lv [local]) by mandoc.bsd.lv (OpenSMTPD) with ESMTPA id 8444d905 for ; Mon, 15 Jul 2019 14:21:00 -0500 (EST) Date: Mon, 15 Jul 2019 14:21:00 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: explain escaping of end-of-sentence characters; missing info X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: <862a05c48097f3d6@mandoc.bsd.lv> Log Message: ----------- explain escaping of end-of-sentence characters; missing info reported by Ian 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 -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv