From 050315e505c48b0677069afc7175067e954adbea Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sun, 6 Nov 2011 14:43:14 +0000 Subject: Accomodate for \f(Cx formatting. Noted by Andreas Vogele, thanks! --- mandoc.c | 11 +++++++++-- roff.7 | 6 ++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/mandoc.c b/mandoc.c index 9fdf9f98..82756712 100644 --- a/mandoc.c +++ b/mandoc.c @@ -1,4 +1,4 @@ -/* $Id: mandoc.c,v 1.60 2011/10/24 20:30:57 schwarze Exp $ */ +/* $Id: mandoc.c,v 1.61 2011/11/06 14:43:14 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011 Ingo Schwarze @@ -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 bc64c195..17154104 100644 --- a/roff.7 +++ b/roff.7 @@ -1,4 +1,4 @@ -.\" $Id: roff.7,v 1.33 2011/09/26 23:07:31 schwarze Exp $ +.\" $Id: roff.7,v 1.34 2011/11/06 14:43:14 kristaps Exp $ .\" .\" Copyright (c) 2010, 2011 Kristaps Dzonsons .\" Copyright (c) 2010, 2011 Ingo Schwarze @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: September 26 2011 $ +.Dd $Mdocdate: November 6 2011 $ .Dt ROFF 7 .Os .Sh NAME @@ -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 -- cgit v1.2.3-56-ge451