-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsamples.tex
More file actions
234 lines (199 loc) · 5.71 KB
/
samples.tex
File metadata and controls
234 lines (199 loc) · 5.71 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
\infannex{LaTeX samples}
\sclause{Block-level normative elements}
\ssclause{\ttfamily\textbackslash begin\{enumerate\}}
\begin{enumerate}
\item
This is an enumerated list.
\begin{enumerate}
\item
This is a nested enumerated list.
\end{enumerate}
\end{enumerate}
\ssclause{\ttfamily\textbackslash begin\{description\}}
\begin{description}
\item[term]
This is a description list.
\item[longer term]
More description list.
\end{description}
\ssclause{\ttfamily\textbackslash begin\{bnf\}}
Grammar rules appear in the index automatically.
The ``opt'' suffix should be applied only to the name of a non-terminal.
\begin{bnf}
\nontermdef{sample-rule-name}
\br
definition
\br
alternative\opt
\br
\terminal{(}
sample-rule-name
\terminal{)}
\end{bnf}
\ssclause{Tables}
{\bfseries
This is an advanced topic,
not for the unwary.
}
\begin{table}[hb]
\centering
\begin{tabular}{|l|l|}
\hline
A&B long%
\\ \hline
C longer&D%
\\ \hline
\end{tabular}
\caption{
Table caption
}
\end{table}
\sclause{Text-level normative elements}
\ssclause{\ttfamily\textbackslash tcode}
The
\tcode{for}
keyword.
\ssclause{\ttfamily\textbackslash defn}
This paragraph defines this
\defn{sample term};
it is automatically added to the index.
\ssclause{\texttt{\$} (math)}
A reference to the meta-variable $X$.
\ssclause{\ttfamily\textbackslash index}
There is a sample index entry
\index{sample index entry}
pointing to this paragraph.
\sclause{Non-normative text}
\ssclause{\ttfamily\textbackslash footnote}
Footnotes should be used very sparingly.
(They're a technical challenge for TeX,
so there are restrictions on their content.)%
\footnote{
This is a sample footnote.
}
\begin{comment}
Supposedly this is a comment.
\end{comment}
\ssclause{\ttfamily\textbackslash begin\{note\}}
A numbered note should generally be used for non-normative text.
\begin{note}
This is a numbered note.
\end{note}
\ssclause{\ttfamily\textbackslash begin\{example\}}
\begin{example}
This is a numbered example.
\end{example}
\ssclause{\ttfamily\textbackslash begin\{verbatim\}}
\begin{verbatim}
int main()
{
printf("Hello, world\n");
}
\end{verbatim}
\ssclause{\ttfamily\textbackslash begin\{anote\}}
When there is only one note (or example) in a subclause,
it can be changed to an unnumbered note (or example).
\begin{anote}
This is an unnumbered note.
\end{anote}
\ssclause{\ttfamily\textbackslash begin\{anexample\}}
\begin{anexample}
This is an unnumbered example.
\end{anexample}
\sclause{Revisions}
\ssclause{\ttfamily\textbackslash added}
There is
\added{%
some text}
in this paragraph that has been added.
\ssclause{\ttfamily\textbackslash removed}
There is
\removed{%
some text}
in this paragraph that has been removed.
\ssclause{\ttfamily\textbackslash ednote}
\ednote{This a note from the editor.}
\sclause{Constructs not recommended}
\ssclause{\ttfamily\textbackslash begin\{itemize\}}
Lists with unnumbered bullets, especially with more than three items,
should be used sparingly.
\begin{itemize}
\item
This is an itemized list.
\begin{itemize}
\item
This is a nested itemized list.
\end{itemize}
\end{itemize}
\ssclause{\ttfamily\textbackslash begin\{quote\}}
Quote blocks should not be used solely for indentation.
\begin{quote}
This is a quote block.
\end{quote}
\ssclause{\ttfamily\textbackslash begin\{quotation\}}
Quotation blocks should not be used solely for indentation.
\begin{quotation}
This is a quotation block.
\end{quotation}
\ssclause{\ttfamily\textbackslash texttt, \textbackslash ttfamily}
Fixed-width text should be marked with
\verb`\`\verb`begin{verbatim}`
or
\verb`\tcode`
instead.
{\ttfamily
This text is set in typewriter font.
}
\ssclause{\texttt{\textbackslash emph, \textbackslash em,
\textbackslash textit, \textbackslash itshape} (italics)}
Italics for the definition of a term are provided by
\verb`\defn`.
(Italics should never be used when referring to a defined term.)
Italics are the default presentation in a grammar rule,
and should not be made explicit.
A reference to a meta-variable in a normative rule
should be marked as math
(i.e. surrounded by dollar signs).
It should not be necessary to use italics for emphasis.
For a reference to a grammar non-terminal,
italics are used in the C++ standard,
but not the C standard.
When necessary, \verb`\grammarterm` should be used.
\begin{tabular}{|*{16}{c|}}
\hline
& ! & " & \# & \$ & \% & \& & ' & ( & ) & * & + & , & - & . & / \\
\hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & : & ; & < & = & > & ? \\
\hline
@ & A & B & C & D & E & F & G & H & I & J & K & L & M & N & O \\
\hline
P & Q & R & S & T & U & V & W & X & Y & Z &
[ & \textbackslash & ] & \textasciicircum & _ \\
\hline
` & a & b & c & d & e & f & g & h & i & j & k & l & m & n & o \\
\hline
p & q & r & s & t & u & v & w & x & y & z & \{ & | & \} & \textasciitilde & \\
\hline
& \textexclamdown & \textcent & \pounds &
\textcurrency & \textyen & \textbrokenbar & \S &
\textasciidieresis & \copyright & \textordfeminine & \guillemotleft &
\lnot & & \textregistered & \textasciimacron \\
\hline
\textdegree & \textpm & \texttwosuperior & \textthreesuperior
& \textasciiacute & \mu & \P & \textperiodcentered &
\c{} & \textonesuperior & \textordmasculine & \guillemotright
& \textonequarter & \textonehalf & \textthreequarters & \textquestiondown \\
\hline
\`{A} & \'{A} & \^{A} & \~{A} & \"{A} & \r{A} & \AE & \c{C} &
\`{E} & \'{E} & \^{E} & \"{E} & \`{I} & \'{I} & \^{I} & \"{I} \\
\hline
\DH & \~{N} & \`{O} & \'{O} & \^{O} & \~{O} & \"{O} & \texttimes &
\O & \`{U} & \'{U} & \^{U} & \"{U} & \'{Y} & \TH & \ss \\
\hline
\`{a} & \'{a} & \^{a} & \~{a} & \"{a} & \r{a} & \ae & \c{c} &
\`{e} & \'{e} & \^{e} & \"{e} & \`{i} & \'{i} & \^{i} & \"{i} \\
\hline
\dh & \~{n} & \`{o} & \'{o} & \^{o} & \~{o} & \"{o} & \textdiv &
\o & \`{u} & \'{u} & \^{u} & \"{u} & \'{y} & \th & \"{y} \\
\hline
\end{tabular}