• Corrected default number of rows to span for labs and tutorials (should be 2, not 1).
1 parent 16c7d7a commit 7f883b90b7425430b93b25205f3c93a57832cc18
Nigel Stanger authored on 1 May 2014
Showing 1 changed file
View
20
modules/paper-calendar.xml
 
<!--
Output a calendar entry for a laboratory. Laboratories are automatically numbered unless otherwise specified. Note that the laboratory occupies two cells in the generated table regardless of whether it's numbered.
@rows: The number of rows the laboratory spans [default 1].
@rows: The number of rows the laboratory spans [default 2].
@number: Whether or not to generate a number for this laboratory. The value of this attribute will override any value of parent::calendar/@number-laboratories (so you can have all laboratories numbered apart from certain ones, or vice versa). If unspecified, it defaults to the value of parent::calendar/@number-laboratories, or failing that, "yes".
"yes" [default if parent::calendar/@number-laboratories not specified]
"no"
</common>
<common formats="/latex/xelatex/">
<xsl:if test="$numbered = 'yes'">
<xsl:call-template name="generate-number-cell">
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 1" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
<xsl:with-param name="number" select="1 + count( preceding::laboratory[node()] )" />
</xsl:call-template>
<xsl:call-template name="tabular-column-separator" />
</xsl:if>
<xsl:call-template name="generate-content-cell">
<xsl:with-param name="columns" select="if ( $numbered = 'yes' ) then 1 else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 1" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
</xsl:call-template>
</common>
<common formats="/html/xhtml/">
<xsl:if test="$numbered = 'yes'">
<xsl:call-template name="generate-number-cell">
<xsl:with-param name="colour">ltblue</xsl:with-param>
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 1" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
<xsl:with-param name="number" select="1 + count( preceding::laboratory[node()] )" />
</xsl:call-template>
</xsl:if>
 
<xsl:call-template name="generate-content-cell">
<xsl:with-param name="colour">ltblue</xsl:with-param>
<xsl:with-param name="columns" select="if ( $numbered = 'yes' ) then 1 else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 1" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
</xsl:call-template>
</common>
</template>
 
 
<!--
Output a calendar entry for a tutorial. Tutorials are automatically numbered unless otherwise specified. Note that the tutorial occupies two cells in the generated table regardless of whether it's numbered.
@rows: The number of rows the tutorial spans [default 1].
@rows: The number of rows the tutorial spans [default 2].
@number: Whether or not to generate a number for this tutorial. The value of this attribute will override any value of parent::calendar/@number-tutorials (so you can have all tutorials numbered apart from certain ones, or vice versa). If unspecified, it defaults to the value of parent::calendar/@number-tutorials, or failing that, "yes".
"yes" [default if parent::calendar/@number-tutorials not specified]
"no"
</common>
<common formats="/latex/xelatex/">
<xsl:if test="$numbered = 'yes'">
<xsl:call-template name="generate-number-cell">
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 1" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
<xsl:with-param name="number" select="1 + count( preceding::tutorial[node()] )" />
</xsl:call-template>
<xsl:call-template name="tabular-column-separator" />
</xsl:if>
<xsl:call-template name="generate-content-cell">
<xsl:with-param name="columns" select="if ( $numbered = 'yes' ) then 1 else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 1" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
</xsl:call-template>
</common>
<common formats="/html/xhtml/">
<xsl:if test="$numbered = 'yes'">
<xsl:call-template name="generate-number-cell">
<xsl:with-param name="colour">medgreen</xsl:with-param>
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 1" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
<xsl:with-param name="number" select="1 + count( preceding::tutorial[node()] )" />
</xsl:call-template>
</xsl:if>
 
<xsl:call-template name="generate-content-cell">
<xsl:with-param name="colour">medgreen</xsl:with-param>
<xsl:with-param name="columns" select="if ( $numbered = 'yes' ) then 1 else 2" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 1" />
<xsl:with-param name="rows" select="if ( @rows ) then @rows else 2" />
</xsl:call-template>
</common>
</template>