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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
|
'\" t
.TH GPINYIN 1 "7 February 2022" "groff 1.22.4"
.SH NAME
gpinyin \- use Hanyu Pinyin Chinese in roff
.
.\" ====================================================================
.\" Legal Terms
.\" ====================================================================
.\"
.\" Copyright (C) 2014-2018 Free Software Foundation, Inc.
.\"
.\" This file is part of gpinyin, which is part of groff, a free
.\" software project.
.\"
.\" You can redistribute it and/or modify it under the terms of the GNU
.\" General Public License version 2 as published by the Free Software
.\" Foundation.
.\"
.\" The license text is available in the internet at
.\" <http://www.gnu.org/licenses/gpl-2.0.html>.
.
.\" ====================================================================
.\" Local definitions
.\" ====================================================================
.
.\" Define a string for the TeX logo.
.ie t .ds TeX T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
.el .ds TeX TeX
.
.\" Define a string for an ellipsis.
.ie t .ds EL \f[S]\N'188'\f[P]\"
.el .ds EL \&.\|.\|.\&\"
.
.
.\" ====================================================================
.SH "SYNOPSIS"
.\" ====================================================================
.
.SY gpinyin
.RI [ input-file
\*(EL]
.YS
.
.SY gpinyin
.B \-h
.SY gpinyin
.B \-\-help
.YS
.
.SY gpinyin
.B \-v
.SY gpinyin
.B \-\-version
.YS
.
.
.\" ====================================================================
.SH DESCRIPTION
.\" ====================================================================
.
.B gpinyin
is a preprocessor for
.BR \%groff (1)
that facilitates use of the Hanyu Pinyin
.BR groff (7)
files.
.
Pinyin is a method for writing the Chinese language with the Latin
alphabet.
.
The Chinese language consists of more than four hundred syllables,
each with one of five different tones.
.
In Pinyin,
a syllable is written in the Latin alphabet and a numeric tone indicator
can be appended to each syllable.
.
.
.P
Each
.I input-file
is a file name or the hyphen-minus character \[lq]\-\[rq] to indicate
that standard input should be read.
.
As usual,
the argument \[lq]\-\-\[rq] can be used in order to force interpretation
of all remaining arguments as file names,
even if an
.I input-file
argument begins with the hyphen-minus character.
.
.
.\" ====================================================================
.SS "Pinyin Sections"
.\" ====================================================================
.
Pinyin sections in
.I groff
files are enclosed by two
.B .pinyin
requests with different arguments.
.
The starting request is
.RS
.EX
\&.pinyin start
.EE
.RE
or
.RS
.EX
\&.pinyin begin
.EE
.RE
and the ending request is
.RS
.EX
\&.pinyin stop
.EE
.RE
or
.RS
.EX
\&.pinyin end
.EE
.RE
\&.
.
.
.\" ====================================================================
.SS "Syllables"
.\" ====================================================================
.
The spoken Chinese language is based on about 411
.IR syllables ;
see
.UR http://\:en.wikipedia.org/\:wiki/\:Pinyin_table
.UE .
.
.
.P
In Pinyin,
each syllable consists of one to six letters from the Latin alphabet;
these letters comprise the fifty-two upper- and lowercase letters from
the ASCII character set,
plus the letter \[lq]U\[rq] with dieresis (umlaut) in both cases\[em]in
other words,
the members of the set \[lq][a\[en]zA\[en]Z\[:u]\[:U]]\[rq].
.
.
.P
In
.I groff
input,
all ASCII letters are written as themselves.
.
The \[lq]u with dieresis\[rq] can be written as
\[lq]\e[:u]\[rq]
in lowercase or
\[lq]\e[:U]\[rq]
in uppercase.
.
Within
.B .pinyin
sections,
.I gpinyin
supports the form
\[lq]ue\[rq]
for lowercase and the forms
\[lq]Ue\[rq]
and
\[lq]UE\[rq]
for uppercase.
.
.
.\" ====================================================================
.SS "Tones"
.\" ====================================================================
.
Each syllable has exactly one of five
.IR tones .
.
The fifth tone is not explicitly written at all,
but each of the first through fourth tones is indicated with a diacritic
above a specific vowel within the syllable.
.
.
.P
In a
.I gpinyin
source file,
these tones are written by adding a numeral in the range 0 to 5 after
the syllable.
.
The tone numbers 1 to 4 are transformed into accents above vowels in the
output.
.
The tone numbers 0 and 5 are synonymous.
.
.
.P
The following table summarizes the tones.
.
Some output devices will not be able to render every output example.
.
.
.P
.if t .ne 8 \" Try to keep the table on one page for printed output.
.TS
l l l l l.
Tone Description Diacritic Example Input Example Output
_
first flat \[a-] ma1 m\[u0061_0304]
second rising \[aa] ma2 m\[u0061_0301]
third falling-rising \[ah] ma3 m\[u0061_030C]
fourth falling \[ga] ma4 m\[u0061_0300]
fifth neutral (none) ma0 ma
\^ \^ \^ ma5 \^
.TE
.
.
.P
The neutral tone number can be omitted from a word-final syllable,
but not otherwise.
.
.
.\" ====================================================================
.SH OPTIONS
.\" ====================================================================
.
.TP
.B \-h
.TQ
.B \-\-help
Print usage information and exit.
.
.
.TP
.B \-v
.TQ
.B \-\-version
Print version information and exit.
.
.
.\" ====================================================================
.SH AUTHORS
.\" ====================================================================
.
.B gpinyin
was written by
.MT <groff\-bernd.warken\-72@\:web.de>
Bernd Warken
.ME .
.
.
.\" ====================================================================
.SH "SEE ALSO"
.\" ====================================================================
.
Useful documents on the World Wide Web related to Pinyin include
.RS 4n
.br
.UR http://\:en.wikipedia.org/\:wiki/\:Pinyin
\[lq]Pinyin\[rq] (Wikipedia)
.UE ,
.
.br
.UR http://\:en.wikipedia.org/\:wiki/\:Pinyin_table
\[lq]Pinyin table\[rq] (Wikipedia)
.UE ,
.
.\" XXX: dead link
.\".br
.\".UR http://\:www.sino.uni\-heidelberg.de/\:course_resources/\:s02/\:\
.\"py\-vowels.htm
.\".I Unicode vowels for Pinyin
.\".UE ,
.\".
.br
.UR http://\:www.foolsworkshop.com/\:ptou/\:index.html
.I Pinyin to Unicode
.UE ,
.
.br
.UR http://\:www.mandarintools.com/
.I On-line Chinese Tools
.UE ,
.
.br
.UR http://\:www.pinyin.info/\:index.html
.I Pinyin.info: a guide to the writing of Mandarin Chinese in \
romanization
.UE ,
.
.br
.UR http://\:www.pinyin.info/\:rules/\:where.html
\[lq]Where do the tone marks go?\[rq] (Pinyin.info)
.UE ,
.
.br
.UR http://\:git.savannah.gnu.org/\:gitweb/\:\
?p=cjk.git;a=blob_plain;f=doc/\:pinyin.txt;hb=HEAD
pinyin.txt from the CJK macro package for \*[TeX]
.UE ,
.br
.RS -4n
and
.RE
.
.br
.UR http://\:git.savannah.gnu.org/\:gitweb/\:\
?p=cjk.git;a=blob_plain;f=texinput/p\:inyin.sty;hb=HEAD
pinyin.sty from the CJK macro package for \*[TeX]
.UE .
.
.RE
.
.P
.BR \%groff (1),
.BR \%grog (1),
and
.BR \%groffer (1)
explain how to view
.I roff
documents.
.
.
.P
.BR \%groff (7)
and
.BR \%groff_char (7)
are comprehensive references covering the language elements of GNU
.I roff
and the available glyph repertoire,
respectively.
.
.
.\" ====================================================================
.\" Editor settings
.\" ====================================================================
.
.\" Local Variables:
.\" mode: nroff
.\" End:
.\" vim: set filetype=groff:
|