Changeset 76088 in vbox
- Timestamp:
- Dec 9, 2018 9:47:33 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/doc/manual/docbook2latex.xsl (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/docbook2latex.xsl
r76081 r76088 115 115 \usepackage{hyperref} 116 116 \usepackage{fancybox} 117 \usepackage{fancyvrb}118 117 \usepackage{alltt} 119 118 \usepackage{color} … … 505 504 506 505 <xsl:template match="screen"> 507 <xsl:text>

 \begin{Verbatim}[fontsize=\footnotesize]
</xsl:text>508 <xsl:apply-templates /> 509 <xsl:text>
\end{ Verbatim}
</xsl:text>506 <xsl:text>

{\footnotesize\begin{alltt}
</xsl:text> 507 <xsl:apply-templates /> 508 <xsl:text>
\end{alltt}}
</xsl:text> 510 509 </xsl:template> 511 510 … … 893 892 <xsl:template match="replaceable"> 894 893 <xsl:choose> 895 <xsl:when test="(not(ancestor::cmdsynopsis) and not(ancestor::option) ) or ancestor::arg">894 <xsl:when test="(not(ancestor::cmdsynopsis) and not(ancestor::option) and not(ancestor::screen)) or ancestor::arg"> 896 895 <xsl:text>\texttt{\textit{</xsl:text> 897 896 <xsl:apply-templates /> … … 922 921 923 922 <xsl:choose> 924 <xsl:when test="(name(..)='screen') or (name(../..)='screen')">925 <xsl:value-of select="." />926 </xsl:when>927 928 923 <xsl:when test="(name(..) = 'computeroutput') or (name(../..) = 'computeroutput') 929 924 or (name(..) = 'code') or (name(../..) = 'code') … … 1020 1015 </xsl:when> 1021 1016 1017 <!-- <screen> and <programlisting>, which work with alltt environment. --> 1022 1018 <xsl:otherwise> 1023 1019 <xsl:variable name="subst2"> 1024 1020 <xsl:call-template name="str:subst"> 1025 1021 <xsl:with-param name="text" select="$subst1" /> 1022 <xsl:with-param name="replace" select="'{'" /> 1023 <xsl:with-param name="with" select="'\{'" /> 1024 <xsl:with-param name="disable-output-escaping" select="no" /> 1025 </xsl:call-template> 1026 </xsl:variable> 1027 <xsl:variable name="subst3"> 1028 <xsl:call-template name="str:subst"> 1029 <xsl:with-param name="text" select="$subst2" /> 1030 <xsl:with-param name="replace" select="'}'" /> 1031 <xsl:with-param name="with" select="'\}'" /> 1032 <xsl:with-param name="disable-output-escaping" select="no" /> 1033 </xsl:call-template> 1034 </xsl:variable> 1035 <xsl:variable name="subst4"> 1036 <xsl:call-template name="str:subst"> 1037 <xsl:with-param name="text" select="$subst3" /> 1026 1038 <xsl:with-param name="replace" select="'_'" /> 1027 1039 <xsl:with-param name="with" select="'\_'" /> … … 1029 1041 </xsl:call-template> 1030 1042 </xsl:variable> 1031 <xsl:variable name="subst 3">1032 <xsl:call-template name="str:subst"> 1033 <xsl:with-param name="text" select="$subst 2" />1043 <xsl:variable name="subst5"> 1044 <xsl:call-template name="str:subst"> 1045 <xsl:with-param name="text" select="$subst4" /> 1034 1046 <xsl:with-param name="replace" select="'$'" /> 1035 1047 <xsl:with-param name="with" select="'\$'" /> … … 1037 1049 </xsl:call-template> 1038 1050 </xsl:variable> 1039 <xsl:variable name="subst 4">1040 <xsl:call-template name="str:subst"> 1041 <xsl:with-param name="text" select="$subst 3" />1051 <xsl:variable name="subst6"> 1052 <xsl:call-template name="str:subst"> 1053 <xsl:with-param name="text" select="$subst5" /> 1042 1054 <xsl:with-param name="replace" select="'%'" /> 1043 1055 <xsl:with-param name="with" select="'\%'" /> … … 1045 1057 </xsl:call-template> 1046 1058 </xsl:variable> 1047 <xsl:variable name="subst 5">1048 <xsl:call-template name="str:subst"> 1049 <xsl:with-param name="text" select="$subst 4" />1059 <xsl:variable name="subst7"> 1060 <xsl:call-template name="str:subst"> 1061 <xsl:with-param name="text" select="$subst6" /> 1050 1062 <xsl:with-param name="replace" select="'#'" /> 1051 1063 <xsl:with-param name="with" select="'\#'" /> … … 1053 1065 </xsl:call-template> 1054 1066 </xsl:variable> 1055 <xsl:variable name="subst 6">1056 <xsl:call-template name="str:subst"> 1057 <xsl:with-param name="text" select="$subst 5" />1067 <xsl:variable name="subst8"> 1068 <xsl:call-template name="str:subst"> 1069 <xsl:with-param name="text" select="$subst7" /> 1058 1070 <xsl:with-param name="replace" select="'µ'" /> 1059 1071 <xsl:with-param name="with" select="'$\mu$'" /> … … 1061 1073 </xsl:call-template> 1062 1074 </xsl:variable> 1063 <xsl:variable name="subst 7">1064 <xsl:call-template name="str:subst"> 1065 <xsl:with-param name="text" select="$subst 6" />1075 <xsl:variable name="subst9"> 1076 <xsl:call-template name="str:subst"> 1077 <xsl:with-param name="text" select="$subst8" /> 1066 1078 <xsl:with-param name="replace" select="'®'" /> 1067 1079 <xsl:with-param name="with" select="'\texorpdfstring{\textregistered}{}'" /> … … 1074 1086 with pretty quotes by invoking sed a few times. Unfortunately there are 1075 1087 no regular expressions in XSLT so there's no other way. --> 1076 <xsl:variable name="subst8"> 1077 <xsl:call-template name="str:subst"> 1078 <xsl:with-param name="text" select="$subst7" /> 1079 <xsl:with-param name="replace" select="$quote" /> 1080 <xsl:with-param name="with" select="'\QUOTE{}'" /> 1081 <xsl:with-param name="disable-output-escaping" select="no" /> 1082 </xsl:call-template> 1083 </xsl:variable> 1084 <xsl:variable name="subst9"> 1085 <xsl:call-template name="str:subst"> 1086 <xsl:with-param name="text" select="$subst8" /> 1088 <xsl:variable name="subst10"> 1089 <xsl:choose> 1090 <xsl:when test="(name(..)='screen') or (name(../..)='screen') 1091 or (name(..)='programlisting') or (name(../..)='programlisting') 1092 "> 1093 <xsl:value-of select="$subst9" /> 1094 </xsl:when> 1095 <xsl:otherwise> 1096 <xsl:call-template name="str:subst"> 1097 <xsl:with-param name="text" select="$subst9" /> 1098 <xsl:with-param name="replace" select="$quote" /> 1099 <xsl:with-param name="with" select="'\QUOTE{}'" /> 1100 <xsl:with-param name="disable-output-escaping" select="no" /> 1101 </xsl:call-template> 1102 </xsl:otherwise> 1103 </xsl:choose> 1104 </xsl:variable> 1105 <xsl:variable name="subst11"> 1106 <xsl:call-template name="str:subst"> 1107 <xsl:with-param name="text" select="$subst10" /> 1087 1108 <xsl:with-param name="replace" select="'~'" /> 1088 1109 <xsl:with-param name="with" select="'\textasciitilde '" /> … … 1090 1111 </xsl:call-template> 1091 1112 </xsl:variable> 1092 <xsl:variable name="subst1 0">1093 <xsl:call-template name="str:subst"> 1094 <xsl:with-param name="text" select="$subst 9" />1113 <xsl:variable name="subst12"> 1114 <xsl:call-template name="str:subst"> 1115 <xsl:with-param name="text" select="$subst11" /> 1095 1116 <xsl:with-param name="replace" select="'&'" /> 1096 1117 <xsl:with-param name="with" select="'\&'" /> … … 1098 1119 </xsl:call-template> 1099 1120 </xsl:variable> 1100 <xsl:value-of select="$subst1 0" />1121 <xsl:value-of select="$subst12" /> 1101 1122 </xsl:otherwise> 1102 1123 </xsl:choose>
Note:
See TracChangeset
for help on using the changeset viewer.

