Skip to content

Commit 7a2078b

Browse files
jonasgitster
authored andcommitted
man pages are littered with .ft C and others
Jakub Narebski <[email protected]> wrote Sun, Feb 03, 2008: > Junio C Hamano wrote: > > Jakub Narebski <[email protected]> writes: > > > > [From] http://thread.gmane.org/gmane.comp.version-control.git/53457/focus=53458 > Julian Phillips: > > Are you using docbook xsl 1.72? There are known problems building the > > manpages with that version. 1.71 works, and 1.73 should work when it get > > released. I was able to solve this problem with this patch, which adds a XSL file used specifically for DOCBOOK_XSL_172=YesPlease and where dots and backslashes are escaped properly so they won't be substituted to the wrong thing further down the "DocBook XSL pipeline". Doing the escaping in the existing callout.xsl breaks v1.70.1. Hopefully v1.73 will end this part of the manpage nightmare. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4f395ee commit 7a2078b

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

Documentation/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ man7dir=$(mandir)/man7
4545

4646
ASCIIDOC=asciidoc
4747
ASCIIDOC_EXTRA =
48+
MANPAGE_XSL = callouts.xsl
4849
INSTALL?=install
4950
RM ?= rm -f
5051
DOC_REF = origin/man
@@ -65,6 +66,7 @@ ASCIIDOC_EXTRA += -a asciidoc7compatible
6566
endif
6667
ifdef DOCBOOK_XSL_172
6768
ASCIIDOC_EXTRA += -a docbook-xsl-172
69+
MANPAGE_XSL = manpage-1.72.xsl
6870
endif
6971

7072
#
@@ -159,7 +161,7 @@ $(MAN_HTML): %.html : %.txt
159161

160162
%.1 %.5 %.7 : %.xml
161163
$(RM) $@
162-
xmlto -m callouts.xsl man $<
164+
xmlto -m $(MANPAGE_XSL) man $<
163165

164166
%.xml : %.txt
165167
$(RM) $@+ $@

Documentation/manpage-1.72.xsl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- callout.xsl: converts asciidoc callouts to man page format -->
2+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3+
<xsl:template match="co">
4+
<xsl:value-of select="concat('&#x2593;fB(',substring-after(@id,'-'),')&#x2593;fR')"/>
5+
</xsl:template>
6+
<xsl:template match="calloutlist">
7+
<xsl:text>&#x2302;sp&#10;</xsl:text>
8+
<xsl:apply-templates/>
9+
<xsl:text>&#10;</xsl:text>
10+
</xsl:template>
11+
<xsl:template match="callout">
12+
<xsl:value-of select="concat('&#x2593;fB',substring-after(@arearefs,'-'),'. &#x2593;fR')"/>
13+
<xsl:apply-templates/>
14+
<xsl:text>&#x2302;br&#10;</xsl:text>
15+
</xsl:template>
16+
17+
</xsl:stylesheet>

0 commit comments

Comments
 (0)