| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458 |
- %%
- %% This is file `polytechnique.sty',
- %% generated with the docstrip utility.
- %%
- %% The original source files were:
- %%
- %% polytechnique.dtx (with options: `package')
- %% This is a generated file.
- %%
- %% Copyright (C) 2015 by Denis Merigoux
- %%
- %% This file may be distributed and/or modified under the
- %% conditions of the LaTeX Project Public License, either
- %% version 1.2 of this license or (at your option) any later
- %% version. The latest version of this license is in:
- %%
- %% http://www.latex-project.org/lppl.txt
- %%
- %% and version 1.2 or later is part of all distributions of
- %% LaTeX version 1999/12/01 or later.
- \NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{polytechnique}
- [2016/01/17 v1.3.4, standard scientific documents layout for Ecole polytechnique (Palaiseau,France).]
- %%\CharacterTable
- %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
- %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
- %% Digits \0\1\2\3\4\5\6\7\8\9
- %% Exclamation \! Double quote \" Hash (number) \#
- %% Dollar \$ Percent \% Ampersand \&
- %% Acute accent \' Left paren \( Right paren \)
- %% Asterisk \* Plus \+ Comma \,
- %% Minus \- Point \. Solidus \/
- %% Colon \: Semicolon \; Less than \<
- %% Equals \= Greater than \> Question mark \?
- %% Commercial at \@ Left bracket \[ Backslash \\
- %% Right bracket \] Circumflex \^ Underscore \_
- %% Grave accent \` Left brace \{ Vertical bar \|
- %% Right brace \} Tilde \~}
- %%
- \DeclareOption{a4paper}{
- \PassOptionsToPackage{a4paper}{geometry}
- }
- \DeclareOption{fancysections}{
- \AtEndOfPackage{
- \titleformat{\chapter}
- [display]
- {\Huge\bfseries\sffamily}
- {\LARGE\chaptertitlename{} \thechapter}
- {0em}
- {}
- []
- \titleformat{\section}
- [display]
- {\color{rouge485}\LARGE\bfseries\sffamily\filcenter}
- {\thesection}
- {0em}
- {\MakeUppercaseWithNewline}
- [\vspace*{-0.5\baselineskip}%
- \includegraphics{\polyfiletlongrouge}]
- \titleformat{\subsection}
- [block]
- {\color{bleu315}\Large\scshape}
- {\thesubsection}
- {0.5em}
- {}
- [\vspace*{-0.3\baselineskip}%
- \includegraphics{\polyfiletcourtbleuclair}]
- \titleformat{\subsubsection}
- [block]
- {\color{bleu303}\large\scshape}
- {\thesubsubsection}
- {0.5em}
- {\textbullet{} }
- []
- }
- }
- \DeclareOption{notitlepage}{
- \renewcommand*{\maketitle}{
- \notitlepagelayout{}
- }
- }
- \DeclareOption{titlepage}{
- \renewcommand*{\maketitle}{
- \titlepagelayout{}
- }
- }
- \DeclareOption{oneside}{
- \AtEndOfPackage{
- \geometry{inner=\margecote,outer=\margecote}
- }
- }
- \DeclareOption{twoside}{
- \AtEndOfPackage{
- \geometry{inner=\margecoteinterieur,
- outer=\margecoteexterieur}
- }
- }
- \DeclareOption{sectionmark}{
- \AtEndOfPackage{
- \renewcommand{\enteteexterieur}[1]{
- \ifthesection{
- {\scshape\color{bleu303}
- \thesection{}.~\sectiontitle}
- }{
- }
- }
- }
- }
- \DeclareOption{chaptermark}{
- \AtEndOfPackage{
- \renewcommand{\enteteexterieur}[1]{
- \ifthechapter{
- {\scshape\color{bleu303}
- \thechapter{}.~\chaptertitle}
- }{
- }
- }
- }
- }
- \DeclareOption{markboth}{
- \AtEndOfPackage{
- \renewcommand{\enteteexterieurimpair}{
- \ifthesection{%Si la section a ete definie
- {\scshape\color{bleu303}
- \thesection{}.~\sectiontitle}
- }{
- }
- }
- \renewcommand{\enteteexterieurpair}{
- \ifthechapter{
- {\scshape\color{bleu303}
- \thechapter{}.~\chaptertitle}
- }{
- }
- }
- }
- }
- \DeclareOption{pagenumber}{
- \AtEndOfPackage{
- \RequirePackage{lastpage}
- \renewcommand{\piedcentre}{
- \setlength{\largeurfiletpiedcentre}
- {2\largeurfiletpiedcentre}
- \textcolor{bleu303}{\shortstack[c]{
- \rule{\largeurfiletpiedcentre}{0.3mm}\\
- \thepage/\pageref{LastPage}}}
- }
- }
- }
- \DeclareOption*{
- \PassOptionsToPackage{\CurrentOption}{geometry}
- }
- \ExecuteOptions{a4paper,notitlepage,oneside}
- \ProcessOptions*
- \RequirePackage{calc}
- \RequirePackage{xcolor}
- \RequirePackage{geometry}
- \RequirePackage{graphicx}
- \RequirePackage{ifthen}
- \RequirePackage{ifpdf}
- \RequirePackage{lmodern}
- \RequirePackage[pagestyles]{titlesec}
- \definecolor{bleu303}{RGB}{0,62,92}
- \colorlet{bleu303pale}{bleu303!20!white}
- \definecolor{rouge485}{RGB}{213,43,30}
- \definecolor{bleu315}{RGB}{0,104,128}
- \ifpdf
- \newcommand{\polyfiletlongrouge}
- {polytechnique-filetlongrouge.pdf}
- \newcommand{\polyfiletcourt}
- {polytechnique-filetcourt.pdf}
- \let\polyfiletcourtbleuclair\polyfiletcourt
- \let\polyfiletcourtbleu\polyfiletcourt
- \newcommand{\polylogovert}
- {polytechnique-logovert.pdf}
- \newcommand{\polylogohori}
- {polytechnique-logohori.pdf}
- \newcommand{\polyarmes}
- {polytechnique-armes.pdf}
- \else
- \newcommand{\polyfiletlongrouge}
- {polytechnique-filetlongrouge.eps}
- \newcommand{\polyfiletcourtbleuclair}
- {polytechnique-filetcourtbleuclair.eps}
- \newcommand{\polyfiletcourtbleu}
- {polytechnique-filetcourtbleu.eps}
- \newcommand{\polylogovert}
- {polytechnique-logovert.eps}
- \newcommand{\polylogohori}
- {polytechnique-logohori.eps}
- \newcommand{\polyarmes}
- {polytechnique-armes.eps}
- \fi
- \newlength{\margehaut}
- \setlength{\margehaut}{40mm}
- \newlength{\hauteurentete}
- \setlength{\hauteurentete}{27mm}
- \newlength{\separationentete}
- \setlength{\separationentete}{12mm}
- \newlength{\margecote}
- \setlength{\margecote}{20mm}
- \newlength{\margecoteinterieur}
- \setlength{\margecoteinterieur}{22.5mm}
- \newlength{\margecoteexterieur}
- \setlength{\margecoteexterieur}{17.5mm}
- \newlength{\margebas}
- \setlength{\margebas}{35mm}
- \newlength{\separationpied}
- \setlength{\separationpied}{17.5mm}
- \newlength{\hauteurlogohori}
- \setlength{\hauteurlogohori}{15mm}
- \newlength{\separationtitre}
- \setlength{\separationtitre}{15mm}
- \newlength{\epaisseurtrait}
- \setlength{\epaisseurtrait}{1pt}
- \newlength{\separationlignestitre}
- \setlength{\separationlignestitre}{3mm}
- \newlength{\separationtitrecorps}
- \setlength{\separationtitrecorps}{15mm}
- \newlength{\hauteurlogopage}
- \setlength{\hauteurlogopage}{0.6\textheight}
- \newlength{\separationentetelogo}
- \setlength{\separationentetelogo}{20mm}
- \newlength{\largeurfiletpiedcentre}
- \setlength{\largeurfiletpiedcentre}{4mm}
- \newlength{\largeurlogovert}
- \setlength{\largeurlogovert}{\paperwidth/\real{7}}
- \newlength{\hauteurlogovert}
- \setlength{\hauteurlogovert}{\largeurlogovert*\real{1.361}}
- \newlength{\largeurlogohori}
- \setlength{\largeurlogohori}{\hauteurlogohori*\real{1.859}}
- \newlength{\distancetitrelogo}
- \setlength{\distancetitrelogo}{\separationtitre-\margehaut}
- \newlength{\separationlogotrait}
- \setlength{\separationlogotrait}{-\baselineskip*2+10mm}
- \newlength{\largeurminipage}
- \setlength{\largeurminipage}
- {(\textwidth-\largeurlogovert-0.5cm)/\real{2}}
- \newlength{\distancetitrecorps}
- \setlength{\distancetitrecorps}
- {\separationtitrecorps-\baselineskip*2}
- \newlength{\largeurtitreentete}
- \setlength{\largeurtitreentete}{\textwidth-\largeurlogohori
- -\separationentetelogo}
- \newlength{\decalageverticalentete}
- \setlength{\decalageverticalentete}
- {\hauteurlogohori/\real{2.6}}
- \geometry{
- top=\margehaut,headheight=\hauteurentete,
- headsep=\separationentete,
- bottom=\margebas,footskip=\separationpied
- }
- \newcommand{\piedcentre}{
- \textcolor{bleu303}{\shortstack[c]
- {\rule{\largeurfiletpiedcentre}{0.3mm}\\\thepage}}
- }
- \newcommand{\enteteexterieur}[1]{
- {\begin{minipage}[b]{\largeurtitreentete}
- \scshape#1\textcolor{bleu303}
- \polytitrecourtsave
- \end{minipage}}
- }
- \newcommand{\enteteinterieur}[2][bleu303]{
- {%
- \color{#1}%
- \includegraphics[height=\hauteurlogohori,width=2\largeurlogohori,keepaspectratio]{#2}%
- }%
- }
- \newcommand{\enteteexterieurpair}{
- \enteteexterieur{\flushright}
- }
- \newcommand{\enteteexterieurimpair}{
- \enteteexterieur{}
- }
- \newcommand{\enteteinterieurpair}{
- \enteteinterieur{\polylogohori}
- }
- \newcommand{\enteteinterieurimpair}{
- \enteteinterieur{\polylogohori}
- }
- \newcommand{\entetes}{
- \newpagestyle{polytechnique}{
- \sethead[\raisebox{.5\hauteurlogohori}{\raisebox{-0.5\height}{\enteteinterieurpair}}]% left even
- []% center even
- [\raisebox{.5\hauteurlogohori}{\raisebox{-0.5\height}{\enteteexterieurpair}}]% right even
- {\raisebox{.5\hauteurlogohori}{\raisebox{-0.5\height}{\enteteexterieurimpair}}}% left odd
- {}% center odd
- {\raisebox{.5\hauteurlogohori}{\raisebox{-0.5\height}{\enteteinterieurimpair}}}% right odd
- \setfoot{}% left odd
- {\piedcentre}% center odd
- {}% right odd
- }
- \pagestyle{polytechnique}
- }
- \renewpagestyle{plain}{
- \sethead{}% left
- {}% center
- {}% right
- \setfoot{}% left
- {\piedcentre}% center
- {}% right
- }
- \pagestyle{plain}
- \newboolean{subtitle}\setboolean{subtitle}{false}
- \newcommand{\polysoustitresave}{}
- \def\subtitle{}
- \renewcommand*{\subtitle}[1]{
- \renewcommand*{\polysoustitresave}{#1}
- \setboolean{subtitle}{true}
- }
- \newcommand{\polytitresave}{}
- \newcommand{\polytitrecourtsave}{}
- \renewcommand*{\title}[2][{}]{
- \renewcommand*{\polytitresave}{#2}
- \ifthenelse{\equal{#1}{}}{
- \renewcommand*{\polytitrecourtsave}{#2}
- }{
- \renewcommand*{\polytitrecourtsave}{#1}
- }
- \entetes
- }
- \newcommand{\polyauthorsave}{}
- \renewcommand*{\author}[1]{
- \renewcommand*{\polyauthorsave}{#1}
- }
- \newcommand{\polydatesave}{\today}
- \renewcommand*{\date}[1]{
- \renewcommand*{\polydatesave}{#1}
- }
- \newcommand{\logo}[2][{}]{
- \ifthenelse{\equal{#1}{headers}}{
- \renewcommand{\enteteinterieurimpair}{
- \enteteinterieur{#2}
- }
- }{}
- \renewcommand{\titlepagebottomline}{
- \begin{minipage}{5\largeurlogohori}
- \centering
- \raisebox{-0.5\height}{
- \color{bleu303}
- \includegraphics[width=1.5\largeurlogohori]
- {\polylogohori}
- }
- \hspace{0.25\largeurlogohori}
- \raisebox{-0.5\height}{
- \includegraphics[height=\hauteurlogovert,
- width=1.5\largeurlogohori,
- keepaspectratio]{#2}
- }
- \end{minipage}
- }
- \renewcommand{\notitlepageupperline}{
- \noindent%
- \begin{minipage}{\textwidth}
- \centering
- \begin{minipage}{0.33\textwidth}
- \raisebox{-0.5\height}
- {\color{bleu303}%
- \includegraphics[width=\largeurlogovert]
- {\polylogovert}
- }
- \end{minipage}%
- % \end{macrocode}
- \begin{minipage}{0.33\textwidth}
- \color{bleu303}%
- \centering\polydatesave{}\\
- \polyauthorsave{}\\
- \includegraphics{\polyfiletcourtbleu}
- \end{minipage}%
- \begin{minipage}{0.33\textwidth}
- \color{bleu303}%
- \flushright\raisebox{-0.5\height}
- {\includegraphics[height=\hauteurlogovert,
- width=1.75\largeurlogohori,
- keepaspectratio]{#2}
- }
- \end{minipage}
- \end{minipage}
- }
- }
- \newcommand{\notitlepageupperline}{
- \noindent
- \begin{minipage}[b]{\largeurminipage}
- \color{bleu303}%
- \hspace{0cm}\polyauthorsave
- \end{minipage}%
- \hspace*{\fill}
- {\color{bleu303}%
- \includegraphics[width=\largeurlogovert]{\polylogovert}}
- \hspace*{\fill}%
- \begin{minipage}[b]{\largeurminipage}
- \color{bleu303}%
- \flushright\hspace{0cm}\polydatesave
- \end{minipage}%
- }
- \newcommand{\notitlepagelayout}{
- \thispagestyle{plain}
- \vspace*{\distancetitrelogo}
- \notitlepageupperline{}
- \\[\separationlogotrait]
- \begin{center}
- \textcolor{bleu303}
- {\rule{\textwidth}{\epaisseurtrait}}
- \\
- \color{bleu303}\Huge\scshape
- \MakeUppercaseWithNewline{\polytitresave}
- \ifthenelse{\boolean{subtitle}}{
- \\[\separationlignestitre]
- \Large\upshape\polysoustitresave\\\normalsize
- }{
- \\
- \normalsize
- }
- \textcolor{bleu303}
- {\rule{\textwidth}{\epaisseurtrait}}
- \end{center}
- \vspace*{\distancetitrecorps}
- }
- \newcommand{\titlepagebottomline}{
- \includegraphics[height=\hauteurlogovert]{\polylogovert}
- }
- \newcommand{\titlepagelayout}{
- \noindent\makebox[\textwidth][c]{%
- \raisebox{-\totalheight}[0pt][0pt]{%
- \color{bleu303pale}%
- \includegraphics[height=\hauteurlogopage]{\polyarmes}}}
- \vspace*{0.125\textheight}
- \begin{center}
- \Huge\sffamily\bfseries\color{bleu303}
- \MakeUppercaseWithNewline{\polytitresave}\\
- \vspace*{0.2\textheight}
- \LARGE\hspace{0cm}\polysoustitresave\\
- \vspace*{0.15\textheight}
- \Large\mdseries\hspace{0cm}\polydatesave\\
- \includegraphics{\polyfiletcourtbleu}
- \\[0.4\baselineskip]
- \rmfamily\hspace{0cm}\polyauthorsave\\[\fill]
- $\;$\titlepagebottomline{}
- \vspace*{-0.5\margebas}
- \end{center}
- \thispagestyle{empty}
- \clearpage
- }
- \newcommand{\MakeUppercaseWithNewline}[1]{
- \begingroup
- \let\SavedOrgNewline\\%
- \DeclareRobustCommand{\\}{\SavedOrgNewline}%
- \MakeUppercase{#1}%
- \endgroup
- }
- \endinput
- %%
- %% End of file `polytechnique.sty'.
|