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 3397 invoked from network); 4 Oct 2021 08:07:06 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 4 Oct 2021 08:07:06 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id bae719a4 for ; Mon, 4 Oct 2021 03:07:03 -0500 (EST) 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 d04776ef for ; Mon, 4 Oct 2021 03:07:01 -0500 (EST) Received: from hekate.asta.kit.edu ([141.3.145.153] 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 1mXJ00-0000Vm-H8; Mon, 04 Oct 2021 10:07:00 +0200 Received: from donnerwolke.asta.kit.edu ([141.3.145.61] helo=donnerwolke.usta.de) by hekate.usta.de with esmtp (Exim 4.92.2) (envelope-from ) id 1mXIzz-00046J-CH; Mon, 04 Oct 2021 10:06:59 +0200 Received: from login-1.asta.kit.edu ([141.3.145.72]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1mXIzz-0007CO-88; Mon, 04 Oct 2021 10:06:59 +0200 Received: from schwarze by login-1.asta.kit.edu with local (Exim 4.92) (envelope-from ) id 1mXIzz-0001jW-7N; Mon, 04 Oct 2021 10:06:59 +0200 Date: Mon, 4 Oct 2021 10:06:59 +0200 From: Ingo Schwarze To: Cameron Katri Cc: discuss@mandoc.bsd.lv Subject: Re: Specify man section name at runtime Message-ID: References: <20211003174918.nn45mg6rmuaou2fa@FreeBSDY540> <20211003231630.mb65kbrsb4cpb4yn@FreeBSDY540> X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211003231630.mb65kbrsb4cpb4yn@FreeBSDY540> Hi Cameron, Cameron Katri wrote on Sun, Oct 03, 2021 at 07:16:30PM -0400: > Well this is a very niche use case, but on FreeBSD they patch msec.in > to say "FreeBSD General Commands Manual" etc. I think that patching is ill-advised. In manual pages, the operating system name is supposed to be printed in the footer line (lower left corner), not in the header line. One consequence of the FreeBSD patching is that if you format manual pages of another operating system on FreeBSD, the header line will always include the misleading string "FreeBSD" anyway, and as you observed, there is no way to tell mandoc to leave it out. The string in the footer line, on the other hand, defaults to uname(3), which already includes "FreeBSD" by default, and can be overridden both by the "-I os=" option on the command line and by the .Os macro in the manual page. The file msec.in does not exist for the purpose of branding that FreeBSD abuses it for, but to accomodate differing volume conventions of operating systems. For example, illumos has traditionally been using the System V convention that includes LINE("4", "File Formats and Configurations") LINE("5", "Standards, Environments, and Macros") LINE("6", "Games and Demos") LINE("7", "Device and Network Interfaces") LINE("8", "Maintenance Procedures") LINE("9", "Kernel Concepts") and many subsections, in particular in volume 3. Of course, that also implies that formatting BSD device driver manuals on illumos will show the misleading volume title "File Formats and Configurations", but that can't be helped because manual page files do not contain any indication which volume numbering scheme they adhere to. > which means that when I use mandoc -T html to generate my website I assume you use a Makefile for that purpose, or at least some kind of script to regenerate the website when needed? > I have to use a different build of mandoc so that the volume title > just says "Miscellaneous Information Manual" > instead of "FreeBSD Miscellaneous Information Manual." What's wrong with saying something like index.html: index.mdoc mandoc -T html index.mdoc | sed '/head-vol/s/FreeBSD //' > index.html in that script? I doubt that use case warrants adding a feature that makes the documentation longer and hence harder to read for every user. Yours, Ingo -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv