.screen, .programlisting { background-color: silver; padding: 4px; }
.menuchoice, .guimenu, .guisubmenu, .guimenuitem { font-weight: bold; }
.guibutton { background-color: silver; padding: 2px; }
+
+/* programlisting types */
+.programlisting,
+.programlistingco,
+.screen { padding-left: 14pt; }
+
+.rolelabel {
+ position: absolute;
+ margin-left: -14pt;
+ background-color: #606060;
+ color: white;
+ line-height: 1;
+ font-family: sans-serif;
+ font-weight: bold;
+ text-align: center;
+ padding: 1px;
+ font-size: smaller;
+ text-transform: uppercase }
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
-<xsl:import href="../../../../../xsl/fo/docbook.xsl"/>
+<xsl:import href="../../../../../xsl/fo/profile-docbook.xsl"/>
+
+<xsl:param name="profile.status">final</xsl:param>
<xsl:param name="body.start.indent" select="'0pt'"/>
<xsl:param name="title.margin.left" select="'0pt'"/>
<xsl:param name="ulink.footnotes" select="1"/>
+<xsl:template match="programlisting[@language]">
+ <fo:block clear="left"/>
+ <fo:float float="start">
+ <fo:block width="0.4cm" text-align="end" font-family="Helvetica" font-size="7pt" font-weight="bold"
+ margin-left="-0.4cm">
+ <xsl:if test="not(preceding-sibling::*[1]/self::programlisting)">
+ <xsl:attribute name="margin-top">1.5em</xsl:attribute>
+ </xsl:if>
+ <fo:block-container reference-orientation="90" width="0.8cm">
+ <fo:block color="white" background-color="#808080" text-align="center">
+ <xsl:value-of select="translate(@language,'rngc','RNGC')"/>
+ </fo:block>
+ </fo:block-container>
+ </fo:block>
+ </fo:float>
+ <xsl:apply-imports/>
+</xsl:template>
+
</xsl:stylesheet>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
-<xsl:import href="../../../../../xsl/html/docbook.xsl"/>
+<xsl:import href="../../../../../xsl/html/profile-docbook.xsl"/>
+
+<xsl:param name="profile.status">final</xsl:param>
<xsl:template name="user.head.content">
<xsl:param name="node" select="."/>
</a>
</xsl:template>
+<!-- Support for labels identifying programlisting syntax used -->
+<xsl:template match="programlisting[@language]">
+ <xsl:param name="suppress-numbers" select="'0'"/>
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:call-template name="anchor"/>
+
+ <xsl:if test="$shade.verbatim != 0">
+ <xsl:message>
+ <xsl:text>The shade.verbatim parameter is deprecated. </xsl:text>
+ <xsl:text>Use CSS instead,</xsl:text>
+ </xsl:message>
+ <xsl:message>
+ <xsl:text>for example: pre.</xsl:text>
+ <xsl:value-of select="local-name(.)"/>
+ <xsl:text> { background-color: #E0E0E0; }</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$suppress-numbers = '0'
+ and @linenumbering = 'numbered'
+ and $use.extensions != '0'
+ and $linenumbering.extension != '0'">
+ <xsl:variable name="rtf">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <pre class="{name(.)}">
+ <xsl:call-template name="role.label"/>
+ <xsl:call-template name="number.rtf.lines">
+ <xsl:with-param name="rtf" select="$rtf"/>
+ </xsl:call-template>
+ </pre>
+ </xsl:when>
+ <xsl:otherwise>
+ <pre class="{name(.)}">
+ <xsl:call-template name="role.label"/>
+ <xsl:apply-templates/>
+ </pre>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="role.label">
+ <span class="rolelabel">
+ <xsl:call-template name="brealize">
+ <xsl:with-param name="text" select="@language"/>
+ </xsl:call-template>
+ </span>
+</xsl:template>
+
+<xsl:template name="brealize">
+ <xsl:param name="text"/>
+ <xsl:variable name="head" select="substring($text, 1, 1)"/>
+ <xsl:variable name="tail" select="substring($text, 2)"/>
+
+ <xsl:if test="$head != ''">
+ <xsl:value-of select="$head"/>
+ </xsl:if>
+
+ <xsl:if test="$tail != ''">
+ <br/>
+ <xsl:call-template name="brealize">
+ <xsl:with-param name="text" select="$tail"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
</xsl:stylesheet>