From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout.scc.kit.edu (mailout.scc.kit.edu [129.13.185.202]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id rBPN4xsQ015256 for ; Wed, 25 Dec 2013 18:04:59 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1VvxVa-0000U5-Gs; Thu, 26 Dec 2013 00:04:58 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1VvxVa-0006ED-GH; Thu, 26 Dec 2013 00:04:58 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1VvxVa-0001t6-Ej; Thu, 26 Dec 2013 00:04:58 +0100 Received: from schwarze by usta.de with local (Exim 4.77) (envelope-from ) id 1VvxVa-0007LD-8y; Thu, 26 Dec 2013 00:04:58 +0100 Date: Thu, 26 Dec 2013 00:04:58 +0100 From: Ingo Schwarze To: "Anthony J. Bentley" Cc: discuss@mdocml.bsd.lv Subject: Re: \u and \d Message-ID: <20131225230458.GE21163@iris.usta.de> References: X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Hi Anthony, Anthony J. Bentley wrote on Thu, Dec 05, 2013 at 11:58:55PM -0700: > \utest\d > > Displays "test" in groff. In mandoc, it displays "utestd". I have no > idea what special formatting these escapes are meant to trigger (maybe > superscripts via 'u'p and 'd'own?), Yes, they are shorthands for \v'0.5v' and \v'-0.5v', respectively, i.e. moving half a line up or down; not necessarily for super- and subscripts, though: if you want to change the font size, you have to do that in addition to \u and \d, as in the example you cite below: > \m[blue]\fBthe issue tracker\fR\m[]\&\s-2\u[5]\d\s+2\& They are documented in the Ossanna/Kernighan/Ritter Heirloom Troff Manual http://heirloom.sourceforge.net/doctools/troff.pdf and also in the Groff Manual, http://www.gnu.org/software/groff/manual/html_node/Page-Motions.html > but they should be at least ignored if they aren't implemented. Sure, they cannot be implemented for -Tascii, but they can be ignored. I just committed the following patch to bsd.lv and OpenBSD. Thanks for reporting, Ingo Date: Wed, 25 Dec 2013 17:45:33 -0500 (EST) From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Parse and ignore the roff(7) escape sequences \d ... Log Message: ----------- Parse and ignore the roff(7) escape sequences \d (move half line down) und \u (move half line up). Found by bentley@ in some DocBook crap. Modified Files: -------------- mdocml: mandoc.c Revision Data ------------- Index: mandoc.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.c,v retrieving revision 1.71 retrieving revision 1.72 diff -Lmandoc.c -Lmandoc.c -u -p -r1.71 -r1.72 --- mandoc.c +++ mandoc.c @@ -102,6 +102,14 @@ mandoc_escape(const char const **end, co break; /* + * Escapes taking no arguments at all. + */ + case ('d'): + /* FALLTHROUGH */ + case ('u'): + return(ESCAPE_IGNORE); + + /* * The \z escape is supposed to output the following * character without advancing the cursor position. * Since we are mostly dealing with terminal mode, -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv