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