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

« back to all changes in this revision

Viewing changes to debian/patches/20_preserve_linebreaks_in_screen_userinput.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Hoenen
  • Date: 2009-08-27 20:17:07 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090827201707-qxo37xooz0bwfe92
Tags: 0.2.12-1
* New upstream release
* New upstream release fixes the separate page number display of PDF viewers
  like evince and acroread regarding the TOC page numbers for large documents
  when using the XeTeX backend.  Thanks to Yves-Alexis Perez for reporting.
  Closes: #533332
* Remove patches that have been integrated upstream:
  + 20_preserve_linebreaks_in_screen_userinput (#528964)
  + 10_dblatex_wrapper_script
* Cleanup dblatex .sty files that are already provided by TeXLive packages:
  + Remove the duplicates from dblatex.
  + Add a dependency on texlive-bibtex-extra for bibtopic.sty (the other files
    are provided by the already existing dependency on texlive-latex-extra).
  + Remove the .sty files section from the copyright file.
  Thanks to Vincent Lefevre for reporting.  Closes: #535550
* Synchronize debian/copyright with upstream COPYRIGHT regarding spelling
  issues.
* Move contents of debian/README.Debian-source to debian/copyright in order to
  comply with "Debian Developer's Reference", "Best practices for orig.tar.gz
  files".
* Add dblatex README.source refering to the dpatch one.  Thanks, lintian.
* Standards-Version: 3.8.3 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## 20_preserve_linebreaks_in_screen_userinput.dpatch by Beno�t Guillon <benoit.guillon@tele2.fr>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: Fix for BTS report #528964:
6
 
## DP: Preserve the verbatim nature of <userinput> elements even as children of
7
 
## DP: a <screen> element, that is preserve linebreaks.
8
 
## DP: The patch is likely to be included in the next upstream release.
9
 
 
10
 
@DPATCH@
11
 
diff -urNad dblatex~/xsl/callout.xsl dblatex/xsl/callout.xsl
12
 
--- dblatex~/xsl/callout.xsl    2009-06-21 21:53:58.000000000 +0200
13
 
+++ dblatex/xsl/callout.xsl     2009-06-25 20:05:45.000000000 +0200
14
 
@@ -6,7 +6,7 @@
15
 
     ############################################################################ -->
16
 
 
17
 
 <!-- Callout parameters -->
18
 
-<xsl:param name="co.tagout" select="':&gt;'"/>
19
 
+<xsl:param name="co.tagout" select="'&lt;/t&gt;'"/>
20
 
 <xsl:param name="co.linkends.show" select="'1'"/>
21
 
 <xsl:param name="callout.markup.circled" select="'1'"/>
22
 
 <xsl:param name="callout.linkends.hot" select="'1'"/>
23
 
@@ -21,7 +21,7 @@
24
 
 
25
 
 
26
 
 <!-- Generate the enter TeX escape sequence for <co>. The principle is to
27
 
-     find the first sequence of the form "<[try]:" that is not contained in
28
 
+     find the first sequence of the form "<[try]" that is not contained in
29
 
      the listing, to ensure that no conflict will occur with lstlisting -->
30
 
 
31
 
 <xsl:template name="co-tagin-gen">
32
 
@@ -32,12 +32,11 @@
33
 
     <xsl:if test="$try &gt; 0">
34
 
       <xsl:value-of select="$try"/>
35
 
     </xsl:if>
36
 
-    <xsl:text>:</xsl:text>
37
 
   </xsl:variable>
38
 
 
39
 
   <xsl:choose>
40
 
   <xsl:when test="contains($text, $tag)">
41
 
-    <xsl:message>Try another escape sequence for &lt;co&gt;</xsl:message> 
42
 
+    <xsl:message>Try another escape sequence in verbatim</xsl:message> 
43
 
     <xsl:call-template name="co-tagin-gen">
44
 
       <xsl:with-param name="text" select="$text"/>
45
 
       <xsl:with-param name="try" select="$try+1"/>
46
 
@@ -167,14 +166,16 @@
47
 
 
48
 
 <xsl:template match="co|area" mode="latex.programlisting">
49
 
   <xsl:param name="rnode" select="/"/>
50
 
-  <xsl:param name="co-tagin" select="'&lt;:'"/>
51
 
+  <xsl:param name="co-tagin" select="'&lt;'"/>
52
 
   <xsl:param name="co-tagout" select="$co.tagout"/>
53
 
   <xsl:param name="co-hide" select="0"/>
54
 
   <xsl:variable name="conum">
55
 
     <xsl:apply-templates select="." mode="conumber"/>
56
 
   </xsl:variable>
57
 
 
58
 
-  <xsl:value-of select="$co-tagin"/>
59
 
+  <xsl:if test="$co-tagin != ''">
60
 
+    <xsl:value-of select="concat($co-tagin, 't>')"/>
61
 
+  </xsl:if>
62
 
   <xsl:choose>
63
 
   <xsl:when test="$co-hide != 0">
64
 
     <xsl:if test="@id">
65
 
@@ -206,7 +207,7 @@
66
 
 <!-- Print the markup of the co referenced by coref -->
67
 
 <xsl:template match="coref" mode="latex.programlisting">
68
 
   <xsl:param name="rnode" select="/"/>
69
 
-  <xsl:param name="co-tagin" select="'&lt;:'"/>
70
 
+  <xsl:param name="co-tagin" select="'&lt;'"/>
71
 
   <xsl:param name="co-tagout" select="$co.tagout"/>
72
 
   <xsl:variable name="co" select="$rnode//*[@id=current()/@linkend]"/>
73
 
 
74
 
@@ -216,7 +217,7 @@
75
 
       <xsl:apply-templates select="$co" mode="conumber"/>
76
 
     </xsl:variable>
77
 
     <!-- Entry tex sequence -->
78
 
-    <xsl:value-of select="$co-tagin"/>
79
 
+    <xsl:value-of select="concat($co-tagin, 't>')"/>
80
 
     <!-- The same number mark than the pointed <co> -->
81
 
     <xsl:text>\conum{</xsl:text>
82
 
     <xsl:value-of select="$conum"/>
83
 
diff -urNad dblatex~/xsl/index.xsl dblatex/xsl/index.xsl
84
 
--- dblatex~/xsl/index.xsl      2009-06-21 21:53:58.000000000 +0200
85
 
+++ dblatex/xsl/index.xsl       2009-06-25 20:05:45.000000000 +0200
86
 
@@ -102,7 +102,7 @@
87
 
 
88
 
 <!-- in a programlisting -->
89
 
 <xsl:template match="indexterm" mode="latex.programlisting">
90
 
-  <xsl:param name="co-tagin" select="'&lt;:'"/>
91
 
+  <xsl:param name="co-tagin" select="'&lt;'"/>
92
 
   <xsl:param name="rnode" select="/"/>
93
 
   <xsl:param name="probe" select="0"/>
94
 
 
95
 
diff -urNad dblatex~/xsl/inlined.xsl dblatex/xsl/inlined.xsl
96
 
--- dblatex~/xsl/inlined.xsl    2009-06-21 21:53:58.000000000 +0200
97
 
+++ dblatex/xsl/inlined.xsl     2009-06-25 20:05:45.000000000 +0200
98
 
@@ -629,18 +629,31 @@
99
 
 <!-- ==================================================================== -->
100
 
 <!-- inline elements in program listings -->
101
 
 
102
 
+<xsl:template name="verbatim.boldseq">
103
 
+  <xsl:param name="co-tagin" select="'&lt;'"/>
104
 
+  <xsl:param name="rnode" select="/"/>
105
 
+  <xsl:param name="probe" select="0"/>
106
 
+  <xsl:param name="style" select="'b'"/>
107
 
+  <xsl:param name="content"/>
108
 
+
109
 
+  <xsl:call-template name="verbatim.format">
110
 
+    <xsl:with-param name="co-tagin" select="$co-tagin"/>
111
 
+    <xsl:with-param name="rnode" select="$rnode"/>
112
 
+    <xsl:with-param name="probe" select="$probe"/>
113
 
+    <xsl:with-param name="style" select="'b'"/>
114
 
+    <xsl:with-param name="content" select="$content"/>
115
 
+  </xsl:call-template>
116
 
+</xsl:template>
117
 
+
118
 
 <xsl:template match="userinput" mode="latex.programlisting">
119
 
   <xsl:param name="co-tagin" select="'&lt;:'"/>
120
 
   <xsl:param name="rnode" select="/"/>
121
 
   <xsl:param name="probe" select="0"/>
122
 
 
123
 
-  <xsl:call-template name="verbatim.embed">
124
 
-    <xsl:with-param name="co-taging" select="$co-tagin"/>
125
 
+  <xsl:call-template name="verbatim.boldseq">
126
 
+    <xsl:with-param name="co-tagin" select="$co-tagin"/>
127
 
     <xsl:with-param name="rnode" select="$rnode"/>
128
 
     <xsl:with-param name="probe" select="$probe"/>
129
 
-    <xsl:with-param name="content">
130
 
-      <xsl:call-template name="inline.boldseq"/>
131
 
-    </xsl:with-param>
132
 
   </xsl:call-template>
133
 
 </xsl:template>
134
 
 
135
 
@@ -649,11 +662,50 @@
136
 
   <xsl:param name="rnode" select="/"/>
137
 
   <xsl:param name="probe" select="0"/>
138
 
 
139
 
-  <xsl:call-template name="verbatim.embed">
140
 
-    <xsl:with-param name="co-taging" select="$co-tagin"/>
141
 
+  <xsl:variable name="style">
142
 
+    <xsl:choose>
143
 
+    <xsl:when test="@role='bold' or @role='strong'">
144
 
+      <xsl:value-of select="'b'"/>
145
 
+    </xsl:when>
146
 
+    <xsl:otherwise>
147
 
+      <xsl:value-of select="'i'"/>
148
 
+    </xsl:otherwise>
149
 
+    </xsl:choose>
150
 
+  </xsl:variable>
151
 
+
152
 
+  <xsl:call-template name="verbatim.format">
153
 
+    <xsl:with-param name="co-tagin" select="$co-tagin"/>
154
 
     <xsl:with-param name="rnode" select="$rnode"/>
155
 
     <xsl:with-param name="probe" select="$probe"/>
156
 
+    <xsl:with-param name="style" select="$style"/>
157
 
   </xsl:call-template>
158
 
 </xsl:template>
159
 
 
160
 
+<xsl:template match="replaceable" mode="latex.programlisting">
161
 
+  <xsl:param name="co-tagin" select="'&lt;:'"/>
162
 
+  <xsl:param name="rnode" select="/"/>
163
 
+  <xsl:param name="probe" select="0"/>
164
 
+
165
 
+  <xsl:call-template name="verbatim.format">
166
 
+    <xsl:with-param name="co-tagin" select="$co-tagin"/>
167
 
+    <xsl:with-param name="rnode" select="$rnode"/>
168
 
+    <xsl:with-param name="probe" select="$probe"/>
169
 
+    <xsl:with-param name="style" select="'i'"/>
170
 
+  </xsl:call-template>
171
 
+</xsl:template>
172
 
+
173
 
+<xsl:template match="optional" mode="latex.programlisting">
174
 
+  <xsl:param name="co-tagin" select="'&lt;:'"/>
175
 
+  <xsl:param name="rnode" select="/"/>
176
 
+  <xsl:param name="probe" select="0"/>
177
 
+
178
 
+  <xsl:value-of select="$arg.choice.opt.open.str"/>
179
 
+  <xsl:apply-templates mode="latex.programlisting">
180
 
+    <xsl:with-param name="co-tagin" select="$co-tagin"/>
181
 
+    <xsl:with-param name="rnode" select="$rnode"/>
182
 
+    <xsl:with-param name="probe" select="$probe"/>
183
 
+  </xsl:apply-templates>
184
 
+  <xsl:value-of select="$arg.choice.opt.close.str"/>
185
 
+</xsl:template>
186
 
+
187
 
 </xsl:stylesheet>
188
 
diff -urNad dblatex~/xsl/verbatim.xsl dblatex/xsl/verbatim.xsl
189
 
--- dblatex~/xsl/verbatim.xsl   2009-06-21 21:53:58.000000000 +0200
190
 
+++ dblatex/xsl/verbatim.xsl    2009-06-25 20:05:45.000000000 +0200
191
 
@@ -84,12 +84,12 @@
192
 
      -->
193
 
 
194
 
 <xsl:template name="verbatim.embed">
195
 
-  <xsl:param name="co-tagin" select="'&lt;:'"/>
196
 
+  <xsl:param name="co-tagin" select="'&lt;'"/>
197
 
   <xsl:param name="rnode" select="/"/>
198
 
   <xsl:param name="probe" select="0"/>
199
 
   <xsl:param name="content"/>
200
 
 
201
 
-  <xsl:value-of select="$co-tagin"/>
202
 
+  <xsl:value-of select="concat($co-tagin, 't&gt;')"/>
203
 
   <xsl:if test="$probe = 0">
204
 
     <xsl:choose>
205
 
       <xsl:when test="$content != ''">
206
 
@@ -100,15 +100,48 @@
207
 
       </xsl:otherwise>
208
 
     </xsl:choose>
209
 
   </xsl:if>
210
 
-  <xsl:value-of select="$co.tagout"/>
211
 
+  <xsl:value-of select="'&lt;/t&gt;'"/>
212
 
+</xsl:template>
213
 
+
214
 
+<!-- Template to format (bold, italic) the calling element. The format is
215
 
+     specified by the <style> that drives the corresponding delimiter
216
 
+     sequence. Styles can be nested, so apply the same template mode to
217
 
+     children.
218
 
+     -->
219
 
+
220
 
+ <xsl:template name="verbatim.format">
221
 
+  <xsl:param name="co-tagin" select="'&lt;'"/>
222
 
+  <xsl:param name="rnode" select="/"/>
223
 
+  <xsl:param name="probe" select="0"/>
224
 
+  <xsl:param name="style" select="'b'"/>
225
 
+  <xsl:param name="content"/>
226
 
+
227
 
+  <xsl:value-of select="concat($co-tagin, $style, '&gt;')"/>
228
 
+  <xsl:if test="$probe = 0">
229
 
+    <xsl:choose>
230
 
+      <xsl:when test="$content != ''">
231
 
+        <xsl:value-of select="$content"/>
232
 
+      </xsl:when>
233
 
+      <xsl:otherwise>
234
 
+        <xsl:apply-templates mode="latex.programlisting">
235
 
+          <xsl:with-param name="co-tagin" select="$co-tagin"/>
236
 
+          <xsl:with-param name="rnode" select="$rnode"/>
237
 
+          <xsl:with-param name="probe" select="$probe"/>
238
 
+        </xsl:apply-templates>
239
 
+      </xsl:otherwise>
240
 
+    </xsl:choose>
241
 
+  </xsl:if>
242
 
+  <xsl:value-of select="concat('&lt;/', $style, '&gt;')"/>
243
 
 </xsl:template>
244
 
 
245
 
+<!-- ==================================================================== -->
246
 
+
247
 
 <!-- By default an element in a programlisting environment just prints out its
248
 
      text() adapted to this environment, and apply to its children the same
249
 
      template. -->
250
 
 
251
 
 <xsl:template match="*" mode="latex.programlisting">
252
 
-  <xsl:param name="co-tagin" select="'&lt;:'"/>
253
 
+  <xsl:param name="co-tagin" select="'&lt;'"/>
254
 
   <xsl:param name="rnode" select="/"/>
255
 
   <xsl:param name="probe" select="0"/>
256
 
 
257
 
@@ -118,7 +151,7 @@
258
 
   </xsl:message>
259
 
 
260
 
   <xsl:apply-templates mode="latex.programlisting">
261
 
-    <xsl:with-param name="co-taging" select="$co-tagin"/>
262
 
+    <xsl:with-param name="co-tagin" select="$co-tagin"/>
263
 
     <xsl:with-param name="rnode" select="$rnode"/>
264
 
     <xsl:with-param name="probe" select="$probe"/>
265
 
   </xsl:apply-templates>
266
 
@@ -226,13 +259,11 @@
267
 
       <xsl:text>,</xsl:text>
268
 
     </xsl:otherwise>
269
 
     </xsl:choose>
270
 
-    <!-- TeX delimiters if some tex stuff is embedded (like <co>s) -->
271
 
+    <!-- TeX/verb delimiters if tex or formatting is embedded (like <co>s) -->
272
 
     <xsl:if test="$co-tagin!=''">
273
 
-      <xsl:text>escapeinside={</xsl:text>
274
 
-      <xsl:value-of select="$co-tagin"/>
275
 
-      <xsl:text>}{</xsl:text>
276
 
-      <xsl:value-of select="$co.tagout"/>
277
 
-      <xsl:text>},</xsl:text>
278
 
+      <xsl:call-template name="listing-delim">
279
 
+        <xsl:with-param name="tagin" select="$co-tagin"/>
280
 
+      </xsl:call-template>
281
 
     </xsl:if>
282
 
   </xsl:variable>
283
 
 
284
 
@@ -270,6 +301,27 @@
285
 
   </xsl:choose>
286
 
 </xsl:template>
287
 
 
288
 
+<!-- ==================================================================== -->
289
 
+
290
 
+<!-- Defines the style delimiters to use, and the tex sequence delimiters -->
291
 
+
292
 
+<xsl:template name="listing-delim">
293
 
+  <xsl:param name="tagin" select="'&lt;'"/>
294
 
+  <xsl:variable name="tex" select="concat($tagin, 't&gt;')"/>
295
 
+  <xsl:variable name="bf" select="concat($tagin, 'b&gt;')"/>
296
 
+  <xsl:variable name="it" select="concat($tagin, 'i&gt;')"/>
297
 
+
298
 
+  <xsl:text>escapeinside={</xsl:text>
299
 
+  <xsl:value-of select="$tex"/>
300
 
+  <xsl:text>}{&lt;/t&gt;}</xsl:text>
301
 
+  <xsl:text>,</xsl:text>
302
 
+  <xsl:text>moredelim={**[is][\bfseries]{</xsl:text>
303
 
+  <xsl:value-of select="$bf"/>
304
 
+  <xsl:text>}{&lt;/b&gt;}},</xsl:text>
305
 
+  <xsl:text>moredelim={**[is][\itshape]{</xsl:text>
306
 
+  <xsl:value-of select="$it"/>
307
 
+  <xsl:text>}{&lt;/i&gt;}},</xsl:text>
308
 
+</xsl:template>
309
 
 
310
 
 <!-- ==================================================================== -->
311