~ubuntu-branches/ubuntu/precise/dblatex/precise

« back to all changes in this revision

Viewing changes to debian/patches/20_filename_replaceable.patch

  • Committer: Package Import Robot
  • Author(s): Andreas Hoenen
  • Date: 2011-07-09 15:20:37 UTC
  • mfrom: (0.8.1) (0.6.2) (8.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: package-import@ubuntu.com-20110709152037-8ao9l07dmgyjn6vn
* New upstram release
* New upstream release fixes the following open Debian BTS issues:
  + Don't crash on XeTeX backend compilation of spanish documents with an
    <appendix> element.  Thanks to W. Martin Borgert for reporting.
    Closes: #629110
* Remove patches that have been integrated upstream:
  + 20_filename_replaceable.patch (#623590)
* Take over actualized copyright period of upstream COPYRIGHT to
  debian/copyright.
* Replace python build helper dh_pysupport with dh_python2.
* In draft mode set draft watermark for XeTeX backend, too.  Thanks to W.
  Martin Borgert for reporting and for the patch.  Closes: #629514

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Author: Andreas Hoenen <andreas@hoenen-terstappen.de>, Benoit Guillon <ben.guillon@gmail.com>
2
 
Description: Hotfix for BTS report #623590:
3
 
Render <replaceable> elements inside of <filename> elements like other
4
 
<replaceable> elements: use an italics type.
5
 
--- a/xsl/inlined.xsl
6
 
+++ b/xsl/inlined.xsl
7
 
@@ -223,9 +223,7 @@
8
 
   <xsl:when test="$filename.as.url='1' and
9
 
                   not(ancestor::title or ancestor::refentrytitle)">
10
 
     <!-- Guess hyperref is always used now. -->
11
 
-    <xsl:call-template name="nolinkurl-output">
12
 
-      <xsl:with-param name="url" select="."/>
13
 
-    </xsl:call-template>
14
 
+    <xsl:apply-templates mode="nolinkurl"/>
15
 
   </xsl:when>
16
 
   <xsl:otherwise>
17
 
     <xsl:call-template name="inline.monoseq"/>
18
 
@@ -233,6 +231,47 @@
19
 
   </xsl:choose>
20
 
 </xsl:template>
21
 
 
22
 
+<!-- By default propagate the mode -->
23
 
+<xsl:template match="*" mode="nolinkurl">
24
 
+  <xsl:param name="command" select="'\nolinkurl'"/>
25
 
+  <xsl:apply-templates mode="nolinkurl">
26
 
+    <xsl:with-param name="command" select="$command"/>
27
 
+  </xsl:apply-templates>
28
 
+</xsl:template>
29
 
+
30
 
+<xsl:template match="text()" mode="nolinkurl">
31
 
+  <xsl:param name="command" select="'\nolinkurl'"/>
32
 
+  <xsl:call-template name="nolinkurl-output">
33
 
+    <xsl:with-param name="url" select="."/>
34
 
+    <xsl:with-param name="command" select="$command"/>
35
 
+  </xsl:call-template>
36
 
+</xsl:template>
37
 
+
38
 
+<!-- Come back to inline.monoseq for templates where nolinkurl cannot apply -->
39
 
+<xsl:template match="subscript|superscript" mode="nolinkurl">
40
 
+  <xsl:call-template name="inline.monoseq">
41
 
+    <xsl:with-param name="content">
42
 
+      <xsl:apply-templates select="."/>
43
 
+    </xsl:with-param>
44
 
+  </xsl:call-template>
45
 
+</xsl:template>
46
 
+
47
 
+<xsl:template match="replaceable" mode="nolinkurl">
48
 
+  <xsl:param name="command" select="'\nolinkurl'"/>
49
 
+  <xsl:call-template name="inline.italicmonoseq">
50
 
+    <xsl:with-param name="content">
51
 
+      <xsl:apply-templates mode="nolinkurl">
52
 
+        <xsl:with-param name="command" select="$command"/>
53
 
+      </xsl:apply-templates>
54
 
+    </xsl:with-param>
55
 
+  </xsl:call-template>
56
 
+</xsl:template>
57
 
+
58
 
+<xsl:template match="indexterm" mode="nolinkurl">
59
 
+  <xsl:apply-templates select="."/>
60
 
+</xsl:template>
61
 
+
62
 
+
63
 
 <xsl:template match="function">
64
 
   <xsl:choose>
65
 
     <xsl:when test="$function.parens != '0'
66
 
--- a/xsl/url.xsl
67
 
+++ b/xsl/url.xsl
68
 
@@ -7,7 +7,9 @@
69
 
 
70
 
 <xsl:template name="nolinkurl">
71
 
   <xsl:param name="url" select="@url"/>
72
 
-  <xsl:text>\nolinkurl{</xsl:text>
73
 
+  <xsl:param name="command" select="'\nolinkurl'"/>
74
 
+  <xsl:value-of select="$command"/>
75
 
+  <xsl:text>{</xsl:text>
76
 
   <xsl:call-template name="scape-encode">
77
 
     <xsl:with-param name="string" select="$url"/>
78
 
   </xsl:call-template>
79
 
@@ -20,12 +22,14 @@
80
 
 -->
81
 
 <xsl:template name="nolinkurl2">
82
 
   <xsl:param name="url" select="@url"/>
83
 
+  <xsl:param name="command" select="'\nolinkurl'"/>
84
 
   <xsl:variable name="bscount">
85
 
     <xsl:call-template name="bslash-end-count">
86
 
       <xsl:with-param name="url" select="$url"/>
87
 
     </xsl:call-template>
88
 
   </xsl:variable>
89
 
-  <xsl:text>\nolinkurl{</xsl:text>
90
 
+  <xsl:value-of select="$command"/>
91
 
+  <xsl:text>{</xsl:text>
92
 
   <xsl:call-template name="scape-encode">
93
 
     <xsl:with-param name="string" select="$url"/>
94
 
   </xsl:call-template>
95
 
@@ -65,6 +69,7 @@
96
 
      -->
97
 
 <xsl:template name="nolinkurl-output">
98
 
   <xsl:param name="url" select="@url"/>
99
 
+  <xsl:param name="command" select="'\nolinkurl'"/>
100
 
   <xsl:variable name="url2">
101
 
     <xsl:choose>
102
 
       <!-- Behaviour depending on the texlive version -->
103
 
@@ -85,6 +90,7 @@
104
 
   <xsl:when test="ancestor::entry or ancestor::revision or ancestor::footnote">
105
 
     <xsl:call-template name="nolinkurl-escape">
106
 
       <xsl:with-param name="url" select="$url2"/>
107
 
+      <xsl:with-param name="command" select="$command"/>
108
 
     </xsl:call-template>
109
 
     <!-- FIXME: do something with '&' and revision if needed -->
110
 
   </xsl:when>
111
 
@@ -92,6 +98,7 @@
112
 
     <xsl:call-template name="nolinkurl-escape">
113
 
       <xsl:with-param name="url" select="$url2"/>
114
 
       <xsl:with-param name="chars" select="' '"/>
115
 
+      <xsl:with-param name="command" select="$command"/>
116
 
     </xsl:call-template>
117
 
   </xsl:otherwise>
118
 
   </xsl:choose>
119
 
@@ -142,6 +149,7 @@
120
 
   <xsl:param name="escchars"/>
121
 
   <xsl:param name="url"/>
122
 
   <xsl:param name="chars" select="'#% '"/>
123
 
+  <xsl:param name="command" select="'\nolinkurl'"/>
124
 
 
125
 
   <xsl:variable name="len" select="string-length($url)"/>
126
 
 
127
 
@@ -162,6 +170,7 @@
128
 
     <xsl:if test="$len != 0">
129
 
       <xsl:call-template name="nolinkurl2">
130
 
         <xsl:with-param name="url" select="$url"/>
131
 
+        <xsl:with-param name="command" select="$command"/>
132
 
       </xsl:call-template>
133
 
     </xsl:if>
134
 
   </xsl:when>
135
 
@@ -171,6 +180,7 @@
136
 
                       select="concat($escchars, '\', substring($url,1,1))"/>
137
 
       <xsl:with-param name="url" select="substring($url, 2)"/>
138
 
       <xsl:with-param name="chars" select="$chars"/>
139
 
+      <xsl:with-param name="command" select="$command"/>
140
 
     </xsl:call-template>
141
 
   </xsl:when>
142
 
   <xsl:otherwise>
143
 
@@ -181,12 +191,14 @@
144
 
     </xsl:if>
145
 
     <xsl:call-template name="nolinkurl2">
146
 
       <xsl:with-param name="url" select="substring($url, 1, $pos)"/>
147
 
+      <xsl:with-param name="command" select="$command"/>
148
 
     </xsl:call-template>
149
 
     <xsl:call-template name="nolinkurl-escape">
150
 
       <xsl:with-param name="escchars"
151
 
                       select="concat('\', substring($url,$pos+1,1))"/>
152
 
       <xsl:with-param name="url" select="substring($url, $pos+2)"/>
153
 
       <xsl:with-param name="chars" select="$chars"/>
154
 
+      <xsl:with-param name="command" select="$command"/>
155
 
     </xsl:call-template>
156
 
   </xsl:otherwise>
157
 
   </xsl:choose>