2017-2018/tools/style/classCours.cls

80 lines
1.9 KiB
OpenEdge ABL
Raw Normal View History

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{classCours}
% classe de base
\LoadClassWithOptions{article}
% extensions
\RequirePackage{base}
\RequirePackage{none_beamer}
\RequirePackage{colorscheme}
% géométrie
\RequirePackage{geometry}
\geometry{left=20mm,right=20mm, top=15mm, bottom=20mm}
%\RequirePackage{arev}
\RequirePackage{kpfonts}
\renewcommand*\familydefault{\sfdefault}
\RequirePackage[T1]{fontenc}
% commandes personnelles
% Les en-tête et les pieds de pages
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
%\setlength{\headheight}{15.2pt}
\setlength{\headsep}{5pt}
\newcommand{\op@boiteentete}{\makebox[0pt][l]{\hspace*{-3ex}%
\color{bgentete}\rule[-0.8ex]{\linewidth+6ex}{3ex}%
}}
\fancyhead[L]{%
\op@boiteentete%
\small\op@typedoc \op@titre%
}
\fancyhead[R]{\small\scshape\op@entete}
\fancyfoot[R]{\color{footer}\thepage}
\fancyfoot[L]{\color{footer}\scriptsize\op@classe{} -- \op@annee}
\fancypagestyle{plain}{%
\fancyhf{}
\fancyfoot[R]{\color{footer}\thepage}
\fancyfoot[L]{\color{footer}\scriptsize\op@classe{} -- \op@annee}
% \fancyfoot[R]{\thepage}
% \fancyfoot[L]{\scriptsize\op@classe{} -- \op@annee}
}
% Description du Cours
\newcommand{\op@entete}{}
\newcommand{\op@soustitre}{}
\newcommand{\op@classe}{}
\newcommand{\op@typedoc}{}
\newcommand{\op@typedoctmp}{}
\newcommand{\op@titre}{}
\newcommand{\classe}[1]{\renewcommand{\op@classe}{#1}}
\newcommand{\titre}[1]{\renewcommand{\op@titre}{#1}}
\renewcommand{\op@typedoc}{Cours: }
\renewcommand{\op@soustitre}{\op@classe{} -- \@date{}}%
\renewcommand{\op@entete}{\@date}
% Redéfinition de maketitle pour ne plus avoir la date
\renewcommand{\maketitle}{%
\thispagestyle{plain}
\noindent{\huge \color{title}\bfseries \op@typedoc \op@titre}\par
\noindent{\color{line}\rule{\linewidth}{1ex}}\par
\noindent{\color{subtitle}\bfseries \op@soustitre}\par
\vspace{2.5\baselineskip}
}