Aggiunto il materiale di Mirko per la realizzazione dell'HTML.
[gapil.git] / htgapil.cfg
diff --git a/htgapil.cfg b/htgapil.cfg
new file mode 100644 (file)
index 0000000..84a8ea2
--- /dev/null
@@ -0,0 +1,312 @@
+%% htgapil.cfg
+%%
+%% Copyright (C) 2003 Mirko Maischberger.  
+%%   This program is free software; you can redistribute it and/or modify
+%%   it under the terms of the GNU General Public License as published by
+%%   the Free Software Foundation; either version 2 of the License, or
+%%   (at your option) any later version.
+%%
+%%   This program is distributed in the hope that it will be useful,
+%%   but WITHOUT ANY WARRANTY; without even the implied warranty of
+%%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%%   GNU General Public License for more details.
+%%
+%%   You should have received a copy of the GNU General Public License
+%%   along with this program; if not, write to the Free Software
+%%   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  
+%%   02111-1307  USA
+%%
+%% Configurazione tex4ht per la compilazione del
+%% GaPiL (Guida alla Programmazione in Linux)
+%%
+%% $id$
+%% 
+
+\Preamble{html,4,info,next,mouseover}
+
+\usepackage{tex4ht}
+
+%Opzioni per hyperref
+%\usepackage[tex4ht]{hyperref}
+
+\renewcommand{\includecodesnip}[1]
+        {\HCode{<div class='lstlisting-plain'>}\input #1.html\HCode{</div>}}
+        {}
+\renewcommand{\includestruct}[1]
+        {\HCode{<div class='lstlisting-lines'>}\input #1.html\HCode{</div>}}
+        {}
+\renewcommand{\includecodesample}[1]
+        {\HCode{<div class='lstlisting-lines'>}\input #1.html\HCode{</div>}}
+        {}
+
+\begin{document}
+
+
+% Voce del css per impostare il logo e dei margini decenti
+\Css{
+        body { 
+                padding: 2em 10em 2em 70px; 
+                margin: 0; 
+                font-family: sans-serif;
+                color: black; 
+                background: white; 
+                background-position: top left;
+                background-attachment: fixed; 
+                background-repeat: no-repeat;
+                background-image: url(gapil-logo.png);
+        }
+}
+
+\Css{
+        pre { text-align: left;}
+}
+% Corregge un bug
+\Css{
+        .figure img.graphics { 
+                margin-left: 0px;
+        }
+}
+
+\Css {
+        td.figure { 
+                text-align: center; 
+        }
+}
+
+% Gli <hr> si tramutano in una linea grigia 
+\Css{
+        hr {
+                border: 0; 
+                width: 100\%; 
+                height: 2px; 
+                color: \#999; 
+                background-color: \#999;
+        }
+}
+
+% Qualche stile per i link
+\Css{
+        a {
+                font-weight:bold; 
+                color: \#ce2727; 
+                text-decoration: none;
+        }
+}
+
+\Css{
+        a:hover {
+                font-weight:bold; 
+                color: \#ee4747; 
+                text-decoration: underline;
+        }
+}
+
+\Css{
+        a:visited {
+                font-weight:bold; 
+                color: \#666;
+        }
+}
+
+% Non lo chiappa: lo aggioungo come perl -e a htmlize.sh
+%\Css{
+%        .js { 
+%                background: \#f99;
+%        }
+%}
+
+% Configura gli stili per le liste
+\Css{
+        span.boxedminipage ul.descriptionstar {
+                list-style-type: none; 
+                text-indent: -3em;
+        }
+}
+
+\Css{
+        ul.basedescript {
+                list-style-type: none; 
+                text-indent: -3em;
+        }
+}
+
+\Css{
+        ul.itemizestar {
+                list-style-type: none; 
+        }
+}
+
+\Css{
+        ul.itemize {
+                list-style-type: none; 
+        }
+}
+
+% Configura i vari riquadri del GaPiL
+\Css{
+        div.lstlisting-plain {
+                font-size: 90\%;
+                text-align: center;
+                margin: 0px 20px 0px 20px;
+                padding: 0px 7px 0px 7px;
+        }
+}                
+
+\Css{
+        div.lstlisting-plain span.linenum {
+                display: none;
+        }
+}
+
+\Css{
+        div.lstlisting-lines {
+                font-size: 90\%;
+                text-align: center;
+                margin: 3px 20px 3px 20px;
+                padding: 3px 7px 3px 7px;
+                border-top: 3px double black;
+                border-bottom: 3px double black;
+        }
+}                
+
+\Css{
+        div.tabular {
+                text-align: center;
+                margin: 7px 20px 7px 20px;
+                padding: 7px 7px 7px 7px;
+        }
+}                
+
+\Css{
+        div.prototype {
+                font-size: 15px;
+                margin: 15px 40px 15px 40px;
+                background: \#fee;
+                padding: 7px 12px 0px 12px;
+                border: 1px solid \#ccc;
+        }
+}                
+
+\Css{
+        div.functions {
+                font-size: 15px;
+                margin: 15px 40px 15px 40px;
+                background: \#fee;
+                padding: 7px 12px 12px 12px;
+                border: 1px solid \#ccc;
+        }
+}                
+
+\Css{
+        div.verbatim {
+                text-align: left;
+                font-size: 15px;
+                background: \#eee;
+                margin: 15px 40px 15px 40px;
+                padding: 7px 7px 7px 7px;
+                border: 1px solid \#ccc;
+        }
+}                
+
+% E ora qualcosa di completamente diverso :)
+
+% Usa le immagini PNG (che le gif ci stanno sulle balle)
+\Configure{Picture}{.png}
+
+% Pochi tasti per non confondere l'utente
+\Configure{crosslinks}
+        {[}
+        {]\HCode{&nbsp;&nbsp;}}
+        {Avanti}
+        {Indietro}
+        {}
+        {}
+        {}
+        {Su}
+
+% Una nota di copyright in fondo 
+% Mi ci ero aggiunto anche "me" come webmaster, ma 
+% non vorrei esagerare :). 
+\Configure{crosslinks+}
+        {}
+        {\HCode{<hr>}}
+        {\HCode{<hr>}}
+        {\HCode{<hr>
+        <div style='float: left'>&copy; 2000-2003 
+        <a href='http://www.firenze.linux.it/\%7epiccardi/'>Simone Piccardi</a>
+        </div>
+%    <div style='float: right'>Pubblicazione web curata da 
+%    <a href='http://www.lilik.it/\%7emirko/'>Mirko Maischberger</a>
+%    </div>
+}}
+
+% basedescript con le \item[voci] in grassetto
+\ConfigureList{basedescript}
+        {\HCode{<ul class='basedescript'>}}
+        {\HCode{</ul>}}
+        {\HCode{<li><b>}}
+        {\HCode{</b>}}
+
+% idem per description e description*
+\ConfigureList{description}
+        {\HCode{<ul class='description'>}}
+        {\HCode{</ul>}}
+        {\HCode{<li><b>}}
+        {\HCode{</b>}}
+
+\ConfigureList{description*}
+        {\HCode{<ul class='descriptionstar'>}}
+        {\HCode{</ul>}}
+        {\HCode{<li><b>}}
+        {\HCode{</b>}}
+
+% Altri ambienti lista che non so per quale motivo
+% senza queste righe non funzionano
+\ConfigureList{itemize}
+        {\HCode{<ul class='itemize'>}}
+        {\HCode{</ul>}}
+        {\HCode{<li>}}
+        {\HCode{}}
+
+\ConfigureList{itemize*}
+        {\HCode{<ul class='itemizestar'>}}
+        {\HCode{</ul>}}
+        {\HCode{<li>}}
+        {\HCode{}}
+
+% Converti tutti i listati in immagini PNG
+%\ConfigureEnv{lstlisting}
+%        {\HCode{<div class='lstlisting'>}\Picture*{}}
+%        {\EndPicture\HCode{</div>}}
+%        {}
+%        {}
+
+% Converti tutte le tabelle in immagini PNG
+\ConfigureEnv{tabular}
+        {\HCode{<div class='tabular'>}\Picture*{}}
+        {\EndPicture\HCode{</div>}}
+        {}
+        {}
+
+% Tre "div" diversi per tre riquardi
+\ConfigureEnv{prototype}
+        {\HCode{<div class='prototype'>}}
+        {\HCode{</div>}}
+        {}
+        {}
+
+\ConfigureEnv{functions}
+        {\HCode{<div class='functions'>}}
+        {\HCode{</div>}}
+        {}
+        {}
+
+\Configure{verbatim}{}{ }
+\Configure{verb}{}{}
+\ConfigureEnv{verbatim}
+        {\HCode{<div class='verbatim'><pre>}}       
+        {\HCode{</pre></div>}}       
+        {}
+        {}
+
+\EndPreamble