summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-11-06 14:43:14 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-11-06 14:43:14 +0000
commita3d2601486005576848664f22121fcd2881778e3 (patch)
tree9937bf2834cc70fa10f85a72d53749f356bd733f
parent4c433934a384d19bd29d0468c0f871275f8c7fd0 (diff)
downloadmandoc-a3d2601486005576848664f22121fcd2881778e3.tar.gz
Accomodate for \f(Cx formatting. Noted by Andreas Vogele, thanks!
-rw-r--r--mandoc.c9
-rw-r--r--roff.72
2 files changed, 10 insertions, 1 deletions
diff --git a/mandoc.c b/mandoc.c
index e9cfc632..b60691a2 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -369,8 +369,15 @@ out:
switch (gly) {
case (ESCAPE_FONT):
- if (1 != rlim)
+ /*
+ * Pretend that the constant-width font modes are the
+ * same as the regular font modes.
+ */
+ if (2 == rlim && 'C' == *rstart)
+ rstart++;
+ else if (1 != rlim)
break;
+
switch (*rstart) {
case ('3'):
/* FALLTHROUGH */
diff --git a/roff.7 b/roff.7
index d67e374e..b82020d0 100644
--- a/roff.7
+++ b/roff.7
@@ -143,6 +143,8 @@ escape followed by an indicator: B (bold), I (italic), R (regular), or P
(revert to previous mode).
A numerical representation 3, 2, or 1 (bold, italic, and regular,
respectively) may be used instead.
+The indicator or numerical representative may be preceded by C
+(constant-width), which is ignored.
.Pp
Examples:
.Bl -tag -width Ds -offset indent -compact