- Timestamp:
- Jun 17, 2015 4:04:03 PM (10 years ago)
- Location:
- trunk/doc/manual
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/common-formatcfg.xsl
r56482 r56483 56 56 </xsl:attribute-set> 57 57 58 <!-- command synopsis --> 59 <xsl:variable name="arg.choice.opt.open.str">[</xsl:variable> 60 <xsl:variable name="arg.choice.opt.close.str">]</xsl:variable> 61 <xsl:variable name="arg.choice.req.open.str"><</xsl:variable> 62 <xsl:variable name="arg.choice.req.close.str">></xsl:variable> 63 <xsl:variable name="arg.choice.plain.open.str"><xsl:text> </xsl:text></xsl:variable> 64 <xsl:variable name="arg.choice.plain.close.str"><xsl:text> </xsl:text></xsl:variable> 65 <xsl:variable name="arg.choice.def.open.str">[</xsl:variable> 66 <xsl:variable name="arg.choice.def.close.str">]</xsl:variable> 67 <xsl:variable name="arg.rep.repeat.str">...</xsl:variable> 68 <xsl:variable name="arg.rep.norepeat.str"></xsl:variable> 69 <xsl:variable name="arg.rep.def.str"></xsl:variable> 70 <xsl:variable name="arg.or.sep"> | </xsl:variable> 71 <xsl:variable name="cmdsynopsis.hanging.indent">4pi</xsl:variable> 58 72 59 73 <!-- -
trunk/doc/manual/docbook2latex.xsl
r56482 r56483 38 38 39 39 <xsl:import href="string.xsl"/> 40 <xsl:import href="common-formatcfg.xsl"/> 40 41 41 42 <xsl:variable name="g_nlsChapter"> … … 779 780 <xsl:if test="position() > 1"> 780 781 <xsl:choose> 782 <xsl:when test="parent::group"><xsl:value-of select="$arg.or.sep"/></xsl:when> 781 783 <xsl:when test="ancestor-or-self::*/@sepchar"><xsl:value-of select="ancestor-or-self::*/@sepchar"/></xsl:when> 782 784 <xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise> … … 785 787 <!-- open wrapping --> 786 788 <xsl:choose> 787 <xsl:when test="@choice = 'opt' or not(@choice) or @choice = ''"> <xsl:text>[</xsl:text></xsl:when> 788 <xsl:when test="@choice = 'req'"> <xsl:text>{</xsl:text></xsl:when> 789 <xsl:when test="not(@choice) or @choice = ''"> <xsl:value-of select="$arg.choice.def.open.str"/></xsl:when> 790 <xsl:when test="@choice = 'opt'"> <xsl:value-of select="$arg.choice.opt.open.str"/></xsl:when> 791 <xsl:when test="@choice = 'req'"> <xsl:value-of select="$arg.choice.req.open.str"/></xsl:when> 789 792 <xsl:when test="@choice = 'plain'"/> 790 793 <xsl:otherwise><xsl:message terminate="yes">Invalid arg choice: "<xsl:value-of select="@choice"/>"</xsl:message></xsl:otherwise> 791 794 </xsl:choose> 795 792 796 <!-- render the arg (TODO: may need to do more work here) --> 793 797 <xsl:apply-templates /> 798 794 799 <!-- repeat wrapping --> 795 800 <xsl:choose> 796 801 <xsl:when test="@rep = 'norepeat' or not(@rep) or @rep = ''"/> 797 <xsl:when test="@rep = 'repeat'"> <xsl:text>...</xsl:text></xsl:when>802 <xsl:when test="@rep = 'repeat'"> <xsl:value-of select="$arg.rep.repeat.str"/></xsl:when> 798 803 <xsl:otherwise><xsl:message terminate="yes">Invalid rep choice: "<xsl:value-of select="@rep"/>"</xsl:message></xsl:otherwise> 799 804 </xsl:choose> 800 805 <!-- close wrapping --> 801 806 <xsl:choose> 802 <xsl:when test="@choice = 'opt' or not(@choice) or @choice = ''"> <xsl:text>]</xsl:text></xsl:when> 803 <xsl:when test="@choice = 'req'"> <xsl:text>}</xsl:text></xsl:when> 807 <xsl:when test="not(@choice) or @choice = ''"> <xsl:value-of select="$arg.choice.def.close.str"/></xsl:when> 808 <xsl:when test="@choice = 'opt'"> <xsl:value-of select="$arg.choice.opt.close.str"/></xsl:when> 809 <xsl:when test="@choice = 'req'"> <xsl:value-of select="$arg.choice.req.close.str"/></xsl:when> 804 810 </xsl:choose> 805 811 </xsl:template> … … 807 813 <xsl:template match="replaceable"> 808 814 <xsl:choose> 809 <xsl:when test="not(ancestor::cmdsynopsis) ">815 <xsl:when test="not(ancestor::cmdsynopsis) or ancestor::arg"> 810 816 <xsl:text>\texttt{\textit{</xsl:text> 811 817 <xsl:apply-templates /> … … 813 819 </xsl:when> 814 820 <xsl:otherwise> 815 <xsl:text>\textit{ </xsl:text>816 <xsl:apply-templates /> 817 <xsl:text> }</xsl:text>821 <xsl:text>\textit{<</xsl:text> 822 <xsl:apply-templates /> 823 <xsl:text>>}</xsl:text> 818 824 </xsl:otherwise> 819 825 </xsl:choose> … … 825 831 --> 826 832 <xsl:template match="//text()"> 833 827 834 <xsl:variable name="subst1"> 828 835 <xsl:call-template name="str:subst"> … … 833 840 </xsl:call-template> 834 841 </xsl:variable> 842 835 843 <xsl:choose> 836 844 <xsl:when test="(name(..)='screen') or (name(../..)='screen')"> 837 845 <xsl:value-of select="." /> 838 846 </xsl:when> 847 839 848 <xsl:when test="(name(..) = 'computeroutput') or (name(../..) = 'computeroutput') 840 849 or (name(..) = 'code') or (name(../..) = 'code') … … 901 910 </xsl:call-template> 902 911 </xsl:variable> 903 <xsl:value-of select="$subst8" /> 904 </xsl:when> 912 <xsl:choose> 913 <xsl:when test="parent::arg or parent::command"> 914 <xsl:variable name="subst9"> 915 <xsl:call-template name="str:subst"> 916 <xsl:with-param name="text" select="$subst8" /> 917 <xsl:with-param name="replace" select="' '" /> 918 <xsl:with-param name="with" select="'~'" /> 919 <xsl:with-param name="disable-output-escaping" select="no" /> 920 </xsl:call-template> 921 </xsl:variable> 922 <xsl:value-of select="$subst9" /> 923 </xsl:when> 924 <xsl:otherwise> 925 <xsl:value-of select="$subst8" /> 926 </xsl:otherwise> 927 </xsl:choose> 928 </xsl:when> 929 905 930 <xsl:when test="(name(..)='address') or (name(../..)='address')"> 906 931 <xsl:variable name="subst2"> … … 914 939 <xsl:value-of select="$subst2" /> 915 940 </xsl:when> 941 916 942 <xsl:otherwise> 917 943 <xsl:variable name="subst2">
Note:
See TracChangeset
for help on using the changeset viewer.