From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: explain escaping of end-of-sentence characters; missing info
Date: Mon, 15 Jul 2019 14:21:00 -0500 (EST) [thread overview]
Message-ID: <862a05c48097f3d6@mandoc.bsd.lv> (raw)
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
reply other threads:[~2019-07-15 19:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=862a05c48097f3d6@mandoc.bsd.lv \
--to=schwarze@mandoc.bsd.lv \
--cc=source@mandoc.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).