Skip to content

Commit

Permalink
man pages are littered with .ft C and others
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jonas authored and gitster committed Feb 5, 2008
1 parent 4f395ee commit 7a2078b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ man7dir=$(mandir)/man7

ASCIIDOC=asciidoc
ASCIIDOC_EXTRA =
MANPAGE_XSL = callouts.xsl
INSTALL?=install
RM ?= rm -f
DOC_REF = origin/man
Expand All @@ -65,6 +66,7 @@ ASCIIDOC_EXTRA += -a asciidoc7compatible
endif
ifdef DOCBOOK_XSL_172
ASCIIDOC_EXTRA += -a docbook-xsl-172
MANPAGE_XSL = manpage-1.72.xsl
endif

#
Expand Down Expand Up @@ -159,7 +161,7 @@ $(MAN_HTML): %.html : %.txt

%.1 %.5 %.7 : %.xml
$(RM) $@
xmlto -m callouts.xsl man $<
xmlto -m $(MANPAGE_XSL) man $<

%.xml : %.txt
$(RM) $@+ $@
Expand Down
17 changes: 17 additions & 0 deletions Documentation/manpage-1.72.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- callout.xsl: converts asciidoc callouts to man page format -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="co">
<xsl:value-of select="concat('&#x2593;fB(',substring-after(@id,'-'),')&#x2593;fR')"/>
</xsl:template>
<xsl:template match="calloutlist">
<xsl:text>&#x2302;sp&#10;</xsl:text>
<xsl:apply-templates/>
<xsl:text>&#10;</xsl:text>
</xsl:template>
<xsl:template match="callout">
<xsl:value-of select="concat('&#x2593;fB',substring-after(@arearefs,'-'),'. &#x2593;fR')"/>
<xsl:apply-templates/>
<xsl:text>&#x2302;br&#10;</xsl:text>
</xsl:template>

</xsl:stylesheet>

0 comments on commit 7a2078b

Please sign in to comment.