From: Michael J Gruber <git@drmicha.warpmail.net>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [BUG] yet another doc formatting problem
Date: Tue, 07 Dec 2010 09:42:48 +0100 [thread overview]
Message-ID: <4CFDF388.6060907@drmicha.warpmail.net> (raw)
In-Reply-To: <20101207050737.GA32485@sigill.intra.peff.net>
Jeff King venit, vidit, dixit 07.12.2010 06:07:
> When I build git-rm.1, some of the headings look odd. For example:
>
> Using git commit -a""
> If you intend that your next commit should record...
> ...
> Using git add -A""
> When accepting a new code drop for a vendor branch
>
> Note the funny double-space and the weird "" at the end. I get the same
> thing from "git show origin/man:man1/git-rm.1 | nroff -man".
>
> The source looks like this:
>
> $ git grep -A1 Using..git.commit git-rm.txt
> git-rm.txt:Using "git commit -a"
> git-rm.txt-~~~~~~~~~~~~~~~~~~~~~
>
> which looks sane to me. The generated xml also looks OK to me:
>
> $ grep Using..git.commit git-rm.xml
> <title>Using "git commit -a"</title>
>
> But the resulting roff doesn't:
>
> $ grep Using..git.commit git-rm.1
> .SS "Using "git commit \-a""
>
> which looks like a quoting error to me, which implies a bug in docbook.
>
> I guess we can hack around it with some XSL magic, but I am tempted to
> do the simple:
>
> diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt
> index 71e3d9f..8ee559b 100644
> --- a/Documentation/git-rm.txt
> +++ b/Documentation/git-rm.txt
> @@ -89,8 +89,8 @@ the paths that have disappeared from the filesystem. However,
> depending on the use case, there are several ways that can be
> done.
>
> -Using "git commit -a"
> -~~~~~~~~~~~~~~~~~~~~~
> +Using git commit -a
> +~~~~~~~~~~~~~~~~~~~
> If you intend that your next commit should record all modifications
> of tracked files in the working tree and record all removals of
> files that have been removed from the working tree with `rm`
> @@ -98,8 +98,8 @@ files that have been removed from the working tree with `rm`
> automatically notice and record all removals. You can also have a
> similar effect without committing by using `git add -u`.
>
> -Using "git add -A"
> -~~~~~~~~~~~~~~~~~~
> +Using git add -A
> +~~~~~~~~~~~~~~~~
> When accepting a new code drop for a vendor branch, you probably
> want to record both the removal of paths and additions of new paths
> as well as modifications of existing paths.
>
> -Peff
Couple'o'things goin' on here ;)
First of all, we shouldn't use a literal " to denote a "quotation". Just
like in HTML, this may or may not work. Typographically, the outcome was
*always* wrong. The proper way in asciidoc is surrounding the
``quotation'' by double backticks and double ticks. Doing it right in
git-rm.txt will lead to proper nroff and html outputs, e.g.:
Using “git commit -a”
Of course, literal " works in most place - well, save the fact that it
never really works because it never produces typographically correct
output. Am I repeating myself? ;)
Here, a literal " in asciidoc ends up as a literal " in html and xml.
Any browser groks it in a place like that, producing correct output -
well, save the fact that...
docbook (translating xml to nroff) does not grok it. Now that is a
surprise... Pleeease, someone get me straight asciidoc to nroff!
On a side note, looking at origin/man I get the impression that these
subheaders were always wrong.
So, in summary, we should really ``quote'' things properly, but this
would need to be done consistently, because a mix of new
(typographhically correct) quotes and old ones looks even worse. If we
really want to go that route I'd volunteer to do things one by one.
Actually, it seems we've been partially going that route already, using
{tilde}, {apostrophe} etc.
Michael
next prev parent reply other threads:[~2010-12-07 8:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-07 5:07 [BUG] yet another doc formatting problem Jeff King
2010-12-07 8:42 ` Michael J Gruber [this message]
2010-12-07 9:07 ` [PATCH] git-rm.txt: Fix quoting Michael J Gruber
2010-12-07 16:43 ` Jeff King
2010-12-08 8:08 ` Michael J Gruber
2010-12-07 17:19 ` Jonathan Nieder
2010-12-07 17:25 ` Jeff King
2010-12-08 11:15 ` [PATCHv2] " Michael J Gruber
2010-12-07 19:12 ` [PATCH] " Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CFDF388.6060907@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).