2
## 04_rawtext.dpatch by Ralf Treinen <treinen@debian.org>
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
9
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
13
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
14
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
17
-patch) patch -p1 ${patch_opts} < $0;;
18
-unpatch) patch -R -p1 ${patch_opts} < $0;;
20
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
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
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
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}
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
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
68
-let open_rawhtml lexbuf =
69
- begin match !Parse_opts.destination with
70
- | Parse_opts.Html -> ()
71
- | _ -> Misc.warning "rawhtml detected"
74
- (fun () -> put_html () ; Dest.put_char '\n') ;
75
- finish := put_html ;
76
- noeof scan_byline lexbuf
78
-and close_rawhtml _ = ()
80
let open_forget lexbuf =
81
process := (fun () -> Out.reset line_buff) ;
82
finish := (fun () -> Out.reset line_buff) ;
83
noeof scan_byline lexbuf
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
91
+let open_rawhtml lexbuf = match !Parse_opts.destination with
92
+ | Parse_opts.Html -> open_raw lexbuf
93
+ | _ -> open_forget lexbuf
95
+let open_rawtext lexbuf = match !Parse_opts.destination with
96
+ | Parse_opts.Text|Parse_opts.Info -> open_raw lexbuf
97
+ | _ -> open_forget lexbuf
99
+let close_nothing _ = ()
101
let open_tofile chan lexbuf =
104
noeof scan_byline lexbuf) ;
105
def_code "\\endverbatim*" close_verbenv ;
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 ;
115
def_code "\\verblatex" open_forget ;
116
def_code "\\endverblatex" Scan.check_alltt_skip ;
117
def_code "\\verbimage" open_verbimage ;