aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc.7
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-10-23 13:54:41 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-10-23 13:54:41 +0000
commit3264df2aa9d46dd6abdbbceeab5b618fd13c8618 (patch)
treec7e161c9d8127c75434d36ea2cd30b5af68e88e0 /mdoc.7
parentb4f225d167b4188b17b3dccbf60d7aa392514fa2 (diff)
downloadmandoc-3264df2aa9d46dd6abdbbceeab5b618fd13c8618.tar.gz
mandoc-3264df2aa9d46dd6abdbbceeab5b618fd13c8618.tar.zst
mandoc-3264df2aa9d46dd6abdbbceeab5b618fd13c8618.zip
Modernize documentation of .Ao and .Aq.
I looked through our whole tree and failed to find a single use that is really convincing, except those with .Mt. Putting it around character and key names is somewhat widespread and maybe acceptable, even if hardly useful. So for now, delete the bogus examples and explain what these macros are really used for. Discourage the most common abuses. Triggered by a question from Raf Czlonka <rczlonka at gmail dot com>.
Diffstat (limited to 'mdoc.7')
-rw-r--r--mdoc.758
1 files changed, 41 insertions, 17 deletions
diff --git a/mdoc.7 b/mdoc.7
index 5a1863c8..1efd8cf0 100644
--- a/mdoc.7
+++ b/mdoc.7
@@ -1,4 +1,4 @@
-.\" $Id: mdoc.7,v 1.269 2017/07/20 16:24:53 schwarze Exp $
+.\" $Id: mdoc.7,v 1.270 2017/10/23 13:54:41 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010, 2011, 2013-2017 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 20 2017 $
+.Dd $Mdocdate: October 23 2017 $
.Dt MDOC 7
.Os
.Sh NAME
@@ -674,12 +674,10 @@ Examples:
.Ss \&Ao
Begin a block enclosed by angle brackets.
Does not have any head arguments.
-.Pp
-Examples:
-.Dl \&.Fl -key= \&Ns \&Ao \&Ar val \&Ac
-.Pp
-See also
-.Sx \&Aq .
+This macro is almost never useful.
+See
+.Sx \&Aq
+for more details.
.Ss \&Ap
Inserts an apostrophe without any surrounding whitespace.
This is generally used as a grammatical device when referring to the verb
@@ -689,19 +687,45 @@ Examples:
.Dl \&.Fn execve \&Ap d
.Ss \&Aq
Encloses its arguments in angle brackets.
+The only important use case is for email addresses.
+See
+.Sx \&Mt
+for an example.
.Pp
-Examples:
-.Dl \&.Fl -key= \&Ns \&Aq \&Ar val
+Occasionally, it is used for names of characters and keys, for example:
+.Bd -literal -offset indent
+Press the
+\&.Aq escape
+key to ...
+.Ed
.Pp
-.Em Remarks :
-this macro is often abused for rendering URIs, which should instead use
+For URIs, use
.Sx \&Lk
+instead, and
+.Sx \&In
+for
+.Dq #include
+directives.
+Never wrap
+.Sx \&Ar
+in
+.Sx \&Aq .
+.Pp
+Since
+.Sx \&Aq
+usually renders with non-ASCII characters in non-ASCII output modes,
+do not use it where the ASCII characters
+.Sq <
+and
+.Sq >
+are required as syntax elements.
+Instead, use these characters directly in such cases, combining them
+with the macros
+.Sx \&Pf ,
+.Sx \&Ns ,
or
-.Sx \&Mt ,
-or to note pre-processor
-.Dq Li #include
-statements, which should use
-.Sx \&In .
+.Sx \&Eo
+as needed.
.Pp
See also
.Sx \&Ao .