source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: explain escaping of end-of-sentence characters; missing info
@ 2019-07-15 19:21 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-07-15 19:21 UTC (permalink / raw)
  To: source

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
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-15 19:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-15 19:21 mandoc: explain escaping of end-of-sentence characters; missing info schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).