From: Junio C Hamano Date: Wed, 21 Feb 2024 17:31:30 GMT Subject: Re: [PATCH 1/3] doc: git-rev-parse: enforce command-line description syntax Message-ID: In-Reply-To: <67dca173-3048-430b-88a1-d3b5d853f84b@free.fr> Jean-Noël Avila writes: >>> ---short[=length]:: >>> +--short[=]:: >>> Same as `--verify` but shortens the object name to a unique >>> prefix with at least `length` characters. The minimum length >> This same comment applies throughout this patch, but in other places >> when we use in the option argument description, don't >> we use the same in text as well? I am wondering if >> the `length` (typeset in fixed-width) should become . What >> do other recent[*] documentation pages commonly do? > > This is another part of the inconsistences in documentation that I'd > like to tackle (hopefully, not in another life). > > Using angle brackets for placeholders everywhere they appear is a > visual link to the preceding syntax description, but may feel a bit > heavy on some cases. Anyway, I'm all for applying the rule everywhere, > for the sake of consistency. I agree that if is not an appropriate way to spell them in the explanation text, we would want to change them consistently everywhere, and until then, using the angle-bracketted that is common would be better. The text will be modified again when we decide to switch from to something else, so updating them now may be a wasted effort, but (1) we may decide that is good enough after all, or (2) it may make it easier to mechanically identify words whose mark-up should be converted if we consistently use now, even if we know it won't be the final mark-up. So I am inclined to say that we should first do `length` -> in the body text in the short term. But I also think we should *not* do so as part of this patch, whose focus is how the option enumeration header should mark up the option arguments. > Backticks and single quotes are used indistinctively (by the way, > asciidoctor does not process single quotes as markup) and are not used > everywhere they should. Using backticks is also a good hint for > translators to mean "verbatim, do not translate". Obviously, the > placeholders ask for translation, so the backtick rule should not > apply to them, even if another formating would be welcome : > __ for instance? Yes. The way AsciiDoc renders (at least HTML) an unadorned is not so great. In "git-add.html" manual page, we see these examples. The first one (unadorned) does not make the placeholder word stand out enough; the second one that does `` makes it stand out better, but as you said, the `verbatim` mark-up is semantically wrong. https://git.github.io/htmldocs/git-add.html#:~:text=For%20more%20details%20about%20the%20%3Cpathspec%3E%20syntax https://git.github.io/htmldocs/git-add.html#:~:text=Pathspec%20is%20passed%20in%20%3Cfile%3E%20instead%20of%20commandline%20args.%20If%20%3Cfile%3E%20is%20exactly%20%2D%20then%20standard%20input%20is%20used.%20Pathspec The last part of the Documentation/CodingGuidelines document talks about how to mark up placeholders but it does not go beyond saying that they are written as . Whatever mark-up rule we decide to use, we should document it there. Thanks.