From nobody Thu Jun 09 21:49:06 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E18B1857B15 for ; Thu, 9 Jun 2022 21:49:11 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4LJyRB4rc5z3wHT; Thu, 9 Jun 2022 21:49:10 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from kent.sdaoden.eu (kent.sdaoden.eu [192.0.2.2]) by sdaoden.eu (Postfix) with ESMTPS id 86B701605A; Thu, 9 Jun 2022 23:49:08 +0200 (CEST) Received: by kent.sdaoden.eu (Postfix, from userid 1000) id 74B228AB09; Thu, 9 Jun 2022 23:49:06 +0200 (CEST) Date: Thu, 09 Jun 2022 23:49:06 +0200 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Steve Kargl Cc: Baptiste Daroussin , freebsd-hackers@freebsd.org Subject: Re: mandoc and volume titles Message-ID: <20220609214906.6--d0%steffen@sdaoden.eu> In-Reply-To: References: <20220609071702.umix3bbub3qxunlq@aniel.nours.eu> <20220609152904.gc9ue%steffen@sdaoden.eu> <20220609165536.A5vGK%steffen@sdaoden.eu> User-Agent: s-nail v14.9.24-254-g443e374be3 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 4LJyRB4rc5z3wHT X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of steffen@sdaoden.eu designates 217.144.132.164 as permitted sender) smtp.mailfrom=steffen@sdaoden.eu X-Spamd-Result: default: False [-1.86 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sdaoden.eu]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.56)[-0.563]; MID_CONTAINS_FROM(1.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[192.0.2.2:received] X-ThisMailContainsUnwantedMimeParts: N List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org Steve Kargl wrote in : |On Thu, Jun 09, 2022 at 06:55:36PM +0200, Steffen Nurpmeso wrote: |> Steve Kargl wrote in |> : |>|On Thu, Jun 09, 2022 at 05:29:04PM +0200, Steffen Nurpmeso wrote: |>|> Steve Kargl wrote in |>|> : |>|>|On Thu, Jun 09, 2022 at 09:17:02AM +0200, Baptiste Daroussin wrote: |>|>|> On Wed, Jun 08, 2022 at 04:35:08PM -0700, Steve Kargl wrote: ... |> These are all strings from the doc-common mdoc(7) (g)roff file |> which are then picked up by mdoc(7) as required by the context. |> (g)roff can give you what you want like this: |> |> .ds volume-operating-system steve |> .ds volume-ds-8 kargl |> |> (before the [.Dd,].Dt,.Os preamble), and i get then |> |> S-POSTGRAY(8) steve kargl S-POSTGRAY(8) |> |> Ingo Schwarze just currently has a run on mandoc in the OpenBSD |> source tree since a couple of days, maybe if a FreeBSD folk would |> point him to doc-common strings (or at least the volume-ds-* |> ones), you would be fine out with the next release of mandoc. | |The first 6 lives of my file are | |.ds volume-operating-system steve |.ds volume-ds-8 kargl If you use ".Dt TDI 1", you must set volume-ds-1. |.Dd June 8, 2022 |.Dt TDI 1 |.Sh NAME |.Nm tdi | |% mandoc tdi.1 | head -1 This is mandoc Mr. Kargl. mandoc parses man(7) and mdoc(7) documents into a tree of what it knows, and then interprets it so that it matches what roff would generate. (On the terminal; after way over a decade of work it "can" other formats much better than roff.) There was a time when Ingo Schwarze as mandoc maintainer posted mails stating how many percent (to the tenths iirc) of all OpenBSD manuals come out equal. But it still is not at hundred percent. ... |I cannot find mention of .ds in mandoc(1) nor mdoc(7) man pages. Because it is a scut. Not a roff interpreter. (Having said that: it is also a good thing, as it is very fast and can some things good; but it is not a roff interpreter, which as a Unix lover makes me sad.) But i _think_ at least rudimentary .ds support comes with the next release, i seem to recall to have read something about .ds. |Depending groff documentation, which might not be installed as it |is a port, seems to be a bit dubious. Quite vice versa. mdoc is thirty years old, and could be implemented because roff that is even older is such a powerful system. |% groff -T ascii -mdoc tdi.1 | head -1 |TDI(1) FreeBSD General Commands Manual \ | TDI(1) | |It appears to no work? Now that is overly interesting! Yes. Long story short (i _hate_ the way groff is maintained). Please use a doc- prefix for your pleasure: #?0|kent:$ cat steve.4 .Dd June 8, 2022 .ds doc-volume-operating-system Steve .ds doc-volume-ds-4 Kargl .Dt TDI 4 .Sh NAME .Nm tdi Hi. #?0|kent:nail.git$ groff -mdoc -Tutf8 steve.4 TDI(4) Steve Kargl TDI(4) NAME tdi Hi. June 8, 2022 --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)