git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [StGit PATCH 2/3] asciidoc.conf: Steal updates from git
Date: Mon, 08 Sep 2008 23:08:05 +0200	[thread overview]
Message-ID: <20080908210805.1957.79447.stgit@yoghurt> (raw)
In-Reply-To: <20080908210302.1957.44280.stgit@yoghurt>

Steal updates to asciidoc.conf from git. Also, make sure that we use
the link:[] abd stglink:[] macros correctly everywhere.

Signed-off-by: Karl Hasselström <kha@treskal.com>

---

 Documentation/asciidoc.conf |   79 +++++++++++++++++++++++++++++++------------
 Documentation/stg.txt       |    2 +
 stgit/argparse.py           |    2 +
 stgit/commands/clone.py     |    4 +-
 4 files changed, 61 insertions(+), 26 deletions(-)


diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 4c83756..69447ab 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -1,51 +1,86 @@
-## gitlink: macro
-#
-# Usage: gitlink:command[manpage-section]
-#
-# Note, {0} is the manpage section, while {target} is the command.
-#
-# Show GIT link as: <command>(<section>); if section is defined, else just show
-# the command.
-
 [attributes]
-caret=^
+asterisk=&#42;
+plus=&#43;
+caret=&#94;
 startsb=&#91;
 endsb=&#93;
 tilde=&#126;
 
 ifdef::backend-docbook[]
-[gitlink-inlinemacro]
-{0%{target}}
-{0#<citerefentry>}
-{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
-{0#</citerefentry>}
-endif::backend-docbook[]
-
-ifdef::backend-docbook[]
+ifndef::docbook-xsl-172[]
 # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
+# v1.72 breaks with this because it replaces dots not in roff requests.
 [listingblock]
 <example><title>{title}</title>
 <literallayout>
+ifdef::doctype-manpage[]
+&#10;.ft C&#10;
+endif::doctype-manpage[]
 |
+ifdef::doctype-manpage[]
+&#10;.ft&#10;
+endif::doctype-manpage[]
 </literallayout>
 {title#}</example>
+endif::docbook-xsl-172[]
+endif::backend-docbook[]
+
+ifdef::doctype-manpage[]
+ifdef::backend-docbook[]
+[header]
+template::[header-declarations]
+<refentry>
+<refmeta>
+<refentrytitle>{mantitle}</refentrytitle>
+<manvolnum>{manvolnum}</manvolnum>
+<refmiscinfo class="source">StGit</refmiscinfo>
+<refmiscinfo class="version">{stgit_version}</refmiscinfo>
+<refmiscinfo class="manual">StGit Manual</refmiscinfo>
+</refmeta>
+<refnamediv>
+  <refname>{manname}</refname>
+  <refpurpose>{manpurpose}</refpurpose>
+</refnamediv>
+endif::backend-docbook[]
+endif::doctype-manpage[]
+
+## link: macro
+#
+# Usage: link:command[manpage-section]
+#
+# Note, {0} is the manpage section, while {target} is the command.
+#
+# Show link as: <command>(<section>); if section is defined, else just
+# show the command.
+
+ifdef::backend-docbook[]
+[link-inlinemacro]
+{0%{target}}
+{0#<citerefentry>}
+{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
+{0#</citerefentry>}
 endif::backend-docbook[]
 
 ifdef::backend-xhtml11[]
-[gitlink-inlinemacro]
+[link-inlinemacro]
 <a href="{target}.html">{target}{0?({0})}</a>
 endif::backend-xhtml11[]
 
-# stglink
+## stglink: macro
+#
+# Usage: stglink:command[]
+#
+# Show StGit link as: stg-<command>(1) in man pages, stg <command> in
+# html.
 
 ifdef::backend-docbook[]
 [stglink-inlinemacro]
 <citerefentry>
-<refentrytitle>stg {target}</refentrytitle><manvolnum>1</manvolnum>
+  <refentrytitle>stg-{target}</refentrytitle><manvolnum>1</manvolnum>
 </citerefentry>
 endif::backend-docbook[]
 
 ifdef::backend-xhtml11[]
 [stglink-inlinemacro]
-<a href="stg-{target}.html">stg {target}(1)</a>
+<a href="stg-{target}.html">stg {target}</a>
 endif::backend-xhtml11[]
diff --git a/Documentation/stg.txt b/Documentation/stg.txt
index f6cd815..a0b2176 100644
--- a/Documentation/stg.txt
+++ b/Documentation/stg.txt
@@ -245,7 +245,7 @@ CONFIGURATION MECHANISM
 -----------------------
 
 Starting with 0.12, StGIT uses the same configuration mechanism as
-GIT.  See gitlink:git[7] for more details.
+GIT.  See link:git[7] for more details.
 
 TEMPLATES
 ---------
diff --git a/stgit/argparse.py b/stgit/argparse.py
index 4cd9527..d0134f8 100644
--- a/stgit/argparse.py
+++ b/stgit/argparse.py
@@ -94,7 +94,7 @@ def write_asciidoc(cmd, f):
             o.write_asciidoc(f)
             f.write('\n')
     _write_underlined('StGit', '-', f)
-    f.write('Part of the StGit suite - see stglink:stg[1]\n')
+    f.write('Part of the StGit suite - see link:stg[1]\n')
 
 def sign_options():
     def callback(option, opt_str, value, parser, sign_str):
diff --git a/stgit/commands/clone.py b/stgit/commands/clone.py
index d2c68bb..b83169e 100644
--- a/stgit/commands/clone.py
+++ b/stgit/commands/clone.py
@@ -24,10 +24,10 @@ help = 'Make a local clone of a remote repository'
 usage = ['<repository> <dir>']
 description = """
 Clone a git repository into the local directory <dir> (using
-gitlink:clone[]) and initialise the local branch "master".
+stglink:clone[]) and initialise the local branch "master".
 
 This operation is for example suitable to start working using the
-"tracking branch" workflow (see gitlink:stg[1]). Other means to setup
+"tracking branch" workflow (see link:stg[1]). Other means to setup
 an StGit stack are stglink:init[] and the '--create' and '--clone'
 commands of stglink:branch[].
 

  reply	other threads:[~2008-09-08 21:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08 21:07 [StGit PATCH 0/3] Auto-generate man pages and command list Karl Hasselström
2008-09-08 21:08 ` Karl Hasselström [this message]
2008-09-08 21:08 ` [StGit PATCH 3/3] Generate command lists automatically Karl Hasselström
2008-09-09  7:17   ` [StGit PATCH] Fixes for auto-generation of man pages Daniel White
2008-09-10 15:56     ` Karl Hasselström
     [not found] ` <20080908210758.1957.664.stgit@yoghurt>
2008-09-10 21:56   ` [StGit PATCH 1/3] Auto-generate man pages for all StGit commands Catalin Marinas
2008-09-11  6:58     ` Karl Hasselström

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=20080908210805.1957.79447.stgit@yoghurt \
    --to=kha@treskal.com \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    /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).