git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: request for pre-generated git.info pages

From
KNKalle Olavi Niemitalo <kon@iki.fi>
Date
Oct 31, 2008, 00:19 UTC
Message-ID
<871vxx8vkg.fsf@Astalo.kon.iki.fi>
In-Reply-To
<8763n98yz7.fsf@Astalo.kon.iki.fi>
Kalle Olavi Niemitalo <kon@iki.fi> writes:
> However, the Info browser does not recognize cross-references
> between them.  I am playing with some patches to fix those.

This seems to fix it, although the result isn't pretty. Not signed off.

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 62269e3..56e1cf5 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -184,12 +184,12 @@ git.info: user-manual.texi
 
 user-manual.texi: user-manual.xml
 	$(RM) $@+ $@
-	$(DOCBOOK2X_TEXI) user-manual.xml --to-stdout | $(PERL_PATH) fix-texi.perl >$@+
+	$(DOCBOOK2X_TEXI) -s texi.xsl user-manual.xml --to-stdout | $(PERL_PATH) fix-texi.perl >$@+
 	mv $@+ $@
 
 gitman.texi: $(MAN_XML) cat-texi.perl
 	$(RM) $@+ $@
-	($(foreach xml,$(MAN_XML),$(DOCBOOK2X_TEXI) --to-stdout $(xml);)) | \
+	($(foreach xml,$(MAN_XML),$(DOCBOOK2X_TEXI) -s texi.xsl --to-stdout $(xml);)) | \
 	$(PERL_PATH) cat-texi.perl $@ >$@+
 	mv $@+ $@
 
diff --git a/Documentation/texi.xsl b/Documentation/texi.xsl
new file mode 100644
index 0000000..5c6f4cd
--- /dev/null
+++ b/Documentation/texi.xsl
@@ -0,0 +1,17 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns="http://docbook2x.sourceforge.net/xmlns/Texi-XML"
+                version="1.0">
+  <!-- docbook2x 0.8.3 recognizes sf.net but not sourceforge.net.  -->
+  <xsl:import href="http://docbook2x.sf.net/latest/xslt/texi/docbook.xsl"/>
+
+  <!-- In a man page, asciidoc.conf expands linkgit to citerefentry.
+       Each man page goes in gitman.texi so ref/@file is not needed.  -->
+  <xsl:template match="citerefentry[starts-with(refentrytitle, 'git')]">
+    <ref node="{refentrytitle}" />
+  </xsl:template>
+
+  <!-- In Git User's Manual, user-manual.conf expands linkgit to ulink.  -->
+  <xsl:template match="ulink[starts-with(@url, 'git') and substring(@url, string-length(@url) - 4) = '.html']">
+    <ref node="{substring(@url, 1, string-length(@url) - 5)}" file="gitman.info" />
+  </xsl:template>
+</xsl:stylesheet>
Previous: Kalle Olavi Niemitalo
Message 6 of 6 in “request for pre-generated git.info pages”
  1. Leo RazoumovOct 29, 2008
  2. Mike RalphsonOct 30, 2008
  3. Miklos VajnaOct 30, 2008
  4. Mike RalphsonOct 30, 2008
  5. Kalle Olavi NiemitaloOct 30, 2008
  6. Kalle Olavi NiemitaloOct 31, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.