]> granicus.if.org Git - docbook-dsssl/commitdiff
Added some templates for generating if-then-else conditional
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 26 Feb 2008 09:58:56 +0000 (09:58 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 26 Feb 2008 09:58:56 +0000 (09:58 +0000)
markup in groff, so let's use those instead of hard-coding it in
multiple places...

xsl/manpages/lists.xsl

index 6ca5e22361fe4c112cdea86e4670c886066d3fcd..0d11d061d1fe82d928e2f38d3b6ba7346c902b1c 100644 (file)
   <!-- * TTY; so we do some fixed-width-font hackery with \h to make a -->
   <!-- * hanging indents (instead of using .IP, which has some -->
   <!-- * undesirable side effects under certain circumstances) -->
-  <xsl:text>.ie n \{\&#10;</xsl:text>
+  <xsl:call-template name="roff-if-else-start"/>
   <xsl:text>\h'-</xsl:text>
     <xsl:if test="not($list-indent = '')">
     <xsl:text>0</xsl:text>
   <xsl:text>'</xsl:text>
   </xsl:if>
   <xsl:apply-templates/>
-  <xsl:text>.\}&#10;</xsl:text>
   <!-- * else, we are not using for "nroff", but instead "troff" - which -->
   <!-- * means not for TTY, but for PS or whatever; so we’re not using a -->
   <!-- * fixed-width font, so use a real .IP instead -->
-  <xsl:text>.el \{\&#10;</xsl:text>
+  <xsl:call-template name="roff-else"/>
   <!-- * .IP generates a blank like of space, so let’s go backwards one -->
   <!-- * line up to compensate for that -->
   <xsl:text>.sp -1&#10;</xsl:text>
-  <!-- * the value 2 is the amount of indentation -->
-  <xsl:text>.IP \(bu 2&#10;</xsl:text>
+  <xsl:text>.IP \(bu 2.3&#10;</xsl:text>
+  <!-- * The value 2.3 is the amount of indentation; we use 2.3 instead -->
+  <!-- * of 2 because when the font family is New Century Schoolbook it -->
+  <!-- * seems to require the extra space. -->
   <xsl:apply-templates/>
+  <xsl:call-template name="roff-if-end"/>
   <xsl:text>.\}&#10;</xsl:text>
   <xsl:text>.RE&#10;</xsl:text>
 </xsl:template>
   <!-- * TTY; so we do some fixed-width-font hackery with \h to make a -->
   <!-- * hanging indents (instead of using .IP, which has some -->
   <!-- * undesirabel side effects under certain circumstances) -->
-  <xsl:text>.ie n \{\&#10;</xsl:text>
+  <xsl:call-template name="roff-if-else-start"/>
   <xsl:text>\h'-</xsl:text>
     <xsl:if test="not($list-indent = '')">
     <xsl:text>0</xsl:text>
   <xsl:text>'</xsl:text>
   </xsl:if>
   <xsl:apply-templates/>
-  <xsl:text>.\}&#10;</xsl:text>
   <!-- * else, we are not using for "nroff", but instead "troff" - which -->
   <!-- * means not for TTY, but for PS or whatever; so we’re not using a -->
   <!-- * fixed-width font, so use a real .IP instead -->
-  <xsl:text>.el \{\&#10;</xsl:text>
+  <xsl:call-template name="roff-else"/>
   <!-- * .IP generates a blank like of space, so let’s go backwards one -->
   <!-- * line up to compensate for that -->
   <xsl:text>.sp -1&#10;</xsl:text>
     <xsl:text>  </xsl:text>
   </xsl:if>
   <xsl:number format="1."/>
-  <xsl:text>" 4&#10;</xsl:text>
-  <!-- * the value 4 is the amount of indentation -->
+  <xsl:text>" 4.2&#10;</xsl:text>
+  <!-- * The value 4.2 is the amount of indentation; we use 4.2 instead -->
+  <!-- * of 4 because when the font family is Bookman it seems to require -->
+  <!-- * the extra space. -->
   <xsl:apply-templates/>
-  <xsl:text>.\}&#10;</xsl:text>
+  <xsl:call-template name="roff-if-end"/>
   <xsl:text>.RE&#10;</xsl:text>
   <xsl:text>&#10;</xsl:text>
 </xsl:template>