From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-2.sys.kth.se (smtp-2.sys.kth.se [130.237.32.160]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p81At6Lg012888 for ; Thu, 1 Sep 2011 06:55:06 -0400 (EDT) Received: from mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) by smtp-2.sys.kth.se (Postfix) with ESMTP id 45C9D14E26A for ; Thu, 1 Sep 2011 12:55:00 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-2.sys.kth.se ([130.237.32.160]) by mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) (amavisd-new, port 10024) with LMTP id kowt6mHGjCxD for ; Thu, 1 Sep 2011 12:54:58 +0200 (CEST) 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 [172.16.18.84] (unknown [193.10.49.5]) by smtp-2.sys.kth.se (Postfix) with ESMTP id EFA7F14DC75 for ; Thu, 1 Sep 2011 12:54:58 +0200 (CEST) Message-ID: <4E5F6482.8040608@bsd.lv> Date: Thu, 01 Sep 2011 12:54:58 +0200 From: Kristaps Dzonsons User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110820 Icedove/3.1.12 X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 To: discuss@mdocml.bsd.lv Subject: deroff -> demandoc Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I've added the demandoc utility to the mdocml suite. I did this becaus I noticed the deroff has some issues: it unilaterally strips away macro lines (including their text) and doesn't always regard escapes. Also: % demandoc mandoc.1 | spell -b demandoc retains the line number AND column of its input, strips out escapes, and correctly handles macro lines in both -man and -mdoc (it uses libmandoc, obviously). It's also just a tiny source file. Examples: % cat -n foo.1 1 .Dd $Mdocdate$ 2 .Dt FOO 1 3 .Os 4 .Sh NAME 5 .Nm foo 6 .Nd bar 7 .Sh DESCRIPTION 8 Hi there. % ./demandoc foo.1 | cat -n 1 2 3 4 NAME 5 foo 6 bar 7 DESCRIPTION 8 Hi there. Thoughts? Kristaps -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv