aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-07-15 19:20:30 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-07-15 19:20:30 +0000
commita1ad72824dd4e1389339062d26170a255f62f29d (patch)
tree6c7282722af6e2c90d573cd9418b43ea4de77556
parent67dcc2e5b969bc3dc00fcdd852cb6fd4ed9a2107 (diff)
downloadmandoc-a1ad72824dd4e1389339062d26170a255f62f29d.tar.gz
mandoc-a1ad72824dd4e1389339062d26170a255f62f29d.tar.zst
mandoc-a1ad72824dd4e1389339062d26170a255f62f29d.zip
explain escaping of end-of-sentence characters;
missing info reported by Ian <ropers at gmail dot com> on misc@
-rw-r--r--mdoc.711
-rw-r--r--roff.710
2 files changed, 17 insertions, 4 deletions
diff --git a/mdoc.7 b/mdoc.7
index 40e4ca84..deca4ba8 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -1,4 +1,4 @@
-.\" $Id: mdoc.7,v 1.278 2019/04/24 13:15:00 schwarze Exp $
+.\" $Id: mdoc.7,v 1.279 2019/07/15 19:20:30 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010, 2011, 2013-2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: April 24 2019 $
+.Dd $Mdocdate: July 15 2019 $
.Dt MDOC 7
.Os
.Sh NAME
@@ -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
diff --git a/roff.7 b/roff.7
index 108e62d9..f129750b 100644
--- a/roff.7
+++ b/roff.7
@@ -1,4 +1,4 @@
-.\" $Id: roff.7,v 1.113 2019/07/01 23:30:16 schwarze Exp $
+.\" $Id: roff.7,v 1.114 2019/07/15 19:20:30 schwarze Exp $
.\"
.\" Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010-2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: July 1 2019 $
+.Dd $Mdocdate: July 15 2019 $
.Dt ROFF 7
.Os
.Sh NAME
@@ -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: