glog_td4/MyPack2.sty

170 lines
4.8 KiB
Text
Raw Permalink Normal View History

2018-04-01 12:34:28 +00:00
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{MyPack2}
%%%%%%%% INCLUSIONS GÉNÉRALES %%%%%%%%%
\RequirePackage{babel}
%\RequirePackage{titlesec}
\RequirePackage{color}
%\RequirePackage[a4paper]{geometry}
\RequirePackage[font=small,format=plain,labelfont=bf,up,
textfont=normal,up,
justification=justified,
singlelinecheck=false]{caption}
\RequirePackage[justification=centering]{caption}
\RequirePackage{xcolor} % Required for specifying custom colours
\definecolor{grey}{rgb}{0.9,0.9,0.9} % Colour of the box surrounding the title
\RequirePackage[utf8]{inputenc} % Required for inputting international characters
\RequirePackage[T1]{fontenc}
% \RequirePackage[sfdefault]{ClearSans} % Use the Clear Sans font (sans serif)
\RequirePackage{placeins}
\RequirePackage{listings}
\RequirePackage{graphicx}
\RequirePackage{amsfonts}
\definecolor{defaultColor}{RGB}{0,100,143}
\definecolor{bleu}{RGB}{0,100,143}
\definecolor{gris}{RGB}{130,130,140}
\definecolor{grisBleu}{RGB}{65,115,141}
%%%%%%%% MATH %%%%%%%%%
\RequirePackage{stmaryrd}
\newcommand*\intervalleEntier[2]{\intervalle{\llbracket}{#1}{#2}{\rrbracket}}
\newcommand*\intervalle[4]{\left#1 #2 \, ; #3 \right#4}
\newcommand*\intervalleOO[2]{\intervalle{]}{#1}{#2}{[}}
\newcommand*\intervalleFF[2]{\intervalle{[}{#1}{#2}{]}}
\newcommand*\intervalleOF[2]{\intervalle{]}{#1}{#2}{]}}
\newcommand*\intervalleFO[2]{\intervalle{[}{#1}{#2}{[}}
\let\ensembleNombre\mathbb
\newcommand*\N{\ensembleNombre{N}}
\newcommand*\Z{\ensembleNombre{Z}}
\newcommand*\Q{\ensembleNombre{Q}}
\newcommand*\R{\ensembleNombre{R}}
\newcommand*\C{\ensembleNombre{C}}
\newcommand*\enstq[2]{\left\{#1,\; #2\right\}}
%\newcommand*\int[1]{\left\lfloor #1\right\rfloor}
%\newcommand*\norme[1]{\left\lVert#1\right\rVert}
%\newcommand*\abs[1]{\left\lvert#1\right\rvert}
\let\vecteur\overrightarrow
\newcommand*\Sys[1]{\left\{ \begin{aligned} #1 \end{aligned} \right. \kern-\nulldelimiterspace}
\newcommand*\application[5]{
#1 \colon
\begin{alignedat}{2} &#2 &\to &#3\\
&#4 &\mapsto &#5
\end{alignedat}
}
\newcommand*\applicationSigne[3]{
#1 \colon #2 \to #3
}
\newtheorem{defi}{Définition}[section]
\newtheorem{theo}{Théorème}[section]
\newtheorem{prop}{Proposition}[section]
\newtheorem{ex}{Exemple}[section]
%%%%%%%% SECTIONNEMENT %%%%%%%%%
%\renewcommand{\thesection}{\Roman{section}}
%\renewcommand{\thesubsection}{\arabic{subsection}}
%\renewcommand{\@seccntformat}[1]{
% \llap{
% \textcolor{defaultColor}{\csname the#1\endcsname}
% \hspace{1em}
% }
%}
%\renewcommand{\section}{
% \@startsection{section}{1}{0pt}
% {0pt}
% {0pt}
% {\normalfont\large\bfseries\llap}
%}
\newcommand*\emptyPage{\newpage\null\thispagestyle{empty}\addtocounter{page}{-1}\newpage}
%%%%%%%% INTIALISATION DE LA PAGE %%%%%%%%%
\RequirePackage{fancyhdr}
\newcommand\initPage[3]{
\pagestyle{fancy}
\fancyhead{#1}
\lhead{#2}
\rhead{#3}
\rfoot{}
\lfoot{\includegraphics[scale=0.2]{CSLogo}}
%\titleformat*{\section}{\Large\bfseries\color{bleu}\Roman{section}}
%\titleformat*{\subsection}{\large\bfseries\color{grisBleu}}
%\titleformat*{\subsubsection}{\bfseries\color{gris}}
%\titlespacing*{\section}{-3em}{*1}{*1}
%\titlespacing*{\subsection}{-2em}{*1}{*1}
%\titlespacing*{\subsubsection}{-1em}{*1}{*1}
}
%%%%%%%% TITRE %%%%%%%%M
\renewcommand{\maketitle}{
\begin{titlepage} % Suppresses displaying the page number on the title page and the subsequent page counts as page 1
%------------------------------------------------
% Grey title box
%------------------------------------------------
\topskip0pt
\vspace*{5cm}
\colorbox{grey}{
\parbox[t]{0.93\textwidth}{ % Outer full width box
\parbox[t]{0.91\textwidth}{ % Inner box for inner right text margin
\raggedleft % Right align the text
\fontsize{72pt}{80pt}\selectfont % Title font size, the first argument is the font size and the second is the line spacing, adjust depending on title length
\vspace{1cm} % Space between the start of the title and the top of the grey box
\@title
\vspace{1cm} % Space between the end of the title and the bottom of the grey box
}
}
}
\vfill % Space between the title box and author information
%------------------------------------------------
% Author name and information
%------------------------------------------------
\parbox[t]{0.93\textwidth}{ % Box to inset this section slightly
\raggedleft % Right align the text
\large % Increase the font size
{\Large \@author}\\[4pt] % Extra space after name
\hfill\rule{0.2\linewidth}{1pt}\\% Horizontal line, first argument width, second thickness
\@date
}
\end{titlepage}
\emptyPage
}
%%%%%%%% FIN DU DOCUMENT %%%%%%%%%
\newcommand{\roadMap}{
\clearpage
\listoffigures
\clearpage
\listoftables
}
% Fin du package
\endinput