]> pere.pagekite.me Git - text-free-culture-lessig.git/commitdiff
Fix <dedication> pages in epub and html version.
authorPetter Reinholdtsen <pere@hungry.com>
Wed, 30 Sep 2015 07:15:16 +0000 (09:15 +0200)
committerPetter Reinholdtsen <pere@hungry.com>
Wed, 30 Sep 2015 07:15:16 +0000 (09:15 +0200)
Makefile
data/html.xsl

index eb9e4ba041e92e943048bc7529c1b128346bd1cf..21666549c5fdff8122436246e11daa7ef6a5e20d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -44,6 +44,11 @@ HTML_XSLT = \
   data/html.xsl \
   data/stylesheet-html.xsl
 
+EPUB_XSLT = \
+  $(XSLT) \
+  data/html.xsl \
+  data/stylesheet-epub.xsl
+
 PDF_XSLT = \
   $(DB_XSLT) \
   $(XSLT) \
@@ -134,8 +139,10 @@ pdf-compare: freeculture.xml $(IMAGES)
 %.txt: %.xml $(IMAGES)
        xmlto txt $<
 
-%.epub: %.xml $(IMAGES)
-       $(DBTOEPUB) $<
+%.epub: %.xml $(IMAGES) $(EPUB_XSLT)
+       $(DBTOEPUB) \
+       -s data/stylesheet-epub.xsl \
+       $<
 
 %.mobi: %.epub
        ebook-convert $< $@
index 43cd579974362bb89bf20534236039e4397dfcca..4f2519940eea5b9d3c69f8bb5d19588472fd64ec 100644 (file)
@@ -8,4 +8,22 @@
   <!-- Restore previous default value with openjade -->
   <xsl:param name="autotoc.label.in.hyperlink" select="0"></xsl:param>
   <xsl:param name="toc.section.depth">3</xsl:param>
+
+  <!-- Add <hr> after the dedication block, based on block from
+       /usr/share/xml/docbook/stylesheet/docbook-xsl/html/component.xsl
+       -->
+  <xsl:template match="dedication" mode="dedication">
+    <xsl:call-template name="id.warning"/>
+    <div>
+      <xsl:call-template name="common.html.attributes">
+       <xsl:with-param name="inherit" select="1"/>
+      </xsl:call-template>
+      <xsl:call-template name="id.attribute">
+       <xsl:with-param name="conditional" select="0"/>
+      </xsl:call-template>
+      <xsl:apply-templates/>
+      <xsl:call-template name="process.footnotes"/>
+    </div>
+    <hr/>
+  </xsl:template>
 </xsl:stylesheet>