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=-3.3 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,NICE_REPLY_A,T_TVD_MIME_EPI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16235 invoked from network); 20 Sep 2022 19:53:18 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 20 Sep 2022 19:53:18 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 4cd40c03 for ; Tue, 20 Sep 2022 14:53:16 -0500 (EST) Received: from mail.celforyon.fr (ns3039568.ip-51-255-86.eu [51.255.86.93]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 528a70f8 for ; Tue, 20 Sep 2022 14:53:15 -0500 (EST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 07B611781A05 for ; Tue, 20 Sep 2022 21:53:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eldred.fr; s=dkim; t=1663703594; h=from:subject:date:message-id:to:mime-version:content-type: content-language:in-reply-to:references; bh=RaAYmxuwMWjZUQgKNM/GBFTJdOTTqm4vKZop6ZEi1OY=; b=ny/01SwzDImh420lXPPkEDh5GKNsXxp2fEZe8iXPe0kbhadZEhsdvAUo8jUuEtPosJArpo F3qfjpIzasHJoYcRIQny3U58htyR64YemGN+8kLqskGTTnIPjtfw5Y2/L9/0cFhqh0nxdk 2QFovrVcc2lmJW8xsQ/mTj75eyElPkEK3BToJGiBCOWE9mHys9kD3fDjIRdqaLaTcYs/cd K2a5gbk+LRIxlxGxphjHaa1FJuvy8WBw8z3MFh1zr9rNOirUpIm938oQ0W6ch7gP0ho7Xh l3en9prDoIsEqVA/NqUZuH+ZxYSlkT0geeQ9zXtSy41UmtpGZeZ1fE6oj7opqA== Content-Type: multipart/alternative; boundary="------------Ypk0Ao7r0p6ah2iAraW1FzfS" Message-ID: <96de05f8-cfc6-02f2-7613-2215f901ad7c@eldred.fr> Date: Tue, 20 Sep 2022 21:52:59 +0200 X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: Inconsistent HTML anchor names To: tech@mandoc.bsd.lv References: Content-Language: en-US, en-GB From: Eldred HABERT In-Reply-To: X-Last-TLS-Session-Version: TLSv1.3 This is a multi-part message in MIME format. --------------Ypk0Ao7r0p6ah2iAraW1FzfS Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/9/22 2:36 PM, Ingo Schwarze wrote: > Salut Eldred, Well, I hope you will forgive my lack of response for a month and a half. I've been busy elsewhere, and this email got buried under many others. Apologies. > It's also nice to see you using the mdoc(7) language for your manual > pages. Blame bentley for that. I think he originally wrote the man pages, and I think they provide good defaults that are more convenient than directly messing with groff formatting, so I use it for all my (admittedly few) man pages. > You might also consider using "mandoc -T lint" on your manual > pages, it produces a lot of output. Even if you don't care about > STYLE messages, at least running "mandoc -T lint -W warning" would > make sense, for example: It does make sense, and I do run this from time to time. The warnings haven't been fixed mainly because they seemed harmless/false positives, but this seems like a good occasion to discuss them, if you want. > mandoc: rgbgfx.1:168:2: WARNING: skipping empty macro: Sy I'm not really sure what this is pointing out. > mandoc: rgbgfx.1:573:2: WARNING: sections out of conventional > order: Sh SEE ALSO > mandoc: rgbgfx.1:575:2: WARNING: unusual Xr order: rgbasm(1) after rgbds(7) > mandoc: rgbgfx.1:577:2: WARNING: unusual Xr order: rgbfix after rgblink My understanding is that the Xr order is supposed to be by section, then alphabetical, right? The rationale for our ordering is that it is the order in which we expect the users to read the manual pages; this made more sense back when we served the renders online directly; now that we have a separate navbar, it might be okay to reorder the footers. > The commit appended below (made both to OpenBSD and to the portable > mandoc at bsd.lv) fixes the bug. Please check that it works for > you, too, and tell me in case you notice any regressions. I haven't found any thus far, but my testing isn't thorough. We haven't really set up any kind of anchor checker, sadly. >> While we do some post-processing >> [https://github.com/gbdev/rgbds-www/blob/master/maintainer/man_to_html.sh], > I'm not convinced i understood all of that, but here are some remarks > anyway: > > * Using ".Fl Fl foo" for GNU-style long options is discouraged because > it is semantically wrong. Using ".Fl \-foo" is better. > https://mandoc.bsd.lv/mdoc/style/options.html Again, blame bentley. I didn't realise this page existed until I went through two fairly small links lost in the middle of others. Good resources, despite not being very easy to find. I'll fix this. (I'm also noticing the '\-', and I /really/ hope we didn't mess up and use a breakable hyphen in places we shouldn't have...) > * You may no longer need to shift headings; mandoc-current already > translates .Sh to

and .Ss

. That change was motivated > by accessibility considerations very similar to your comment > "level 1 is reserved for the page's title". Great! That said, I'm reluctant to use a non-release version of Mandoc in our documentation generator, as I don't have much time to dedicate to maintaining it; so I think I'll patiently wait for the next release. Late but yours nonetheless, ~ Eldred --------------Ypk0Ao7r0p6ah2iAraW1FzfS Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 8/9/22 2:36 PM, Ingo Schwarze wrote:
Salut Eldred,
Well, I hope you will forgive my lack of response for a month and a half. I've been busy elsewhere, and this email got buried under many others. Apologies.
It's also nice to see you using the mdoc(7) language for your manual
pages.
Blame bentley for that. I think he originally wrote the man pages, and I think they provide good defaults that are more convenient than directly messing with groff formatting, so I use it for all my (admittedly few) man pages.
You might also consider using "mandoc -T lint" on your manual
pages, it produces a lot of output.  Even if you don't care about
STYLE messages, at least running "mandoc -T lint -W warning" would
make sense, for example:
It does make sense, and I do run this from time to time. The warnings haven't been fixed mainly because they seemed harmless/false positives, but this seems like a good occasion to discuss them, if you want.
  mandoc: rgbgfx.1:168:2: WARNING: skipping empty macro: Sy
I'm not really sure what this is pointing out.
  mandoc: rgbgfx.1:573:2: WARNING: sections out of conventional
                                   order: Sh SEE ALSO
  mandoc: rgbgfx.1:575:2: WARNING: unusual Xr order: rgbasm(1) after rgbds(7)
  mandoc: rgbgfx.1:577:2: WARNING: unusual Xr order: rgbfix after rgblink

My understanding is that the Xr order is supposed to be by section, then alphabetical, right?
The rationale for our ordering is that it is the order in which we expect the users to read the manual pages; this made more sense back when we served the renders online directly; now that we have a separate navbar, it might be okay to reorder the footers.

The commit appended below (made both to OpenBSD and to the portable
mandoc at bsd.lv) fixes the bug.  Please check that it works for
you, too, and tell me in case you notice any regressions.
I haven't found any thus far, but my testing isn't thorough. We haven't really set up any kind of anchor checker, sadly.
While we do some post-processing
[https://github.com/gbdev/rgbds-www/blob/master/maintainer/man_to_html.sh],
I'm not convinced i understood all of that, but here are some remarks
anyway:

 * Using ".Fl Fl foo" for GNU-style long options is discouraged because
   it is semantically wrong.  Using ".Fl \-foo" is better.
   https://mandoc.bsd.lv/mdoc/style/options.html
Again, blame bentley. I didn't realise this page existed until I went through two fairly small links lost in the middle of others. Good resources, despite not being very easy to find. I'll fix this.
(I'm also noticing the '\-', and I really hope we didn't mess up and use a breakable hyphen in places we shouldn't have...)
 * You may no longer need to shift headings; mandoc-current already
   translates .Sh to <h2> and .Ss <h3>.  That change was motivated
   by accessibility considerations very similar to your comment
   "level 1 is reserved for the page's title".
Great! That said, I'm reluctant to use a non-release version of Mandoc in our documentation generator, as I don't have much time to dedicate to maintaining it; so I think I'll patiently wait for the next release.

Late but yours nonetheless,
~ Eldred

--------------Ypk0Ao7r0p6ah2iAraW1FzfS-- -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv