- Timestamp:
- Jul 24, 2024 10:35:29 AM (6 months ago)
- Location:
- trunk/doc/manual
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/common-formatcfg.xsl
r99116 r105474 107 107 </xsl:template> 108 108 109 <!--110 refentry related layout tweaks.111 112 Note! While we could save us all this work by using refsect1..3 and113 refsynopsisdiv docbook-refentry-to-manual-sect1.xsl, we'd like to have114 a valid XML document and thus do do some extra markup using the role115 and condition attributes. We catch some of it here. But the XSLT116 for specific targets (html, latex, etc) have a few more tweaks117 related to this.118 119 The @role has only one special trick 'not-in-toc' that excludes sections120 like 'Synopsis' and 'Description' from the TOCs.121 122 The @condition records the original refentry element name, i.e. it will123 have values like refentry, refsynopsisdiv, refsect1, refsect2 and refsect3.124 -->125 126 <!-- This removes the not-in-toc bits from the toc. -->127 <xsl:template match="sect2[@role = 'not-in-toc']" mode="toc" />128 <xsl:template match="sect3[@role = 'not-in-toc']" mode="toc" />129 <xsl:template match="sect4[@role = 'not-in-toc']" mode="toc" />130 <xsl:template match="sect5[@role = 'not-in-toc']" mode="toc" />131 <xsl:template match="section[@role = 'not-in-toc']" mode="toc" />132 <xsl:template match="simplesect[@role = 'not-in-toc']" mode="toc" />133 134 <!-- This removes unnecessary <dd><dl> stuff caused by the above. -->135 <xsl:template match="sect1[sect2/@role = 'not-in-toc']" mode="toc">136 <xsl:param name="toc-context" select="."/>137 <xsl:call-template name="subtoc">138 <xsl:with-param name="toc-context" select="$toc-context"/>139 <xsl:with-param name="nodes" select="sect2[@role != 'not-in-toc'] | bridgehead[$bridgehead.in.toc != 0]"/>140 </xsl:call-template>141 </xsl:template>142 143 <xsl:template match="sect2[sect3/@role = 'not-in-toc']" mode="toc">144 <xsl:param name="toc-context" select="."/>145 <xsl:call-template name="subtoc">146 <xsl:with-param name="toc-context" select="$toc-context"/>147 <xsl:with-param name="nodes" select="sect3[@role != 'not-in-toc'] | bridgehead[$bridgehead.in.toc != 0]"/>148 </xsl:call-template>149 </xsl:template>150 151 <!-- This make the refsect* and refsynopsisdiv unnumbered like the default refentry rendering. -->152 <xsl:template match="sect2[@condition = 'refsynopsisdiv']153 | sect2[starts-with(@condition, 'refsect')]154 | sect3[starts-with(@condition, 'refsect')]155 | sect4[starts-with(@condition, 'refsect')]156 | sect5[starts-with(@condition, 'refsect')]157 | section[starts-with(@condition, 'refsect')]158 | simplesect[starts-with(@condition, 'refsect')]"159 mode="object.title.template"160 >161 <xsl:call-template name="gentext.template">162 <xsl:with-param name="context" select="'title-unnumbered'"/>163 <xsl:with-param name="name">164 <xsl:call-template name="xpath.location"/>165 </xsl:with-param>166 </xsl:call-template>167 </xsl:template>168 169 109 170 110 </xsl:stylesheet> -
trunk/doc/manual/common-html-formatcfg.xsl
r98103 r105474 122 122 123 123 124 <!-- This is for allow special CSS rules to apply to the refsect stuff. -->125 <xsl:template match="sect2[ @role = 'not-in-toc']/title126 | sect3[ @role = 'not-in-toc']/title127 | sect4[ @role = 'not-in-toc']/title128 | sect5[ @role = 'not-in-toc']/title129 | section[ @role = 'not-in-toc']/title130 | simplesect[@role = 'not-in-toc']/title131 | sect1[ @condition = 'refentry']/title132 | sect2[ @condition = 'refentry']/title133 | sect1[ starts-with(@condition, 'refsect')]/title134 | sect2[ starts-with(@condition, 'refsect')]/title135 | sect3[ starts-with(@condition, 'refsect')]/title136 | sect4[ starts-with(@condition, 'refsect')]/title137 | sect5[ starts-with(@condition, 'refsect')]/title138 | section[ starts-with(@condition, 'refsect')]/title139 | simplesect[starts-with(@condition, 'refsect')]/title140 " mode="titlepage.mode">141 <xsl:element name="div">142 <xsl:attribute name="class">143 <xsl:value-of select="../@role"/>144 <xsl:if test="../@role and ../@condition">145 <xsl:text> </xsl:text>146 </xsl:if>147 <xsl:value-of select="../@condition"/>148 </xsl:attribute>149 <xsl:apply-imports/>150 </xsl:element>151 </xsl:template>152 153 <xsl:template match="sect2[ @role = 'not-in-toc']154 | sect3[ @role = 'not-in-toc']155 | sect4[ @role = 'not-in-toc']156 | sect5[ @role = 'not-in-toc']157 | section[ @role = 'not-in-toc']158 | simplesect[@role = 'not-in-toc']159 | sect1[ @condition = 'refentry']160 | sect2[ @condition = 'refentry']161 | sect1[ starts-with(@condition, 'refsect')]162 | sect2[ starts-with(@condition, 'refsect')]163 | sect3[ starts-with(@condition, 'refsect')]164 | sect4[ starts-with(@condition, 'refsect')]165 | sect5[ starts-with(@condition, 'refsect')]166 | section[ starts-with(@condition, 'refsect')]167 | simplesect[starts-with(@condition, 'refsect')]" >168 <xsl:element name="div">169 <xsl:attribute name="class">170 <xsl:value-of select="@role"/>171 <xsl:if test="@role and @condition">172 <xsl:text> </xsl:text>173 </xsl:if>174 <xsl:value-of select="@condition"/>175 </xsl:attribute>176 <xsl:apply-imports/>177 </xsl:element>178 </xsl:template>179 180 124 <!-- To use CSS to correctly insert hanging indent when soft wrapping and 181 125 <sbr>'ing a synopsis, we must place each command in its own <p>. The default -
trunk/doc/manual/docbook-refentry-to-C-help.xsl
r99513 r105474 1 1 <?xml version="1.0"?> 2 2 <!-- 3 docbook-refentry-to- manual-sect1.xsl:3 docbook-refentry-to-C-help.xsl: 4 4 XSLT stylesheet for nicking the refsynopsisdiv bit of a 5 5 refentry (manpage) for use in the command overview section -
trunk/doc/manual/docbook-refentry-to-manual-dita.xsl
r99629 r105474 1 1 <?xml version="1.0"?> 2 2 <!-- 3 docbook-refentry-to-manual- sect1.xsl:3 docbook-refentry-to-manual-dita.xsl: 4 4 XSLT stylesheet for converting a refentry (manpage) 5 5 to dita for use in the user manual. … … 50 50 4.0.x with the latest com.elovirta.pdf plugin (2023-03-xx 51 51 or later), we can enable this by default again. --> 52 <xsl:param name="g_fReplaceHyp ens">false</xsl:param>52 <xsl:param name="g_fReplaceHyphens">true</xsl:param> 53 53 54 54 <!-- Render the syntax diagram more as text than as proper markup. --> … … 769 769 </xsl:template> 770 770 771 <!-- replaceable/text() in a cmdsynopsis should have hyp ens replaced. -->771 <!-- replaceable/text() in a cmdsynopsis should have hyphens replaced. --> 772 772 <xsl:template match="replaceable/text()[ancestor::cmdsynopsis]" > 773 773 <xsl:call-template name="emit-text-with-replacements"/> … … 1084 1084 1085 1085 <!-- 1086 Maybe replace hyp ens (dashes) with non-breaking ones.1086 Maybe replace hyphens (dashes) with non-breaking ones. 1087 1087 --> 1088 1088 <xsl:template name="emit-text-with-replacements"> 1089 1089 <xsl:param name="a_sText" select="."/> 1090 1090 <xsl:choose> 1091 <xsl:when test="$g_fReplaceHyp ens = 'true'">1091 <xsl:when test="$g_fReplaceHyphens = 'true'"> 1092 1092 <xsl:call-template name="str:subst"> 1093 1093 <xsl:with-param name="text" select="$a_sText"/> -
trunk/doc/manual/docbook2latex.xsl
r99118 r105474 390 390 </xsl:call-template> 391 391 </xsl:when> 392 <xsl:when test="parent::sect2[@role='not-in-toc'] or parent::refsect1 or (parent::section and count(ancestor::section) = 2)">393 <xsl:call-template name="title-wrapper">394 <xsl:with-param name="texcmd">\subsection*</xsl:with-param>395 </xsl:call-template>396 </xsl:when>397 392 <xsl:when test="name(..)='sect2'"> 398 393 <xsl:call-template name="title-wrapper"> … … 400 395 </xsl:call-template> 401 396 </xsl:when> 402 <xsl:when test="parent::sect3[@role='not-in-toc'] or parent::refsect2 or (parent::section and count(ancestor::section) = 3)">403 <xsl:call-template name="title-wrapper">404 <xsl:with-param name="texcmd">\subsubsection*</xsl:with-param>405 </xsl:call-template>406 </xsl:when>407 397 <xsl:when test="name(..)='sect3'"> 408 398 <xsl:call-template name="title-wrapper"> … … 410 400 </xsl:call-template> 411 401 </xsl:when> 412 <xsl:when test="parent::sect4[@role='not-in-toc'] or parent::refsect3 or (parent::section and count(ancestor::section) = 4)">413 <xsl:call-template name="title-wrapper">414 <xsl:with-param name="texcmd">\paragraph*</xsl:with-param>415 </xsl:call-template>416 </xsl:when>417 402 <xsl:when test="name(..)='sect4'"> 418 403 <xsl:call-template name="title-wrapper"> 419 404 <xsl:with-param name="texcmd">\paragraph</xsl:with-param> 420 </xsl:call-template>421 </xsl:when>422 <xsl:when test="parent::sect5[@role='not-in-toc'] or parent::refsect4 or (parent::section and count(ancestor::section) = 5)">423 <xsl:call-template name="title-wrapper">424 <xsl:with-param name="texcmd">\subparagraph*</xsl:with-param>425 405 </xsl:call-template> 426 406 </xsl:when> -
trunk/doc/manual/ru_RU/docbook-refentry-to-C-help.xsl
r98103 r105474 1 1 <?xml version="1.0"?> 2 2 <!-- 3 docbook-refentry-to- manual-sect1.xsl:3 docbook-refentry-to-C-help.xsl: 4 4 XSLT stylesheet for nicking the refsynopsisdiv bit of a 5 5 refentry (manpage) for use in the command overview section
Note:
See TracChangeset
for help on using the changeset viewer.