8

I've just been looking through a few man pages for a few different commands including grep and ifconfig.

I've noticed over a few pages, the content uses a strange syntax to notate what i think are quotations (back-tick followed by a single or double quote):

`text'

Quote Example

Why can't they use ' or " to open and close quotations?

Update

I now realise that this should be bolding out the characters instead of noting quotes. Is there any reason my system is ignoring these when formatting? I'm using OSX.

Matt
  • 223

2 Answers2

13

Man pages historically have been written in the troff/nroff markup language, although there are alternatives now such as DocBook.

Troff, which is meant for preparing output to a phototypesetter (or to files in formats such as PostScript or PDF), will automatically change the ` and ' characters in the input into curved quotation marks, and . (See the Troff User’s Manual, section 2.1).

Nroff, which is what the man command runs when the output is to a terminal, will pass those characters through unchanged.

Those quotes are actually in the man page sources for the older version of GNU grep (2.5.1) in FreeBSD and OSX:

.B GREP_COLOR
environment variable. WHEN may be `never', `always', or `auto'

More recent versions of GNU grep do not have those quotes in the man page sources:

.I WHEN
is
.BR never ", " always ", or " auto .
Mark Plotnick
  • 25,413
  • 3
  • 64
  • 82
7

These quotation marks are often used because they look nice, similar to the quotation marks in printed books (which are different at the beginning and end of the quoted passage).

These quotation marks may also have been added by your local troff configuration (or, could be removed by it!). The actual file may not contain these characters literally. You can check with something like

zcat /usr/share/man/man8/ifconfig.8.gz | less

how the man pages look like on disk. They are formatted for screen output by the tron/troff family of programs (hardly known or in use today, but very useful in the text-only console times...). Check the man page of man(1) for details!

Ned64
  • 8,726