%% 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{
}\input #1.html\HCode{
}}
{}
\renewcommand{\includestruct}[1]
{\HCode{}\input #1.html\HCode{
}}
{}
\renewcommand{\includecodesample}[1]
{\HCode{}\input #1.html\HCode{
}}
{}
\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
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{ }}
{Avanti}
{Indietro}
{}
{}
{}
{Su}
% Una nota di copyright in fondo
% Mi ci ero aggiunto anche "me" come webmaster, ma
% non vorrei esagerare :).
% Non era esagerato, quindi l'ho messo ... (SP)
\Configure{crosslinks+}
{}
{\HCode{
}}
{\HCode{
}}
{\HCode{
}}
% basedescript con le \item[voci] in grassetto
\ConfigureList{basedescript}
{\HCode{}}
{\HCode{}}
{\HCode{}}
% idem per description e description*
\ConfigureList{description}
{\HCode{}}
{\HCode{}}
{\HCode{}}
\ConfigureList{description*}
{\HCode{}}
{\HCode{}}
{\HCode{}}
% Altri ambienti lista che non so per quale motivo
% senza queste righe non funzionano
\ConfigureList{itemize}
{\HCode{}}
{\HCode{}}
{\HCode{}}
\ConfigureList{itemize*}
{\HCode{}}
{\HCode{}}
{\HCode{}}
% Converti tutti i listati in immagini PNG
%\ConfigureEnv{lstlisting}
% {\HCode{}\Picture*{}}
% {\EndPicture\HCode{
}}
% {}
% {}
% Converti tutte le tabelle in immagini PNG
\ConfigureEnv{tabular}
{\HCode{}\Picture*{}}
{\EndPicture\HCode{
}}
{}
{}
% Tre "div" diversi per tre riquardi
\ConfigureEnv{prototype}
{\HCode{}}
{\HCode{
}}
{}
{}
\ConfigureEnv{functions}
{\HCode{}}
{\HCode{
}}
{}
{}
\Configure{verbatim}{}{ }
\Configure{verb}{}{}
\ConfigureEnv{verbatim}
{\HCode{}}
{}
{}
\EndPreamble