diff --git a/format-master.xml b/format-master.xml index 6c859b6..93b885b 100755 --- a/format-master.xml +++ b/format-master.xml @@ -784,9 +784,13 @@ <!-- Document preamble stuff: title, author, date. --> <template name="preamble-title" match="document/title" mode="preamble"> <latex>\title{<xsl:apply-templates/>}</latex> - <html> - <xsl:apply-templates/> - </html> + <!-- + For HTML, strip out any formatting (e.g., emphasis), as this + is not interpreted within the <TITLE> tag, resulting in raw + HTML markup in the window title. Ick. We do this by just + grabbing the values of all descendant text nodes. + --> + <html><xsl:value-of select="."/></html> </template> <template name="preamble-author" match="document/author" mode="preamble"> @@ -995,14 +999,22 @@ 'right' @border: Width of cell border for HTML tables. + + @scale (LaTeX only): scaling factor for the tabular. + + @rotate (LaTeX only): rotation angle of tabular in degrees + anti-clockwise. --> <template name="tabular" match="tabular"> <latex> - <!-- Overall table alignment. --> + <!-- spacing --> + <xsl:text> + + </xsl:text> + + <!-- Overall tabular alignment. --> <xsl:if test="@align"> - <xsl:text> - - \begin{</xsl:text> + <xsl:text>\begin{</xsl:text> <xsl:choose> <xsl:when test="(@align = 'left') or (@align = 'right')"> <xsl:text>flush</xsl:text><xsl:value-of select="@align"/> @@ -1013,17 +1025,33 @@ </xsl:choose> <xsl:text>}</xsl:text> </xsl:if> - <xsl:text> - - \begin{tabular}{</xsl:text> + + <!-- tabular rotation --> + <xsl:if test="@rotate"> + <xsl:text>\rotatebox{</xsl:text> + <xsl:value-of select="@rotate"/> + <xsl:text>}{</xsl:text> + </xsl:if> + + <!-- tabular scaling --> + <xsl:if test="@scale"> + <xsl:text>\scalebox{</xsl:text> + <xsl:value-of select="@scale"/> + <xsl:text>}{</xsl:text> + </xsl:if> + + <xsl:text>\begin{tabular}{</xsl:text> <xsl:apply-templates select="tabular-columns"/> <xsl:text>}</xsl:text> <xsl:apply-templates select="tabular-header"/> <xsl:apply-templates select="tabular-body"/> <xsl:apply-templates select="tabular-footer"/> - <xsl:text>\end{tabular} - - </xsl:text> + <xsl:text>\end{tabular}</xsl:text> + + <xsl:if test="@scale"><xsl:text>}</xsl:text></xsl:if> + + <xsl:if test="@rotate"><xsl:text>}</xsl:text></xsl:if> + <xsl:if test="@align"> <xsl:text>\end{</xsl:text> <xsl:choose> @@ -1034,10 +1062,13 @@ <xsl:text>center</xsl:text> </xsl:when> </xsl:choose> - <xsl:text>} - - </xsl:text> + <xsl:text>}</xsl:text> </xsl:if> + + <!-- spacing --> + <xsl:text> + + </xsl:text> </latex> <html> <TABLE>