Show More
@@ -0,0 +1,23 b'' | |||
|
1 | <?xml version='1.0' encoding="UTF-8"?> | |
|
2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> | |
|
3 | <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"/> | |
|
4 | <xsl:output encoding="UTF-8"/> | |
|
5 | ||
|
6 | <xsl:template match="refnamediv"> | |
|
7 | <xsl:text>.SH 名前 </xsl:text> | |
|
8 | <xsl:for-each select="refname"> | |
|
9 | <xsl:if test="position()>1"> | |
|
10 | <xsl:text>, </xsl:text> | |
|
11 | </xsl:if> | |
|
12 | <xsl:value-of select="."/> | |
|
13 | </xsl:for-each> | |
|
14 | <xsl:text> \- </xsl:text> | |
|
15 | <xsl:value-of select="normalize-space (refpurpose)"/> | |
|
16 | </xsl:template> | |
|
17 | ||
|
18 | <xsl:template match="refsynopsisdiv"> | |
|
19 | <xsl:text> .SH "書式" </xsl:text> | |
|
20 | <xsl:apply-templates/> | |
|
21 | </xsl:template> | |
|
22 | ||
|
23 | </xsl:stylesheet> |
@@ -1,21 +1,21 b'' | |||
|
1 | 1 | SOURCES=$(wildcard *.[0-9].ja.txt) |
|
2 | 2 | MAN=$(SOURCES:%.txt=%) |
|
3 | 3 | HTML=$(SOURCES:%.txt=%.html) |
|
4 | 4 | |
|
5 | 5 | all: man html |
|
6 | 6 | |
|
7 | 7 | man: $(MAN) |
|
8 | 8 | |
|
9 | 9 | html: $(HTML) |
|
10 | 10 | |
|
11 | 11 | %: %.xml |
|
12 | xmlto man $*.xml | |
|
12 | xmlto -x docbook.ja.xsl man $*.xml | |
|
13 | 13 | |
|
14 | 14 | %.xml: %.txt |
|
15 | 15 | -asciidoc -d manpage -b docbook -f docbook.ja.conf $*.txt |
|
16 | 16 | |
|
17 | 17 | %.html: %.txt |
|
18 | 18 | asciidoc -b html4 $*.txt |
|
19 | 19 | |
|
20 | 20 | clean: |
|
21 | 21 | $(RM) $(MAN:%.ja=%) $(MAN:%=%.xml) $(MAN:%=%.html) |
General Comments 0
You need to be logged in to leave comments.
Login now