From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29891 invoked from network); 19 Oct 2023 15:10:35 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 19 Oct 2023 15:10:35 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id c76e4937 for ; Thu, 19 Oct 2023 15:10:34 +0000 (UTC) Received: from scc-mailout-kit-02.scc.kit.edu (scc-mailout-kit-02.scc.kit.edu [129.13.231.82]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 6f6202a5 for ; Thu, 19 Oct 2023 15:10:33 +0000 (UTC) Received: from hekate.asta.kit.edu ([2a00:1398:5:f401::77]) by scc-mailout-kit-02.scc.kit.edu with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (envelope-from ) id 1qtUfQ-00FlaD-1P; Thu, 19 Oct 2023 17:10:33 +0200 Received: from login-1.asta.kit.edu ([2a00:1398:5:f400::72]) by hekate.asta.kit.edu with esmtp (Exim 4.94.2) (envelope-from ) id 1qtUfQ-000KJt-UA; Thu, 19 Oct 2023 17:10:32 +0200 Received: from schwarze by login-1.asta.kit.edu with local (Exim 4.94.2) (envelope-from ) id 1qtUfQ-000oRy-7p; Thu, 19 Oct 2023 17:10:32 +0200 Date: Thu, 19 Oct 2023 17:10:32 +0200 From: Ingo Schwarze To: Alejandro Colomar Cc: tech@mandoc.bsd.lv Subject: Re: mandoc -man -Thtml bug: inconsistent vertical space before .TP Message-ID: References: X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Alejandro, Ingo Schwarze wrote on Thu, Oct 19, 2023 at 04:45:21PM +0200: > Consequently, the following needs to be done in mandoc: > > 1. Currently, when formatting .TP or .IP with a non-empty head, > the HTML formatter looks at the previous and at the following > abstract syntax tree (AST) node to figure out whether the > tagged paragraph is part of a list. > If that previous or follwing AST node is .IP or .RS with an > empty head, it will have to iterate until it finds an AST node > that is neither .IP nor .RS or has a non-empty head, evaluating > the properties of that node instead of the directly preceding > or following node. > > 2. When formatting .IP or .RS with an empty head, mandoc needs > to iterate backwards, searching for an AST node that is neither > .IP nor .RS or has a non-empty head, and figure out whether that > node is a list item, which again, as explained above, requires > iterating both forwards and backwards. > If it turns out we are inside a list, interrupting the list > must be prevented. Instead, .IP with an empty head must be > formatted like .PP, and .RS with an empty head must be formatted > somewhat like .br. > > Probably, doing all this in the HTML formatter module would be > over the top. I believe such complicated AST inspection should > be done by the validation module (man_validate.c), which should > set AST node flags similar to > > - this node starts a new list > - this node starts a new list item > - this node merely indicates a paragraph break > - this node ends a list > > which the fotmatters can then readily use. > > This required logic is so complicated that i won't code it right > away, there are more urgent matters to be taken care of. > Instead, i will add it to the mandoc TODO list. FYI: Added, see the commit below. Ingo Log Message: ----------- new entries: .MR and .TP .IP .TP Modified Files: -------------- mandoc: TODO Revision Data ------------- Index: TODO =================================================================== RCS file: /home/cvs/mandoc/mandoc/TODO,v retrieving revision 1.329 retrieving revision 1.330 diff -LTODO -LTODO -u -p -r1.329 -r1.330 --- TODO +++ TODO @@ -239,6 +239,9 @@ are mere guesses, and some may be wrong. --- missing man features ----------------------------------------------- +- groff_man(7) .MR + loc ** exist * algo * size * imp *** + - MANWIDTH Markus Waldeck 9 Jun 2015 05:49:56 +0200 Laura Morales 26 Apr 2018 08:15:55 +0200 @@ -504,6 +507,10 @@ are mere guesses, and some may be wrong. loc ** exist ** algo ** size * imp ** --- HTML issues -------------------------------------------------------- + +- support the idiom .TP .IP .TP for multi-paragraph list item bodies + to: Alejandro Colomar Thu, 19 Oct 2023 16:45:21 +0200 + loc ** exist ** algo ** size ** imp ** - .Nm without an argument and .Bx cause premature Nab Sun, 5 Jun 2022 18:30:09 +0200 -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv