2019-01-09 20:45:49 +01:00
|
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
|
|
|
|
\ProvidesClass{cours}[2019/01/09 LaTeX class for Lessons]
|
|
|
|
|
\makeatletter
|
|
|
|
|
% Base Class
|
|
|
|
|
|
|
|
|
|
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\ProcessOptions\relax
|
|
|
|
|
% Main packages
|
|
|
|
|
|
|
|
|
|
\LoadClass[12pt,a4paper,french,titlepage]{book}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\RequirePackage[french]{babel} % pour ecrire en francais
|
|
|
|
|
\RequirePackage[left=2.00cm, right=2.00cm, top=3.00cm, bottom=3.00cm]{geometry} % la mise en page
|
|
|
|
|
|
|
|
|
|
% Packages
|
|
|
|
|
\RequirePackage[utf8]{inputenc} % encodage
|
|
|
|
|
|
|
|
|
|
\RequirePackage{fancyhdr} % la mise en page
|
|
|
|
|
\RequirePackage[dvipsnames,x11names]{xcolor} % Un peu de couleur !
|
|
|
|
|
\RequirePackage{float}
|
|
|
|
|
\RequirePackage{subcaption}
|
|
|
|
|
\RequirePackage{subfiles}
|
|
|
|
|
\RequirePackage{hyperref}
|
|
|
|
|
\hypersetup{
|
|
|
|
|
bookmarks=true, % show bookmarks bar?
|
|
|
|
|
unicode=true, % non-Latin characters in Acrobat’s bookmarks
|
|
|
|
|
pdftoolbar=true, % show Acrobat’s toolbar?
|
|
|
|
|
pdfmenubar=true, % show Acrobat’s menu?
|
|
|
|
|
pdffitwindow=false, % window fit to page when opened
|
|
|
|
|
pdfstartview={FitH}, % fits the width of the page to the window
|
|
|
|
|
pdftitle=\@title, % title
|
|
|
|
|
pdfauthor=\@author, % author
|
|
|
|
|
colorlinks=true, % false: boxed links; true: colored links
|
|
|
|
|
linkcolor=black, % color of internal links
|
|
|
|
|
citecolor=OliveGreen, % color of links to bibliography
|
|
|
|
|
filecolor=magenta, % color of file links
|
|
|
|
|
urlcolor=BlueViolet % color of external links
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\RequirePackage{tikz}
|
|
|
|
|
\usetikzlibrary{fit}
|
|
|
|
|
\usetikzlibrary{positioning}
|
|
|
|
|
\RequirePackage{schemabloc}
|
2019-01-10 17:31:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\usepackage[european,cuteinductors,siunitx,straightvoltages]{circuitikz}
|
|
|
|
|
\tikzset{every picture/.style={execute at begin picture={\shorthandoff{:;!?};}}}
|
|
|
|
|
\usetikzlibrary{positioning, fit, calc}
|
|
|
|
|
|
2019-01-09 20:45:49 +01:00
|
|
|
|
\RequirePackage{pgfplots}
|
|
|
|
|
\RequirePackage{mathtools}
|
|
|
|
|
\RequirePackage{amsfonts}
|
|
|
|
|
\RequirePackage{mathrsfs}
|
|
|
|
|
\RequirePackage{amssymb}
|
|
|
|
|
\RequirePackage[section]{placeins} % Oblige a placer toutes les figures avant de passer a la section suivante
|
|
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
%%%%%%%%%%%%%%%%%%% Custom title Page %%%%%%%%%
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
\def\teacher#1{\gdef\@teacher{#1}}
|
|
|
|
|
\def\module#1{\gdef\@module{#1}}
|
2019-01-23 16:21:21 +01:00
|
|
|
|
\RequirePackage{setspace}
|
2019-01-09 20:45:49 +01:00
|
|
|
|
\renewcommand{\maketitle}{%
|
|
|
|
|
\begin{titlepage}
|
|
|
|
|
\centering
|
|
|
|
|
{\huge \textsc{M1 E3A - Voie André Ampère}}
|
|
|
|
|
\vspace{1cm}
|
|
|
|
|
% \includegraphics[height=4cm]{Saphire} \\
|
|
|
|
|
\vfill
|
|
|
|
|
\@ifundefined{@module}
|
|
|
|
|
{}
|
|
|
|
|
{%
|
2019-01-23 16:21:21 +01:00
|
|
|
|
\baselineskip=2\baselineskip
|
|
|
|
|
{\LARGE \textsc{Module \@module}}\\
|
2019-01-28 13:09:26 +01:00
|
|
|
|
%\baselineskip=0.5\baselineskip
|
2019-01-09 20:45:49 +01:00
|
|
|
|
}
|
|
|
|
|
\vspace{1cm}\vfill
|
|
|
|
|
\@ifundefined{@title}
|
|
|
|
|
{}
|
|
|
|
|
{{\Huge \textbf{\@title}}}
|
|
|
|
|
\vfill
|
|
|
|
|
\@ifundefined{@author}
|
|
|
|
|
{}{%
|
|
|
|
|
{\Large
|
|
|
|
|
\underline{Un cours de :}\\ \vspace{1em}
|
|
|
|
|
\textsc{\@teacher} \\ \vspace{0.5cm}
|
|
|
|
|
\underline{Rédigé et complété par :} \\ \vspace{1em}
|
|
|
|
|
\textsc{\@author}}
|
|
|
|
|
\vfill}
|
|
|
|
|
\@ifundefined\@date{}{%
|
|
|
|
|
{\LARGE Version du \@date}
|
|
|
|
|
\vfill}
|
|
|
|
|
% \includegraphics[width=6cm]{ENSPS}
|
|
|
|
|
% \hfill
|
|
|
|
|
% \includegraphics[width=6cm]{UPS}
|
|
|
|
|
\end{titlepage}}
|
|
|
|
|
|
|
|
|
|
% pas de début de section dans la moitié inférieure d'une page
|
|
|
|
|
|
|
|
|
|
\RequirePackage{needspace}
|
|
|
|
|
|
|
|
|
|
\renewcommand{\section}{
|
|
|
|
|
\needspace{0.3\textheight}%
|
|
|
|
|
\@startsection {section}{1}{\z@}%
|
|
|
|
|
{-3.5ex \@plus -1ex \@minus -.2ex}%
|
|
|
|
|
{2.3ex \@plus.2ex}%
|
|
|
|
|
{\reset@font\Large\bfseries}}
|
|
|
|
|
\raggedbottom
|
|
|
|
|
|
|
|
|
|
\setcounter{secnumdepth}{3}
|
|
|
|
|
\renewcommand{\thesection}{\arabic{section}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
%%%%%%%%%%%%%%% BOITES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\RequirePackage{tikz,environ}
|
|
|
|
|
\tikzstyle{mybox} = [draw=black, very thick,
|
|
|
|
|
rectangle, inner sep=10pt, inner ysep=20pt]
|
|
|
|
|
\tikzstyle{fancytitle} = [draw=black, fill=white, text=black]
|
|
|
|
|
|
|
|
|
|
\NewEnviron{defin}{\par
|
|
|
|
|
\begin{center}
|
|
|
|
|
\begin{tikzpicture}
|
|
|
|
|
\node [mybox] (box){%
|
|
|
|
|
\begin{minipage}{0.8\textwidth}
|
|
|
|
|
\BODY
|
|
|
|
|
\end{minipage} };
|
|
|
|
|
\node[fancytitle, right=10pt] at (box.north west) {\textbf{Définition}};
|
|
|
|
|
\end{tikzpicture}\end{center}\par
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
% \NewEnviron{thm}{\par
|
|
|
|
|
% \begin{center}
|
|
|
|
|
% \begin{tikzpicture}
|
|
|
|
|
% \node [mybox] (box){%
|
|
|
|
|
% \begin{minipage}{0.8\textwidth}
|
|
|
|
|
% \BODY
|
|
|
|
|
% \end{minipage} };
|
|
|
|
|
% \node[fancytitle, right=10pt] at (box.north west) {\textbf{Théorème}};
|
|
|
|
|
% \end{tikzpicture}\end{center}\par
|
|
|
|
|
%}
|
|
|
|
|
|
|
|
|
|
\RequirePackage{thmbox}
|
|
|
|
|
\RequirePackage{xparse}
|
|
|
|
|
\NewDocumentEnvironment{prop}{o}{%
|
|
|
|
|
\begin{center}\begin{minipage}{0.8\textwidth}
|
|
|
|
|
\thmbox[M]{\textbf{Proposition \IfNoValueTF{#1}{}{\em (#1)}}}%
|
|
|
|
|
%\hspace*{-1.5em}%
|
|
|
|
|
}
|
|
|
|
|
{%
|
|
|
|
|
\endthmbox\vspace*{.75ex}\end{minipage}\end{center}%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
\NewDocumentEnvironment{thm}{o}{%
|
|
|
|
|
\begin{center}\begin{minipage}{0.8\textwidth}
|
|
|
|
|
\thmbox[M]{\textbf{Théorème \IfNoValueTF{#1}{}{\em (#1)}}}%
|
|
|
|
|
%\hspace*{-1.5em}%
|
|
|
|
|
}
|
|
|
|
|
{%
|
|
|
|
|
\endthmbox\vspace*{.75ex}\end{minipage}\end{center}%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\NewDocumentEnvironment{corol}{o}{%
|
|
|
|
|
\begin{center}\begin{minipage}{0.8\textwidth}
|
|
|
|
|
\thmbox[M]{\textbf{Corollaire \IfNoValueTF{#1}{}{\em (#1)}}}%
|
|
|
|
|
%\hspace*{-1.5em}%
|
|
|
|
|
}
|
|
|
|
|
{%
|
|
|
|
|
\endthmbox\vspace*{.75ex}\end{minipage}\end{center}%
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-28 13:09:26 +01:00
|
|
|
|
\NewDocumentEnvironment{lemme}{o}{%
|
2019-01-09 20:45:49 +01:00
|
|
|
|
\begin{center}\begin{minipage}{0.8\textwidth}
|
2019-01-28 13:09:26 +01:00
|
|
|
|
\thmbox[M]{\textbf{Lemme \IfNoValueTF{#1}{}{\em (#1)}}}%
|
2019-01-09 20:45:49 +01:00
|
|
|
|
%\hspace*{-1.5em}%
|
|
|
|
|
}
|
|
|
|
|
{%
|
|
|
|
|
\endthmbox\vspace*{.75ex}\end{minipage}\end{center}%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
\newenvironment{rem}{\par\textbf{Remarque: }\nopagebreak}{\par}
|
2019-01-28 13:09:26 +01:00
|
|
|
|
\newenvironment{exemple}[1][\unskip]{\par\textbf{Exemple: }\textit{#1}
|
|
|
|
|
\nopagebreak}{\par}
|
2019-01-09 20:45:49 +01:00
|
|
|
|
\newenvironment{preuve}{\par\textit{Démonstration: }\nopagebreak}{\par}
|