From: Jonas Fonseca <fonseca@diku.dk>
To: Teemu Likonen <tlikonen@iki.fi>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: [PATCH] asciidoc: add minor workaround to add an empty line after code blocks
Date: Thu, 30 Oct 2008 11:45:03 +0100 [thread overview]
Message-ID: <20081030104503.GA17131@diku.dk> (raw)
In-Reply-To: <87od13ujm4.fsf@iki.fi>
Insert an empty <simpara> in manpages after code blocks to force and
empty line.
The problem can be seen on the manpage for the git tutorial, where an
example command and the following paragraph is printed with no empty
line between them:
First, note that you can get documentation for a command such as git
log --graph with:
$ man git-log
It is a good idea to introduce yourself to git [...]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
Documentation/asciidoc.conf | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
Teemu Likonen <tlikonen@iki.fi> wrote Thu, Oct 30, 2008:
> In case someone is interested there is still a minor flaw that an
> example command and the following paragraph is printed with no empty
> line between them. Like in the beginning of "git help tutorial", for
> example:
>
> First, note that you can get documentation for a command such as git
> log --graph with:
>
> $ man git-log
> It is a good idea to introduce yourself to git [...]
>
> It would be nicer if there was empty line after "$ man git-log". I can't
> remember if this is new issue or not. This applies only to man pages; in
> html pages there are nice boxes around example commands and equal
> spacing before and after them.
This is an old issue reported by Theodore Ts'o and fixed partially in
commit 63c97ce228f2d2697a8ed954a9592dfb5f286338 for the URL section of
the fetch/pull/push manpages. I have fixed this in tig using an
approach similar to the attached. Simple and clean, but only tested
with docbook-xsl version 1.72 so I have made it conditional.
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 40d43b7..2da867d 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -40,6 +40,26 @@ endif::doctype-manpage[]
</literallayout>
{title#}</example>
endif::docbook-xsl-172[]
+
+ifdef::docbook-xsl-172[]
+ifdef::doctype-manpage[]
+# The following two small workarounds insert a simple paragraph after screen
+[listingblock]
+<example><title>{title}</title>
+<screen>
+|
+</screen><simpara></simpara>
+{title#}</example>
+
+[verseblock]
+<formalpara{id? id="{id}"}><title>{title}</title><para>
+{title%}<literallayout{id? id="{id}"}>
+{title#}<literallayout>
+|
+</literallayout><simpara></simpara>
+{title#}</para></formalpara>
+endif::doctype-manpage[]
+endif::docbook-xsl-172[]
endif::backend-docbook[]
ifdef::doctype-manpage[]
--
1.6.0.3.756.gb776d.dirty
--
Jonas Fonseca
next prev parent reply other threads:[~2008-10-30 10:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 19:16 A typesetting problem with git man pages Teemu Likonen
2008-10-29 19:35 ` Jonas Fonseca
2008-10-29 22:22 ` Teemu Likonen
2008-10-30 10:45 ` Jonas Fonseca [this message]
2008-10-30 12:56 ` [PATCH] asciidoc: add minor workaround to add an empty line after code blocks Teemu Likonen
2008-11-01 22:48 ` Junio C Hamano
2008-11-01 23:42 ` Thomas Adam
2008-11-03 0:12 ` Kalle Olavi Niemitalo
2008-10-31 7:37 ` A typesetting problem with git man pages Teemu Likonen
2008-10-31 8:37 ` Teemu Likonen
2008-10-29 19:39 ` Jeff King
2008-10-29 20:14 ` Jonas Fonseca
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=20081030104503.GA17131@diku.dk \
--to=fonseca@diku.dk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tlikonen@iki.fi \
/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).