Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/recipe-books.git

eBook is the default version.

AuthorDave Jarvis <email>
Date2013-02-27 18:55:47 GMT-0800
Commitd27f7ed28253ce3374e877ab29842ab9e5f4ab6a
Parent70fb6d3
xsl/latex.xsl
<xsl:param name="book-front-cover" select="true()" />
+<!-- If true, the book has a different layout than print. -->
+<xsl:param name="ebook" select="true()" />
+
<!-- These will come from the XML...
<xsl:param name="book-back-cover" select="true()" />
-->
<!-- Keys -->
<xsl:key name="ingredient-id" match="/recipe-book/ingredients/ingredient" use="@id" />
<xsl:key name="recipe-by-category" match="recipe" use="tags/tag[1]" />
<xsl:template match="/recipe-book">
- <xsl:text>\documentclass{recipe-book}&#xa;</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$ebook">
+ <xsl:text>\documentclass[ebook]{recipe-book}&#xa;</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>\documentclass{recipe-book}&#xa;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:text>\usepackage{hyperref}&#xa;</xsl:text>
<xsl:value-of select="$preamble" />
Delta11 lines added, 1 line removed, 10-line increase