From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout-kit-02.scc.kit.edu (scc-mailout-kit-02.scc.kit.edu [129.13.231.82]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 5b710d84 for ; Sat, 23 Mar 2019 03:46:20 -0500 (EST) Received: from asta-nat.asta.uni-karlsruhe.de ([172.22.63.82] helo=hekate.usta.de) by scc-mailout-kit-02.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from ) id 1h7cID-0001ab-Mm; Sat, 23 Mar 2019 09:46:19 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1h7cIC-0003tb-B1; Sat, 23 Mar 2019 09:46:16 +0100 Received: from athene.usta.de ([172.24.96.10]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1h7cIC-0005fY-7f; Sat, 23 Mar 2019 09:46:16 +0100 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id b5903717; Sat, 23 Mar 2019 09:46:16 +0100 (CET) Date: Sat, 23 Mar 2019 09:46:16 +0100 From: Ingo Schwarze To: Stephen Gregoratto Cc: tech@mandoc.bsd.lv Subject: Re: [PATCH docbook2mdoc] Add NODE_EMAIL Message-ID: <20190323084616.GA62193@athene.usta.de> References: <20190322103342.6idzehqruirutcog@BlackBox> <20190322200700.GD6535@athene.usta.de> <20190323053008.vctluoysjwtc3usv@BlackBox> 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: <20190323053008.vctluoysjwtc3usv@BlackBox> User-Agent: Mutt/1.8.0 (2017-02-23) Hi Stephen, Stephen Gregoratto wrote on Sat, Mar 23, 2019 at 04:30:08PM +1100: > On 2019-03-22 21:07, Ingo Schwarze wrote: >> In the future, it might be useful to mention in which real-world >> document(s) you found a given feature used. > The manpages for doclifter/manlifter[1] Oh. That package is definitely important. > contain esr's email address enclosed in an node. > I've also come across the block in the GNOME project's > GTK docs[2]. > > The big DocBook users are the FreeDesktop group and it's members: GNOME, > KDE, Systemd et al. If we work through the smaller cases (like GTK's), > we can eventually start thinking about how to transform longer and more > complicated ones. Case in point, this section I found in the GTK > docs[3]. All that makes a lot of sense to me. Thanks for explaining. >> Thank you, help working on docbook2mdoc(1) is certainly welcome! >> Just out of curiosity: What are you using docbook2mdoc(1) for? > I've interacted with many manpage generators so far, so I thought I'd > make a good faith comparison between the many I've seen/used in OSS. > I've decided I'd start with the generators I know the least, which are > refentry files. I can't say i have ever *used* the DocBook format, but the man(7) output from DocBook files has struck me over and over again as the by far lowest quality man(7) code i have ever seen from any manual page generator. DocBook is without any doubt the number one manual page generation scheme causing the most trouble in real life, in multiple respects. By far. So i am definitely not able to approach DocBook in good faith; i strongly hate DocBook and i am heavily biased against it based on previous experience. But our different perspective on it can likely be productive. :) > I was going to compare docbook2mdoc's output to the official XSL > stylesheets to see how they compare, But I can't compare them if > it exits on an unseen node ;). Right. Even though docbook2mdoc(1) is now five years old, it is still clearly experimental software in an early stage of development. The version number 0.0.9 makes sense in that respect. > Also, I do like using mdoc and mandoc and thought I could help out > with the DocBook converter. Good, thanks. I see at least three reasons why that might be useful: 1. Some parts of X11 documentation currently exist in DocBook form. Short term, it is useful to convert them to mdoc(7) and install them as part of Xenocara in OpenBSD. 2. Medium term, it might be an option to use docbook2mdoc(1) for building the documentation of (at least some) ports having DocBook documentation. That is, run docbook2mdoc(1) at port build time and let the pkg install the resulting mdoc(7) files. Not sure yet how well that may work, but if it does, it would give users higher quality documentation, allowing semantic search in particular, better HTML output, and even better man(1) terminal output that better matches usual conventions. 3. Long term, it might be possible to build a toolchain out of doclifter(1) and docbook2mdoc(1) to convert legacy man(7) manual pages to mdoc(7). Not sure yet how well that may work. > My personal goal is to convert most of the systemd manpages, > as they contain many tables/code listings that would > look good when going through mandoc's HTML output. I see. Even though systemd is not software that could reasonably be ported to OpenBSD, i see your point. > Cheers. Something I noticed is that many documents put the authors in > the section, which the XSL stylesheets move into AUTHORS. Not > sure how we would deal with this. Perhaps a string buffer or array of > struct author that could be printed out at the end/before > CAVEATS/BUGS et al.? The canonical approach would be to use the syntax tree itself to store the information and let the formatter decide what needs to be printed at which time. Usually, the formatter formats elements in tree order, but it can (and already does) print some out of order, earlier (or for AUTHORS, it would be later). That implies skipping the nodes when the normal tree walk comes across them and explicitely accessing them from the place where they have to be printed. Another idea might be to insert a validation stage which could, among other transformations, do reordering before starting the tree walk for formatting. Not sure yet whether that is a good idea - it may be useful, even needed at some point, or it may turn out to be overengineering... > For now I'll put my node in its own . I'm not sure i understand that sentence. What do you mean with "I'll put"? Aren't DocBook elements part of input documents, and aren't input documents things that are given a priori? How can you influence what is found in input documents? Yours, Ingo -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv