Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Escaping dots in groff

According to info groff (section 5.11 Character Translations), \. should print just the dot. However, this is not what seems to happen. If I render this manpage

.TH x x x x
\.SH foo

I get foo rendered as a section heading, and .SH is not printed.

So, why does this happen, and how do I escape the dot (and the apostrophe) at the begginning of the line in groff?

like image 228
Roman Cheplyaka Avatar asked Jul 13 '12 11:07

Roman Cheplyaka


1 Answers

Simply prepend the dot with a zero-width character:

\&.SH foo

or switch temporarily to another control character:

.cc #
.SH foo
#cc
like image 167
Ant_222 Avatar answered Sep 21 '22 11:09

Ant_222