]> git.decadent.org.uk Git - ion3.git/blob - debian/patches/208_build-docs-with-hevea.diff
8e9d0268295626f73037c084b2c58ad6920def30
[ion3.git] / debian / patches / 208_build-docs-with-hevea.diff
1 #! /bin/sh -e
2 if [ $# -ne 1 ]; then 
3     echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
4     exit 1  
5 fi
6 case "$1" in 
7     -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
8     -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
9     *)
10         echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
11         exit 1;;
12 esac
13
14 exit 0
15
16 @DPATCH@
17 diff -Nur ion3-20061015.orig/doc/artikel3.hva ion3-20061015/doc/artikel3.hva
18 --- ion3-20061015.orig/doc/artikel3.hva 1970-01-01 01:00:00.000000000 +0100
19 +++ ion3-20061015/doc/artikel3.hva      2006-10-17 18:20:49.000000000 +0200
20 @@ -0,0 +1 @@
21 +\input{article.hva}
22 diff -Nur ion3-20061015.orig/doc/gpl.tex ion3-20061015/doc/gpl.tex
23 --- ion3-20061015.orig/doc/gpl.tex      2006-10-15 20:00:49.000000000 +0200
24 +++ ion3-20061015/doc/gpl.tex   2006-10-17 18:20:49.000000000 +0200
25 @@ -1,21 +1,29 @@
26  \xchapter{The GNU General Public License}
27  
28  \begin{center}
29 +%BEGIN LATEX
30  {\parindent 0in
31 +%END LATEX
32  
33  Version 2, June 1991
34  
35  Copyright \copyright\ 1989, 1991 Free Software Foundation, Inc.
36  
37 +%BEGIN LATEX
38  \bigskip
39 +%END LATEX
40  
41  59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
42  
43 +%BEGIN LATEX
44  \bigskip
45 +%END LATEX
46  
47  Everyone is permitted to copy and distribute verbatim copies
48  of this license document, but changing it is not allowed.
49 +%BEGIN LATEX
50  }
51 +%END LATEX
52  \end{center}
53  
54  \begin{center}
55 diff -Nur ion3-20061015.orig/doc/ionconf.tex ion3-20061015/doc/ionconf.tex
56 --- ion3-20061015.orig/doc/ionconf.tex  2006-10-15 20:00:51.000000000 +0200
57 +++ ion3-20061015/doc/ionconf.tex       2006-10-17 18:20:49.000000000 +0200
58 @@ -56,17 +56,21 @@
59  \markboth{\MakeUppercase{List of functions}}%
60           {\MakeUppercase{List of functions}}%
61  
62 -%begin{latexonly}
63 +\begin{latexonly}
64  \makeatletter
65  \def\fnlisti#1{\@dottedtocline{1}{0em}{1.5em}{\lstinline!#1!}{\pageref{fn:#1}}}
66  {\parskip\z@\input{fnlist}}
67  \makeatother
68 -%end{latexonly}
69 +\end{latexonly}
70  
71 +%BEGIN LATEX
72  \begin{htmlonly}
73 +%END LATEX
74  \newcommand{\fnlisti}[1]{\fnref{#1}\\}
75  \input{fnlist}
76 +%BEGIN LATEX
77  \end{htmlonly}
78 +%END LATEX
79  
80  \printindex
81  
82 diff -Nur ion3-20061015.orig/doc/macros.tex ion3-20061015/doc/macros.tex
83 --- ion3-20061015.orig/doc/macros.tex   2006-10-15 20:00:50.000000000 +0200
84 +++ ion3-20061015/doc/macros.tex        2006-10-17 18:20:49.000000000 +0200
85 @@ -14,6 +14,25 @@
86  \usepackage[a4paper]{geometry}
87  \usepackage{calc}
88  
89 +% hevea style
90 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
91 +
92 +%BEGIN LATEX
93 +\begin{htmlonly}
94 +%END LATEX
95 +
96 +\remakesection
97 +  {\chapter}{-1}{chapter}
98 +  {\@open{H1}{}}{\thechapter}{\quad}{\@close{H1}}
99 +\setcounter{tocdepth}{3}
100 +\setcounter{indexcols}{1}
101 +\renewcommand{\@table@attributes}{CELLSPACING=10 CELLPADDING=0}
102 +
103 +%BEGIN LATEX
104 +\end{htmlonly}
105 +%END LATEX
106 +
107 +
108  % URL settings
109  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
110  
111 @@ -23,7 +42,7 @@
112  % listings package
113  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
114  
115 -%begin{latexonly}
116 +%BEGIN LATEX
117  \usepackage{listings}
118  
119  \lstset{
120 @@ -33,7 +52,7 @@
121    alsoletter={",},
122    alsoother={\_},
123  }
124 -%end{latexonly}
125 +%END LATEX
126  
127  % Some markup
128  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
129 @@ -44,7 +63,7 @@
130  \newcommand{\spec}[1]{#1}
131  \newcommand{\indextype}[1]{\index{#1@\type{#1}}}
132  
133 -%begin{latexonly}
134 +%BEGIN LATEX
135  \newcommand{\key}[1]{\mbox{\textbf{#1}}}
136  \newcommand{\code}[1]{\lstinline!#1!}
137  \newcommand{\var}[1]{\lstinline!#1!}
138 @@ -54,28 +73,33 @@
139  \newcommand{\fnrefx}[2]{\hyperlink{fn:#1.#2}{\code{#2}}}
140  \newcommand{\fnref}[1]{\hyperlink{fn:#1}{\code{#1}}}
141  \newcommand{\myhref}[2]{\hyperlink{#1}{#2}}
142 +%END LATEX
143  
144 -%end{latexonly}
145 +%BEGIN LATEX
146  \begin{htmlonly}
147 -    
148 +%END LATEX
149  \newcommand{\key}[1]{\textbf{#1}}
150  \newcommand{\code}[1]{\texttt{#1}}
151  \newcommand{\var}[1]{\texttt{#1}}
152  \newcommand{\command}[1]{\texttt{#1}}
153  
154 -\newcommand{\hyperlabel}[1]{\label{#1}}
155 -\newcommand{\fnref}[1]{\htmlref{\texttt{#1}}{fn:#1}}
156 -\newcommand{\fnrefx}[2]{\htmlref{\texttt{#2}}{fn:#1.#2}}
157 -\newcommand{\myhref}[2]{\htmlref{#2}{#1}}
158 +% docode is not present nor needed in hevea
159 +\newcommand{\docode}{}
160  
161 +\newcommand{\hyperlabel}[1]{\label{#1}}
162 +\newcommand{\fnref}[1]{\aname{fn:#1}{\texttt{#1}}}
163 +\newcommand{\fnrefx}[2]{\aname{fn:#1.#2}{\texttt{#1}}}
164 +\newcommand{\myhref}[2]{\ahref{#2}{#1}}
165 +%BEGIN LATEX
166  \end{htmlonly}
167 +%END LATEX
168  
169  \newcommand{\tabhead}[1]{\hline #1 \\ \hline}
170  
171  % function tables
172  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
173  
174 -%begin{latexonly}
175 +%BEGIN LATEX
176  
177  \newcommand{\funclistlabel}[1]{#1\hfill}
178  \newenvironment{function}{
179 @@ -96,8 +120,11 @@
180    \end{list}
181  }
182  
183 -%end{latexonly}
184 +%END LATEX
185 +
186 +%BEGIN LATEX
187  \begin{htmlonly}
188 +%END LATEX
189  
190  \newenvironment{function}{
191    \begin{description}
192 @@ -105,7 +132,9 @@
193    \end{description}
194  }
195  
196 +%BEGIN LATEX
197  \end{htmlonly}
198 +%END LATEX
199  
200  
201  \newcommand{\synopsis}[1]{
202 @@ -128,7 +157,7 @@
203  % While rapport3/artikel3 are otherwise nice classes, 
204  % itemize looks awful.
205  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
206 -%begin{latexonly}
207 +%BEGIN LATEX
208  \makeatletter
209  \renewenvironment{itemize}{%
210    \ifnum \@itemdepth >3
211 @@ -148,4 +177,4 @@
212    \fi}
213   {\global\@ignoretrue \endlist}
214  \makeatletter
215 -%end{latexonly}
216 +%END LATEX
217 diff -Nur ion3-20061015.orig/doc/Makefile ion3-20061015/doc/Makefile
218 --- ion3-20061015.orig/doc/Makefile     2006-10-15 20:00:50.000000000 +0200
219 +++ ion3-20061015/doc/Makefile  2006-10-17 18:21:16.000000000 +0200
220 @@ -1,10 +1,13 @@
221  # Settings
222  ######################################
223  
224 -TOPDIR=../ion-3
225 +TOPDIR=..
226  
227  include $(TOPDIR)/build/system-inc.mk
228  
229 +HEVEA=hevea
230 +HACHA=hacha
231 +
232  L2H=latex2html -show_section_numbers -short_index -local_icons -noaddress \
233      -up_url http://iki.fi/tuomov/ion/ -up_title "Ion homepage" -nofootnode\
234  ##    -style greyviolet.css
235 @@ -58,8 +61,11 @@
236         makeindex ionconf.idx
237         latex ionconf
238  
239 -ionconf-html: 
240 -       $(L2H) -split 3 ionconf
241 +ionconf-html:
242 +       $(HEVEA) -fix ionconf 2>&1 | grep -v 'occuring outside math mode'
243 +       rm -rf ionconf
244 +       mkdir ionconf
245 +       cd ionconf && $(HACHA) ../ionconf.html
246  
247  fntexes: $(FNTEXES)
248  
249 @@ -97,6 +103,7 @@
250         rm -f $(FNTEXES) fnlist.tex
251         rm -f *.aux *.toc *.log
252         rm -f *.idx *.ild *.ilg *.ind
253 +       rm -f *.haux *.hind *.htoc *.html .log
254          
255  realclean: clean
256         rm -f *.ps *.pdf *.dvi
257 diff -Nur ion3-20061015.orig/doc/rapport3.hva ion3-20061015/doc/rapport3.hva
258 --- ion3-20061015.orig/doc/rapport3.hva 1970-01-01 01:00:00.000000000 +0100
259 +++ ion3-20061015/doc/rapport3.hva      2006-10-17 18:20:49.000000000 +0200
260 @@ -0,0 +1 @@
261 +\input{report.hva}