<xsl:text>.sp </xsl:text>
</xsl:template>
-<xsl:template match="address|literallayout|programlisting|screen|synopsis">
- <!-- * Yes, address and synopsis are verbatim environments. -->
+<xsl:template match="literallayout|programlisting|screen|
+ address|synopsis|funcsynopsisinfo">
+ <!-- * Yes, address, synopsis, and funcsynopsisinfo are verbatim environments. -->
<xsl:choose>
<!-- * Check to see if this verbatim item is within a parent element that -->
<xsl:text>.sp </xsl:text>
</xsl:otherwise>
</xsl:choose>
- <xsl:text>.nf </xsl:text>
- <xsl:apply-templates/>
- <xsl:text> </xsl:text>
- <xsl:text>.fi </xsl:text>
+ <xsl:choose>
+ <xsl:when test="self::funcsynopsisinfo">
+ <!-- * All funcsynopsisinfo content must be rendered in bold -->
+ <!-- * The man(7) man page says this: -->
+ <!-- * -->
+ <!-- * For functions, the arguments are always specified using -->
+ <!-- * italics, even in the SYNOPSIS section, where the rest of -->
+ <!-- * the function is specified in bold. -->
+ <!-- * -->
+ <!-- * If you take a look through the contents of the man/man2 -->
+ <!-- * directory on your system, you'll see that most existing pages -->
+ <!-- * do follow that "bold everything in function synopsis " rule. -->
+ <!-- * -->
+ <xsl:text>.\" bold on </xsl:text>
+ <xsl:text>.ft B </xsl:text>
+ <xsl:text>.nf </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text> </xsl:text>
+ <xsl:text>.fi </xsl:text>
+ <xsl:text>.\" bold off </xsl:text>
+ <xsl:text>.ft </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- * Other verbatims do not need to get bolded -->
+ <xsl:text>.nf </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text> </xsl:text>
+ <xsl:text>.fi </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
<!-- * if first following sibling node of this verbatim -->
<!-- * environment is a text node, output a line of space before it -->
<xsl:if test="following-sibling::node()[1][name(.) = '']">
<xsl:variable name="arg.or.sep"> |</xsl:variable>
-<!-- * Note: If you are looking for the <synopsis> element, you won't -->
-<!-- * find any code here for handling it. It is a _verbatim_ -->
-<!-- * environment; check the block.xsl file instead. -->
+<!-- * Note: If you're looking for the *Synopsis* element, you won't -->
+<!-- * find any code here for handling it. It's a "verbatim" -->
+<!-- * environment; see the block.xsl file instead. -->
<xsl:template match="synopfragmentref">
<xsl:variable name="target" select="key('id',@linkend)"/>
</xsl:template>
<!-- ==================================================================== -->
+<!-- * Funcsynopis hierarchy starts here -->
+<!-- ==================================================================== -->
+
+<!-- * Note: If you're looking for the *Funcsynopsisinfo* element, -->
+<!-- * you won't find any code here for handling it. It's a "verbatim" -->
+<!-- * environment; see the block.xsl file instead. -->
<!-- * Within funcsynopis output, disable hyphenation, and use -->
<!-- * left-aligned filling for the duration of the synopsis, so that -->
<!-- * that document functions, and there's no good reason for us to -->
<!-- * be following it. -->
-<xsl:template match="funcsynopsisinfo">
- <xsl:text>.PP </xsl:text>
- <xsl:apply-templates mode="bold" select="."/>
- <xsl:text> </xsl:text>
-</xsl:template>
-
<xsl:template match="funcprototype">
<xsl:variable name="funcprototype.string.value">
<xsl:value-of select="funcdef"/>