From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout-kit-01.scc.kit.edu (scc-mailout-kit-01.scc.kit.edu [129.13.231.81]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 2bdb4ace for ; Mon, 9 Jan 2017 08:40:29 -0500 (EST) Received: from asta-nat.asta.uni-karlsruhe.de ([172.22.63.82] helo=hekate.usta.de) by scc-mailout-kit-01.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from ) id 1cQaBW-0001hi-A2; Mon, 09 Jan 2017 14:40:28 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1cQaBV-0000xh-AD; Mon, 09 Jan 2017 14:40:25 +0100 Received: from athene.usta.de ([172.24.96.10]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1cQaBZ-0002Zp-Kh; Mon, 09 Jan 2017 14:40:29 +0100 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id 5d437261; Mon, 9 Jan 2017 14:40:25 +0100 (CET) Date: Mon, 9 Jan 2017 14:40:25 +0100 From: Ingo Schwarze To: discuss@mdocml.bsd.lv Cc: Thomas Klausner , Abhinav Upadhyay Subject: Re: Mandoc Not Parsing Sy Macro (In some cases) Message-ID: <20170109134025.GD94305@athene.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.6.2 (2016-07-01) Hi Abhinav, Abhinav Upadhyay wrote on Mon, Jan 09, 2017 at 04:06:43PM +0530: > In NetBSD's sysctl(7) man page, we noticed an issue where in some > tables the Sy macro was not being parsed and being rendered literally > as "Sy". While in other places it was being parsed correctly. On > looking closely, we realized that in the cases where Sy was not being > parsed, we were using instead of Ta macro, like this: > > .It Sy Second level name Sy Type Sy Changeable > > Which is being rendered as: > Second level name Sy Type Sy Changeable That is correct rendering. Groff renders it the same way. > Whereas in the places where it was being rendered correctly, we were > using Ta, like this: > > It Sy Name Ta Sy Constant Ta Sy Next level names Ta Sy Description Yes, that is exactly why you should preferably use Ta and not literal tabs. It's much easier to use correctly, and the mdoc(7) source code is easier to read. If you insist on using literal tabs, you need a blank character between the tab and the following macro. Yes, that is weird: a blank is syntactically significant after a tab. But that's just how roff traditionally behaves. > I think this issue was not present in the previous version of mandoc, Yes, 1.13.3 had a bug processing the first word after a tab incorrectly. It was fixed on October 17, 2015. See http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/regress/usr.bin/mandoc/mdoc/Bl/column.in in particular the commit message of revision 1.8, the test code added by that commit, and the correct output in http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/regress/usr.bin/mandoc/mdoc/Bl/column.out_ascii?rev=HEAD&content-type=text/x-cvsweb-markup > It has been noticed only with the latest release. The proper response is to fix your manual pages. You should do that because as they are, they are not portable and won't work with groff. Either insert the missing blanks or - much better for clarity and robustness - use Ta rather than bare tabs. I think i will also commit a clarification to the mdoc(7) manual because this is indeed a nasty trap for the unwary. Yours, Ingo -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv