title: groff_char(7)

summary: groff glyph names

text:
# groff_char(7)

## NAME
groff_char - groff glyph names

## DESCRIPTION
This manual page lists the standard groff glyph names and the default input mapping, latin1. The glyphs in this document look different depending on which output device was chosen (with option -T for the man(1) program or the roff formatter). Glyphs not available for the device that is being used to print or view this manual page are marked with ‘(N/A)’; the device currently used is ‘html’.

In the actual version, groff provides only 8-bit characters for direct input and named entities for further glyphs. On ASCII platforms, input character codes in the range 0 to 127 (decimal) represent the usual 7-bit ASCII characters, while codes between 127 and 255 are interpreted as the corresponding characters in the latin1 (ISO-8859-1) code set by default. This mapping is contained in the file latin1.tmac and can be changed by loading a different input encoding. Note that some of the input characters are reserved by groff, either for internal use or for special input purposes. On EBCDIC platforms, only code page cp1047 is supported (which contains the same characters as latin1; the input encoding file is called cp1047.tmac). Again, some input characters are reserved for internal and special purposes.

All roff systems provide the concept of named glyphs. In traditional roff systems, only names of length 2 were used, while groff also provides support for longer names. It is strongly suggested that only named glyphs are used for all character representations outside of the printable 7-bit ASCII range.

Some of the predefined groff escape sequences (with names of length 1) also produce single glyphs; these exist for historical reasons or are printable versions of syntactical characters. They include ‘\\’, ‘\´’, ‘\`’, ‘\-’, ‘\.’, and ‘\e’; see groff(7).

In groff, all of these different types of characters and glyphs can be tested positively with the ‘.if c’ conditional.

## REFERENCE
In this section, the glyphs in groff are specified in tabular form. The meaning of the columns is as follows.

Output

shows how the glyph is printed for the current device; although this can have quite a different shape on other devices, it always represents the same glyph.

Input

specifies how the glyph is input either directly by a key on the keyboard, or by a groff escape sequence.

Code

applies to glyphs which can be input with a single character, and gives the ISO latin1 decimal code of that input character. Note that this code is equivalent to the lowest 256 Unicode characters, including 7-bit ASCII in the range 0 to 127.

PostScript

gives the usual PostScript name of the glyph.

Unicode

is the glyph name used in composite glyph names. The names in the Unicode column look like u0021 or u0041_0300. In groff, the corresponding Unicode characters can be constructed by adding a backslash and a pair of square brackets, for example \[u0021] or \[u0041_0300].

### 7-bit Character Codes 32–126
These are the basic glyphs having 7-bit ASCII code values assigned. They are identical to the printable characters of the character standards ISO-8859-1 (latin1) and Unicode (range Basic Latin). The glyph names used in composite glyph names are ‘u0020’ up to ‘u007E’.

Note that input characters in the range 0-31 and character 127 are not printable characters. Most of them are invalid input characters for groff anyway, and the valid ones have special meaning. For EBCDIC, the printable characters are in the range 66-255.

48-57

Decimal digits 0 to 9 (print as themselves).

65-90

Upper case letters A-Z (print as themselves).

97-122

Lower case letters a–z (print as themselves).

Most of the remaining characters not in the just described ranges print as themselves; the only exceptions are the following characters:

`

the ISO latin1 ‘Grave Accent’ (code 96) prints as ‘, a left single quotation mark; the original character can be obtained with ‘\`’.

'

the ISO latin1 ‘Apostrophe’ (code 39) prints as ', a right single quotation mark; the original character can be obtained with ‘\(aq’.

-

the ISO latin1 ‘Hyphen, Minus Sign’ (code 45) prints as a hyphen; a minus sign can be obtained with ‘\-’.

~

the ISO latin1 ‘Tilde’ (code 126) is reduced in size to be usable as a diacritic; a larger glyph can be obtained with ‘\(ti’.

^

the ISO latin1 ‘Circumflex Accent’ (code 94) is reduced in size to be usable as a diacritic; a larger glyph can be obtained with ‘\(ha’.

Output

Input

Code

PostScript

Unicode

Notes

!

!

33

exclam

u0021

exclamation mark (bang)

"

"

34

quotedbl

u0022

double quote

\#

\#

35

numbersign

u0023

number sign

$

$

36

dollar

u0024

currency dollar sign

%

%

37

percent

u0025

percent

&

&

38

ampersand

u0026

ampersand

'

'

39

quoteright

u0027

right quote

(

(

40

parenleft

u0028

parentheses left

)

)

41

parenright

u0029

parentheses right

*

*

42

asterisk

u002A

asterisk

+

+

43

plus

u002B

plus

,

,

44

comma

u002C

comma

-

-

45

hyphen

u2010

hyphen

.

.

46

period

u002E

period, dot

/

/

47

slash

u002F

slash

:

:

58

colon

u003A

colon

;

;

59

semicolon

u003B

semicolon

<

<

60

less

u003C

less than

=

=

61

equal

u003D

equal

>

>

62

greater

u003E

greater than

?

?

63

question

u003F

question mark

@

@

64

at

u0040

at

[

[

91

bracketleft

u005B

square bracket left

\

\

92

backslash

u005C

backslash

]

]

93

bracketright

u005D

square bracket right

^

^

94

circumflex

u005E

circumflex accent

_

_

95

underscore

u005F

underscore

`

`

96

quoteleft

u0060

quote left

{

{

123

braceleft

u007B

curly brace left

|

|

124

bar

u007C

bar

}

}

125

braceright

u007D

curly brace right

~

~

126

tilde

u007E

tilde accent

### 8-bit Character Codes 160 to 255
They are interpreted as printable characters according to the latin1 (ISO-8859-1) code set, being identical to the Unicode range Latin-1 Supplement.

Input characters in range 128-159 (on non-EBCDIC hosts) are not printable characters.

160

the ISO latin1 no-break space is mapped to ‘\~’, the stretchable space character.

173

the soft hyphen control character. groff never uses this character for output (thus it is omitted in the table below); the input character 173 is mapped onto ‘\%’.

The remaining ranges (161-172, 174-255) are printable characters that print as themselves. Although they can be specified directly with the keyboard on systems with a latin1 code page, it is better to use their glyph names; see next section.

Output

Input

Code

PostScript

Unicode

Notes

¡

¡

161

exclamdown

u00A1

inverted exclamation mark

¢

¢

162

cent

u00A2

currency unit

£

£

163

sterling

u00A3

pound sterling

¤

¤

164

currency

u00A4

generic currency symbol

¥

¥

165

yen

u00A5

Japanese currency symbol

¦

¦

166

brokenbar

u00A6

broken bar

§

§

167

section

u00A7

section sign

¨

¨

168

dieresis

u00A8

dieresis (umlaut)

©

©

169

copyright

u00A9

copyright symbol

ª

ª

170

ordfeminine

u00AA

feminine ordinal (Spanish)

«

«

171

guillemotleft

u00AB

left guillemet [sic]

¬

¬

172

logicalnot

u00AC

logical not

®

®

174

registered

u00AE

registered mark symbol

¯

¯

175

macron

u00AF

overbar accent

°

°

176

degree

u00B0

degree sign

±

±

177

plusminus

u00B1

plus-minus sign

²

²

178

twosuperior

u00B2

superscript 2

³

³

179

threesuperior

u00B3

superscript 3

´

´

180

acute

u00B4

acute accent

µ

µ

181

mu

u00B5

micro sign

¶

¶

182

paragraph

u00B6

end of paragraphs marker

·

·

183

periodcentered

u00B7

centered period

¸

¸

184

cedilla

u00B8

cedilla accent

¹

¹

185

onesuperior

u00B9

superscript 1

º

º

186

ordmasculine

u00BA

masculine ordinal (Spanish)

»

»

187

guillemotright

u00BB

right guillemet [sic]

¼

¼

188

onequarter

u00BC

1/4 symbol

½

½

189

onehalf

u00BD

1/2 symbol

¾

¾

190

threequarters

u00BE

3/4 symbol

¿

¿

191

questiondown

u00BF

inverted question mark

À

À

192

Agrave

u0041_0300

A grave

Á

Á

193

Aacute

u0041_0301

A acute

Â

Â

194

Acircumflex

u0041_0302

A circumflex

Ã

Ã

195

Atilde

u0041_0303

A tilde

Ä

Ä

196

Adieresis

u0041_0308

A dieresis (umlaut)

Å

Å

197

Aring

u0041_030A

A ring

Æ

Æ

198

AE

u00C6

A+E combined

Ç

Ç

199

Ccedilla

u0043_0327

C cedilla

È

È

200

Egrave

u0045_0300

E grave

É

É

201

Eacute

u0045_0301

E acute

Ê

Ê

202

Ecircumflex

u0045_0302

E circumflex

Ë

Ë

203

Edieresis

u0045_0308

E dieresis (umlaut)

Ì

Ì

204

Igrave

u0049_0300

I grave

Í

Í

205

Iacute

u0049_0301

I acute

Î

Î

206

Icircumflex

u0049_0302

I circumflex

Ï

Ï

207

Idieresis

u0049_0308

I dieresis

Ð

Ð

208

Eth

u00D0

E th

Ñ

Ñ

209

Ntilde

u004E_0303

N tilde

Ò

Ò

210

Ograve

u004F_0300

O grave

Ó

Ó

211

Oacute

u004F_0301

O acute

Ô

Ô

212

Ocircumflex

u004F_0302

O circumflex

Õ

Õ

213

Otilde

u004F_0303

O tilde

Ö

Ö

214

Odieresis

u004F_0308

O dieresis (umlaut)

×

×

215

multiply

u00D7

multiply

Ø

Ø

216

Oslash

u00D8

O slash

Ù

Ù

217

Ugrave

u0055_0300

U grave

Ú

Ú

218

Uacute

u0055_0301

U acute

Û

Û

219

Ucircumflex

u0055_0302

U circumflex

Ü

Ü

220

Udieresis

u0055_0308

U dieresis (umlaut)

Ý

Ý

221

Yacute

u0059_0301

Y acute

Þ

Þ

222

Thorn

u00DE

Thorn

ß

ß

223

germandbls

u00DF

German double s (sharp s)

à

à

224

agrave

u0061_0300

a grave

á

á

225

aacute

u0061_0301

a acute

â

â

226

acircumflex

u0061_0302

a circumflex

ã

ã

227

atilde

u0061_0303

a tilde

ä

ä

228

adieresis

u0061_0308

a dieresis (umlaut)

å

å

229

aring

u0061_030A

a ring

æ

æ

230

ae

u00E6

a+e combined

ç

ç

231

ccedilla

u0063_0327

c cedilla

è

è

232

egrave

u0065_0300

e grave

é

é

233

eacute

u0065_0301

e acute

ê

ê

234

ecircumflex

u0065_0302

e circumflex

ë

ë

235

edieresis

u0065_0308

e dieresis (umlaut)

ì

ì

236

igrave

u0069_0300

i grave

í

í

237

iacute

u0069_0301

i acute

î

î

238

icircumflex

u0069_0302

i circumflex

ï

ï

239

idieresis

u0069_0308

i dieresis (umlaut)

ð

ð

240

eth

u00F0

e th

ñ

ñ

241

ntilde

u006E_0303

n tilde

ò

ò

242

ograve

u006F_0300

o grave

ó

ó

243

oacute

u006F_0301

o acute

ô

ô

244

ocircumflex

u006F_0302

o circumflex

õ

õ

245

otilde

u006F_0303

o tilde

ö

ö

246

odieresis

u006F_0308

o dieresis (umlaut)

÷

÷

247

divide

u00F7

divide

ø

ø

248

oslash

u00F8

o slash

ù

ù

249

ugrave

u0075_0300

u grave

ú

ú

250

uacute

u0075_0301

u acute

û

û

251

ucircumflex

u0075_0302

u circumflex

ü

ü

252

udieresis

u0075_0308

u dieresis (umlaut)

ý

ý

253

yacute

u0079_0301

y acute

þ

þ

254

thorn

u00FE

thorn

ÿ

ÿ

255

ydieresis

u0079_0308

y dieresis (umlaut)

### Named Glyphs
Glyph names can be embedded into the document text by using escape sequences. groff(7) describes how these escape sequences look. Glyph names can consist of quite arbitrary characters from the ASCII or latin1 code set, not only alphanumeric characters. Here some examples:

\(ch

A glyph having the 2-character name ch.

\[char_name]

A glyph having the name char_name (having length 1, 2, 3, ...). Note that ‘c’ is not the same as ‘\[c]’ (c a single character): The latter is internally mapped to glyph name ‘\c’. By default, groff defines a single glyph name starting with a backslash, namely ‘\-’, which can be either accessed as ‘\-’ or ‘\[-]’.

\[base_glyph composite_1 composite_2 ...]

A composite glyph; see below for a more detailed description.

In groff, each 8-bit input character can also referred to by the construct ‘\[charn]’ where n is the decimal code of the character, a number between 0 and 255 without leading zeros (those entities are not glyph names). They are normally mapped onto glyphs using the .trin request.

Another special convention is the handling of glyphs with names directly derived from a Unicode code point; this is shown in the ‘Unicode’ column of the table below. In general, all glyphs not having a name as listed in this manual page can be accessed with the ‘\[uXXXX]’ construct; please go to section ‘Using Symbols’ in the groff info manual for more details.

Moreover, new glyph names can be created by the .char request; see groff(7).

In the following, a plus sign in the ‘Notes’ column indicates that this particular glyph name appears in the PS version of the original troff documentation, CSTR 54.

Entries marked with ‘***’ denote glyphs for mathematical purposes (mainly used for DVI output). Normally, such glyphs have metrics which make them unusable in normal text.

Output

Input

PostScript

Unicode

Notes

Ð

\[-D]

Eth

u00D0

uppercase eth

ð

\[Sd]

eth

u00F0

lowercase eth

Þ

\[TP]

Thorn

u00DE

uppercase thorn

þ

\[Tp]

thorn

u00FE

lowercase thorn

ß

\[ss]

germandbls

u00DF

German double s (sharp s)

Ligatures and Other Latin Glyphs

Output

Input

PostScript

Unicode

Notes

ﬀ

\[ff]

ff

u0066_0066

ff ligature +

ﬁ

\[fi]

fi

u0066_0069

fi ligature +

ﬂ

\[fl]

fl

u0066_006C

fl ligature +

ﬃ

\[Fi]

ffi

u0066_0066_0069

ffi ligature +

ﬄ

\[Fl]

ffl

u0066_0066_006C

ffl ligature +

Ł

\[/L]

Lslash

u0141

L slash (Polish)

ł

\[/l]

lslash

u0142

l slash (Polish)

Ø

\[/O]

Oslash

u00D8

O slash (Scandinavian)

ø

\[/o]

oslash

u00F8

o slash (Scandinavian)

Æ

\[AE]

AE

u00C6

A+E combined

æ

\[ae]

ae

u00E6

a+e combined

Œ

\[OE]

OE

u0152

O+E combined

œ

\[oe]

oe

u0153

o+e combined

Ĳ

\[IJ]

IJ

u0132

I+J combined (Dutch)

ĳ

\[ij]

ij

u0133

i+j combined(Dutch)

ı

\[.i]

dotlessi

u0131

i without a dot (Turkish)

ȷ

\[.j]

dotlessj

u0237

j without a dot

Accented Characters

Output

Input

PostScript

Unicode

Notes

Á

\['A]

Aacute

u0041_0301

A acute

\['C]

Cacute

u0043_0301

C acute

É

\['E]

Eacute

u0045_0301

E acute

Í

\['I]

Iacute

u0049_0301

I acute

Ó

\['O]

Oacute

u004F_0301

O acute

Ú

\['U]

Uacute

u0055_0301

U acute

Ý

\['Y]

Yacute

u0059_0301

Y acute

á

\['a]

aacute

u0061_0301

a acute

\['c]

cacute

u0063_0301

c acute

é

\['e]

eacute

u0065_0301

e acute

í

\['i]

iacute

u0069_0301

i acute

ó

\['o]

oacute

u006F_0301

o acute

ú

\['u]

uacute

u0075_0301

u acute

ý

\['y]

yacute

u0079_0301

y acute

Ä

\[:A]

Adieresis

u0041_0308

A dieresis (umlaut)

Ë

\[:E]

Edieresis

u0045_0308

E dieresis (umlaut)

Ï

\[:I]

Idieresis

u0049_0308

I dieresis (umlaut)

Ö

\[:O]

Odieresis

u004F_0308

O dieresis (umlaut)

Ü

\[:U]

Udieresis

u0055_0308

U dieresis (umlaut)

\[:Y]

Ydieresis

u0059_0308

Y dieresis (umlaut)

ä

\[:a]

adieresis

u0061_0308

a dieresis (umlaut)

ë

\[:e]

edieresis

u0065_0308

e dieresis (umlaut)

ï

\[:i]

idieresis

u0069_0308

i dieresis (umlaut)

ö

\[:o]

odieresis

u006F_0308

o dieresis (umlaut)

ü

\[:u]

udieresis

u0075_0308

u dieresis (umlaut)

ÿ

\[:y]

ydieresis

u0079_0308

y dieresis (umlaut)

Â

\[^A]

Acircumflex

u0041_0302

A circumflex

Ê

\[^E]

Ecircumflex

u0045_0302

E circumflex

Î

\[^I]

Icircumflex

u0049_0302

I circumflex

Ô

\[^O]

Ocircumflex

u004F_0302

O circumflex

Û

\[^U]

Ucircumflex

u0055_0302

U circumflex

â

\[^a]

acircumflex

u0061_0302

a circumflex

ê

\[^e]

ecircumflex

u0065_0302

e circumflex

î

\[^i]

icircumflex

u0069_0302

i circumflex

ô

\[^o]

ocircumflex

u006F_0302

o circumflex

û

\[^u]

ucircumflex

u0075_0302

u circumflex

À

\[`A]

Agrave

u0041_0300

A grave

È

\[`E]

Egrave

u0045_0300

E grave

Ì

\[`I]

Igrave

u0049_0300

I grave

Ò

\[`O]

Ograve

u004F_0300

O grave

Ù

\[`U]

Ugrave

u0055_0300

U grave

à

\[`a]

agrave

u0061_0300

a grave

è

\[`e]

egrave

u0065_0300

e grave

ì

\[`i]

igrave

u0069_0300

i grave

ò

\[`o]

ograve

u006F_0300

o grave

ù

\[`u]

ugrave

u0075_0300

u grave

Ã

\[~A]

Atilde

u0041_0303

A tilde

Ñ

\[~N]

Ntilde

u004E_0303

N tilde

Õ

\[~O]

Otilde

u004F_0303

O tilde

ã

\[~a]

atilde

u0061_0303

a tilde

ñ

\[~n]

ntilde

u006E_0303

n tilde

õ

\[~o]

otilde

u006F_0303

o tilde

\[vS]

Scaron

u0053_030C

S caron

\[vs]

scaron

u0073_030C

s caron

\[vZ]

Zcaron

u005A_030C

Z caron

\[vz]

zcaron

u007A_030C

z caron

Ç

\[,C]

Ccedilla

u0043_0327

C cedilla

ç

\[,c]

ccedilla

u0063_0327

c cedilla

Å

\[oA]

Aring

u0041_030A

A ring

å

\[oa]

aring

u0061_030A

a ring

Accents

The composite request is used to map most of the accents to non-spacing glyph names; the values given in parentheses are the original (spacing) ones.

Output

Input

PostScript

Unicode

Notes

˝

\[a"]

hungarumlaut

u030B (u02DD)

Hungarian umlaut

¯

\[a-]

macron

u0304 (u00AF)

overbar accent

˙

\[a.]

dotaccent

u0307 (u02D9)

dot accent

^

\[a^]

circumflex

u0302 (u005E)

circumflex accent

´

\[aa]

acute

u0301 (u00B4)

acute accent

`

\[ga]

grave

u0300 (u0060)

grave accent

˘

\[ab]

breve

u0306 (u02D8)

breve accent

¸

\[ac]

cedilla

u0327 (u00B8)

cedilla accent

¨

\[ad]

dieresis

u0308 (u00A8)

umlaut accent

ˇ

\[ah]

caron

u030C (u02C7)

caron accent

˚

\[ao]

ring

u030A (u02DA)

small circle, ring accent

~

\[a~]

tilde

u0303 (u007E)

tilde accent

˛

\[ho]

ogonek

u0328 (u02DB)

hook accent

^

\[ha]

asciicircum

u005E

high circumflex, ASCII character, in mathematics the power sign

~

\[ti]

asciitilde

u007E

tilde in vertical middle, ASCII, in Unix-like the home directory

Quotes

Output

Input

PostScript

Unicode

Notes

„

\[Bq]

quotedblbase

u201E

low double comma quote

‚

\[bq]

quotesinglbase

u201A

low single comma quote

“

\[lq]

quotedblleft

u201C

left double quote

”

\[rq]

quotedblright

u201D

right double quote

‘

\[oq]

quoteleft

u2018

single open (left) quote

’

\[cq]

quoteright

u2019

single closing (right) quote

'

\[aq]

quotesingle

u0027

apostrophe quote (ASCII 39)

"

\[dq]

quotedbl

u0022

double quote (ASCII 34)

«

\[Fo]

guillemotleft

u00AB

left guillemet [sic]

»

\[Fc]

guillemotright

u00BB

right guillemet [sic]

‹

\[fo]

guilsinglleft

u2039

single left-pointing angle quotation mark

›

\[fc]

guilsinglright

u203A

single right-pointing angle quotation mark

Punctuation

Output

Input

PostScript

Unicode

Notes

¡

\[r!]

exclamdown

u00A1

inverted exclamation mark

¿

\[r?]

questiondown

u00BF

inverted question mark

—

\[em]

emdash

u2014

em-dash symbol

–

\[en]

endash

u2013

en-dash symbol

‐

\[hy]

hyphen

u2010

hyphen symbol

Brackets

The extensible bracket pieces are font-invariant glyphs. In classical troff only one glyph was available to vertically extend brackets, braces, and parentheses: ‘bv’. We map it rather arbitrarily to u23AA.

Note that not all devices contain extensible bracket pieces which can be piled up with ‘\b’ due to the restrictions of the escape's piling algorithm. A general solution to build brackets out of pieces is the following macro:

```
.\" Make a pile centered vertically 0.5em
.\" above the baseline.
.\" The first argument is placed at the top.
.\" The pile is returned in string `pile'
.eo
.de pile-make
.  nr pile-wd 0
.  nr pile-ht 0
.  ds pile-args
.
.  nr pile-# \n[.$]
.  while \n[pile-#] \{\
.    nr pile-wd (\n[pile-wd] >? \w'\$[\n[pile-#]]')
.    nr pile-ht +(\n[rst] - \n[rsb])
.    as pile-args \v'\n[rsb]u'\"
.    as pile-args \Z'\$[\n[pile-#]]'\"
.    as pile-args \v'-\n[rst]u'\"
.    nr pile-# -1
.  \}
.
.  ds pile \v'(-0.5m + (\n[pile-ht]u / 2u))'\"
.  as pile \*[pile-args]\"
.  as pile \v'((\n[pile-ht]u / 2u) + 0.5m)'\"
.  as pile \h'\n[pile-wd]u'\"
..
.ec
```

```

```

Another complication is the fact that some glyphs which represent bracket pieces in original troff can be used for other mathematical symbols also, for example ‘lf’ and ‘rf’ which provide the ‘floor’ operator. Other devices (most notably for DVI output) don't unify such glyphs. For this reason, the four glyphs ‘lf’, ‘rf’, lc’, and ‘rc’ are not unified with similarly looking bracket pieces. In groff, only glyphs with long names are guaranteed to pile up correctly for all devices (provided those glyphs exist).

Output

Input

PostScript

Unicode

Notes

[

\[lB]

bracketleft

u005B

left square bracket

]

\[rB]

bracketright

u005D

right square bracket

{

\[lC]

braceleft

u007B

left curly brace

}

\[rC]

braceright

u007D

right curly brace

⟨

\[la]

angleleft

u27E8

left angle bracket

⟩

\[ra]

angleright

u27E9

right angle bracket

⎪

\[bv]

braceex

u23AA

curly brace vertical extension

⎪

\[braceex]

braceex

u23AA

curly brace vertical extension

⎡

\[bracketlefttp]

bracketlefttp

u23A1

left square bracket top

⎣

\[bracketleftbt]

bracketleftbt

u23A3

left square bracket bottom

⎢

\[bracketleftex]

bracketleftex

u23A2

left square bracket extension

⎤

\[bracketrighttp]

bracketrighttp

u23A4

right square bracket top

⎦

\[bracketrightbt]

bracketrightbt

u23A6

right square bracket bottom

⎥

\[bracketrightex]

bracketrightex

u23A5

right square bracket extension

⎧

\[lt]

bracelefttp

u23A7

left curly brace top

⎧

\[bracelefttp]

bracelefttp

u23A7

left curly brace top

⎨

\[lk]

braceleftmid

u23A8

left curly brace middle

⎨

\[braceleftmid]

braceleftmid

u23A8

left curly brace middle

⎩

\[lb]

braceleftbt

u23A9

left curly brace bottom

⎩

\[braceleftbt]

braceleftbt

u23A9

left curly brace bottom

⎪

\[braceleftex]

braceleftex

u23AA

left curly brace extension

⎫

\[rt]

bracerighttp

u23AB

right curly brace top

⎫

\[bracerighttp]

bracerighttp

u23AB

right curly brace top

⎬

\[rk]

bracerightmid

u23AC

right curly brace middle

⎬

\[bracerightmid]

bracerightmid

u23AC

right curly brace middle

⎭

\[rb]

bracerightbt

u23AD

right curly brace bottom

⎭

\[bracerightbt]

bracerightbt

u23AD

right curly brace bottom

⎪

\[bracerightex]

bracerightex

u23AA

right curly brace extension

⎛

\[parenlefttp]

parenlefttp

u239B

left parenthesis top

⎝

\[parenleftbt]

parenleftbt

u239D

left parenthesis bottom

⎜

\[parenleftex]

parenleftex

u239C

left parenthesis extension

⎞

\[parenrighttp]

parenrighttp

u239E

right parenthesis top

⎠

\[parenrightbt]

parenrightbt

u23A0

right parenthesis bottoom

⎟

\[parenrightex]

parenrightex

u239F

right parenthesis extension

Arrows

Output

Input

PostScript

Unicode

Notes

←

\[<-]

arrowleft

u2190

horizontal arrow left

→

\[->]

arrowright

u2192

horizontal arrow right

↔

\[<>]

arrowboth

u2194

horizontal arrow in both directions

↓

\[da]

arrowdown

u2193

vertical arrow down

↑

\[ua]

arrowup

u2191

vertical arrow up

↕

\[va]

arrowupdn

u2195

vertical arrow in both directions

⇐

\[lA]

arrowdblleft

u21D0

horizontal double arrow left

⇒

\[rA]

arrowdblright

u21D2

horizontal double arrow right

⇔

\[hA]

arrowdblboth

u21D4

horizontal double arrow in both directions

⇓

\[dA]

arrowdbldown

u21D3

vertical double arrow down

⇑

\[uA]

arrowdblup

u21D1

vertical double arrow up

⇕

\[vA]

uni21D5

u21D5

vertical double arrow in both directions

⎯

\[an]

arrowhorizex

u23AF

horizontal arrow extension

Lines

The font-invariant glyphs ‘br’, ‘ul’, and ‘rn’ form corners; they can be used to build boxes. Note that both the PostScript and the Unicode-derived names of these three glyphs are just rough approximations.

‘rn’ also serves in classical troff as the horizontal extension of the square root sign.

‘ru’ is a font-invariant glyph, namely a rule of length 0.5m.

Output

Input

PostScript

Unicode

Notes

|

\[ba]

bar

u007C

bar

│

\[br]

SF110000

u2502

box rule

_

\[ul]

underscore

u005F

underscore

‾

\[rn]

overline

u203E

overline

_

\[ru]

---

---

baseline rule

¦

\[bb]

brokenbar

u00A6

broken bar

/

\[sl]

slash

u002F

slash, solidus

\

\[rs]

backslash

u005C

reverse slash, reverse solidus

Use ‘\[radicalex]’, not ‘\[overline]’, for continuation of square root.

Text markers

Output

Input

PostScript

Unicode

Notes

○

\[ci]

circle

u25CB

circle

•

\[bu]

bullet

u2022

bullet

‡

\[dd]

daggerdbl

u2021

double dagger sign

†

\[dg]

dagger

u2020

dagger

◊

\[lz]

lozenge

u25CA

lozenge, diamond, pound key

□

\[sq]

uni25A1

u25A1

white square

¶

\[ps]

paragraph

u00B6

end of paragraphs marker

§

\[sc]

section

u00A7

section sign

☜

\[lh]

uni261C

u261C

hand pointing left

☞

\[rh]

a14

u261E

hand pointing right

@

\[at]

at

u0040

at

\#

\[sh]

numbersign

u0023

number sign

↵

\[CR]

carriagereturn

u21B5

carriage return

✓

\[OK]

a19

u2713

check mark, tick

Legal Symbols

Output

Input

PostScript

Unicode

Notes

©

\[co]

copyright

u00A9

copyright sign

®

\[rg]

registered

u00AE

registered mark

™

\[tm]

trademark

u2122

trademark symbol

\[bs]

---

---

AT&T Bell Labs logo +

The Bell Labs logo is not supported in groff.

Currency symbols

Output

Input

PostScript

Unicode

Notes

$

\[Do]

dollar

u0024

dollar

¢

\[ct]

cent

u00A2

cent

€

\[eu]

---

u20AC

official Euro symbol

€

\[Eu]

Euro

u20AC

font-specific Euro glyph variant

¥

\[Ye]

yen

u00A5

Japanese Yen

£

\[Po]

sterling

u00A3

pound sterling (British)

¤

\[Cs]

currency

u00A4

Scandinavian currency sign

ƒ

\[Fn]

florin

u0192

Dutch currency sign

Units

Output

Input

PostScript

Unicode

Notes

°

\[de]

degree

u00B0

degree

‰

\[%0]

perthousand

u2030

per thousand, per mille sign

′

\[fm]

minute

u2032

arc minute sign

″

\[sd]

second

u2033

acr second sign

µ

\[mc]

mu

u00B5

mu, micro sign

ª

\[Of]

ordfeminine

u00AA

feminine ordinal (Spanish)

º

\[Om]

ordmasculine

u00BA

masculine ordinal (Spanish)

Logical Symbols

Output

Input

PostScript

Unicode

Notes

∧

\[AN]

logicaland

u2227

logical and

∨

\[OR]

logicalor

u2228

logical or

¬

\[no]

logicalnot

u00AC

logical not

¬

\[tno]

logicalnot

u00AC

text variant of ‘no’

∃

\[te]

existential

u2203

there exists

∀

\[fa]

universal

u2200

for all

∋

\[st]

suchthat

u220B

sucht that

∴

\[3d]

therefore

u2234

therefore

∴

\[tf]

therefore

u2234

therefore

|

\[or]

bar

u007C

bitwise OR operator (as used in C)

Mathematical Symbols

Output

Input

PostScript

Unicode

Notes

½

\[12]

onehalf

u00BD

1/2 symbol

¼

\[14]

onequarter

u00BC

1/4 symbol

¾

\[34]

threequarters

u00BE

3/4 symbol

⅛

\[18]

oneeighth

u215B

1/8 symbol

⅜

\[38]

threeeighths

u215C

3/8 symbol

⅝

\[58]

fiveeighths

u215D

5/8 symbol

⅞

\[78]

seveneighths

u215E

7/8 symbol

¹

\[S1]

onesuperior

u00B9

superscript 1

²

\[S2]

twosuperior

u00B2

superscript 2

³

\[S3]

threesuperior

u00B3

superscript 3

+

\[pl]

plus

u002B

plus in special font

−

\[mi]

minus

u2212

minus in special font

∓

\[-+]

uni2213

u2213

minus-plus

±

\[+-]

plusminus

u00B1

plus-minus

±

\[t+-]

plusminus

u00B1

text variant of \[+-]

·

\[pc]

periodcentered

u00B7

period centered

⋅

\[md]

dotmath

u22C5

multiplication dot

×

\[mu]

multiply

u00D7

multiply sign

×

\[tmu]

multiply

u00D7

text variant of \[mu]

⊗

\[c*]

circlemultiply

u2297

multiply sign in circle

⊕

\[c+]

circleplus

u2295

plus sign in circle

÷

\[di]

divide

u00F7

division sign

÷

\[tdi]

divide

u00F7

text variant of \[di]

⁄

\[f/]

fraction

u2044

bar for fractions

∗

\[**]

asteriskmath

u2217

mathematical asterisk

≤

\[<=]

lessequal

u2264

less or equal

≥

\[>=]

greaterequal

u2265

greater or equal

≪

\[<<]

uni226A

u226A

much less

≫

\[>>]

uni226B

u226B

much greater

=

\[eq]

equal

u003D

equals in special font

≠

\[!=]

notequal

u003D_0338

not equal

≡

\[==]

equivalence

u2261

equivalent

≢

\[ne]

uni2262

u2261_0338

not equivalent

≅

\[=~]

congruent

u2245

congruent, approx. equal

≃

\[|=]

uni2243

u2243

asymptot. equal to

∼

\[ap]

similar

u223C

similar

≈

\[~~]

approxequal

u2248

almost equal to

≈

\[~=]

approxequal

u2248

almost equal to

∝

\[pt]

proportional

u221D

proportional

∅

\[es]

emptyset

u2205

empty set

∈

\[mo]

element

u2208

element of a set

∉

\[nm]

notelement

u2208_0338

not element of set

⊂

\[sb]

propersubset

u2282

proper subset

⊄

\[nb]

notsubset

u2282_0338

not supset

⊃

\[sp]

propersuperset

u2283

proper superset

⊅

\[nc]

uni2285

u2283_0338

not superset

⊆

\[ib]

reflexsubset

u2286

subset or equal

⊇

\[ip]

reflexsuperset

u2287

superset or equal

∩

\[ca]

intersection

u2229

intersection, cap

∪

\[cu]

union

u222A

union, cup

∠

\[/_]

angle

u2220

angle

⊥

\[pp]

perpendicular

u22A5

perpendicular

∫

\[is]

integral

u222B

integral

∫

\[integral]

integral

u222B

integral

∑

\[sum]

summation

u2211

summation

∏

\[product]

product

u220F

product

∐

\[coproduct]

uni2210

u2210

coproduct

∇

\[gr]

gradient

u2207

gradient

√

\[sr]

radical

u221A

square root

√

\[sqrt]

radical

u221A

square root

\[radicalex]

radicalex

---

square root continuation

\[sqrtex]

radicalex

---

square root continuation

⌈

\[lc]

uni2308

u2308

left ceiling

⌉

\[rc]

uni2309

u2309

right ceiling

⌊

\[lf]

uni230A

u230A

left floor

⌋

\[rf]

uni230B

u230B

right floor

∞

\[if]

infinity

u221E

infinity

ℵ

\[Ah]

aleph

u2135

aleph

ℑ

\[Im]

Ifraktur

u2111

Gothic I, imaginary

ℜ

\[Re]

Rfraktur

u211C

Gothic R, real

℘

\[wp]

weierstrass

u2118

Weierstrass p

∂

\[pd]

partialdiff

u2202

partial differentiation

ℏ

\[-h]

uni210F

u210F

Planck constant / 2pi (h-bar)

ℏ

\[hbar]

uni210F

u210F

Planck constant / 2pi (h-bar)

Greek glyphs

These glyphs are intended for technical use, not for real Greek; normally, the uppercase letters have upright shape, and the lowercase ones are slanted. There is a problem with the mapping of letter phi to Unicode. Prior to Unicode version 3.0, the difference between U+03C6, GREEK SMALL LETTER PHI, and U+03D5, GREEK PHI SYMBOL, was not clearly described; only the glyph shapes in the Unicode book could be used as a reference. Starting with Unicode 3.0, the reference glyphs have been exchanged and described verbally also: In mathematical context, U+03D5 is the stroked variant and U+03C6 the curly glyph. Unfortunately, most font vendors didn't update their fonts to this (incompatible) change in Unicode. At the time of this writing (January 2006), it is not clear yet whether the Adobe Glyph Names ‘phi’ and ‘phi1’ also change its meaning if used for mathematics, thus compatibility problems are likely to happen – being conservative, groff currently assumes that ‘phi’ in a PostScript symbol font is the stroked version.

In groff, symbol ‘\[*f]’ always denotes the stroked version of phi, and ‘\[+f]’ the curly variant.

Output

Input

PostScript

Unicode

Notes

Α

\[*A]

Alpha

u0391

Alpha

Β

\[*B]

Beta

u0392

Beta

Γ

\[*G]

Gamma

u0393

Gamma

Δ

\[*D]

Delta

u0394

Delta

Ε

\[*E]

Epsilon

u0395

Epsilon

Ζ

\[*Z]

Zeta

u0396

Zeta

Η

\[*Y]

Eta

u0397

Eta

Θ

\[*H]

Theta

u0398

Theta

Ι

\[*I]

Iota

u0399

Iota

Κ

\[*K]

Kappa

u039A

Kappa

Λ

\[*L]

Lambda

u039B

Lamda

Μ

\[*M]

Mu

u039C

Mu

Ν

\[*N]

Nu

u039D

Nu

Ξ

\[*C]

Xi

u039E

Xi

Ο

\[*O]

Omicron

u039F

Omicron

Π

\[*P]

Pi

u03A0

Pi

Ρ

\[*R]

Rho

u03A1

Rho

Σ

\[*S]

Sigma

u03A3

Sigma

Τ

\[*T]

Tau

u03A4

Tau

Υ

\[*U]

Upsilon

u03A5

Upsilon

Φ

\[*F]

Phi

u03A6

Phi

Χ

\[*X]

Chi

u03A7

Chi

Ψ

\[*Q]

Psi

u03A8

Psi

Ω

\[*W]

Omega

u03A9

Omega

α

\[*a]

alpha

u03B1

alpha

β

\[*b]

beta

u03B2

beta

γ

\[*g]

gamma

u03B3

gamma

δ

\[*d]

delta

u03B4

delta

ε

\[*e]

epsilon

u03B5

epsilon

ζ

\[*z]

zeta

u03B6

zeta

η

\[*y]

eta

u03B7

eta

θ

\[*h]

theta

u03B8

theta

ι

\[*i]

iota

u03B9

iota

κ

\[*k]

kappa

u03BA

kappa

λ

\[*l]

lambda

u03BB

lambda

μ

\[*m]

mu

u03BC

mu

ν

\[*n]

nu

u03BD

nu

ξ

\[*c]

xi

u03BE

xi

ο

\[*o]

omicron

u03BF

omicron

π

\[*p]

pi

u03C0

pi

ρ

\[*r]

rho

u03C1

rho

ς

\[ts]

sigma1

u03C2

terminal sigma

σ

\[*s]

sigma

u03C3

sigma

τ

\[*t]

tau

u03C4

tau

υ

\[*u]

upsilon

u03C5

upsilon

ϕ

\[*f]

phi

u03D5

phi oked glyph)

χ

\[*x]

chi

u03C7

chi

ψ

\[*q]

psi

u03C8

psi

ω

\[*w]

omega

u03C9

omega

ϑ

\[+h]

theta1

u03D1

variant theta

φ

\[+f]

phi1

u03C6

variant phi (curly shape)

ϖ

\[+p]

omega1

u03D6

variant pi, looking like omega

ϵ

\[+e]

uni03F5

u03F5

variant epsilon

Card symbols

Output

Input

PostScript

Unicode

Notes

♣

\[CL]

club

u2663

black club suit

♠

\[SP]

spade

u2660

black spade suit

♥

\[HE]

heart

u2665

black heart suit

♡

\[u2661]

uni2661

u2661

white heart suit

♦

\[DI]

diamond

u2666

black diamond suit

♢

\[u2662]

uni2662

u2662

white diamond suit

## SEE ALSO
groff(1)

the GNU roff formatter

groff(7)

a short reference of the groff formatting language

An extension to the troff character set for Europe, E.G. Keizer, K.J. Simonsen, J. Akkerhuis; EUUG Newsletter, Volume 9, No. 2, Summer 1989

The Unicode Standard

## COPYING
Copyright © 1989-2014 Free Software Foundation, Inc.

This file is part of groff (GNU roff), which is a free software project.

You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

You should have received a copy of the GNU General Public License along with this program. If not, see GPL2.

## AUTHORS
This document was written by James Clark with additions by Werner Lemberg and Bernd Warken. This document was revised to use real tables by Eric S. Raymond.


package: groff-extra

title: groff_diff(7)

text:
# groff_diff(7)

## NAME
groff_diff - differences between GNU troff and classical troff

## DESCRIPTION
This manual page describes the language differences between groff, the GNU roff text processing system, and the classical roff formatter of the freely available Unix 7 of the 1970s, documented in the Troff User's Manual by Ossanna and Kernighan. This includes the roff language as well as the intermediate output format (troff output).

The section SEE ALSO gives pointers to both the classical roff and the modern groff documentation.

## GROFF LANGUAGE
In this section, all additional features of groff compared to the classical Unix 7 troff are described in detail.

### Long names
The names of number registers, fonts, strings/macros/diversions, special characters (glyphs), and colors can be of any length. In escape sequences, additionally to the classical ‘(xx’ construction for a two-character glyph name, you can use ‘[xxx]’ for a name of arbitrary length.

\[xxx]

Print the special character (glyph) called xxx.

\[comp1 comp2 ...]

Print composite glyph consisting of multiple components. Example: ‘\[A ho]’ is capital letter A with ogonek which finally maps to glyph name ‘u0041_0328’. See the groff info file for details how a glyph name for a composite glyph is constructed, and groff_char(7) for a list of glyph name components used in composite glyph names.

\f[xxx]

Set font xxx. Additionally, \f[] is a new syntax form equal to \fP, i.e., to return to the previous font.

\*[xxx arg1 arg2 ...]

Interpolate string xxx, taking arg1, arg2, ..., as arguments.

\n[xxx]

Interpolate number register xxx.

### Fractional point sizes
A scaled point is equal to 1/sizescale points, where sizescale is specified in the DESC file (1 by default). There is a new scale indicator z that has the effect of multiplying by sizescale. Requests and escape sequences in troff interpret arguments that represent a point size as being in units of scaled points, but they evaluate each such argument using a default scale indicator of z. Arguments treated in this way are the argument to the ps request, the third argument to the cs request, the second and fourth arguments to the tkf request, the argument to the \H escape sequence, and those variants of the \s escape sequence that take a numeric expression as their argument.

For example, suppose sizescale is 1000; then a scaled point is equivalent to a millipoint; the call .ps 10.25 is equivalent to .ps 10.25z and so sets the point size to 10250 scaled points, which is equal to 10.25 points.

The number register \n[.s] returns the point size in points as decimal fraction. There is also a new number register \n[.ps] that returns the point size in scaled points.

It would make no sense to use the z scale indicator in a numeric expression whose default scale indicator was neither u nor z, and so troff disallows this. Similarly it would make no sense to use a scaling indicator other than z or u in a numeric expression whose default scale indicator was z, and so troff disallows this as well.

There is also new scale indicator s which multiplies by the number of units in a scaled point. So, for example, \n[.ps]s is equal to 1m. Be sure not to confuse the s and z scale indicators.

### Numeric expressions
Spaces are permitted in a number expression within parentheses.

M indicates a scale of 100ths of an em. f indicates a scale of 65536 units, providing fractions for color definitions with the defcolor request. For example, 0.5f = 32768u.

e1>?e2

The maximum of e1 and e2.

e1<?e2

The minimum of e1 and e2.

(c;e)

Evaluate e using c as the default scaling indicator. If c is missing, ignore scaling indicators in the evaluation of e.

### New escape sequences
\A'anything'

This expands to 1 or 0, depending on whether anything is or is not acceptable as the name of a string, macro, diversion, number register, environment, font, or color. It returns 0 if anything is empty. This is useful if you want to look up user input in some sort of associative table.

\B'anything'

This expands to 1 or 0, depending on whether anything is or is not a valid numeric expression. It returns 0 if anything is empty.

\C'xxx'

Typeset glyph named xxx. Normally it is more convenient to use \[xxx]. But \C has the advantage that it is compatible with recent versions of UNIX and is available in compatibility mode.

\E

This is equivalent to an escape character, but it is not interpreted in copy mode. For example, strings to start and end superscripting could be defined like this

```
.ds { \v'-.3m'\s'\En[.s]*6u/10u'
.ds } \s0\v'.3m'

```

The use of \E ensures that these definitions work even if \*{ gets interpreted in copy mode (for example, by being used in a macro argument).

\Ff

\F(fm

\F[fam]

Change font family. This is the same as the fam request. \F[] switches back to the previous font family (note that \FP won't work; it selects font family ‘P’ instead).

\mx

\m(xx

\m[xxx]

Set drawing color. \m[] switches back to the previous color.

\Mx

\M(xx

\M[xxx]

Set background color for filled objects drawn with the \D'...' commands. \M[] switches back to the previous color.

\N'n'

Typeset the glyph with index n in the current font. n can be any integer. Most devices only have glyphs with indices between 0 and 255. If the current font does not contain a glyph with that code, special fonts are not searched. The \N escape sequence can be conveniently used in conjunction with the char request, for example

```
.char \[phone] \f(ZD\N'37'

```

The index of each glyph is given in the fourth column in the font description file after the charset command. It is possible to include unnamed glyphs in the font description file by using a name of ---; the \N escape sequence is the only way to use these.

\On

\O[n]

Suppress troff output. The escapes \O2, \O3, \O4, and \O5 are intended for internal use by grohtml.

\O0

Disable any ditroff glyphs from being emitted to the device driver, provided that the escape occurs at the outer level (see \O3 and \O4).

\O1

Enable output of glyphs, provided that the escape occurs at the outer level.

\O0 and \O1 also reset the registers \n[opminx], \n[opminy], \n[opmaxx], and \n[opmaxy] to -1. These four registers mark the top left and bottom right hand corners of a box which encompasses all written glyphs.

\O2

Provided that the escape occurs at the outer level, enable output of glyphs and also write out to stderr the page number and four registers encompassing the glyphs previously written since the last call to \O.

\O3

Begin a nesting level. At start-up, troff is at outer level. This is really an internal mechanism for grohtml while producing images. They are generated by running the troff source through troff to the postscript device and ghostscript to produce images in PNG format. The \O3 escape starts a new page if the device is not html (to reduce the possibility of images crossing a page boundary).

\O4

End a nesting level.

\O5[Pfilename]

This escape is grohtml specific. Provided that this escape occurs at the outer nesting level, write filename to stderr. The position of the image, P, must be specified and must be one of l, r, c, or i (left, right, centered, inline). filename is associated with the production of the next inline image.

\R'name ±n'

This has the same effect as

.nr name ±n

\s(nn

\s±(nn

Set the point size to nn points; nn must be exactly two digits.

\s[±n]

\s±[n]

\s'±n'

\s±'n'

Set the point size to n scaled points; n is a numeric expression with a default scale indicator of z.

\Vx

\V(xx

\V[xxx]

Interpolate the contents of the environment variable xxx, as returned by getenv(3). \V is interpreted in copy mode.

\Yx

\Y(xx

\Y[xxx]

This is approximately equivalent to \X'\*[xxx]'. However the contents of the string or macro xxx are not interpreted; also it is permitted for xxx to have been defined as a macro and thus contain newlines (it is not permitted for the argument to \X to contain newlines). The inclusion of newlines requires an extension to the UNIX troff output format, and confuses drivers that do not know about this extension.

\Z'anything'

Print anything and then restore the horizontal and vertical position; anything may not contain tabs or leaders.

\$0

The name by which the current macro was invoked. The als request can make a macro have more than one name.

\$*

In a macro or string, the concatenation of all the arguments separated by spaces.

\$@

In a macro or string, the concatenation of all the arguments with each surrounded by double quotes, and separated by spaces.

\$^

In a macro, the representation of all parameters as if they were an argument to the ds request.

\$(nn

\$[nnn]

In a macro or string, this gives the nn-th or nnn-th argument. Macros and strings can have an unlimited number of arguments.

\?anything\?

When used in a diversion, this transparently embeds anything in the diversion. anything is read in copy mode. When the diversion is reread, anything is interpreted. anything may not contain newlines; use \! if you want to embed newlines in a diversion. The escape sequence \? is also recognized in copy mode and turned into a single internal code; it is this code that terminates anything. Thus

```
.nr x 1
.nf
.di d
\?\\?\\\\?\\\\\\\
\nx\\\\?\\?\?
.di
.nr x 2
.di e
.d
.di
.nr x 3
.di f
.e
.di
.nr x 4
.f

```

prints 4.

\/

This increases the width of the preceding glyph so that the spacing between that glyph and the following glyph is correct if the following glyph is a roman glyph. It is a good idea to use this escape sequence whenever an italic glyph is immediately followed by a roman glyph without any intervening space.

\,

This modifies the spacing of the following glyph so that the spacing between that glyph and the preceding glyph is correct if the preceding glyph is a roman glyph. It is a good idea to use this escape sequence whenever a roman glyph is immediately followed by an italic glyph without any intervening space.

\)

Like \& except that it behaves like a character declared with the cflags request to be transparent for the purposes of end-of-sentence recognition.

\~

This produces an unbreakable space that stretches like a normal inter-word space when a line is adjusted.

\:

This causes the insertion of a zero-width break point. It is equal to \% within a word but without insertion of a soft hyphen glyph.

\#

Everything up to and including the next newline is ignored. This is interpreted in copy mode. It is like \" except that \" does not ignore the terminating newline.

### New requests
.aln xx yy

Create an alias xx for number register object named yy. The new name and the old name are exactly equivalent. If yy is undefined, a warning of type reg is generated, and the request is ignored.

.als xx yy

Create an alias xx for request, string, macro, or diversion object named yy. The new name and the old name are exactly equivalent (it is similar to a hard rather than a soft link). If yy is undefined, a warning of type mac is generated, and the request is ignored. The de, am, di, da, ds, and as requests only create a new object if the name of the macro, diversion or string is currently undefined or if it is defined to be a request; normally they modify the value of an existing object.

.am1 xx yy

Similar to .am, but compatibility mode is switched off during execution. To be more precise, a ‘compatibility save’ token is inserted at the beginning of the macro addition, and a ‘compatibility restore’ token at the end. As a consequence, the requests am, am1, de, and de1 can be intermixed freely since the compatibility save/restore tokens only affect the macro parts defined by .am1 and .ds1.

.ami xx yy

Append to macro indirectly. See the dei request below for more information.

.ami1 xx yy

Same as the ami request but compatibility mode is switched off during execution.

.as1 xx yy

Similar to .as, but compatibility mode is switched off during expansion. To be more precise, a ‘compatibility save’ token is inserted at the beginning of the string, and a ‘compatibility restore’ token at the end. As a consequence, the requests as, as1, ds, and ds1 can be intermixed freely since the compatibility save/restore tokens only affect the (sub)strings defined by as1 and ds1.

.asciify xx

This request ‘unformats’ the diversion xx in such a way that ASCII and space characters (and some escape sequences) that were formatted and diverted into xx are treated like ordinary input characters when xx is reread. Useful for diversions in conjunction with the writem request. It can be also used for gross hacks; for example, this

```
.tr @.
.di x
@nr n 1
.br
.di
.tr @@
.asciify x
.x

```

sets register n to 1. Note that glyph information (font, font size, etc.) is not preserved; use .unformat instead.

.backtrace

Print a backtrace of the input stack on stderr.

.blm xx

Set the blank line macro to xx. If there is a blank line macro, it is invoked when a blank line is encountered instead of the usual troff behaviour.

.box xx

.boxa xx

These requests are similar to the di and da requests with the exception that a partially filled line does not become part of the diversion (i.e., the diversion always starts with a new line) but is restored after ending the diversion, discarding the partially filled line which possibly comes from the diversion.

.break

Break out of a while loop. See also the while and continue requests. Be sure not to confuse this with the br request.

.brp

This is the same as \p.

.cflags n c1 c2 ...

Characters c1, c2, ..., have properties determined by n, which is ORed from the following:

1

The character ends sentences (initially characters .?! have this property).

2

Lines can be broken before the character (initially no characters have this property); a line is not broken at a character with this property unless the characters on each side both have non-zero hyphenation codes. This can be overridden with value 64.

4

Lines can be broken after the character (initially characters -\[hy]\[em] have this property); a line is not broken at a character with this property unless the characters on each side both have non-zero hyphenation codes. This can be overridden with value 64.

8

The glyph associated with this character overlaps horizontally (initially characters \[ul]\[rn]\[ru]\[radicalex]\[sqrtex] have this property).

16

The glyph associated with this character overlaps vertically (initially glyph \[br] has this property).

32

An end-of-sentence character followed by any number of characters with this property is treated as the end of a sentence if followed by a newline or two spaces; in other words the character is transparent for the purposes of end-of-sentence recognition; this is the same as having a zero space factor in TeX (initially characters "')]*\[dg]\[rq]\[cq] have this property).

64

Ignore hyphenation code values of the surrounding characters. Use this in combination with values 2 and 4 (initially no characters have this property).

128

Prohibit a line break before the character, but allow a line break after the character. This works only in combination with flags 256 and 512 and has no effect otherwise.

256

Prohibit a line break after the character, but allow a line break before the character. This works only in combination with flags 128 and 512 and has no effect otherwise.

512

Allow line break before or after the character. This works only in combination with flags 128 and 256 and has no effect otherwise.

Contrary to flag values 2 and 4, the flags 128, 256, and 512 work pairwise. If, for example, the left character has value 512, and the right character 128, no line break gets inserted. If we use value 6 instead for the left character, a line break after the character can't be suppressed since the right neighbour character doesn't get examined.

.char c string

[This request can both define characters and glyphs.]

Define entity c to be string. To be more precise, define (or even override) a groff entity which can be accessed with name c on the input side, and which uses string on the output side. Every time glyph c needs to be printed, string is processed in a temporary environment and the result is wrapped up into a single object. Compatibility mode is turned off and the escape character is set to \ while string is being processed. Any emboldening, constant spacing or track kerning is applied to this object rather than to individual glyphs in string.

A groff object defined by this request can be used just like a normal glyph provided by the output device. In particular other characters can be translated to it with the tr request; it can be made the leader glyph by the lc request; repeated patterns can be drawn with the glyph using the \l and \L escape sequences; words containing c can be hyphenated correctly, if the hcode request is used to give the object a hyphenation code.

There is a special anti-recursion feature: Use of glyph within the glyph's definition is handled like normal glyphs not defined with char.

A glyph definition can be removed with the rchar request.

.chop xx

Chop the last element off macro, string, or diversion xx. This is useful for removing the newline from the end of diversions that are to be interpolated as strings.

.class name c1 c2 ...

Assign name to a set of characters c1, c2, ..., so that they can be referred to from other requests easily (currently .cflags only). Character ranges (indicated by an intermediate ‘-’) and nested classes are possible also. This is useful to assign properties to a large set of characters.

.close stream

Close the stream named stream; stream will no longer be an acceptable argument to the write request. See the open request.

.composite glyph1 glyph2

Map glyph name glyph1 to glyph name glyph2 if it is used in \[...] with more than one component.

.continue

Finish the current iteration of a while loop. See also the while and break requests.

.color n

If n is non-zero or missing, enable colors (this is the default), otherwise disable them.

.cp n

If n is non-zero or missing, enable compatibility mode, otherwise disable it. In compatibility mode, long names are not recognized, and the incompatibilities caused by long names do not arise.

.defcolor xxx scheme color_components

Define color xxx. scheme can be one of the following values: rgb (three components), cmy (three components), cmyk (four components), and gray or grey (one component). Color components can be given either as a hexadecimal string or as positive decimal integers in the range 0–65535. A hexadecimal string contains all color components concatenated; it must start with either # or ##. The former specifies hex values in the range 0–255 (which are internally multiplied by 257), the latter in the range 0–65535. Examples: #FFC0CB (pink), ##ffff0000ffff (magenta). A new scaling indicator f has been introduced which multiplies its value by 65536; this makes it convenient to specify color components as fractions in the range 0 to 1. Example:

```
.defcolor darkgreen rgb 0.1f 0.5f 0.2f

```

Note that f is the default scaling indicator for the defcolor request, thus the above statement is equivalent to

```
.defcolor darkgreen rgb 0.1 0.5 0.2

```

The color named default (which is device-specific) can't be redefined. It is possible that the default color for \M and \m is not the same.

.de1 xx yy

Similar to .de, but compatibility mode is switched off during execution. On entry, the current compatibility mode is saved and restored at exit.

.dei xx yy

Define macro indirectly. The following example

```
.ds xx aa
.ds yy bb
.dei xx yy

```

is equivalent to

```
.de aa bb

```

.dei1 xx yy

Similar to the dei request but compatibility mode is switched off during execution.

.device anything

This is (almost) the same as the \X escape. anything is read in copy mode; a leading " is stripped.

.devicem xx

This is the same as the \Y escape (to embed the contents of a macro into the intermediate output preceded with ‘x X’).

.do xxx

Interpret .xxx with compatibility mode disabled. For example,

```
.do fam T

```

would have the same effect as

```
.fam T

```

except that it would work even if compatibility mode had been enabled. Note that the previous compatibility mode is restored before any files sourced by xxx are interpreted.

.ds1 xx yy

Similar to .ds, but compatibility mode is switched off during expansion. To be more precise, a ‘compatibility save’ token is inserted at the beginning of the string, and a ‘compatibility restore’ token at the end.

.ecs

Save current escape character.

.ecr

Restore escape character saved with ecs. Without a previous call to ecs, ‘\’ will be the new escape character.

.evc xx

Copy the contents of environment xx to the current environment. No pushing or popping of environments is done.

.fam xx

Set the current font family to xx. The current font family is part of the current environment. If xx is missing, switch back to previous font family. The value at start-up is ‘T’. See the description of the sty request for more information on font families.

.fchar c string

Define fallback character (or glyph) c to be string. The syntax of this request is the same as the char request; the only difference is that a glyph defined with char hides the glyph with the same name in the current font, whereas a glyph defined with fchar is checked only if the particular glyph isn't found in the current font. This test happens before checking special fonts.

.fcolor c

Set the fill color to c. If c is missing, switch to the previous fill color.

.fschar f c string

Define fallback character (or glyph) c for font f to be string. The syntax of this request is the same as the char request (with an additional argument to specify the font); a glyph defined with fschar is searched after the list of fonts declared with the fspecial request but before the list of fonts declared with .special.

.fspecial f s1 s2 ...

When the current font is f, fonts s1, s2, ..., are special, that is, they are searched for glyphs not in the current font. Any fonts specified in the special request are searched after fonts specified in the fspecial request. Without argument, reset the list of global special fonts to be empty.

.ftr f g

Translate font f to g. Whenever a font named f is referred to in an \f escape sequence, in the F and S conditional operators, or in the ft, ul, bd, cs, tkf, special, fspecial, fp, or sty requests, font g is used. If g is missing, or equal to f then font f is not translated.

.fzoom f zoom

Set zoom factor zoom for font f. zoom must a non-negative integer multiple of 1/1000th. If it is missing or is equal to zero, it means the same as 1000, namely no magnification. f must be a real font name, not a style.

.gcolor c

Set the glyph color to c. If c is missing, switch to the previous glyph color.

.hcode c1 code1 c2 code2 ...

Set the hyphenation code of character c1 to code1 and that of c2 to code2, and so on. A hyphenation code must be a single input character (not a special character) other than a digit or a space. Initially each lower-case letter a–z has a hyphenation code, which is itself, and each upper-case letter A–Z has a hyphenation code which is the lower-case version of itself. See also the hpf request.

.hla lang

Set the current hyphenation language to lang. Hyphenation exceptions specified with the hw request and hyphenation patterns specified with the hpf request are both associated with the current hyphenation language. The hla request is usually invoked by the troffrc file to set up a default language.

.hlm n

Set the maximum number of consecutive hyphenated lines to n. If n is negative, there is no maximum. The default value is -1. This value is associated with the current environment. Only lines output from an environment count towards the maximum associated with that environment. Hyphens resulting from \% are counted; explicit hyphens are not.

.hpf file

Read hyphenation patterns from file; this is searched for in the same way that name.tmac is searched for when the -mname option is specified. It should have the same format as (simple) TeX patterns files. More specifically, the following scanning rules are implemented.

•

A percent sign starts a comment (up to the end of the line) even if preceded by a backslash.

•

No support for ‘digraphs’ like \$.

•

^^xx (x is 0–9 or a–f) and ^^x (character code of x in the range 0–127) are recognized; other use of ^ causes an error.

•

No macro expansion.

•

hpf checks for the expression \patterns{...} (possibly with whitespace before and after the braces). Everything between the braces is taken as hyphenation patterns. Consequently, { and } are not allowed in patterns.

•

Similarly, \hyphenation{...} gives a list of hyphenation exceptions.

•

\endinput is recognized also.

•

For backwards compatibility, if \patterns is missing, the whole file is treated as a list of hyphenation patterns (only recognizing the % character as the start of a comment).

Use the hpfcode request to map the encoding used in hyphenation patterns files to groff's input encoding. By default, everything maps to itself except letters ‘A’ to ‘Z’ which map to ‘a’ to ‘z’.

The set of hyphenation patterns is associated with the current language set by the hla request. The hpf request is usually invoked by the troffrc file; a second call replaces the old patterns with the new ones.

.hpfa file

The same as hpf except that the hyphenation patterns from file are appended to the patterns already loaded in the current language.

.hpfcode a b c d ...

After reading a hyphenation patterns file with the hpf or hpfa request, convert all characters with character code a in the recently read patterns to character code b, character code c to d, etc. Initially, all character codes map to themselves. The arguments of hpfcode must be integers in the range 0 to 255. Note that it is even possible to use character codes which are invalid in groff otherwise.

.hym n

Set the hyphenation margin to n: when the current adjustment mode is not b, the line is not hyphenated if the line is no more than n short. The default hyphenation margin is 0. The default scaling indicator for this request is m. The hyphenation margin is associated with the current environment. The current hyphenation margin is available in the \n[.hym] register.

.hys n

Set the hyphenation space to n: When the current adjustment mode is b don't hyphenate the line if the line can be justified by adding no more than n extra space to each word space. The default hyphenation space is 0. The default scaling indicator for this request is m. The hyphenation space is associated with the current environment. The current hyphenation space is available in the \n[.hys] register.

.itc n macro

Variant of .it for which a line interrupted with \c counts as one input line.

.kern n

If n is non-zero or missing, enable pairwise kerning, otherwise disable it.

.length xx string

Compute the length of string and return it in the number register xx (which is not necessarily defined before).

.linetabs n

If n is non-zero or missing, enable line-tabs mode, otherwise disable it (which is the default). In line-tabs mode, tab distances are computed relative to the (current) output line. Otherwise they are taken relative to the input line. For example, the following

```
.ds x a\t\c
.ds y b\t\c
.ds z c
.ta 1i 3i
\*x
\*y
\*z

```

yields

```
a         b         c

```

In line-tabs mode, the same code gives

```
a         b                   c

```

Line-tabs mode is associated with the current environment; the read-only number register \n[.linetabs] is set to 1 if in line-tabs mode, and 0 otherwise.

.lsm xx

Set the leading spaces macro to xx. If there are leading spaces in an input line, it is invoked instead of the usual troff behaviour; the leading spaces are removed. Registers \n[lsn] and \n[lss] hold the number of removed leading spaces and the corresponding horizontal space, respectively.

.mso file

The same as the so request except that file is searched for in the same directories as macro files for the the -m command line option. If the file name to be included has the form name.tmac and it isn't found, mso tries to include tmac.name instead and vice versa. A warning of type file is generated if file can't be loaded, and the request is ignored.

.nop anything

Execute anything. This is similar to ‘.if 1’.

.nroff

Make the n built-in condition true and the t built-in condition false. This can be reversed using the troff request.

.open stream filename

Open filename for writing and associate the stream named stream with it. See also the close and write requests.

.opena stream filename

Like open, but if filename exists, append to it instead of truncating it.

.output string

Emit string directly to the intermediate output (subject to copy-mode interpretation); this is similar to \! used at the top level. An initial double quote in string is stripped off to allow initial blanks.

.pev

Print the current environment and each defined environment state on stderr.

.pnr

Print the names and contents of all currently defined number registers on stderr.

.psbb filename

Get the bounding box of a PostScript image filename. This file must conform to Adobe's Document Structuring Conventions; the command looks for a %%BoundingBox comment to extract the bounding box values. After a successful call, the coordinates (in PostScript units) of the lower left and upper right corner can be found in the registers \n[llx], \n[lly], \n[urx], and \n[ury], respectively. If some error has occurred, the four registers are set to zero.

.pso command

This behaves like the so request except that input comes from the standard output of command.

.ptr

Print the names and positions of all traps (not including input line traps and diversion traps) on stderr. Empty slots in the page trap list are printed as well, because they can affect the priority of subsequently planted traps.

.pvs ±n

Set the post-vertical line space to n; default scale indicator is p. This value is added to each line after it has been output. With no argument, the post-vertical line space is set to its previous value.

The total vertical line spacing consists of four components: .vs and \x with a negative value which are applied before the line is output, and .pvs and \x with a positive value which are applied after the line is output.

.rchar c1 c2 ...

Remove the definitions of glyphs c1, c2, ... This undoes the effect of a char request.

.return

Within a macro, return immediately. If called with an argument, return twice, namely from the current macro and from the macro one level higher. No effect otherwise.

.rfschar c1 c2 ...

Remove the font-specific definitions of glyphs c1, c2, ... This undoes the effect of a fschar request.

.rj

.rj n

Right justify the next n input lines. Without an argument right justify the next input line. The number of lines to be right justified is available in the \n[.rj] register. This implicitly does .ce 0. The ce request implicitly does .rj 0.

.rnn xx yy

Rename number register xx to yy.

.schar c string

Define global fallback character (or glyph) c to be string. The syntax of this request is the same as the char request; a glyph defined with schar is searched after the list of fonts declared with the special request but before the mounted special fonts.

.shc c

Set the soft hyphen character to c. If c is omitted, the soft hyphen character is set to the default \[hy]. The soft hyphen character is the glyph which is inserted when a word is hyphenated at a line break. If the soft hyphen character does not exist in the font of the glyph immediately preceding a potential break point, then the line is not broken at that point. Neither definitions (specified with the char request) nor translations (specified with the tr request) are considered when finding the soft hyphen character.

.shift n

In a macro, shift the arguments by n positions: argument i becomes argument i-n; arguments 1 to n are no longer available. If n is missing, arguments are shifted by 1. Shifting by negative amounts is currently undefined.

.sizes s1 s2 ... sn [0]

This command is similar to the sizes command of a DESC file. It sets the available font sizes for the current font to s1, s2, ..., sn scaled points. The list of sizes can be terminated by an optional 0. Each si can also be a range of sizes m–n. Contrary to the font file command, the list can't extend over more than a single line.

.special s1 s2 ...

Fonts s1, s2, ..., are special and are searched for glyphs not in the current font. Without arguments, reset the list of special fonts to be empty.

.spreadwarn limit

Make troff emit a warning if the additional space inserted for each space between words in an output line is larger or equal to limit. A negative value is changed to zero; no argument toggles the warning on and off without changing limit. The default scaling indicator is m. At startup, spreadwarn is deactivated, and limit is set to 3m. For example, .spreadwarn 0.2m causes a warning if troff must add 0.2m or more for each interword space in a line. This request is active only if text is justified to both margins (using .ad b).

.sty n f

Associate style f with font position n. A font position can be associated either with a font or with a style. The current font is the index of a font position and so is also either a font or a style. When it is a style, the font that is actually used is the font the name of which is the concatenation of the name of the current family and the name of the current style. For example, if the current font is 1 and font position 1 is associated with style R and the current font family is T, then font TR is used. If the current font is not a style, then the current family is ignored. When the requests cs, bd, tkf, uf, or fspecial are applied to a style, then they are applied instead to the member of the current family corresponding to that style. The default family can be set with the -f command line option. The styles command in the DESC file controls which font positions (if any) are initially associated with styles rather than fonts.

.substring xx n1 [n2]

Replace the string named xx with the substring defined by the indices n1 and n2. The first character in the string has index 0. If n2 is omitted, it is taken to be equal to the string's length. If the index value n1 or n2 is negative, it is counted from the end of the string, going backwards: The last character has index -1, the character before the last character has index -2, etc.

.tkf f s1 n1 s2 n2

Enable track kerning for font f. When the current font is f the width of every glyph is increased by an amount between n1 and n2; when the current point size is less than or equal to s1 the width is increased by n1; when it is greater than or equal to s2 the width is increased by n2; when the point size is greater than or equal to s1 and less than or equal to s2 the increase in width is a linear function of the point size.

.tm1 string

Similar to the tm request, string is read in copy mode and written on the standard error, but an initial double quote in string is stripped off to allow initial blanks.

.tmc string

Similar to tm1 but without writing a final newline.

.trf filename

Transparently output the contents of file filename. Each line is output as if preceded by \!; however, the lines are not subject to copy-mode interpretation. If the file does not end with a newline, then a newline is added. For example, you can define a macro x containing the contents of file f, using

```
.di x
.trf f
.di

```

Unlike with the cf request, the file cannot contain characters such as NUL that are not valid troff input characters.

.trin abcd

This is the same as the tr request except that the asciify request uses the character code (if any) before the character translation. Example:

```
.trin ax
.di xxx
a
.br
.di
.xxx
.trin aa
.asciify xxx
.xxx

```

The result is x a. Using tr, the result would be x x.

.trnt abcd

This is the same as the tr request except that the translations do not apply to text that is transparently throughput into a diversion with \!. For example,

```
.tr ab
.di x
\!.tm a
.di
.x

```

prints b; if trnt is used instead of tr it prints a.

.troff

Make the n built-in condition false, and the t built-in condition true. This undoes the effect of the nroff request.

.unformat xx

This request ‘unformats’ the diversion xx. Contrary to the asciify request, which tries to convert formatted elements of the diversion back to input tokens as much as possible, .unformat only handles tabs and spaces between words (usually caused by spaces or newlines in the input) specially. The former are treated as if they were input tokens, and the latter are stretchable again. Note that the vertical size of lines is not preserved. Glyph information (font, font size, space width, etc.) is retained. Useful in conjunction with the box and boxa requests.

.vpt n

Enable vertical position traps if n is non-zero, disable them otherwise. Vertical position traps are traps set by the wh or dt requests. Traps set by the it request are not vertical position traps. The parameter that controls whether vertical position traps are enabled is global. Initially vertical position traps are enabled.

.warn n

Control warnings. n is the sum of the numbers associated with each warning that is to be enabled; all other warnings are disabled. The number associated with each warning is listed in troff(1). For example, .warn 0 disables all warnings, and .warn 1 disables all warnings except that about missing glyphs. If n is not given, all warnings are enabled.

.warnscale si

Set the scaling indicator used in warnings to si. Valid values for si are u, i, c, p, and P. At startup, it is set to i.

.while c anything

While condition c is true, accept anything as input; c can be any condition acceptable to an if request; anything can comprise multiple lines if the first line starts with \{ and the last line ends with \}. See also the break and continue requests.

.write stream anything

Write anything to the stream named stream. stream must previously have been the subject of an open request. anything is read in copy mode; a leading " is stripped.

.writec stream anything

Similar to write but without writing a final newline.

.writem stream xx

Write the contents of the macro or string xx to the stream named stream. stream must previously have been the subject of an open request. xx is read in copy mode.

### Extended escape sequences
\D'...'

All drawing commands of groff's intermediate output are accepted. See subsection Drawing Commands below for more information.

### Extended requests
.cf filename

When used in a diversion, this embeds in the diversion an object which, when reread, will cause the contents of filename to be transparently copied through to the output. In UNIX troff, the contents of filename is immediately copied through to the output regardless of whether there is a current diversion; this behaviour is so anomalous that it must be considered a bug.

.de xx yy

.am xx yy

.ds xx yy

.as xx yy

In compatibility mode, these requests behaves similar to .de1, .am1, .ds1, and .as1, respectively: A ‘compatibility save’ token is inserted at the beginning, and a ‘compatibility restore’ token at the end, with compatibility mode switched on during execution.

.ev xx

If xx is not a number, this switches to a named environment called xx. The environment should be popped with a matching ev request without any arguments, just as for numbered environments. There is no limit on the number of named environments; they are created the first time that they are referenced.

.ss m n

When two arguments are given to the ss request, the second argument gives the sentence space size. If the second argument is not given, the sentence space size is the same as the word space size. Like the word space size, the sentence space is in units of one twelfth of the spacewidth parameter for the current font. Initially both the word space size and the sentence space size are 12. Contrary to UNIX troff, GNU troff handles this request in nroff mode also; a given value is then rounded down to the nearest multiple of 12. The sentence space size is used in two circumstances. If the end of a sentence occurs at the end of a line in fill mode, then both an inter-word space and a sentence space are added; if two spaces follow the end of a sentence in the middle of a line, then the second space is a sentence space. Note that the behaviour of UNIX troff are exactly that exhibited by GNU troff if a second argument is never given to the ss request. In GNU troff, as in UNIX troff, you should always follow a sentence with either a newline or two spaces.

.ta n1 n2 ... nn T r1 r2 ... rn

Set tabs at positions n1, n2, ..., nn and then set tabs at nn+r1, nn+r2, ..., nn+rn and then at nn+rn+r1, nn+rn+r2, ..., nn+rn+rn, and so on. For example,

```
.ta T .5i

```

sets tabs every half an inch.

### New number registers
The following read-only registers are available:

\n[.br]

Within a macro call, it is set to 1 if the macro is called with the ‘normal’ control character (‘.’ by default), and set to 0 otherwise. This allows to reliably modify requests.

```
.als bp*orig bp
.de bp
.tm before bp
.ie \\n[.br] .bp*orig
.el 'bp*orig
.tm after bp
..

```

Using this register outside of a macro makes no sense (it always returns zero in such cases).

\n[.C]

1 if compatibility mode is in effect, 0 otherwise.

\n[.cdp]

The depth of the last glyph added to the current environment. It is positive if the glyph extends below the baseline.

\n[.ce]

The number of lines remaining to be centered, as set by the ce request.

\n[.cht]

The height of the last glyph added to the current environment. It is positive if the glyph extends above the baseline.

\n[.color]

1 if colors are enabled, 0 otherwise.

\n[.csk]

The skew of the last glyph added to the current environment. The skew of a glyph is how far to the right of the center of a glyph the center of an accent over that glyph should be placed.

\n[.ev]

The name or number of the current environment. This is a string-valued register.

\n[.fam]

The current font family. This is a string-valued register.

\n[.fn]

The current (internal) real font name. This is a string-valued register. If the current font is a style, the value of \n[.fn] is the proper concatenation of family and style name.

\n[.fp]

The number of the next free font position.

\n[.g]

Always 1. Macros should use this to determine whether they are running under GNU troff.

\n[.height]

The current height of the font as set with \H.

\n[.hla]

The current hyphenation language as set by the hla request.

\n[.hlc]

The number of immediately preceding consecutive hyphenated lines.

\n[.hlm]

The maximum allowed number of consecutive hyphenated lines, as set by the hlm request.

\n[.hy]

The current hyphenation flags (as set by the hy request).

\n[.hym]

The current hyphenation margin (as set by the hym request).

\n[.hys]

The current hyphenation space (as set by the hys request).

\n[.in]

The indentation that applies to the current output line.

\n[.int]

Set to a positive value if last output line is interrupted (i.e., if it contains \c).

\n[.kern]

1 if pairwise kerning is enabled, 0 otherwise.

\n[.lg]

The current ligature mode (as set by the lg request).

\n[.linetabs]

The current line-tabs mode (as set by the linetabs request).

\n[.ll]

The line length that applies to the current output line.

\n[.lt]

The title length as set by the lt request.

\n[.m]

The name of the current drawing color. This is a string-valued register.

\n[.M]

The name of the current background color. This is a string-valued register.

\n[.ne]

The amount of space that was needed in the last ne request that caused a trap to be sprung. Useful in conjunction with the \n[.trunc] register.

\n[.ns]

1 if no-space mode is active, 0 otherwise.

\n[.O]

The current output level as set with \O.

\n[.P]

1 if the current page is in the output list set with -o.

\n[.pe]

1 during a page ejection caused by the bp request, 0 otherwise.

\n[.pn]

The number of the next page, either the value set by a pn request, or the number of the current page plus 1.

\n[.ps]

The current point size in scaled points.

\n[.psr]

The last-requested point size in scaled points.

\n[.pvs]

The current post-vertical line space as set with the pvs request.

\n[.rj]

The number of lines to be right-justified as set by the rj request.

\n[.slant]

The slant of the current font as set with \S.

\n[.sr]

The last requested point size in points as a decimal fraction. This is a string-valued register.

\n[.ss]

\n[.sss]

These give the values of the parameters set by the first and second arguments of the ss request.

\n[.sty]

The current font style. This is a string-valued register.

\n[.tabs]

A string representation of the current tab settings suitable for use as an argument to the ta request.

\n[.trunc]

The amount of vertical space truncated by the most recently sprung vertical position trap, or, if the trap was sprung by a ne request, minus the amount of vertical motion produced by the ne request. In other words, at the point a trap is sprung, it represents the difference of what the vertical position would have been but for the trap, and what the vertical position actually is. Useful in conjunction with the \n[.ne] register.

\n[.U]

Set to 1 if in safer mode and to 0 if in unsafe mode (as given with the -U command line option).

\n[.vpt]

1 if vertical position traps are enabled, 0 otherwise.

\n[.warn]

The sum of the numbers associated with each of the currently enabled warnings. The number associated with each warning is listed in troff(1).

\n[.x]

The major version number. For example, if the version number is 1.03, then \n[.x] contains 1.

\n[.y]

The minor version number. For example, if the version number is 1.03, then \n[.y] contains 03.

\n[.Y]

The revision number of groff.

\n[.zoom]

The zoom value of the current font, in multiples of 1/1000th. Zero if no magnification.

\n[llx]

\n[lly]

\n[urx]

\n[ury]

These four read/write registers are set by the psbb request and contain the bounding box values (in PostScript units) of a given PostScript image.

The following read/write registers are set by the \w escape sequence:

\n[rst]

\n[rsb]

Like the st and sb registers, but take account of the heights and depths of glyphs.

\n[ssc]

The amount of horizontal space (possibly negative) that should be added to the last glyph before a subscript.

\n[skw]

How far to right of the center of the last glyph in the \w argument, the center of an accent from a roman font should be placed over that glyph.

Other available read/write number registers are:

\n[c.]

The current input line number. \n[.c] is a read-only alias to this register.

\n[hours]

The number of hours past midnight. Initialized at start-up.

\n[hp]

The current horizontal position at input line.

\n[lsn]

\n[lss]

If there are leading spaces in an input line, these registers hold the number of leading spaces and the corresponding horizontal space, respectively.

\n[minutes]

The number of minutes after the hour. Initialized at start-up.

\n[seconds]

The number of seconds after the minute. Initialized at start-up.

\n[systat]

The return value of the system() function executed by the last sy request.

\n[slimit]

If greater than 0, the maximum number of objects on the input stack. If less than or equal to 0, there is no limit on the number of objects on the input stack. With no limit, recursion can continue until virtual memory is exhausted.

\n[year]

The current year. Note that the traditional troff number register \n[yr] is the current year minus 1900.

### Miscellaneous
troff predefines a single (read/write) string-based register, \*[.T], which contains the argument given to the -T command line option, namely the current output device (for example, latin1 or ascii). Note that this is not the same as the (read-only) number register \n[.T] which is defined to be 1 if troff is called with the -T command line option, and zero otherwise. This behaviour is different to UNIX troff.

Fonts not listed in the DESC file are automatically mounted on the next available font position when they are referenced. If a font is to be mounted explicitly with the fp request on an unused font position, it should be mounted on the first unused font position, which can be found in the \n[.fp] register; although troff does not enforce this strictly, it does not allow a font to be mounted at a position whose number is much greater than that of any currently used position.

Interpolating a string does not hide existing macro arguments. Thus in a macro, a more efficient way of doing

.xx \\$@

is

\\*[xx]\\

If the font description file contains pairwise kerning information, glyphs from that font are kerned. Kerning between two glyphs can be inhibited by placing a \& between them.

In a string comparison in a condition, characters that appear at different input levels to the first delimiter character are not recognized as the second or third delimiters. This applies also to the tl request. In a \w escape sequence, a character that appears at a different input level to the starting delimiter character is not recognized as the closing delimiter character. The same is true for \A, \b, \B, \C, \l, \L, \o, \X, and \Z. When decoding a macro or string argument that is delimited by double quotes, a character that appears at a different input level to the starting delimiter character is not recognized as the closing delimiter character. The implementation of \$@ ensures that the double quotes surrounding an argument appear at the same input level, which is different to the input level of the argument itself. In a long escape name ] is not recognized as a closing delimiter except when it occurs at the same input level as the opening [. In compatibility mode, no attention is paid to the input-level.

There are some new types of condition:

.if rxxx

True if there is a number register named xxx.

.if dxxx

True if there is a string, macro, diversion, or request named xxx.

.if mxxx

True if there is a color named xxx.

.if cch

True if there is a character (or glyph) ch available; ch is either an ASCII character or a glyph (special character) \N'xxx', \(xx or \[xxx]; the condition is also true if ch has been defined by the char request.

.if Ff

True if font f exists. f is handled as if it was opened with the ft request (this is, font translation and styles are applied), without actually mounting it.

.if Ss

True if style s has been registered. Font translation is applied.

The tr request can now map characters onto \~.

The space width emitted by the \| and \^ escape sequences can be controlled on a per-font basis. If there is a glyph named \| or \^, respectively (note the leading backslash), defined in the current font file, use this glyph's width instead of the default value.

It is now possible to have whitespace between the first and second dot (or the name of the ending macro) to end a macro definition. Example:

```
.if t \{\
.  de bar
.    nop Hello, I'm ‘bar’.
.  .
.\}

```

## INTERMEDIATE OUTPUT FORMAT
This section describes the format output by GNU troff. The output format used by GNU troff is very similar to that used by Unix device-independent troff. Only the differences are documented here.

### Units
The argument to the s command is in scaled points (units of points/n, where n is the argument to the sizescale command in the DESC file). The argument to the x Height command is also in scaled points.

### Text Commands
Nn

Print glyph with index n (a non-negative integer) of the current font.

If the tcommand line is present in the DESC file, troff uses the following two commands.

txxx

xxx is any sequence of characters terminated by a space or a newline (to be more precise, it is a sequence of glyphs which are accessed with the corresponding characters); the first character should be printed at the current position, the current horizontal position should be increased by the width of the first character, and so on for each character. The width of the glyph is that given in the font file, appropriately scaled for the current point size, and rounded so that it is a multiple of the horizontal resolution. Special characters cannot be printed using this command.

un xxx

This is same as the t command except that after printing each character, the current horizontal position is increased by the sum of the width of that character and n.

Note that single characters can have the eighth bit set, as can the names of fonts and special characters.

The names of glyphs and fonts can be of arbitrary length; drivers should not assume that they are only two characters long.

When a glyph is to be printed, that glyph is always in the current font. Unlike device-independent troff, it is not necessary for drivers to search special fonts to find a glyph.

For color support, some new commands have been added:

mc cyan magenta yellow

md

mg gray

mk cyan magenta yellow black

mr red green blue

Set the color components of the current drawing color, using various color schemes. md resets the drawing color to the default value. The arguments are integers in the range 0 to 65536.

The x device control command has been extended.

x u n

If n is 1, start underlining of spaces. If n is 0, stop underlining of spaces. This is needed for the cu request in nroff mode and is ignored otherwise.

### Drawing Commands
The D drawing command has been extended. These extensions are not used by GNU pic if the -n option is given.

Df n\n

Set the shade of gray to be used for filling solid objects to n; n must be an integer between 0 and 1000, where 0 corresponds solid white and 1000 to solid black, and values in between correspond to intermediate shades of gray. This applies only to solid circles, solid ellipses and solid polygons. By default, a level of 1000 is used. Whatever color a solid object has, it should completely obscure everything beneath it. A value greater than 1000 or less than 0 can also be used: this means fill with the shade of gray that is currently being used for lines and text. Normally this is black, but some drivers may provide a way of changing this.

The corresponding \D'f...' command shouldn't be used since its argument is always rounded to an integer multiple of the horizontal resolution which can lead to surprising results.

DC d\n

Draw a solid circle with a diameter of d with the leftmost point at the current position.

DE dx dy\n

Draw a solid ellipse with a horizontal diameter of dx and a vertical diameter of dy with the leftmost point at the current position.

Dp

dx1 dy1 dx2 dy2 ... dxn dyn \n Draw a polygon with, for i=1,...,n+1 , the i-th vertex at the current position +∑j=1i-1(dxj,dyj) . At the moment, GNU pic only uses this command to generate triangles and rectangles.

DP

dx1 dy1 dx2 dy2 ... dxn dyn \n Like Dp but draw a solid rather than outlined polygon.

Dt n\n

Set the current line thickness to n machine units. Traditionally Unix troff drivers use a line thickness proportional to the current point size; drivers should continue to do this if no Dt command has been given, or if a Dt command has been given with a negative value of n. A zero value of n selects the smallest available line thickness.

A difficulty arises in how the current position should be changed after the execution of these commands. This is not of great importance since the code generated by GNU pic does not depend on this. Given a drawing command of the form

\D'c x1 y1 x2 y2 ... xn yn '

where c is not one of c, e, l, a, or ~, Unix troff treats each of the xi as a horizontal quantity, and each of the yi as a vertical quantity and assumes that the width of the drawn object is ∑i=1nxi , and that the height is ∑i=1nyi . (The assumption about the height can be seen by examining the st and sb registers after using such a D command in a \w escape sequence). This rule also holds for all the original drawing commands with the exception of De. For the sake of compatibility GNU troff also follows this rule, even though it produces an ugly result in the case of the Dt and Df, and, to a lesser extent, DE commands. Thus after executing a D command of the form

Dc x1 y1 x2 y2 ... xn yn \n

the current position should be increased by (∑i=1nxi,∑i=1nyi) .

Another set of extensions is

DFc cyan magenta yellow\n

DFd\n

DFg gray\n

DFk cyan magenta yellow black\n

DFr red green blue\n

Set the color components of the filling color similar to the m commands above.

The current position isn't changed by those colour commands (contrary to Df).

### Device Control Commands
There is a continuation convention which permits the argument to the x X command to contain newlines: when outputting the argument to the x X command, GNU troff follows each newline in the argument with a + character (as usual, it terminates the entire argument with a newline); thus if the line after the line containing the x X command starts with +, then the newline ending the line containing the x X command should be treated as part of the argument to the x X command, the + should be ignored, and the part of the line following the + should be treated like the part of the line following the x X command.

The first three output commands are guaranteed to be:

x T device

x res n h v

x init

## INCOMPATIBILITIES
In spite of the many extensions, groff has retained compatibility to classical troff to a large degree. For the cases where the extensions lead to collisions, a special compatibility mode with the restricted, old functionality was created for groff.

### Groff Language
groff provides a compatibility mode that allows to process roff code written for classical troff or for other implementations of roff in a consistent way.

Compatibility mode can be turned on with the -C command line option, and turned on or off with the .cp request. The number register \n(.C is 1 if compatibility mode is on, 0 otherwise.

This became necessary because the GNU concept for long names causes some incompatibilities. Classical troff interprets

.dsabcd

as defining a string ab with contents cd. In groff mode, this is considered as a call of a macro named dsabcd.

Also classical troff interprets \*[ or \n[ as references to a string or number register called [ while groff takes this as the start of a long name.

In compatibility mode, groff interprets these things in the traditional way; so long names are not recognized.

On the other hand, groff in GNU native mode does not allow to use the single-character escapes \\ (backslash), \| (vertical bar), \^ (caret), \& (ampersand), \{ (opening brace), \} (closing brace), ‘\ ’ (space), \' (single quote), \` (backquote), \- (minus), \_ (underline), \! (bang), \% (percent), and \c (character c) in names of strings, macros, diversions, number registers, fonts or environments, whereas classical troff does.

The \A escape sequence can be helpful in avoiding these escape sequences in names.

Fractional point sizes cause one noteworthy incompatibility. In classical troff, the ps request ignores scale indicators and so

.ps 10u

sets the point size to 10 points, whereas in groff native mode the point size is set to 10 scaled points.

In groff, there is a fundamental difference between unformatted input characters, and formatted output characters (glyphs). Everything that affects how a glyph is output is stored with the glyph; once a glyph has been constructed it is unaffected by any subsequent requests that are executed, including the bd, cs, tkf, tr, or fp requests.

Normally glyphs are constructed from input characters at the moment immediately before the glyph is added to the current output line. Macros, diversions and strings are all, in fact, the same type of object; they contain lists of input characters and glyphs in any combination.

Special characters can be both; before being added to the output, they act as input entities, afterwards they denote glyphs.

A glyph does not behave like an input character for the purposes of macro processing; it does not inherit any of the special properties that the input character from which it was constructed might have had. The following example makes things clearer.

```
.di x
\\\\
.br
.di
.x
```

With GNU troff this is printed as \\. So each pair of input backslashes ‘\\’ is turned into a single output backslash glyph ‘\’ and the resulting output backslashes are not interpreted as escape characters when they are reread.

Classical troff would interpret them as escape characters when they were reread and would end up printing a single backslash ‘\’.

In GNU, the correct way to get a printable version of the backslash character ’\’ is the \(rs escape sequence, but classical troff does not provide a clean feature for getting a non-syntactical backslash. A close method is the printable version of the current escape character using the \e escape sequence; this works if the current escape character is not redefined. It works in both GNU mode and compatibility mode, while dirty tricks like specifying a sequence of multiple backslashes do not work reliably; for the different handling in diversions, macro definitions, or text mode quickly leads to a confusion about the necessary number of backslashes.

To store an escape sequence in a diversion that is interpreted when the diversion is reread, either the traditional \! transparent output facility or the new \? escape sequence can be used.

### Intermediate Output
The groff intermediate output format is in a state of evolution. So far it has some incompatibilities, but it is intended to establish a full compatibility to the classical troff output format. Actually the following incompatibilities exist:

•

The positioning after the drawing of the polygons conflicts with the classical definition.

•

The intermediate output cannot be rescaled to other devices as classical ‘device-independent’ troff did.

## SEE ALSO
The groff info file, cf. info(1) presents all groff documentation within a single document.

groff(1)

A list of all documentation around groff.

groff(7)

A description of the groff language, including a short, but complete reference of all predefined requests, registers, and escapes of plain groff. From the command line, this is called using

```
man 7 groff

```

roff(7)

A survey of roff systems, including pointers to further historical documentation.

[CSTR #54]

The Nroff/Troff User's Manual by J. F. Ossanna of 1976 in the revision of Brian Kernighan of 1992, being the classical troff documentation.

## COPYING
Copyright © 1989-2014 Free Software Foundation, Inc.

This file is part of groff, the GNU roff type-setting system. It is the source of the man-page groff_diff(7).

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Front-Cover Texts, and with no Back-Cover Texts.

A copy of the Free Documentation License is included as a file called FDL in the main directory of the groff source package, it is also available in the internet at GNU FDL license.

## AUTHORS
This document was written by James Clark, was modified by Werner Lemberg and Bernd Warken.

branch: sisyphus