Documentati O_PATH (fine) e O_NOFOLLOW
[gapil.git] / htgapil.cfg
1 %% htgapil.cfg
2 %%
3 %% Copyright (C) 2003 Mirko Maischberger.  
4 %%   This program is free software; you can redistribute it and/or modify
5 %%   it under the terms of the GNU General Public License as published by
6 %%   the Free Software Foundation; either version 2 of the License, or
7 %%   (at your option) any later version.
8 %%
9 %%   This program is distributed in the hope that it will be useful,
10 %%   but WITHOUT ANY WARRANTY; without even the implied warranty of
11 %%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 %%   GNU General Public License for more details.
13 %%
14 %%   You should have received a copy of the GNU General Public License
15 %%   along with this program; if not, write to the Free Software
16 %%   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  
17 %%   02111-1307  USA
18 %%
19 %% Configurazione tex4ht per la compilazione del
20 %% GaPiL (Guida alla Programmazione in Linux)
21 %%
22 %% $id$
23 %% 
24
25 \Preamble{html,4,info,next,mouseover}
26
27 \usepackage{tex4ht}
28
29 %Opzioni per hyperref
30 %\usepackage[tex4ht]{hyperref}
31
32 \renewcommand{\includecodesnip}[1]
33         {\HCode{<div class='lstlisting-plain'>}\input #1.html\HCode{</div>}}
34         {}
35 \renewcommand{\includestruct}[1]
36         {\HCode{<div class='lstlisting-lines'>}\input #1.html\HCode{</div>}}
37         {}
38 \renewcommand{\includecodesample}[1]
39         {\HCode{<div class='lstlisting-lines'>}\input #1.html\HCode{</div>}}
40         {}
41
42 \begin{document}
43
44
45 % Voce del css per impostare il logo e dei margini decenti
46 \Css{
47         body { 
48                 padding: 2em 10em 2em 70px; 
49                 margin: 0; 
50                 font-family: sans-serif;
51                 color: black; 
52                 background: white; 
53                 background-position: top left;
54                 background-attachment: fixed; 
55                 background-repeat: no-repeat;
56                 background-image: url(gapil-logo.png);
57         }
58 }
59
60 \Css{
61         pre { text-align: left;}
62 }
63 % Corregge un bug
64 \Css{
65         .figure img.graphics { 
66                 margin-left: 0px;
67         }
68 }
69
70 \Css {
71         td.figure { 
72                 text-align: center; 
73         }
74 }
75
76 % Gli <hr> si tramutano in una linea grigia 
77 \Css{
78         hr {
79                 border: 0; 
80                 width: 100\%; 
81                 height: 2px; 
82                 color: \#999; 
83                 background-color: \#999;
84         }
85 }
86
87 % Qualche stile per i link
88 \Css{
89         a {
90                 font-weight:bold; 
91                 color: \#ce2727; 
92                 text-decoration: none;
93         }
94 }
95
96 \Css{
97         a:hover {
98                 font-weight:bold; 
99                 color: \#ee4747; 
100                 text-decoration: underline;
101         }
102 }
103
104 \Css{
105         a:visited {
106                 font-weight:bold; 
107                 color: \#666;
108         }
109 }
110
111 % Non lo chiappa: lo aggioungo come perl -e a htmlize.sh
112 %\Css{
113 %        .js { 
114 %                background: \#f99;
115 %        }
116 %}
117
118 % Configura gli stili per le liste
119 \Css{
120         span.boxedminipage ul.descriptionstar {
121                 list-style-type: none; 
122                 text-indent: -3em;
123         }
124 }
125
126 \Css{
127         ul.basedescript {
128                 list-style-type: none; 
129                 text-indent: -3em;
130         }
131 }
132
133 \Css{
134         ul.itemizestar {
135                 list-style-type: none; 
136         }
137 }
138
139 \Css{
140         ul.itemize {
141                 list-style-type: none; 
142         }
143 }
144
145 % Configura i vari riquadri del GaPiL
146 \Css{
147         div.lstlisting-plain {
148                 font-size: 90\%;
149                 text-align: center;
150                 margin: 0px 20px 0px 20px;
151                 padding: 0px 7px 0px 7px;
152         }
153 }                
154
155 \Css{
156         div.lstlisting-plain span.linenum {
157                 display: none;
158         }
159 }
160
161 \Css{
162         div.lstlisting-lines {
163                 font-size: 90\%;
164                 text-align: center;
165                 margin: 3px 20px 3px 20px;
166                 padding: 3px 7px 3px 7px;
167                 border-top: 3px double black;
168                 border-bottom: 3px double black;
169         }
170 }                
171
172 \Css{
173         div.tabular {
174                 text-align: center;
175                 margin: 7px 20px 7px 20px;
176                 padding: 7px 7px 7px 7px;
177         }
178 }                
179
180 \Css{
181         div.prototype {
182                 font-size: 15px;
183                 margin: 15px 40px 15px 40px;
184                 background: \#fee;
185                 padding: 7px 12px 0px 12px;
186                 border: 1px solid \#ccc;
187         }
188 }                
189
190 \Css{
191         div.functions {
192                 font-size: 15px;
193                 margin: 15px 40px 15px 40px;
194                 background: \#fee;
195                 padding: 7px 12px 12px 12px;
196                 border: 1px solid \#ccc;
197         }
198 }                
199
200 \Css{
201         div.verbatim {
202                 text-align: left;
203                 font-size: 15px;
204                 background: \#eee;
205                 margin: 15px 40px 15px 40px;
206                 padding: 7px 7px 7px 7px;
207                 border: 1px solid \#ccc;
208         }
209 }                
210
211 % E ora qualcosa di completamente diverso :)
212
213 % Usa le immagini PNG (che le gif ci stanno sulle balle)
214 \Configure{Picture}{.png}
215
216 % Pochi tasti per non confondere l'utente
217 \Configure{crosslinks}
218         {[}
219         {]\HCode{&nbsp;&nbsp;}}
220         {Avanti}
221         {Indietro}
222         {}
223         {}
224         {}
225         {Su}
226
227 % Una nota di copyright in fondo 
228 % Mi ci ero aggiunto anche "me" come webmaster, ma 
229 % non vorrei esagerare :). 
230 % Non era esagerato, quindi l'ho messo ... (SP)
231 \Configure{crosslinks+}
232         {}
233         {\HCode{<hr>}}
234         {\HCode{<hr>}}
235         {\HCode{<hr>
236         <div style='float: left'>&copy; 2000-2003 
237         <a href='http://www.firenze.linux.it/\%7epiccardi/'>Simone Piccardi</a>
238         </div>
239     <div style='float: right'>Pubblicazione web curata da 
240     <a href='http://www.lilik.it/\%7emirko/'>Mirko Maischberger</a>
241     </div>
242 }}
243
244 % basedescript con le \item[voci] in grassetto
245 \ConfigureList{basedescript}
246         {\HCode{<ul class='basedescript'>}}
247         {\HCode{</ul>}}
248         {\HCode{<li><b>}}
249         {\HCode{</b>}}
250
251 % idem per description e description*
252 \ConfigureList{description}
253         {\HCode{<ul class='description'>}}
254         {\HCode{</ul>}}
255         {\HCode{<li><b>}}
256         {\HCode{</b>}}
257
258 \ConfigureList{description*}
259         {\HCode{<ul class='descriptionstar'>}}
260         {\HCode{</ul>}}
261         {\HCode{<li><b>}}
262         {\HCode{</b>}}
263
264 % Altri ambienti lista che non so per quale motivo
265 % senza queste righe non funzionano
266 \ConfigureList{itemize}
267         {\HCode{<ul class='itemize'>}}
268         {\HCode{</ul>}}
269         {\HCode{<li>}}
270         {\HCode{}}
271
272 \ConfigureList{itemize*}
273         {\HCode{<ul class='itemizestar'>}}
274         {\HCode{</ul>}}
275         {\HCode{<li>}}
276         {\HCode{}}
277
278 % Converti tutti i listati in immagini PNG
279 %\ConfigureEnv{lstlisting}
280 %        {\HCode{<div class='lstlisting'>}\Picture*{}}
281 %        {\EndPicture\HCode{</div>}}
282 %        {}
283 %        {}
284
285 % Converti tutte le tabelle in immagini PNG
286 \ConfigureEnv{tabular}
287         {\HCode{<div class='tabular'>}\Picture*{}}
288         {\EndPicture\HCode{</div>}}
289         {}
290         {}
291
292 % Tre "div" diversi per tre riquardi
293 \ConfigureEnv{prototype}
294         {\HCode{<div class='prototype'>}}
295         {\HCode{</div>}}
296         {}
297         {}
298
299 \ConfigureEnv{functions}
300         {\HCode{<div class='functions'>}}
301         {\HCode{</div>}}
302         {}
303         {}
304
305 \Configure{verbatim}{}{ }
306 \Configure{verb}{}{}
307 \ConfigureEnv{verbatim}
308         {\HCode{<div class='verbatim'><pre>}}       
309         {\HCode{</pre></div>}}       
310         {}
311         {}
312
313 \EndPreamble