guide-libreasso/lolipop.hva

274 lines
9.4 KiB
Plaintext
Raw Normal View History

2020-05-16 14:53:30 +02:00
\usepackage{book}
\footerfalse
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Dépendances générales
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Nous écrivons en unicode.
\usepackage[utf8]{inputenc}
% Nous étendons LaTeX avec le symbole €.
\usepackage{eurosym}
% Ainsi que de symboles supplémentaires.
\usepackage{amssymb}
% Le paquet ifthen facilite le contrôle de flux.
\usepackage{ifthen}
% Nous définissons de nouveaux types de flottants en nous appuyant sur le paquet
% float.
\usepackage{float}
% Nous éditons les hyperliens, avec césure, unicode, et sans cadre.
\usepackage[hyphens]{url}
\usepackage[breaklinks=true, unicode=True, pdfborder={0 0 0}]{hyperref}
\def\UrlNoBreaks{\do\(\do\[\do\{\do\<\do\:}%
% Et finalement, nous mettrons en oeuvre les subtilités de la typographie
% française.
\usepackage[french]{babel}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Chemins
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@includes{../includes/}
\def\@images{\@includes images/}
\def\@screenshots{\@includes screenshots/}
\def\@lowres{vignettes/}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Mise en forme
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\strong}[1]{\begin{rawhtml}<strong>\end{rawhtml}#1\begin{rawhtml}</strong>\end{rawhtml}}
% Ainsi que pour les exergues, que nous définirons comme un paragraphe centré
% dans la marge.
\newenvironment{exergue}
{\begin{rawhtml}<div class="guide_exergue">\end{rawhtml}}
{\begin{rawhtml}</div>\end{rawhtml}}
%%% Hyperliens %%%
\newcommand{\email}[1]{\href{mailto:#1}{\tech{#1}}}
%\newcommand{\url}[1]{\href{#1}{\tech{#1}}}
%%% Footnotes
\newcounter{footnotenr}[]
\renewcommand{\footnote}[1]{
\refstepcounter{footnotenr}
\begin{rawhtml}
<span class="guide_footnote"><span class="guide_footnote-nr">\end{rawhtml}\thefootnotenr\begin{rawhtml}</span>
<span class="guide_footnote-content">
\end{rawhtml}#1\begin{rawhtml}</span></span>\end{rawhtml}
}
%%% Autres interfaces %%%
% Pour l'écrit étranger.
\newcommand{\foreign}[1]{\begin{rawhtml}<span class="guide_foreign">\end{rawhtml}#1\begin{rawhtml}</span>\end{rawhtml}}
\let\etranger\foreign
% Pour les marques.
\newcommand{\brand}[1]{\begin{rawhtml}<span class="guide_brand">\end{rawhtml}#1\begin{rawhtml}</span>\end{rawhtml}}
\let\marque\brand
% Pour les aspects techniques.
\newcommand{\tech}[1]{\begin{rawhtml}<span class="guide_tech">\end{rawhtml}#1\begin{rawhtml}</span>\end{rawhtml}}
\let\info\tech
\let\shell\tech
\let\command\tech
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Flottants : captures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{capture}[2][]{\begin{rawhtml}<div class="guide_capture">
<a href="\end{rawhtml}\@screenshots #2\begin{rawhtml}.png"
class="guide_screenshot_fullscreen">
<img class="guide_screenshot_vignette" src="\end{rawhtml}\@screenshots\@lowres #2\begin{rawhtml}.png"/>
</a>\end{rawhtml}}
{\begin{rawhtml}
</div>\end{rawhtml}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Flottants : logiciels
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Déclarons les paramètres qui nous intéressent.
\newcommand{\nom}[1]
{\begin{rawhtml}<div class="guide_nom">\end{rawhtml}#1\begin{rawhtml}</div>\end{rawhtml}}
\newcommand{\logo}[1]{}
\renewcommand{\description}[1]
{\begin{rawhtml}<div class="guide_description">\end{rawhtml}#1\begin{rawhtml}</div>\end{rawhtml}}
\newcommand{\apprentissage}[1]
{\begin{rawhtml}<div class="guide_apprentissage">\end{rawhtml}#1\begin{rawhtml}</div>\end{rawhtml}}
\newcommand{\installation}[1]
{\begin{rawhtml}<div class="guide_installation">\end{rawhtml}#1\begin{rawhtml}</div>\end{rawhtml}}
\newcommand{\lien}[1]
{\begin{rawhtml}<div class="guide_lien">\end{rawhtml}#1\begin{rawhtml}</div>\end{rawhtml}}
\newcommand{\equivalent}[1]
{\begin{rawhtml}<div class="guide_equivalent">\end{rawhtml}#1\begin{rawhtml}</div>\end{rawhtml}}
% L'interface utilisateur est l'environnement "logiciel". Là où le logiciel est
% déclaré, son résumé est inséré en marge et une référence est crée.
\newenvironment{logiciel}
{\begin{rawhtml}<div class="guide_logiciel"><p>\end{rawhtml}}
{\begin{rawhtml}</p></div>\end{rawhtml}\par}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Flottants : encarts
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{encart}[2][]
{\begin{rawhtml}<div class="guide_encart" title="\end{rawhtml}#2\begin{rawhtml}"><p>\end{rawhtml}}
{\begin{rawhtml}</p></div>\end{rawhtml}\par}
\newenvironment{ressource}[1]
{\begin{rawhtml}<div class="guide_ressource"><a href="\end{rawhtml}\@images #1\begin{rawhtml}.png"><p>
<img src="\end{rawhtml}\@images\@lowres #1\begin{rawhtml}.png"/></a>\end{rawhtml}}
{\begin{rawhtml}</p></div>\end{rawhtml}\par}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Glossaire(s)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Entree de glossaire
\newenvironment{Glossaire}[1]{
\begin{rawhtml}<dt class="guide_glossaire_entree">\end{rawhtml}
\begin{rawhtml}</div>\end{rawhtml}
#1
\begin{rawhtml}<dd class="guide_glossaire_description">\end{rawhtml}
}{
\begin{rawhtml}</div>\end{rawhtml}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Couvertures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Commençons par écrire un constructeur pour les parametres à déclarer.
\def\lolipop@declare#1{%
\long\expandafter%
\def \csname lolipop@#1\endcsname {}%
\long\expandafter%
\def \csname #1\endcsname ##1{%
\long\expandafter%
\def \csname lolipop@#1\endcsname{##1}%
}%
}
% Déclarons les paramètres qui nous intéressent
\lolipop@declare{title}
\lolipop@declare{subject}
\lolipop@declare{keywords}
\lolipop@declare{version}
\lolipop@declare{date}
\lolipop@declare{organisation}
\lolipop@declare{orgwebsite}
\lolipop@declare{orgcontact}
\lolipop@declare{orgaddress}
\lolipop@declare{sourcesaddress}
% Page de titre
\def\maketitle{\makeours}
\def\makecouv{}
\def\makeours{
\begin{rawhtml}<div class="guide_title">\end{rawhtml}
\lolipop@title
\begin{rawhtml}</div>
<div class="guide_copyleft">\end{rawhtml}
\reflectbox{\copyright} \lolipop@organisation
\begin{rawhtml}</div>
<div class="guide_version">\end{rawhtml}
Version \lolipop@version\ du \lolipop@date
\begin{rawhtml}</div>
<div class="guide_adresse">\end{rawhtml}
\lolipop@orgaddress
\begin{rawhtml}</div>
<div class="guide_siteweb">\end{rawhtml}
Site Web : \begin{rawhtml}<a href="http://\end{rawhtml}\lolipop@orgwebsite\begin{rawhtml}">\end{rawhtml}
\lolipop@orgwebsite
\begin{rawhtml}</a>\end{rawhtml}
\begin{rawhtml}</div>
<div class="guide_contact">\end{rawhtml}
\begin{rawhtml}<a href="mailto:\end{rawhtml}\lolipop@orgcontact\begin{rawhtml}">\end{rawhtml}
\lolipop@orgcontact
\begin{rawhtml}</a>\end{rawhtml}
\begin{rawhtml}</div>
<div class="guide_licence">\end{rawhtml}
\hyperlink{licence}{Licence de ce document}
\begin{rawhtml}</div>
<div class="guide_source">\end{rawhtml}
Sources originales et version \info{pdf} maintenue :
\begin{rawhtml}<a href="\end{rawhtml}\lolipop@sourcesaddress\begin{rawhtml}">\end{rawhtml}
\lolipop@sourcesaddress
\begin{rawhtml}</a>\end{rawhtml}
\begin{rawhtml}</div>\end{rawhtml}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Table des matières
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{tocdepth}{2}
\renewcommand{\tableofcontents}{
\begin{rawhtml}<div class="guide_tableofcontents">\end{rawhtml}
{\@readtoc{htoc}{\contentsname}}
\begin{rawhtml}</div>\end{rawhtml}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Signature
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{multicol}
\newenvironment{signature}
{\begin{rawhtml}<div class="guide_signature">\end{rawhtml}
\begin{center}\begin{tabular}{lll}}
{\begin{rawhtml}</div>\end{rawhtml}
\end{tabular}\end{center}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Divers
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\@makesection}[7]{%
\renewcommand{\csname @#3@level\endcsname}{#2}%
\renewcommand{#1}[2][]{%
\@secbegin\@checkdepth{#2}{\refstepcounter{#3}}%
\ifoptarg\@checktocdepth{#2}{\@doaddtoc{#2}{#5}{##1}}\else
\@checktocdepth{#2}{\@doaddtoc{#2}{#5}{##2{}}}\fi
\ifoptarg\cuthere{#3}{\@addsecnumber{#2}{#5}{##1}}\else
\cuthere{#3}{\@addsecnumber{#2}{#5}{\begin{@norefs}##2{}\end{@norefs}}}\fi
#4\@secanchor%
\@altdepth{#2}
{\@alttocdepth{#2}{\@locname{htoc\thetocanchor}{#5}#6}{#5#6}}
{\@checktocdepth{#2}{\@locname{htoc\thetocanchor}{}}}%
##2{}#7\@secend}%
\renewcommand{#1*}[1]{%
\@secbegin\cuthere{#3}{##1}%
#4\@secanchor{}##1{}#7\@secend}}%
\def\frontmatter{%
\@makesection
{\chapter}{-1}{chapter}
{\@open{H1}{\envclass@attr{chapter}}}{}{}{\@close{H1}}
}
\def\mainmatter{
\setcounter{chapter}{0}
\@makesection
{\chapter}{-1}{chapter}
{\@open{H1}{\envclass@attr{chapter}}}{\thechapter.}{\quad}{\@close{H1}}
}
\def\backmatter{}
\renewcommand{\large}{\@insert{DIV}{class="guide_large_font"}}