forked from NetHack/NetHack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmac.nh
More file actions
136 lines (136 loc) · 4.36 KB
/
Copy pathtmac.nh
File metadata and controls
136 lines (136 loc) · 4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
.\" NetHack 3.7 tmac.nh $NHDT-Date: $ $NHDT-Branch: $:$NHDT-Revision: $
.
.\" Miscellaneous tmac.n-style macros specifically for nethack's Guidebook.
.\"
.\" Most are modelled after, or variations of, macros in tmac.n whose author
.\" has specified that that file remain unmodified if it gets distributed.
.\" These used to be inline within Guidebook.mn but it was becoming too
.\" cluttered as their number increased. It now uses the '.so' directive
.\" to include this file. (tmac.n is passed to 'roff on the command line.)
.
.\" labeled paragraph start
.\" .PS word
.\" set the width for the label column
.\" .PL word
.\" label for the entry
.\" .PE
.\" clean up
.de PS
.nr PY \\w'\\$1\ -\ 'u \" width of label plus " - "
.nr PX \\w'\ -\ 'u \" width of " - "
.sn \\n(pdu \" tmac.n: inter-paragraph space
.in +\\n(PYu \" additional indent past label (etc)
.si \" tmac.n: start indented section
..
.\" labeled paragraph label (and first line)
.de PL
.br
\\h'|-\\n(PYu'\\$1\\h'|-\\n(PXu'\ -\ \\c \" back up, output the label, then
. \" skip to width-of(" - ") before the
. \" normal indentation, output the " - "
. \" then attach the next line (the
. \" text) without stopping (\c: nroff
. \" section 4.2)
..
.\" labeled paragraph end
.de PE
.ei \" tmac.n: end indented section
.in -\\n(PYu \" undo indent past label (etc)
.sn \\n(pdu \" tmac.n: inter-paragraph space
..
.\" end of labeled paragraph
.
.\"
.\" aligned single character key with SHORT definition (if it overflows one
.\" line, all bets are off)
.\" Usage:
.\" .CC k "definition here"
.nr CZ \w'\fBW' \" width of the key character column
.nr CW \n(CZ/2 \" half the width of the key character column
.de CC
.nr CX \\w'\\fB\\$1'u/2 \" half the width of the key character
.nr CY \\n(CWu-\\n(CXu \" difference between the two half widths
.\" output: move right CR units, print the key letter, move right to
.\" the full width of the column, print " - " and the definition
\\h'|\\n(CYu'\\fB\\$1\\fP\\h'|\\n(CZu'\ -\ \\$2
..
.
.\" .SD = .sd with extra choices for argument; pair with .ED
.\" c - centered (original choice; as of this writing, not used by nethack)
.\" i - indented (default if choice is omitted)
.\" n - not indented
.\" SF - set (1=>indent, 0=>no-indent) by .SD, used by .ED unless centering
.de SD \" start display
. \" look for nested displays -- ILLEGAL
.ie \\n(id>0 .er "display within display"
.el \{\
. nr sf 0 \" don't center by default
. nr SF 1 \" assume indent
. ie '\\$1'c' .nr sf 1 \" center the sucker
. el .if '\\$1'n' .nr SF 0 \" don't indent if 'n'
.\}
.sn \\n(pdu \" a little bit of space
.ev 2 \" switch to display environment
.nf \" what you type is what you get
.if \\n(id=0 .di dd \" start saving text
.rs \" don't eat leading space
.nr id +1 \" increment level of display
..
.\" .ED = .ed with support for \n(SF (indent vs no-indent); pair with .SD
.de ED \" end display
.br \" flush line
.ie \\n(id<=0 .er "end display has no corresponding begin display"
.el \{\
. nr id -1 \" decrement level of display
. if \\n(id=0 \{\
. di \" end diversion
. fi \" resume filling
. in -\\n(piu \" dedent
. ev \" pop environment
. ne \\n(dnu \" be sure you have room
. nf \" don't reprocess display
. rs \" don't eat leading space
. zi \" save indents
. ie \\n(sf .in (\\n(llu-\\n(dlu)/2u \" center
. el .if \\n(SF .in +\\n(piu \" indent
. dd \" drop display
. yi \" restore indents
. \}
.\}
.fi \" resume filling
.sn \\n(pdu \" a little bit of space
..
.
.\" '.UX' is verbatim copy of tmac.n's '.ux' with the exception that
.\" the trademark owner for "UNIX" has been updated.
.de UX \" print "UNIX"
.ie \\n(ux \\&\\$2\\s-1UNIX\\s0\\$1
.el \{\
. nr ux +1 \" mark footnote as dropped
\\&\\$2\\s-1UNIX\\s0\\*(rg\\$1
. fn \" put out the footnote
\\&\\*(rgUNIX is a registered trademark of The Open Group.
. ef \" short and sweet ...
.\}
..
.
.\" .BR - hard line break with vertical padding inserted
.\" $1 - repeat count for amount of padding (optional; default is 1)
.de BR
.ie \\.$==0 .nr bR 1v
.el .nr bR (\\$1-0)v
\0
.sp \\n(bR
.br
..
.\" .UR url
.\" Just a pass-through here; converted to a link when generating HTML.
.de UR
\\$1\\$2
..
.
.\" Don't hyphenate the last word on a page or column. groff and AT&T-
.\" descended troffs use different hyphenation patterns.
.ie \n(.g .hy 6
.el .hy 2
.\"tmac.nh/"