******************************************************************** -->
+ <xsl:variable name="authors-indent">
+ <xsl:choose>
+ <xsl:when test="not($man.indentation.authors.adjust = 0)">
+ <xsl:value-of select="$man.indentation.authors.value"/>
+ </xsl:when>
+ <xsl:when test="not($man.indentation.default.adjust = 0)">
+ <!-- * "zq" is the name of a register we set for preserving the -->
+ <!-- * original default indent value when -->
+ <!-- * $man.indentation.default.adjust is non-zero; -->
+ <!-- * "u" is a roff unit specifier -->
+ <xsl:text>\n(zqu</xsl:text>
+ </xsl:when>
+ <xsl:otherwise/> <!-- * otherwise, just leave it empty -->
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- ================================================================== -->
<!-- * About the $info param used in this stylesheet -->
<!-- * -->
<!-- * The $info param is a "master info" node set that contains -->
<xsl:template name="publisher.attribution">
<xsl:text> .sp -1n </xsl:text>
- <xsl:text>.IP </xsl:text>
+ <xsl:text>.IP ""</xsl:text>
+ <xsl:if test="not($authors-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$authors-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'Publisher'"/>
</xsl:call-template>
<!-- * Editor, then render the corresponding localized gentext -->
<xsl:when test="self::author">
<xsl:text> .sp -1n </xsl:text>
- <xsl:text>.IP </xsl:text>
+ <xsl:text>.IP ""</xsl:text>
+ <xsl:if test="not($authors-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$authors-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'Author'"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="self::editor">
<xsl:text> .sp -1n </xsl:text>
- <xsl:text>.IP </xsl:text>
+ <xsl:text>.IP ""</xsl:text>
+ <xsl:if test="not($authors-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$authors-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'Editor'"/>
</xsl:call-template>
<xsl:choose>
<xsl:when test="@class and @class != 'other'">
<xsl:text> .sp -1n </xsl:text>
- <xsl:text>.IP </xsl:text>
+ <xsl:text>.IP ""</xsl:text>
+ <xsl:if test="not($authors-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$authors-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="@class"/>
</xsl:call-template>
<xsl:template match="personblurb|authorblurb" mode="authorsect">
<xsl:text> .sp -1n </xsl:text>
- <xsl:text>.IP </xsl:text>
+ <xsl:text>.IP ""</xsl:text>
+ <xsl:if test="not($authors-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$authors-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<!-- * yeah, it's possible for a *blurb to have a "title" -->
<xsl:apply-templates select="title"/>
<xsl:for-each select="*[name() != 'title']">
<!-- * We treat Contrib the same as Personblurb/Authorblurb -->
<!-- * except that we don't need to check for a title. -->
<xsl:text> .sp -1n </xsl:text>
- <xsl:text> .IP </xsl:text>
+ <xsl:text> .IP ""</xsl:text>
+ <xsl:if test="not($authors-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$authors-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<xsl:apply-templates/>
</xsl:template>
copyright and other information.
******************************************************************** -->
+
+<xsl:variable name="list-indent">
+ <xsl:choose>
+ <xsl:when test="not($man.indentation.lists.adjust = 0)">
+ <xsl:value-of select="$man.indentation.lists.value"/>
+ </xsl:when>
+ <xsl:when test="not($man.indentation.default.adjust = 0)">
+ <!-- * "zq" is the name of a register we set for preserving the -->
+ <!-- * original default indent value when -->
+ <!-- * $man.indentation.default.adjust is non-zero; -->
+ <!-- * "u" is a roff unit specifier -->
+ <xsl:text>\n(zqu</xsl:text>
+ </xsl:when>
+ <xsl:otherwise/> <!-- * otherwise, just leave it empty -->
+ </xsl:choose>
+</xsl:variable>
+
+<!-- ================================================================== -->
+
<xsl:template match="para[ancestor::listitem or ancestor::step or ancestor::glossdef]|
simpara[ancestor::listitem or ancestor::step or ancestor::glossdef]|
remark[ancestor::listitem or ancestor::step or ancestor::glossdef]">
<xsl:text>.PP </xsl:text>
</xsl:when>
<xsl:otherwise> <!-- * we only have one term, so use .TP -->
- <xsl:text>.TP </xsl:text>
+ <xsl:text>.TP</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:for-each select="term|glossterm">
<!-- * if we have multiple terms in the same varlistentry, we need to-->
<!-- * manually indent the listitem using .RS and .RE -->
<xsl:when test="count(term) > 1">
- <xsl:text>.RS </xsl:text>
+ <xsl:text>.RS</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<xsl:apply-templates/>
<xsl:text>.RE </xsl:text>
</xsl:when>
<xsl:template match="glossentry/glossterm"/>
<xsl:template match="variablelist[ancestor::listitem or ancestor::step or ancestor::glossdef]|
- glosslist[ancestor::listitem or ancestor::step or ancestor::glossdef]">
- <xsl:text>.RS </xsl:text>
+ glosslist[ancestor::listitem or ancestor::step or ancestor::glossdef]">
+ <xsl:text>.RS</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<xsl:apply-templates/>
<xsl:text>.RE </xsl:text>
<xsl:if test="following-sibling::node() or
parent::para[following-sibling::node()] or
parent::simpara[following-sibling::node()] or
parent::remark[following-sibling::node()]">
- <xsl:text>.IP </xsl:text>
+ <xsl:text>.IP ""</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
<xsl:text>• </xsl:text>
<xsl:apply-templates/>
<xsl:if test="following-sibling::listitem">
- <xsl:text>.TP </xsl:text>
+ <xsl:text>.TP</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
<xsl:text> </xsl:text>
<xsl:apply-templates/>
<xsl:if test="position()!=last()">
- <xsl:text>.TP </xsl:text>
+ <xsl:text>.TP</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
<xsl:apply-templates mode="bold" select="title"/>
<xsl:text> </xsl:text>
</xsl:if>
- <xsl:text>.TP 3 </xsl:text>
+ <xsl:text>.TP</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<xsl:apply-templates/>
<xsl:if test="following-sibling::node()">
- <xsl:text>.sp </xsl:text>
- <xsl:text>.RE </xsl:text>
+ <xsl:text>.sp </xsl:text>
+ <xsl:text>.RE </xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="itemizedlist[ancestor::listitem or ancestor::step or ancestor::glossdef]|
orderedlist[ancestor::listitem or ancestor::step or ancestor::glossdef]|
- procedure[ancestor::listitem or ancestor::step or ancestor::glossdef]">
- <xsl:text>.RS </xsl:text>
+ procedure[ancestor::listitem or ancestor::step or ancestor::glossdef]">
+ <xsl:text>.RS</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<xsl:if test="title">
<xsl:text>.PP </xsl:text>
<xsl:apply-templates mode="bold" select="title"/>
<xsl:text> </xsl:text>
</xsl:if>
- <xsl:text>.TP 3 </xsl:text>
+ <xsl:text>.TP</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<xsl:apply-templates/>
<xsl:text>.RE </xsl:text>
<xsl:if test="following-sibling::node() or
parent::para[following-sibling::node()] or
parent::simpara[following-sibling::node()] or
parent::remark[following-sibling::node()]">
- <xsl:text>.IP </xsl:text>
+ <xsl:text>.IP ""</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
<!-- * list (ignoring the values of the type and columns attributes) -->
<xsl:template match="simplelist">
<xsl:for-each select="member">
- <xsl:text>.IP </xsl:text>
+ <xsl:text>.IP ""</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<xsl:apply-templates/>
<xsl:text> </xsl:text>
</xsl:for-each>