Clean code: change comments.
This commit is contained in:
parent
9421778f04
commit
bce0884381
@ -12,24 +12,29 @@
|
|||||||
prof ou élève, V1.0]
|
prof ou élève, V1.0]
|
||||||
|
|
||||||
|
|
||||||
|
%
|
||||||
%-- classe de base
|
%
|
||||||
|
% INIT
|
||||||
|
%
|
||||||
|
%
|
||||||
\LoadClass[a4paper, 12pt, DIV=24]{scrartcl}
|
\LoadClass[a4paper, 12pt, DIV=24]{scrartcl}
|
||||||
%\LoadClass[a4paper, 12pt]{article}
|
|
||||||
%--%
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%-- PACKAGES
|
%
|
||||||
% PERSONNELLES
|
%
|
||||||
% commun: contient des définitions et extensions de base pour tout.
|
% PACKAGES
|
||||||
|
%
|
||||||
|
%
|
||||||
|
|
||||||
|
% Own packages. Those contains some global settings and definitions.
|
||||||
\RequirePackage{commun}
|
\RequirePackage{commun}
|
||||||
\RequirePackage{shortcuts}
|
\RequirePackage{shortcuts}
|
||||||
|
|
||||||
% sortie
|
% output
|
||||||
\RequirePackage{comment}
|
\RequirePackage{comment}
|
||||||
|
|
||||||
% mise en page
|
% layout
|
||||||
\RequirePackage{geometry}
|
\RequirePackage{geometry}
|
||||||
\RequirePackage[footsepline, plainfootsepline]{scrlayer-scrpage}
|
\RequirePackage[footsepline, plainfootsepline]{scrlayer-scrpage}
|
||||||
\RequirePackage{titling}
|
\RequirePackage{titling}
|
||||||
@ -37,50 +42,24 @@
|
|||||||
\RequirePackage{pageslts}
|
\RequirePackage{pageslts}
|
||||||
\RequirePackage{enumitem}
|
\RequirePackage{enumitem}
|
||||||
\RequirePackage[]{hyperref}
|
\RequirePackage[]{hyperref}
|
||||||
%--%
|
|
||||||
|
|
||||||
|
|
||||||
\makeatletter
|
\makeatletter
|
||||||
|
|
||||||
%-- SETTINGS
|
|
||||||
% metapost
|
|
||||||
\ifpdf
|
|
||||||
\DeclareGraphicsRule{*}{mps}{*}{}
|
|
||||||
\fi
|
|
||||||
|
|
||||||
% tkz
|
|
||||||
\usetkzobj{all} % on charge tous les objets
|
|
||||||
|
|
||||||
% format de la page
|
%
|
||||||
\geometry{a4paper, includeheadfoot, hmargin=.7cm, vmargin=.5cm, head=14.5pt}
|
%
|
||||||
|
% FIXES
|
||||||
|
%
|
||||||
|
%
|
||||||
|
|
||||||
% titre, en-tête, pied de page
|
% Fix error from KOMA-Script scrartcl class.
|
||||||
% fancyhdr version (need \RequirePackage{fancyhdr})
|
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
|
||||||
%\pagestyle{fancy}
|
|
||||||
%\fancyhf{}
|
|
||||||
%\rhead{Cours - \@title}
|
|
||||||
%\cfoot{\thepage\ /\ \pageref{LastPage}}
|
|
||||||
%\renewcommand{\headrulewidth}{0pt}
|
|
||||||
%\renewcommand{\footrulewidth}{.4pt}
|
|
||||||
|
|
||||||
% KOMA-Script version (preferred)
|
% Fix for mdframed package see :
|
||||||
\ohead{}
|
% http://tex.stackexchange.com/questions/179790/mdframed-how-to-change-the-separator-between-the-label-and-the-title-of-a-non-n#179794
|
||||||
\rohead[Cours]{Cours - \@title}
|
|
||||||
\cofoot*{\thepage\ /\ \pageref{LastPage}}
|
|
||||||
\pagestyle{scrheadings}
|
|
||||||
\setkomafont{pagehead}{\normalfont\bfseries}
|
|
||||||
\setkomafont{pagefoot}{\normalfont}
|
|
||||||
|
|
||||||
% (sub)sections
|
|
||||||
% \titleformat{\section}[block]{\sffamily\bfseries\Large}{\thesection.}{.5em}{}[]
|
|
||||||
% \titleformat{\subsection}[block]{\sffamily\bfseries\large\hspace{2em}}{\thesubsection)}{.5em}{}[]
|
|
||||||
% \renewcommand \thesection{\Roman{section}}
|
|
||||||
% \renewcommand \thesubsection{\arabic{subsection}}
|
|
||||||
|
|
||||||
% paths
|
|
||||||
\graphicspath{{images/}}
|
|
||||||
|
|
||||||
% mdframed
|
|
||||||
% Fix for package see : http://tex.stackexchange.com/questions/179790/mdframed-how-to-change-the-separator-between-the-label-and-the-title-of-a-non-n#179794
|
|
||||||
\DeclareDocumentCommand{\mdtheorem}{ O{} m o m o }%
|
\DeclareDocumentCommand{\mdtheorem}{ O{} m o m o }%
|
||||||
{\ifcsdef{#2}%
|
{\ifcsdef{#2}%
|
||||||
{\mdf@PackageWarning{Environment #2 already exits\MessageBreak}}%
|
{\mdf@PackageWarning{Environment #2 already exits\MessageBreak}}%
|
||||||
@ -168,6 +147,59 @@
|
|||||||
}%
|
}%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%
|
||||||
|
%
|
||||||
|
% SETTINGS
|
||||||
|
%
|
||||||
|
%
|
||||||
|
|
||||||
|
% metapost
|
||||||
|
\ifpdf
|
||||||
|
\DeclareGraphicsRule{*}{mps}{*}{}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
% tkz
|
||||||
|
\usetkzobj{all} % on charge tous les objets
|
||||||
|
|
||||||
|
% sizing of the page
|
||||||
|
\geometry{a4paper, includeheadfoot, hmargin=.7cm, vmargin=.5cm, head=14.5pt}
|
||||||
|
|
||||||
|
% title, header and footer
|
||||||
|
|
||||||
|
% KOMA-Script version (preferred)
|
||||||
|
\ohead{}
|
||||||
|
\rohead[Cours]{Cours - \@title}
|
||||||
|
\cofoot*{\thepage\ /\ \pageref{LastPage}}
|
||||||
|
\pagestyle{scrheadings}
|
||||||
|
\setkomafont{pagehead}{\normalfont\bfseries}
|
||||||
|
\setkomafont{pagefoot}{\normalfont}
|
||||||
|
|
||||||
|
%-------------------------------------
|
||||||
|
% fancyhdr version (need \RequirePackage{fancyhdr} and class article)
|
||||||
|
%\pagestyle{fancy}
|
||||||
|
%\fancyhf{}
|
||||||
|
%\rhead{Cours - \@title}
|
||||||
|
%\cfoot{\thepage\ /\ \pageref{LastPage}}
|
||||||
|
%\renewcommand{\headrulewidth}{0pt}
|
||||||
|
%\renewcommand{\footrulewidth}{.4pt}
|
||||||
|
%-------------------------------------
|
||||||
|
|
||||||
|
%---------------------------------------------------------------------
|
||||||
|
% (sub)sections
|
||||||
|
% \titleformat{\section}[block]{\sffamily\bfseries\Large}{\thesection.}{.5em}{}[]
|
||||||
|
% \titleformat{\subsection}[block]{\sffamily\bfseries\large\hspace{2em}}{\thesubsection)}{.5em}{}[]
|
||||||
|
% \renewcommand \thesection{\Roman{section}}
|
||||||
|
% \renewcommand \thesubsection{\arabic{subsection}}
|
||||||
|
%---------------------------------------------------------------------
|
||||||
|
|
||||||
|
% paths
|
||||||
|
\graphicspath{{images/}}
|
||||||
|
|
||||||
|
% mdframed
|
||||||
|
|
||||||
|
|
||||||
% global options
|
% global options
|
||||||
\mdfsetup{
|
\mdfsetup{
|
||||||
frametitlealignment=\raggedright,%
|
frametitlealignment=\raggedright,%
|
||||||
@ -240,21 +272,6 @@
|
|||||||
frametitlebackgroundcolor=white!0,%innertopmargin=\topskip,%
|
frametitlebackgroundcolor=white!0,%innertopmargin=\topskip,%
|
||||||
nobreak=true,%
|
nobreak=true,%
|
||||||
xcolor,%
|
xcolor,%
|
||||||
%hidealllines=true, leftline=true, % topline=true, bottomline=true,%
|
|
||||||
% shadow=true,%
|
|
||||||
% backgroundcolor=gray!40,% FOR TEST ONLY
|
|
||||||
% firstextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
|
||||||
% node[symbol] { \faLightbulbO };
|
|
||||||
% },%
|
|
||||||
% secondextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
|
||||||
% node[symbol] { \faLightbulbO };
|
|
||||||
% },%
|
|
||||||
% middleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
|
||||||
% node[symbol] { \faLightbulbO };
|
|
||||||
% },%
|
|
||||||
% singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,-.4)+1.0*(0,\y1)$)
|
|
||||||
% node[symbol] { \faLightbulbO };
|
|
||||||
% },%
|
|
||||||
}
|
}
|
||||||
% quote: frame with no borders but with a beginning quote at upper left and
|
% quote: frame with no borders but with a beginning quote at upper left and
|
||||||
% an ending quote at lower right
|
% an ending quote at lower right
|
||||||
@ -417,6 +434,14 @@
|
|||||||
\mdtheorem[style=todo, theoremseparator={}, theoremspace={}]{appn}{}
|
\mdtheorem[style=todo, theoremseparator={}, theoremspace={}]{appn}{}
|
||||||
\mdtheorem[style=method, theoremseparator={ -}, theoremspace={}]{met}{Méthode}
|
\mdtheorem[style=method, theoremseparator={ -}, theoremspace={}]{met}{Méthode}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%
|
||||||
|
%
|
||||||
|
% MACROS
|
||||||
|
%
|
||||||
|
%
|
||||||
|
|
||||||
% Redirect all standard previously defined environments to their starred version
|
% Redirect all standard previously defined environments to their starred version
|
||||||
% as they don't display numbering.
|
% as they don't display numbering.
|
||||||
\RenewDocumentEnvironment{déf}{ o } {%begin
|
\RenewDocumentEnvironment{déf}{ o } {%begin
|
||||||
@ -579,14 +604,6 @@
|
|||||||
\end{met*}
|
\end{met*}
|
||||||
}
|
}
|
||||||
|
|
||||||
%--%
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% Fix error from KOMA-Script scrartcl class.
|
|
||||||
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
|
|
||||||
|
|
||||||
%-- Macros personnelles
|
|
||||||
% titre
|
% titre
|
||||||
\NewDocumentCommand \titre { G{Titre} G{Sous-titre} } {%
|
\NewDocumentCommand \titre { G{Titre} G{Sous-titre} } {%
|
||||||
\setlength{\droptitle}{-2cm}
|
\setlength{\droptitle}{-2cm}
|
||||||
@ -596,9 +613,8 @@
|
|||||||
\maketitle
|
\maketitle
|
||||||
}
|
}
|
||||||
|
|
||||||
% commandes
|
|
||||||
% \partie | \sspartie
|
% \partie | \sspartie
|
||||||
% definie un titre pour une (sous)section
|
% Define a (sub)section title.
|
||||||
\titleformat{\section}[block]{\sffamily\bfseries\Large}{\thesection.}{.5em}{}[]
|
\titleformat{\section}[block]{\sffamily\bfseries\Large}{\thesection.}{.5em}{}[]
|
||||||
\titleformat{\subsection}[block]{\sffamily\bfseries\large\hspace{2em}}{\thesubsection)}{.5em}{}[]
|
\titleformat{\subsection}[block]{\sffamily\bfseries\large\hspace{2em}}{\thesubsection)}{.5em}{}[]
|
||||||
\renewcommand \thesection{\Roman{section}}
|
\renewcommand \thesection{\Roman{section}}
|
||||||
@ -620,7 +636,6 @@
|
|||||||
\subsection{#1}
|
\subsection{#1}
|
||||||
}
|
}
|
||||||
|
|
||||||
%-- %
|
|
||||||
|
|
||||||
|
|
||||||
\makeatother
|
\makeatother
|
||||||
|
Loading…
x
Reference in New Issue
Block a user