1 Generating git docbook documentation: (done on Debian SID)
4 - change (system/global) asciidoc.conf
6 (?su)(?<!\w)[\\]?(?P<name>http|https|ftp|file|irc|mailto|callto|image|link|anchor|xref|indexterm):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
12 (\n-- )|( -- )|( --\n)= — 
13 (\w)--(\w)=\1—\2
16 - take *.xml files (skip git-tools.xml)
17 - after generation change everyday.xml: article-id to everyday
19 diff --git a/Documentation/Makefile b/Documentation/Makefile
20 index 9ad6a6a..adfe07a 100644
21 --- a/Documentation/Makefile
22 +++ b/Documentation/Makefile
23 @@ -165,6 +165,8 @@ html: $(DOC_HTML)
25 $(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7): asciidoc.conf
27 +xml: cmd-list.perl $(MAN_XML) user-manual.xml everyday.xml
32 @@ -257,13 +259,13 @@ manpage-base-url.xsl: manpage-base-url.xsl.in
35 $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
36 - $(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
37 + $(ASCIIDOC) -b docbook -d article -f asciidoc.conf \
38 $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
41 user-manual.xml: user-manual.txt user-manual.conf
42 $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
43 - $(ASCIIDOC) $(ASCIIDOC_EXTRA) -b docbook -d book -o $@+ $< && \
44 + $(ASCIIDOC) $(ASCIIDOC_EXTRA) -b docbook -d article -o $@+ $< && \
47 technical/api-index.txt: technical/api-index-skel.txt \
48 diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
49 index 1273a85..5223c99
50 --- a/Documentation/asciidoc.conf
51 +++ b/Documentation/asciidoc.conf
55 (?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
56 +(?su)(?<!\w)[\\]?(?P<name>link):\S*?#(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
60 @@ -31,12 +32,94 @@ ifdef::backend-docbook[]
61 endif::backend-docbook[]
63 ifdef::backend-docbook[]
64 +[header-declarations]
65 +<?xml version="1.0" encoding="{encoding}"?>
66 +<!DOCTYPE {doctype-article?sect2}{doctype-book?book}{doctype-manpage?refentry} PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
68 +ifdef::doctype-article[]
70 +template::[header-declarations]
72 +<sect2 lang="{lang=en}" id="{doctitle}">
75 +<primary>{doctitle}</primary>
81 +[callout-inlinemacro]
83 +<co id="{docname}_{coid}"/>
86 +list=<calloutlist{id? id="{docname}_{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>{title?<title>{title}</title>}|</calloutlist>
87 +item=<callout arearefs="{docname}_{coids}">|</callout>
91 +[anchor2-inlinemacro]
92 +<anchor id="{doctitle}_{1}" xreflabel="{2=[{1}]}"/>
94 +[anchor3-inlinemacro]
95 +<anchor id="{doctitle}_{1}" xreflabel="[{1}]"/>[{1}]
98 +<link linkend="{doctitle}_{1}">{2}</link>
99 +{2%}<xref linkend="{doctitle}_{1}"/>
102 +<sect3{id? id="{doctitle}_{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>
103 +<title>{title}</title>
107 +[linkgit-inlinemacro]
109 +<xref linkend="{target}({0})" />
113 +<link linkend="{target}">{0}</link>
116 +<simplesect{id? id="{doctitle}_{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>
117 +<title>{title}</title>
122 +<section{id? id="{doctitle}_{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>
123 +<title>{title}</title>
128 +<section{id? id="{doctitle}_{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>
129 +<title>{title}</title>
133 +[literal-inlinemacro]
135 +<emphasis>{passtext}</emphasis>
138 +ifdef::no-inline-literal[]
140 +endif::no-inline-literal[]
142 +endif::doctype-article[]
143 +endif::backend-docbook[]
145 +ifdef::backend-docbook[]
146 ifndef::git-asciidoc-no-roff[]
147 # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
148 # v1.72 breaks with this because it replaces dots not in roff requests.
150 <example><title>{title}</title>
151 -<literallayout class="monospaced">
153 ifdef::doctype-manpage[]
155 endif::doctype-manpage[]
156 @@ -53,7 +136,7 @@ ifdef::doctype-manpage[]
157 # The following two small workarounds insert a simple paragraph after screen
159 <example><title>{title}</title>
160 -<literallayout class="monospaced">
163 </literallayout><simpara></simpara>
165 diff --git a/Documentation/user-manual.conf b/Documentation/user-manual.conf
166 index d87294d..704f2cc
167 --- a/Documentation/user-manual.conf
168 +++ b/Documentation/user-manual.conf
169 @@ -7,15 +7,53 @@ startsb=[
174 +template::[header-declarations]
176 +<sect2 lang="{lang=en}" id="git_user-manual">
179 [linkgit-inlinemacro]
180 -<ulink url="{target}.html">{target}{0?({0})}</ulink>
181 +<xref linkend="{target}{0?({0})}" />
184 +[anchor2-inlinemacro]
185 +<anchor id="{doctitle}_{1}" xreflabel="{2=[{1}]}"/>
187 +[anchor3-inlinemacro]
188 +<anchor id="{doctitle}_{1}" xreflabel="[{1}]"/>[{1}]
191 +<link linkend="{doctitle}_{1}">{2}</link>
192 +{2%}<xref linkend="{doctitle}_{1}"/>
195 +<section{id? id="{doctitle}_{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>
196 +<title>{title}</title>
200 -ifdef::backend-docbook[]
201 -# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
203 <example><title>{title}</title>
204 -<literallayout class="monospaced">
206 +ifdef::doctype-manpage[]
208 +endif::doctype-manpage[]
210 +ifdef::doctype-manpage[]
212 +endif::doctype-manpage[]
215 -endif::backend-docbook[]
216 +endif::git-asciidoc-no-roff[]
218 +ifdef::git-asciidoc-no-roff[]
219 +ifdef::doctype-manpage[]
220 +# The following two small workarounds insert a simple paragraph after screen
222 +<example><title>{title}</title>
225 +</literallayout><simpara></simpara>
227 +endif::doctype-manpage[]
228 diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
229 index 1b94207..49a0a9c 100644
230 --- a/Documentation/user-manual.txt
231 +++ b/Documentation/user-manual.txt
233 Git User's Manual (for version 1.5.3 or newer)
234 -______________________________________________
235 +==============================================
238 Git is a fast distributed revision control system.