~ubuntu-branches/ubuntu/dapper/hevea/dapper

« back to all changes in this revision

Viewing changes to debian/patches/04_rawtext.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Ralf Treinen
  • Date: 2004-05-10 21:38:07 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040510213807-4kxmazu72pcao16t
Tags: 1.07-2
* Backport Luc Maranget's patches from the unstable beta release:
  - rawhtml environments outputs to html only (closes: Bug#226212).
  - new rawtext environment which outputs to ascii and info output.
    this makes it possible to generate index information for info output
    (closes: Bug#173940).
* Added package Uploaders: Sven, Jerome, Remi, Zack.
* Remove in clean target .cvsignore

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh -e
 
2
## 04_rawtext.dpatch by Ralf Treinen <treinen@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Enable rawtext environment. This patch should be obsolete in
 
6
## DP: hevea vesion 1.08
 
7
 
 
8
if [ $# -lt 1 ]; then
 
9
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
 
10
    exit 1
 
11
fi
 
12
 
 
13
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
 
14
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
 
15
 
 
16
case "$1" in
 
17
    -patch) patch -p1 ${patch_opts} < $0;;
 
18
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
 
19
    *)
 
20
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
 
21
        exit 1;;
 
22
esac
 
23
 
 
24
exit 0
 
25
 
 
26
@DPATCH@
 
27
diff -urNad /home/rt/debian/pkg-ocaml-maint/packages/hevea/trunk/hevea-1.07/hevea.sty hevea-1.07/hevea.sty
 
28
--- /home/rt/debian/pkg-ocaml-maint/packages/hevea/trunk/hevea-1.07/hevea.sty   2002-09-17 14:17:21.000000000 +0200
 
29
+++ hevea-1.07/hevea.sty        2004-05-10 21:21:43.000000000 +0200
 
30
@@ -1,3 +1,4 @@
 
31
+
 
32
 % hevea  : hevea.sty
 
33
 % This is a very basic style file for latex document to be processed
 
34
 % with hevea. It contains definitions of LaTeX environment which are
 
35
@@ -57,6 +58,10 @@
 
36
 \excludecomment{rawhtml}
 
37
 \newcommand{\rawhtmlinput}[1]{}
 
38
 \excludecomment{htmlonly}
 
39
+%%%% Text and Info only
 
40
+\excludecomment{rawtext}
 
41
+\newcommand{\rawtextinput}[1]{}
 
42
+\excludecomment{textonly}
 
43
 %%%% Latex only
 
44
 \newenvironment{latexonly}{}{}
 
45
 \newenvironment{verblatex}{}{}
 
46
diff -urNad /home/rt/debian/pkg-ocaml-maint/packages/hevea/trunk/hevea-1.07/latexcommon.hva hevea-1.07/latexcommon.hva
 
47
--- /home/rt/debian/pkg-ocaml-maint/packages/hevea/trunk/hevea-1.07/latexcommon.hva     2004-05-10 20:48:09.000000000 +0200
 
48
+++ hevea-1.07/latexcommon.hva  2004-05-10 21:24:31.000000000 +0200
 
49
@@ -492,4 +492,8 @@
 
50
 poor}}{}
 
51
 %%%%% Extension des environnments hevea en lecture de fichier
 
52
 \newcommand{\rawhtmlinput}[1]
 
53
-{\@scaninput{\begin{rawhtml}}{#1}{\end{rawhtml}}}
 
54
\ No newline at end of file
 
55
+{\@scaninput{\begin{rawhtml}}{#1}{\end{rawhtml}}}
 
56
+\newcommand{\rawtextinput}[1]
 
57
+{\@scaninput{\begin{rawtext}}{#1}{\end{rawtext}}}
 
58
+\newcommand{\rawinput}[1]
 
59
+{\@scaninput{\begin{raw}}{#1}{\end{raw}}}
 
60
\ No newline at end of file
 
61
diff -urNad /home/rt/debian/pkg-ocaml-maint/packages/hevea/trunk/hevea-1.07/verb.mll hevea-1.07/verb.mll
 
62
--- /home/rt/debian/pkg-ocaml-maint/packages/hevea/trunk/hevea-1.07/verb.mll    2003-09-29 10:54:54.000000000 +0200
 
63
+++ hevea-1.07/verb.mll 2004-05-10 21:18:19.000000000 +0200
 
64
@@ -735,24 +735,25 @@
 
65
   Out.reset line_buff
 
66
 ;;
 
67
 
 
68
-let open_rawhtml lexbuf =
 
69
-  begin match !Parse_opts.destination with
 
70
-    | Parse_opts.Html -> ()
 
71
-    | _ ->  Misc.warning "rawhtml detected"
 
72
-  end ;
 
73
-  process :=
 
74
-     (fun () -> put_html () ; Dest.put_char '\n') ;
 
75
-  finish := put_html ;
 
76
-  noeof scan_byline lexbuf
 
77
-
 
78
-and close_rawhtml _ = ()
 
79
-
 
80
 let open_forget lexbuf =
 
81
   process := (fun () -> Out.reset line_buff) ;
 
82
   finish := (fun () -> Out.reset line_buff) ;
 
83
   noeof scan_byline lexbuf
 
84
 
 
85
-and close_forget _ = ()
 
86
+let open_raw lexbuf =
 
87
+  process := (fun () -> put_html () ; Dest.put_char '\n') ;
 
88
+  finish := put_html ;
 
89
+  noeof scan_byline lexbuf
 
90
+  
 
91
+let open_rawhtml lexbuf = match !Parse_opts.destination with
 
92
+    | Parse_opts.Html -> open_raw lexbuf
 
93
+    | _ -> open_forget lexbuf
 
94
+
 
95
+let open_rawtext lexbuf = match !Parse_opts.destination with
 
96
+    | Parse_opts.Text|Parse_opts.Info -> open_raw lexbuf
 
97
+    | _ -> open_forget lexbuf
 
98
+
 
99
+let  close_nothing _ = ()
 
100
 
 
101
 let open_tofile chan lexbuf =
 
102
   process :=
 
103
@@ -794,8 +795,13 @@
 
104
       noeof scan_byline lexbuf) ;        
 
105
 def_code "\\endverbatim*" close_verbenv ;
 
106
 
 
107
+def_code "\\rawtext" open_rawtext ;
 
108
+def_code "\\endrawtext" close_nothing ;
 
109
 def_code "\\rawhtml" open_rawhtml ;
 
110
-def_code "\\endrawhtml" close_forget ;
 
111
+def_code "\\endrawhtml" close_nothing ;
 
112
+def_code "\\raw" open_raw ;
 
113
+def_code "\\endraw" close_nothing ;
 
114
+
 
115
 def_code "\\verblatex" open_forget ; 
 
116
 def_code "\\endverblatex" Scan.check_alltt_skip ;
 
117
 def_code "\\verbimage" open_verbimage ;