From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-1.sys.kth.se (smtp-1.sys.kth.se [130.237.32.175]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id pA3ExvZ9031940 for ; Thu, 3 Nov 2011 10:59:58 -0400 (EDT) Received: from mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) by smtp-1.sys.kth.se (Postfix) with ESMTP id AF8B0156454 for ; Thu, 3 Nov 2011 15:59:52 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-1.sys.kth.se ([130.237.32.175]) by mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) (amavisd-new, port 10024) with LMTP id lRjZE8244uH7 for ; Thu, 3 Nov 2011 15:59:51 +0100 (CET) X-KTH-Auth: kristaps [193.10.49.5] X-KTH-mail-from: kristaps@bsd.lv X-KTH-rcpt-to: discuss@mdocml.bsd.lv Received: from ctime.my.domain (ctime.hhs.se [193.10.49.5]) by smtp-1.sys.kth.se (Postfix) with ESMTP id E536215648B for ; Thu, 3 Nov 2011 15:59:51 +0100 (CET) Message-ID: <4EB2AC67.1080706@bsd.lv> Date: Thu, 03 Nov 2011 15:59:51 +0100 From: Kristaps Dzonsons User-Agent: Mozilla/5.0 (X11; U; OpenBSD amd64; en-US; rv:1.9.2.13) Gecko/20110223 Thunderbird/3.1.7 X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 To: discuss@mdocml.bsd.lv Subject: Re: Render POD =head3 $c->uri References: <4EB2A792.7080508@andreasvoegele.com> <4EB2ABF2.70805@bsd.lv> In-Reply-To: <4EB2ABF2.70805@bsd.lv> Content-Type: multipart/mixed; boundary="------------080308090207020908050601" This is a multi-part message in MIME format. --------------080308090207020908050601 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit On 11/03/11 15:57, Kristaps Dzonsons wrote: >> when I run the following commands, the text "$c->uri" is fully >> underlined if the manual page is formatted with nroff. If the manual >> page is formatted with mandoc, only the text "->uri" is underlined. >> >> echo '=head3 $c->uri' | pod2man | nroff -man | less -R >> echo '=head3 $c->uri' | pod2man | mandoc | less -R >> >> Noticed on OpenBSD-current. > > Hi Andreas, > > The enclosed patch fixes this issue: since the 4.9 release, we've become > more strict. I've now added the correct magic for `\f(Cx' escapes as > dictated by groff(7) and your example works fine. > > Oks? Gah. Unified diff now (stupid default behaviour of non-unified diff). --------------080308090207020908050601 Content-Type: text/plain; name="patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch.txt" Index: mandoc.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.c,v retrieving revision 1.60 diff -u -r1.60 mandoc.c --- mandoc.c 24 Oct 2011 20:30:57 -0000 1.60 +++ mandoc.c 3 Nov 2011 14:59:14 -0000 @@ -369,8 +369,15 @@ 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 */ Index: roff.7 =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.7,v retrieving revision 1.33 diff -u -r1.33 roff.7 --- roff.7 26 Sep 2011 23:07:31 -0000 1.33 +++ roff.7 3 Nov 2011 14:59:14 -0000 @@ -143,6 +143,8 @@ (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 --------------080308090207020908050601-- -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv