summaryrefslogtreecommitdiffstats
path: root/scripts/LinuxManBook/an-ext.tmac
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/LinuxManBook/an-ext.tmac')
-rw-r--r--scripts/LinuxManBook/an-ext.tmac282
1 files changed, 282 insertions, 0 deletions
diff --git a/scripts/LinuxManBook/an-ext.tmac b/scripts/LinuxManBook/an-ext.tmac
new file mode 100644
index 0000000..e2f5c48
--- /dev/null
+++ b/scripts/LinuxManBook/an-ext.tmac
@@ -0,0 +1,282 @@
+.\" groff extension macros for man(7) package
+.\"
+.\" Copyright (C) 2007-2022 Free Software Foundation, Inc.
+.\"
+.\" Written by Eric S. Raymond <esr@thyrsus.com>
+.\" Werner Lemberg <wl@gnu.org>
+.\" G. Branden Robinson <g.branden.robinson@gmail.com>
+.\"
+.\" You may freely use, modify and/or distribute this file.
+.\"
+.\" The code below provides extension macros for the 'man' macro
+.\" package. Care has been taken to make the code portable; groff
+.\" extensions are properly hidden so that all troff implementations can
+.\" use it without changes.
+.\"
+.\" With groff, this file is sourced by the 'man' macro package itself.
+.\" Man page authors who are concerned about portability might add the
+.\" used macros directly to the prologue of the man page(s).
+.
+.
+.\" Convention: Auxiliary macros and registers start with 'm' followed
+.\" by an uppercase letter or digit.
+.
+.
+.\" Protect against being sourced twice.
+.nr mZ +1
+.if \n(mZ>1 \
+. nx
+.
+.\" Define this to your implementation's constant-width typeface.
+.ds mC CW
+.
+.\" In AT&T troff, there was no register exposing the hyphenation mode,
+.\" and no way to save and restore it. Set this to a reasonable value
+.\" for your implementation and preference.
+.ie !\n(.g \
+. nr mJ 1
+.el \
+. do nr mJ \n[.hy]
+.
+.\" Check if we're using grohtml or grotty, and therefore support URIs.
+.nr mH 0
+.nr mY 0
+.nr mU 0
+.if \n(.g \{\
+. if '\*(.T'html' \
+. nr mH 1
+. if '\*(.T'ascii' \
+. nr mY 1
+. if '\*(.T'cp1047' \
+. nr mY 1
+. if '\*(.T'latin1' \
+. nr mY 1
+. if '\*(.T'utf8' \
+. nr mY 1
+. nr mU \n(mH+\n(mY
+.\}
+.
+.
+.\" groff has glyph entities for angle brackets.
+.ie \n(.g \{\
+. ds mL \(la\"
+. ds mR \(ra\"
+.\}
+.el \{\
+. ds mL <\"
+. ds mR >\"
+.\}
+.
+.nr mS 0
+.
+.
+.\" Declare start of command synopsis. Sets up hanging indentation.
+.de SY
+. ie !\\n(mS \{\
+. nh
+. nr mS 1
+. nr mA \\n(.j
+. ad l
+. nr mI \\n(.i
+. \}
+. el \{\
+. br
+. ns
+. \}
+.
+. nr mT \w'\fB\\$1\fP\ '
+. HP \\n(mTu
+. B "\\$1"
+..
+.
+.
+.\" End of command synopsis. Restores adjustment.
+.de YS
+. in \\n(mIu
+. ad \\n(mA
+. hy \\n(mJ
+. nr mS 0
+..
+.
+.\" Prepare link text for mail/web hyperlinks. `MT` and `UR` call this.
+.de mV
+. ds m1 \\$1\"
+. \" Save the indentation and line length. We want the diversion to
+. \" format as if it has an indentation of zero (that comes for free
+. \" when we switch environments), but we want the line length reduced
+. \" by the amount of indentation that obtains when we output it.
+. nr mK \\n(.l
+. nr mI \\n(.i
+. \" We can only hyperlink if we're not in a diversion.
+. nr mD 0
+. if '\\n(.z'' .nr mD 1
+. if \\n(mD&\\nU&\\n(mU \{\
+. \" Start diversion in a new environment.
+. do ev link-text-env
+. do di link-text-div
+. ll (\\n(mKu-\\n(mIu)
+. \}
+. rr mK
+..
+.
+.\" Start URL.
+.de UR
+. mV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.
+.
+.\" End URL.
+.de UE
+. ie \\n(mD&\\nU&\\n(mU \{\
+. br
+. di
+. ev
+.
+. \" Has there been at least one input line of hyperlinked text?
+. ie \\n(dn \{\
+. if \\n(mH \
+\X^html:<a href="\\*(m1">^\c
+. if \\n(mY \
+\X^tty: link \\*(m1^\c
+. \" Strip off the final newline of the diversion and emit it.
+. do chop link-text-div
+. do link-text-div
+\c
+. if \\n(mH \
+\X^html:</a>^\c
+. if \\n(mY \
+\X^tty: link^\c
+. \}
+. el \{\
+. if \\n(mH \
+\X^html:<a href="\\*(m1">\\*(m1</a>^\c
+. if \\n(mY \
+\X^tty: link \\*(m1^\\*(m1\X^tty: link^\c
+. \}
+\&\\$*\"
+. \}
+. el \{\
+. nh
+\\*(mL\\*(m1\\*(mR\\$1
+. do shift
+. ie \n(.g .if \\n(.$ \&\\$*\"
+. el .if \\n(.$>1 \&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9\"
+. hy \\n(mJ
+. \}
+. rr mD
+..
+.
+.
+.\" Start email address.
+.de MT
+. mV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.
+.
+.\" End email address.
+.de ME
+. ie \\n(mD&\\nU&\\n(mU \{\
+. br
+. di
+. ev
+.
+. \" Has there been at least one input line of hyperlinked text?
+. ie \\n(dn \{\
+. if \\n(mH \
+\X^html:<a href="mailto:\\*(m1">^\c
+. if \\n(mY \
+\X^tty: link mailto:\\*(m1^\c
+. \" Strip off the final newline of the diversion and emit it.
+. do chop link-text-div
+. do link-text-div
+\c
+. if \\n(mH \
+\X^html:</a>^\c
+. if \\n(mY \
+\X^tty: link^\c
+. \}
+. el \{\
+. if \\n(mH \
+\X^html:<a href="mailto:\\*(m1">\\*(m1</a>^\c
+. if \\n(mY \
+\X^tty: link mailto:\\*(m1^\\*(m1\X^tty: link^\c
+. \}
+\&\\$*\"
+. \}
+. el \{\
+. nh
+\\*(mL\\*(m1\\*(mR\\$1
+. do shift
+. ie \n(.g .if \\n(.$ \&\\$*\"
+. el .if \\n(.$>1 \&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9\"
+. hy \\n(mJ
+. \}
+. rr mD
+..
+.
+.
+.\" Set a man page cross reference.
+.\" .MR page-topic page-section [trailing-text]
+.if \n(.g .ig
+.de MR
+. nh
+. ie \\n(.$=1 \
+. I \\$1
+. el \
+. IR \\$1 (\\$2)\\$3
+. hy \\n(mJ
+..
+.
+.
+.\" Continuation line for .TP header.
+.de TQ
+. br
+. ns
+. TP \\$1\" no doublequotes around argument!
+..
+.
+.
+.\" Start example.
+.if \n(.g .ig
+.de EX
+. br
+. if !\\n(mX \{\
+. nr mF \\n(.f
+. nr mP \\n(PD
+. nr PD 1v
+. nf
+. ft \\*(mC
+. nr mX 1
+. \}
+..
+.
+.
+.\" End example.
+.if \n(.g .ig
+.de EE
+. br
+. if \\n(mX \{\
+. ft \\n(mF
+. nr PD \\n(mP
+. fi
+. nr mX 0
+. \}
+..
+.
+.
+.\" Start display.
+.de DS
+. \" XXX to be written
+..
+.
+.
+.\" End display.
+.de DE
+. \" XXX to be written
+..
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" fill-column: 72
+.\" End:
+.\" vim: set filetype=groff textwidth=72: