gpinyin(1)
π gpinyin β Hanyu Pinyin Chinese in your groff docs π
Okay bestie, this is the gpinyin(1) page from the General Commands Manual, and itβs all about making Hanyu Pinyin behave inside groff documents. Letβs get into it. π
π Name π
gpinyin β use Hanyu Pinyin Chinese in groff documents. Periodt.
β¨ Synopsis β¨
gpinyin [file ...]
gpinyin -h
gpinyin --help
gpinyin -v
gpinyin --version
π Description π
So gpinyin is a preprocessor for groff(1) that facilitates use of Hanyu Pinyin in groff(7) files. Pinyin is a method for writing the Mandarin Chinese language with the Latin alphabet. Mandarin consists of more than four hundred base syllables, each spoken with one of five different tones. Changing the tone applied to the syllable generally alters the meaning of the word it forms. In Pinyin, a syllable is written in the Latin alphabet and a numeric tone indicator can be appended to each syllable. β¨
Each input-file is a file name or the character - to indicate that the standard input stream should be read. As usual, the argument -- can be used in order to force interpretation of all remaining arguments as file names, even if an input-file argument begins with a -. -h and --help display a usage message, while -v and --version show version information; all exit afterward. π«Ά
Here are the flag besties, one by one:
-hβ display a usage message, then exit afterward.--helpβ display a usage message, then exit afterward.-vβ show version information, then exit afterward.--versionβ show version information, then exit afterward.
π§ Pinyin sections π§
Pinyin sections in groff files are enclosed by two .pinyin requests with different arguments. The starting request is:
.pinyin start
or:
.pinyin begin
and the ending request is:
.pinyin stop
or:
.pinyin end
π Syllables π
In Pinyin, each syllable is represented by one to six letters drawn from the fifty-two upper- and lowercase letters of the Unicode basic Latin character set, plus the letter βUβ with dieresis (umlaut) in both cases β in other words, the members of the set [aβzAβZΓΌΓ]. π¦
In groff input, all basic Latin letters are written as themselves. The βu with dieresisβ can be written as \[:u] in lowercase or \[:U] in uppercase. Within .pinyin sections, gpinyin supports the form ue for lowercase and the forms Ue and UE for uppercase.
πΈ Tones πΈ
Each syllable has exactly one of five 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. π
In a 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.
The tones are written as follows:
- first β description: flat; diacritic:
Β―; example input:ma1; example output:mΔ. - second β description: rising; diacritic:
Β΄; example input:ma2; example output:mΓ‘. - third β description: falling-rising; diacritic:
Λ; example input:ma3; example output:mΗ. - fourth β description: falling; diacritic:
`; example input:ma4; example output:mΓ. - fifth β description: neutral; diacritic: (none); example input:
ma0orma5; example output:ma.
The neutral tone number can be omitted from a word-final syllable, but not otherwise. No cap. π
π Authors π
gpinyin was written by Bernd Warken. Iconic. π
π See also π
Useful documents on the World Wide Web related to Pinyin include:
- Pinyin to Unicode
- On-line Chinese Tools
- Pinyin.info: a guide to the writing of Mandarin Chinese in romanization
- βWhere do the tone marks go?β
pinyin.txtfrom the CJK macro package for TeX- and
pinyin.styfrom the CJK macro package for TeX
groff(1) and grog(1) explain how to view roff documents. π
groff(7) and groff_char(7) are comprehensive references covering the language elements of GNU troff and the available glyph repertoire, respectively. π
Thatβs the whole gpinyin(1) situation, bestie β brought to you by groff 1.24.2, dated 2026-10-01. Byeee! π
π
π¦ where this page comes from
- alpine 3.24: groff-doc 1.24.2-r0 Β· GPL-3.0-or-later
- Copyright 2014-2020 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms