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 | \usepackage{color} |
---|
29 | |
---|
30 | \definecolor{dkgreen}{rgb}{0,0.6,0} |
---|
31 | \definecolor{gray}{rgb}{0.5,0.5,0.5} |
---|
32 | \definecolor{mauve}{rgb}{0.58,0,0.82} |
---|
33 | |
---|
34 | %% nouvelle commande pour les listings %% |
---|
35 | \newcommand{\crealplisting} [1]{ |
---|
36 | \lstset{ % |
---|
37 | backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor} |
---|
38 | basicstyle=\footnotesize, % the size of the fonts that are used for the code |
---|
39 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace |
---|
40 | breaklines=true, % sets automatic line breaking |
---|
41 | captionpos=b, % sets the caption-position to bottom |
---|
42 | commentstyle=\color{dkgreen}, % comment style |
---|
43 | deletekeywords={...}, % if you want to delete keywords from the given language |
---|
44 | %escapeinside={\%*}{*)}, % if you want to add LaTeX within your code |
---|
45 | %extendedchar=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 |
---|
46 | frame=single, % adds a frame around the code |
---|
47 | keywordstyle=\color{blue}, % keyword style |
---|
48 | language=#1, % the language of the code |
---|
49 | morekeywords={*,...}, % if you want to add more keywords to the set |
---|
50 | numbers=left, % where to put the line-numbers; possible values are (none, left, right) |
---|
51 | numbersep=5pt, % how far the line-numbers are from the code |
---|
52 | numberstyle=\tiny\color{gray}, % the style that is used for the line-numbers |
---|
53 | rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) |
---|
54 | showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' |
---|
55 | showstringspaces=false, % underline spaces within strings only |
---|
56 | showtabs=false, % show tabs within strings adding particular underscores |
---|
57 | stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered |
---|
58 | stringstyle=\color{mauve}, % string literal style |
---|
59 | tabsize=2, % sets default tabsize to 2 spaces |
---|
60 | %title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title |
---|
61 | } |
---|
62 | } |
---|
63 | |
---|
64 | |
---|
65 | %% nouvelle commande pour créer le titre |
---|
66 | \newcommand {\crealptitle} [4] { |
---|
67 | \begin{titlepage} |
---|
68 | \begin{changemargin}{-1.5cm}{-1.5cm} |
---|
69 | %%%%%% EN TETE %%%%% |
---|
70 | \begin{center} |
---|
71 | \begin{tabular}{|p{2.3cm}|p{13cm}|} |
---|
72 | \hline |
---|
73 | % colonne 1 |
---|
74 | \begin{center} |
---|
75 | \includegraphics [width=65 pt]{img/logo_crealp_seul.png} |
---|
76 | \end{center} |
---|
77 | & |
---|
78 | % colonne 2 |
---|
79 | \begin{center} |
---|
80 | \textsc{Research center on alpine environment}\\ |
---|
81 | \textsc{\small Centre de Recherche sur l'Environnement Alpin }\\ |
---|
82 | \scriptsize Industrie 45 - CH 1951 SION +4127 324 03 80 crealp@crealp.vs.ch |
---|
83 | \end{center} |
---|
84 | \\ \hline |
---|
85 | \end{tabular} |
---|
86 | \end{center} |
---|
87 | %%%%%% FIN DE L EN TETE %%%%%% |
---|
88 | |
---|
89 | \vspace{4cm} |
---|
90 | |
---|
91 | %%%%%%%%%%%%%%%%%%%% TITRE %%%%%%%%%%%%%%%%%% |
---|
92 | \begin{center} |
---|
93 | \begin{tabular}{|p{13cm}|} |
---|
94 | \hline |
---|
95 | \begin{center} |
---|
96 | \bfseries {\Huge {\sffamily #1}} |
---|
97 | \end{center} |
---|
98 | \\ \hline |
---|
99 | \end {tabular} |
---|
100 | \end{center} |
---|
101 | %%%%%%%%%%%%%%%%%%%% FIN TITRE %%%%%%%%%%%%% |
---|
102 | |
---|
103 | \vspace{2cm} |
---|
104 | |
---|
105 | %%%%%%%%%%%%%%%%%%% DESCRIPTION %%%%%%%%%%%%% |
---|
106 | \begin{center} |
---|
107 | \begin{tabular}{p{14cm}} |
---|
108 | \hline |
---|
109 | \begin{center} |
---|
110 | \bfseries {\LARGE {\sffamily #2}} |
---|
111 | \end{center} |
---|
112 | \\ \hline |
---|
113 | \end {tabular} |
---|
114 | \end{center} |
---|
115 | %%%%%%%%%%%%%%%%% FIN DESCRIPTION %%%%%%%%%%%% |
---|
116 | |
---|
117 | \vspace{6cm} |
---|
118 | |
---|
119 | %%%%%%%%%%%%%%%%%%% BAS DE PAGE - DATE %%%%%%%%%%%%% |
---|
120 | \begin{center} |
---|
121 | Revised: \today |
---|
122 | |
---|
123 | #3 |
---|
124 | |
---|
125 | \href{mailto:#4}{\url{#4}} |
---|
126 | \end{center} |
---|
127 | %%%%%%%%%%%%%%%%%%% FIN DE BAS DE PAGE %%%%%%%%%%%%% |
---|
128 | \end{changemargin} |
---|
129 | \end{titlepage} |
---|
130 | } |
---|