1 | \ProvidesPackage{crealp-report} |
---|
2 | |
---|
3 | % Use utf-8 encoding for foreign characters |
---|
4 | \usepackage[utf8]{inputenc} |
---|
5 | |
---|
6 | \usepackage[T1]{fontenc} |
---|
7 | %\usepackage[francais]{babel} |
---|
8 | \usepackage{graphicx} |
---|
9 | \usepackage{url} |
---|
10 | \usepackage{hyperref} |
---|
11 | \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png} |
---|
12 | |
---|
13 | |
---|
14 | %%%% debut macro %%%% |
---|
15 | \newenvironment{changemargin}[2]{\begin{list}{}{% |
---|
16 | \setlength{\topsep}{0pt}% |
---|
17 | \setlength{\leftmargin}{0pt}% |
---|
18 | \setlength{\rightmargin}{0pt}% |
---|
19 | \setlength{\listparindent}{\parindent}% |
---|
20 | \setlength{\itemindent}{\parindent}% |
---|
21 | \setlength{\parsep}{0pt plus 1pt}% |
---|
22 | \addtolength{\leftmargin}{#1}% |
---|
23 | \addtolength{\rightmargin}{#2}% |
---|
24 | }\item }{\end{list}} |
---|
25 | %%%% fin macro %%%% |
---|
26 | |
---|
27 | \usepackage{listings} |
---|
28 | |
---|
29 | %% nouvelle commande pour les listings %% |
---|
30 | \newcommand{\crealplisting} [1]{ |
---|
31 | \lstset{ |
---|
32 | language=#1, |
---|
33 | breaklines=true |
---|
34 | basicstyle=\ttfamily |
---|
35 | showstringspaces=false, |
---|
36 | columns=fullflexible, |
---|
37 | frame=leftline, |
---|
38 | captionpos=b |
---|
39 | } |
---|
40 | } |
---|
41 | |
---|
42 | |
---|
43 | %% nouvelle commande pour créer le titre |
---|
44 | \newcommand {\crealptitle} [4] { |
---|
45 | \begin{titlepage} |
---|
46 | \begin{changemargin}{-1.5cm}{-1.5cm} |
---|
47 | %%%%%% EN TETE %%%%% |
---|
48 | \begin{center} |
---|
49 | \begin{tabular}{|p{2.3cm}|p{13cm}|} |
---|
50 | \hline |
---|
51 | % colonne 1 |
---|
52 | \begin{center} |
---|
53 | \includegraphics [width=65 pt]{img/logo_crealp_seul.png} |
---|
54 | \end{center} |
---|
55 | & |
---|
56 | % colonne 2 |
---|
57 | \begin{center} |
---|
58 | \textsc{Research center on alpine environment}\\ |
---|
59 | \textsc{\small Centre de Recherche sur l'Environnement Alpin }\\ |
---|
60 | \scriptsize Industrie 45 - CH 1951 SION +4127 324 03 80 crealp@crealp.vs.ch |
---|
61 | \end{center} |
---|
62 | \\ \hline |
---|
63 | \end{tabular} |
---|
64 | \end{center} |
---|
65 | %%%%%% FIN DE L EN TETE %%%%%% |
---|
66 | |
---|
67 | \vspace{4cm} |
---|
68 | |
---|
69 | %%%%%%%%%%%%%%%%%%%% TITRE %%%%%%%%%%%%%%%%%% |
---|
70 | \begin{center} |
---|
71 | \begin{tabular}{|p{13cm}|} |
---|
72 | \hline |
---|
73 | \begin{center} |
---|
74 | \bfseries {\Huge {\sffamily #1}} |
---|
75 | \end{center} |
---|
76 | \\ \hline |
---|
77 | \end {tabular} |
---|
78 | \end{center} |
---|
79 | %%%%%%%%%%%%%%%%%%%% FIN TITRE %%%%%%%%%%%%% |
---|
80 | |
---|
81 | \vspace{2cm} |
---|
82 | |
---|
83 | %%%%%%%%%%%%%%%%%%% DESCRIPTION %%%%%%%%%%%%% |
---|
84 | \begin{center} |
---|
85 | \begin{tabular}{p{14cm}} |
---|
86 | \hline |
---|
87 | \begin{center} |
---|
88 | \bfseries {\LARGE {\sffamily #2}} |
---|
89 | \end{center} |
---|
90 | \\ \hline |
---|
91 | \end {tabular} |
---|
92 | \end{center} |
---|
93 | %%%%%%%%%%%%%%%%% FIN DESCRIPTION %%%%%%%%%%%% |
---|
94 | |
---|
95 | \vspace{6cm} |
---|
96 | |
---|
97 | %%%%%%%%%%%%%%%%%%% BAS DE PAGE - DATE %%%%%%%%%%%%% |
---|
98 | \begin{center} |
---|
99 | Revised: \today |
---|
100 | |
---|
101 | #3 |
---|
102 | |
---|
103 | \href{mailto:#4}{\url{#4}} |
---|
104 | \end{center} |
---|
105 | %%%%%%%%%%%%%%%%%%% FIN DE BAS DE PAGE %%%%%%%%%%%%% |
---|
106 | \end{changemargin} |
---|
107 | \end{titlepage} |
---|
108 | } |
---|