Rapport sur le langage SARL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ac20.cls 6.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. \NeedsTeXFormat{LaTeX2e}[1995/12/01]
  2. \ProvidesClass{ge11}[2017/06/13 v1 Mise en forme AC20]
  3. % Passe les options de la classe à la classe article
  4. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
  5. \ProcessOptions
  6. \LoadClass[titlepage, a4paper, french,]{article}
  7. \usepackage[right=2.3cm,left=2.3cm]{geometry}
  8. \usepackage{pifont}
  9. \usepackage{enumitem}
  10. \usepackage{lmodern}
  11. \usepackage{amssymb,amsmath}
  12. \usepackage{ifxetex,ifluatex}
  13. \usepackage{fixltx2e} % provides \textsubscript
  14. \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  15. \usepackage[T1]{fontenc}
  16. \usepackage[utf8]{inputenc}
  17. \usepackage{eurosym}
  18. \else % if luatex or xelatex
  19. \ifxetex
  20. \usepackage{mathspec}
  21. \else
  22. \usepackage{fontspec}
  23. \fi
  24. \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
  25. \newcommand{\euro}{€}
  26. \fi
  27. % use upquote if available, for straight quotes in verbatim environments
  28. \IfFileExists{upquote.sty}{\usepackage{upquote}}{}
  29. % use microtype if available
  30. \IfFileExists{microtype.sty}{%
  31. \usepackage[]{microtype}
  32. \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
  33. }{}
  34. \PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
  35. \usepackage[unicode=true]{hyperref}
  36. \hypersetup{
  37. pdftitle={La programmation orientée agent},
  38. pdfauthor={Bartuccio Antoine},
  39. pdfborder={0 0 0},
  40. breaklinks=true}
  41. \urlstyle{same} % don't use monospace font for urls
  42. \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  43. \usepackage[shorthands=off,main=french]{babel}
  44. \else
  45. \usepackage{polyglossia}
  46. \setmainlanguage[]{french}
  47. \fi
  48. \usepackage{color}
  49. \usepackage{fancyvrb}
  50. \newcommand{\VerbBar}{|}
  51. \newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
  52. \DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
  53. % Add ',fontsize=\small' for more characters per line
  54. \newenvironment{Shaded}{}{}
  55. \newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}}
  56. \newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{#1}}
  57. \newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
  58. \newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
  59. \newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{#1}}
  60. \newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}}
  61. \newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
  62. \newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
  63. \newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
  64. \newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{#1}}
  65. \newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}}
  66. \newcommand{\ImportTok}[1]{#1}
  67. \newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{#1}}}
  68. \newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{#1}}}
  69. \newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
  70. \newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
  71. \newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{#1}}
  72. \newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{#1}}
  73. \newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
  74. \newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{#1}}}
  75. \newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
  76. \newcommand{\BuiltInTok}[1]{#1}
  77. \newcommand{\ExtensionTok}[1]{#1}
  78. \newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}}
  79. \newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}}
  80. \newcommand{\RegionMarkerTok}[1]{#1}
  81. \newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
  82. \newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{#1}}}}
  83. \newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
  84. \newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{#1}}}
  85. \newcommand{\NormalTok}[1]{#1}
  86. \usepackage{graphicx,grffile}
  87. \makeatletter
  88. \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
  89. \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
  90. \makeatother
  91. % Scale images if necessary, so that they will not overflow the page
  92. % margins by default, and it is still possible to overwrite the defaults
  93. % using explicit options in \includegraphics[width, height, ...]{}
  94. \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
  95. \IfFileExists{parskip.sty}{%
  96. \usepackage{parskip}
  97. }{% else
  98. \setlength{\parindent}{0pt}
  99. \setlength{\parskip}{6pt plus 2pt minus 1pt}
  100. }
  101. \setlength{\emergencystretch}{3em} % prevent overfull lines
  102. \providecommand{\tightlist}{%
  103. \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
  104. % Redefines (sub)paragraphs to behave more like sections
  105. \ifx\paragraph\undefined\else
  106. \let\oldparagraph\paragraph
  107. \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
  108. \fi
  109. \ifx\subparagraph\undefined\else
  110. \let\oldsubparagraph\subparagraph
  111. \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
  112. \fi
  113. \usepackage{float}
  114. \floatplacement{figure}{!h}
  115. % set default figure placement to htbp
  116. \makeatletter
  117. \def\fps@figure{htbp}
  118. \newcommand\UV[1]{\newcommand\@UV{#1}}
  119. \newcommand\semester[1]{\newcommand\@semester{#1}}
  120. \newcommand\UVManager[1]{\newcommand\@UVManager{#1}}
  121. \newcommand\UVFollower[1]{\newcommand\@UVFollower{#1}}
  122. % Entête et pied de page
  123. \usepackage{fancyhdr}
  124. \usepackage{lastpage}
  125. \pagestyle{fancy}
  126. \fancyhead{}
  127. \fancyfoot{}
  128. \fancyheadoffset{0cm}
  129. \rfoot{
  130. \begin{minipage}{6cm}
  131. \includegraphics{utbm_logo.png}
  132. \end{minipage}
  133. }
  134. \lfoot{\thepage/\textbf{\pageref{LastPage}}}
  135. \lhead{\bsc{\@author}}
  136. \rhead{\textit{\@title}}
  137. \fancypagestyle{titlepage}{
  138. \fancyhf{}
  139. \renewcommand{\headrulewidth}{0pt}
  140. \fancyfoot[R]{\includegraphics{utbm_logo.png}}
  141. \fancyfootoffset{-0.5cm}
  142. }
  143. \newcommand\cover{
  144. \begin{titlepage}
  145. \thispagestyle{titlepage}
  146. \begin{center}
  147. {\Huge\textbf{\@title}}
  148. \hspace{20cm}
  149. {\Large Réalisé dans le cadre de l'unité de valeur}
  150. \end{center}
  151. \begin{center}
  152. {\Large\textbf{\@UV}}
  153. \vspace{10em}
  154. {\Large Écrit par \textbf{\@author}}
  155. {\Large\@date}
  156. \vspace{10em}
  157. Gestionnaire de l'UV : \@UVManager
  158. Professeur encadrant : \@UVFollower
  159. \end{center}
  160. \end{titlepage}
  161. }
  162. \makeatother
  163. % Puces modifiées
  164. \setlist[itemize]{label=\textbullet}
  165. % Changement du titre de la table des matières
  166. \addto{\captionsfrench}{\renewcommand*{\contentsname}{Sommaire}}
  167. \renewcommand\thesection{\arabic{section}}
  168. \renewcommand\thesubsection{\thesection.\arabic{subsection}}
  169. \renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}}
  170. % Saut de page automatique après chaque section
  171. \let\oldsection\section
  172. \renewcommand\section{\clearpage\oldsection}