1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
\documentclass[12pt,a4paper]{article} %configuration article
\usepackage[utf8]{inputenc} %codage utf8
\usepackage[T1]{fontenc} %
\usepackage[french]{babel} %normes françaises
\usepackage{xcolor} %couleurs
\usepackage{multicol} % 2 équations sur une même ligne
\usepackage{graphicx} %insertion images
\usepackage{subfigure} %plusieurs images
\usepackage{subfloat} %plusieurs images
\usepackage[export]{adjustbox}
\usepackage{float} %permettre aux images d'être grande sur une page sans "limite"
\DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\usepackage{caption}
\usepackage{refstyle}
%\usepackage{xkeyval}
%\usepackage[linktextcolour=blue]{hrefhide}
\usepackage{url}
\usepackage{hyperref}
\hypersetup{ % parametrage des hyperliens
pdfborder = {0 0 0}, % Style de bordure - width of PDF link border -
% DEFAULT is {0 0 1}
% pour ne pas ne pas encadrer les liens: {0 0 0}
pdftex,
pdfstartview=FitH,
%colorlinks=true, %colorise les liens
%breaklinks=true, %permet les retours à la ligne pour les liens trop longs
%couleur des hyperliens
%linkcolor= blue %couleur des liens internes aux documents (index, figures, tableaux, equations,...)
%linktoc= blue,
%filecolor= blue,
%citecolor= blue %couleur des liens vers les references bibliographiques
%colorlinks=true, % false: boxed links; true: colored links
%linkcolor=red, % color of internal links (change box color with linkbordercolor)
colorlinks,
linkcolor={red!50!black},
citecolor={blue!50!black},
urlcolor={blue!80!black}
}
%Configurer les marges
\usepackage{geometry}
\geometry{
a4paper,
total={210mm,297mm},
left=20mm,
right=20mm,
top=20mm,
bottom=20mm,
}
\usepackage{listings}
\definecolor{listinggray}{gray}{0.9}
\definecolor{lbcolor}{rgb}{0.9,0.9,0.9}
\definecolor{Darkgreen}{rgb}{0.0, 0.2, 0.13}
\definecolor{armygreen}{rgb}{0.29, 0.33, 0.13}
\lstset{
backgroundcolor=\color{lbcolor},
tabsize=4,
% rulecolor=,
language=[GNU]C++,
basicstyle=\scriptsize,
upquote=true,
aboveskip={1.5\baselineskip},
columns=fixed,
showstringspaces=false,
extendedchars=false,
breaklines=true,
prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
frame=single,
numbers=left,
showtabs=false,
showspaces=false,
showstringspaces=false,
identifierstyle=\ttfamily,
keywordstyle=\color[rgb]{0,0,1},
commentstyle=\color[rgb]{0.026,0.112,0.095},
stringstyle=\color[rgb]{0.627,0.126,0.941},
numberstyle=\color[rgb]{0.205, 0.142, 0.73},
% \lstdefinestyle{C++}{language=C++,style=numbers}.
}
\lstset{
backgroundcolor=\color{lbcolor},
tabsize=4,
language=C++,
captionpos=b,
tabsize=3,
frame=lines,
numbers=left,
numberstyle=\tiny,
numbersep=5pt,
breaklines=true,
showstringspaces=false,
basicstyle=\footnotesize,
% identifierstyle=\color{magenta},
keywordstyle=\color[rgb]{0,0,1},
commentstyle=\color{armygreen},
stringstyle=\color{red}
}
\lstset{literate=%
{'}{{'}}1 %permet l'écriture d'une apostrophe
{é}{{\'e}}1
{à}{{\`a}}1
{ç}{{\c{c}}}1
{}{{\oe}}1
{ù}{{\`u}}1
{À}{{\`A}}1
{Ç}{{\c{C}}}1
{}{{\OE}}1
{Ê}{{\^E}}1
{ê}{{\^e}}1
{î}{{\^i}}1
{ô}{{\^o}}1
{è}{{\`e}}1
}
\begin{document}
\renewcommand{\figurename}{Figure}% Changer le nom figure 1 -> diagramme 1
\renewcommand{\lstlistingname}{Code}% Changer le nom listing 1 -> code 1
\renewcommand{\tablename}{Diagramme}% Changer le nom table 1 -> figure 1
\begin{lstlisting}[caption={Algorithme de lissage},label={code:lissage}]
//Application du filtre à
//Application du filtre é
\end{lstlisting}
\vspace{10mm}
\end{document} |
Partager