手册页中的变音符
Diacritical marks in man pages
我已经用 nroff 语法写了一个手册页。文本是英文的,但我想确保正确显示包含字符“ö”的名称(即使在非 UTF-8 系统上)。有没有办法在nroff中指定这个字符,类似于HTML中的ö
?或者我可以在文件中指定编码吗?
我不知道 troff 但也许 this helps:
accent mark input output
acute accent e\*' é
grave accent e\*` è
circumflex o\*^ ô
cedilla c\*, ç
tilde n\*~ ñ
question \*?
exclamation \*!
umlaut u\*: ü
digraph s \*8 ß
hacek c\*v
macron a\*_
underdot s\*.
o-slash o\*/ ø
angstrom a\*o å
yogh kni\*3t
Thorn \*(Th Þ
thorn \*(th þ
Eth \*(D- Ð
eth \*(d- ð
hooked o \*q
ae ligature \*(ae æ
AE ligature \*(Ae Æ
oe ligature \*(oe
OE ligature \*(Oe
These new diacritical marks will not appear or will be placed on the wrong letter if .AM is not at the top of your file. If .AM is at the top of your file, the default -ms accent marks will be placed on the wrong letter. Choose one set or the other and use it consistently.
As an aid in producing text that will format correctly with both nroff and troff, there are some new string definitions that define dashes and quotation marks for each of these two formatting programs. The (*- string will yield two hyphens in nroff, but in troff it will produce an em dash--like this one. The *Q and (*U strings will produce open and close quotes in troff, but straight double quotes in nroff. (In typesetting, the double quote character is traditionally considered bad form.)
GNU troff (groff),这似乎是事实上的标准,接受字符“ö”的命名字形\[:o]
:
我已经用 nroff 语法写了一个手册页。文本是英文的,但我想确保正确显示包含字符“ö”的名称(即使在非 UTF-8 系统上)。有没有办法在nroff中指定这个字符,类似于HTML中的ö
?或者我可以在文件中指定编码吗?
我不知道 troff 但也许 this helps:
accent mark input output
acute accent e\*' é grave accent e\*` è circumflex o\*^ ô cedilla c\*, ç tilde n\*~ ñ question \*? exclamation \*! umlaut u\*: ü digraph s \*8 ß hacek c\*v macron a\*_ underdot s\*. o-slash o\*/ ø angstrom a\*o å yogh kni\*3t Thorn \*(Th Þ thorn \*(th þ Eth \*(D- Ð eth \*(d- ð hooked o \*q ae ligature \*(ae æ AE ligature \*(Ae Æ oe ligature \*(oe OE ligature \*(Oe
These new diacritical marks will not appear or will be placed on the wrong letter if .AM is not at the top of your file. If .AM is at the top of your file, the default -ms accent marks will be placed on the wrong letter. Choose one set or the other and use it consistently.
As an aid in producing text that will format correctly with both nroff and troff, there are some new string definitions that define dashes and quotation marks for each of these two formatting programs. The (*- string will yield two hyphens in nroff, but in troff it will produce an em dash--like this one. The *Q and (*U strings will produce open and close quotes in troff, but straight double quotes in nroff. (In typesetting, the double quote character is traditionally considered bad form.)
GNU troff (groff),这似乎是事实上的标准,接受字符“ö”的命名字形\[:o]
: