2016-03-22 11:49:55 +00:00
|
|
|
%%%
|
|
|
|
%%%
|
|
|
|
%%% Extensions : commun.sty
|
|
|
|
%%% Version : 1.0
|
|
|
|
%%% Date : 03/05/15
|
2016-08-11 16:04:08 +00:00
|
|
|
%%%
|
|
|
|
%%% Version : 2.0
|
|
|
|
%%% Date : 11/08/16
|
|
|
|
%%% Mods : Change some packages call to be compatible with LuaLaTeX
|
|
|
|
%%%
|
2016-03-22 11:49:55 +00:00
|
|
|
%%% Auteur : Jeff LANCE
|
|
|
|
%%%
|
|
|
|
%%%
|
|
|
|
|
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
2017-03-19 15:23:56 +00:00
|
|
|
\ProvidesPackage{commun}[2015/05/03 Ensembles d'environnements et de fonctions
|
|
|
|
utilisables partout, v2.0]
|
2016-03-22 11:49:55 +00:00
|
|
|
|
|
|
|
|
2017-03-19 17:05:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
%-- PACKAGES CALLS
|
2016-08-12 10:41:05 +00:00
|
|
|
% programmation
|
|
|
|
\RequirePackage{xifthen}
|
|
|
|
\RequirePackage{ifmtarg}
|
|
|
|
\RequirePackage{ifpdf}
|
|
|
|
\RequirePackage{xstring}
|
|
|
|
\RequirePackage{multido}
|
|
|
|
\RequirePackage{xparse}
|
|
|
|
\RequirePackage{etoolbox}
|
|
|
|
\RequirePackage{ifluatex}
|
2016-09-27 09:55:38 +00:00
|
|
|
\RequirePackage{import}
|
2016-08-12 10:41:05 +00:00
|
|
|
|
2016-08-12 09:48:12 +00:00
|
|
|
% langue
|
2016-08-12 10:41:05 +00:00
|
|
|
\ifluatex
|
2016-08-12 10:42:40 +00:00
|
|
|
\RequirePackage{polyglossia} % => babel
|
|
|
|
\setdefaultlanguage{french} % => inputenc
|
2016-08-13 10:49:10 +00:00
|
|
|
\RequirePackage{luatextra} % charge fontspec => fontenc
|
2016-08-14 20:02:30 +00:00
|
|
|
\defaultfontfeatures{Ligatures=TeX}
|
2016-08-12 10:41:05 +00:00
|
|
|
\else
|
2016-09-27 09:55:38 +00:00
|
|
|
\RequirePackage[francais]{babel} % => polyglossia
|
|
|
|
\RequirePackage[utf8]{inputenc} % => fontspec
|
2016-08-12 10:42:40 +00:00
|
|
|
\RequirePackage[T1]{fontenc} % => fontspec
|
2016-08-12 10:41:05 +00:00
|
|
|
\fi
|
2016-08-11 16:04:08 +00:00
|
|
|
|
2016-08-12 09:48:12 +00:00
|
|
|
% polices
|
2016-03-22 11:49:55 +00:00
|
|
|
\RequirePackage{libertine}
|
2016-08-12 09:48:12 +00:00
|
|
|
\RequirePackage{pifont}
|
|
|
|
\RequirePackage{fontawesome}
|
2016-03-22 11:49:55 +00:00
|
|
|
\RequirePackage{eurosym}
|
|
|
|
\RequirePackage{bbding}
|
2016-08-12 09:48:12 +00:00
|
|
|
|
2016-08-12 10:41:05 +00:00
|
|
|
% couleur, dessin
|
2016-08-13 10:49:10 +00:00
|
|
|
\ifluatex
|
|
|
|
\RequirePackage{luacolor}
|
|
|
|
\fi
|
2016-04-07 20:21:19 +00:00
|
|
|
\RequirePackage{xcolor}
|
2016-05-10 12:22:19 +00:00
|
|
|
\RequirePackage[framemethod=tikz]{mdframed}
|
2016-06-12 16:12:47 +00:00
|
|
|
\RequirePackage{graphicx}
|
2017-03-02 00:19:30 +00:00
|
|
|
\RequirePackage{transparent}
|
2016-03-22 11:49:55 +00:00
|
|
|
|
|
|
|
% maths
|
|
|
|
\RequirePackage{amsmath}
|
|
|
|
\RequirePackage{amssymb}
|
|
|
|
\RequirePackage{tkz-euclide}
|
2016-12-28 01:19:41 +00:00
|
|
|
\usetikzlibrary{shadows}
|
2016-03-22 11:49:55 +00:00
|
|
|
\RequirePackage{calc}
|
|
|
|
\RequirePackage{pgfplots}
|
2016-08-13 23:34:31 +00:00
|
|
|
\RequirePackage{siunitx}
|
2016-03-22 11:49:55 +00:00
|
|
|
\RequirePackage{asymptote}
|
2016-05-28 21:16:55 +00:00
|
|
|
\RequirePackage{mathrsfs}
|
2016-03-22 11:49:55 +00:00
|
|
|
|
|
|
|
% tableau
|
|
|
|
\RequirePackage{array}
|
|
|
|
\RequirePackage{tabularx}
|
2016-05-11 12:58:49 +00:00
|
|
|
\RequirePackage{multicol}
|
2017-02-17 17:27:18 +00:00
|
|
|
\RequirePackage{boldline}
|
2016-03-23 14:24:40 +00:00
|
|
|
|
2016-08-16 15:17:16 +00:00
|
|
|
% mise en page
|
|
|
|
\RequirePackage{varwidth}
|
2016-12-14 17:37:20 +00:00
|
|
|
\RequirePackage{adjustbox}
|
2017-03-19 17:05:13 +00:00
|
|
|
%-----------------
|
2016-03-22 11:49:55 +00:00
|
|
|
|
2017-02-17 15:27:44 +00:00
|
|
|
\makeatletter
|
2016-03-22 11:49:55 +00:00
|
|
|
|
2016-05-12 19:55:28 +00:00
|
|
|
|
|
|
|
|
2016-03-22 11:49:55 +00:00
|
|
|
|
2017-03-19 17:05:13 +00:00
|
|
|
%-- NEW COMMANDS
|
|
|
|
|
|
|
|
|
|
|
|
%%% TABLEAU %%%
|
|
|
|
% Commandes d'alignement du contenu dans la colonne de largeur <largeur>.
|
2016-09-30 22:48:12 +00:00
|
|
|
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
|
|
|
|
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
|
|
|
|
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
|
2016-03-22 11:49:55 +00:00
|
|
|
%% lh{largeur} : gauche - haut
|
|
|
|
%\newcolumntype{lh}[1]{>{\raggedright}p{#1}}
|
|
|
|
%% ch{largeur} : centre - haut
|
|
|
|
%\newcolumntype{ch}[1]{>{\centering\arraybackslash}p{#1}}
|
|
|
|
%% rh{largeur} : droite - haut
|
|
|
|
%\newcolumntype{rh}[1]{>{\raggedleft}p{#1}}
|
|
|
|
%% lc{largeur} : gauche - centre
|
|
|
|
%\newcolumntype{lc}[1]{>{\raggedright}m{#1}}
|
|
|
|
%% cc{largeur} : centre - centre
|
2016-09-30 22:48:12 +00:00
|
|
|
% \newcolumntype{M}[1]{ >{\centering\arraybackslash} m{#1} }
|
2016-03-22 11:49:55 +00:00
|
|
|
%% rc{largeur} : droite - centre
|
|
|
|
%\newcolumntype{rc}[1]{>{\raggedleft}m{#1}}
|
|
|
|
%% lb{largeur} : gauche - bas
|
|
|
|
%\newcolumntype{lb}[1]{>{\raggedright}b{#1}}
|
|
|
|
%% cb{largeur} : centre - bas
|
|
|
|
%\newcolumntype{cb}[1]{>{\centering}b{#1}}
|
|
|
|
%% rb{largeur} : droite - bas
|
|
|
|
%\newcolumntype{rb}[1]{>{\raggedleft}b{#1}}
|
2016-03-23 14:24:40 +00:00
|
|
|
|
2017-03-19 17:05:13 +00:00
|
|
|
% Item dans tableau
|
2016-08-29 21:06:06 +00:00
|
|
|
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
|
2017-03-19 17:05:13 +00:00
|
|
|
%%%%%%%%%%%%%%%
|
2016-04-07 20:21:19 +00:00
|
|
|
|
2017-03-19 17:05:13 +00:00
|
|
|
|
|
|
|
%%% TEXTE %%%
|
|
|
|
% \hcancel[color][size]{text}
|
|
|
|
% Barrer du texte avec la couleur color et l'épaisseur size.
|
2016-04-07 20:21:19 +00:00
|
|
|
\newcommand\hcancel[2][black]{
|
|
|
|
\setbox0=\hbox{$#2$}%
|
|
|
|
\rlap{\raisebox{.45\ht0}{\textcolor{#1}{\rule{\wd0}{2pt}}}}#2
|
|
|
|
}
|
|
|
|
% \NewDocumentCommand \hcancel { O{black} O{1pt} } {
|
|
|
|
% \setbox0=\hbox{$#3$}%
|
|
|
|
% \rlap{\raisebox{.45\ht0}{\textcolor{#1}{\rule{\wd0}{#2}}}} {#3}
|
|
|
|
% }
|
2016-05-10 19:16:31 +00:00
|
|
|
|
2017-03-19 17:05:13 +00:00
|
|
|
% \circled{text}
|
|
|
|
% Texet encerclé
|
|
|
|
\newcommand*\circled[1]{
|
|
|
|
\tikz[baseline=(char.base)]{
|
|
|
|
\node[shape=circle,draw,inner sep=2pt] (char) {#1};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
|
|
|
|
%%% POLICES %%%
|
2017-03-18 20:34:36 +00:00
|
|
|
\newfontfamily\Annie[Ligatures=TeX]{Annie Use Your Telescope}
|
|
|
|
\newfontfamily\Architects[Ligatures=TeX]{Architects Daughter}
|
2017-03-19 15:21:14 +00:00
|
|
|
\newfontfamily\Bristol[Ligatures=TeX]{Bristol}
|
|
|
|
\newfontfamily\Comic[Ligatures=TeX]{Comic Sans MS}
|
2017-03-18 20:34:36 +00:00
|
|
|
\newfontfamily\Delius[Ligatures=TeX]{Delius}
|
|
|
|
\newfontfamily\DeliusSC[Ligatures=TeX]{Delius Swash Caps}
|
2017-03-19 15:21:14 +00:00
|
|
|
\newfontfamily\FingerPaint[Ligatures=TeX]{Finger Paint}
|
|
|
|
\newfontfamily\Handlee[Ligatures=TeX]{Handlee}
|
|
|
|
\newfontfamily\Julee[Ligatures=TeX]{Julee}
|
2017-03-18 20:34:36 +00:00
|
|
|
\newfontfamily\NixieOne[Ligatures=TeX]{Nixie One}
|
2017-03-19 15:21:14 +00:00
|
|
|
\newfontfamily\PenguinAttack[Ligatures=TeX]{PenguinAttack}
|
2017-03-01 17:43:39 +00:00
|
|
|
\newfontfamily\PokemonHollow[Ligatures=TeX]{Pokemon Hollow}
|
|
|
|
\newfontfamily\PokemonSolid[Ligatures=TeX]{Pokemon Solid}
|
2017-03-01 17:42:14 +00:00
|
|
|
\newfontfamily\ScratchedLetters[Ligatures=TeX]{Scratched Letters}
|
2016-08-16 15:17:16 +00:00
|
|
|
% tentative pour une commande généraliste
|
|
|
|
% \NewDocumentCommand \setFont { O{\familydefault} O{\encodingdefault} }{%
|
|
|
|
% \fontencoding{#2}%
|
|
|
|
% \fontfamily{#1}%
|
|
|
|
% \selectfont
|
|
|
|
% }
|
2017-03-19 17:05:13 +00:00
|
|
|
%%%%%%%%%%%%%%%
|
2017-01-03 22:55:55 +00:00
|
|
|
|
2017-01-04 18:34:35 +00:00
|
|
|
|
2017-03-19 17:05:13 +00:00
|
|
|
%%% COULEURS %%%
|
2017-03-19 15:21:14 +00:00
|
|
|
% \newColorCommand{color}
|
|
|
|
% Create a macro which can be accessed with the name "\color".
|
|
|
|
% This macro make the following text to be colored in color.
|
|
|
|
\newcommand\newColorCommand[1]{%
|
|
|
|
\expandafter\newcommand\csname #1\endcsname{\color{#1}}}
|
|
|
|
|
|
|
|
% Create new color commands
|
|
|
|
\newColorCommand{red}
|
|
|
|
\newColorCommand{white}
|
2017-03-19 17:05:13 +00:00
|
|
|
%%%%%%%%%%%%%%%%
|
|
|
|
|
2017-03-19 17:09:37 +00:00
|
|
|
|
2017-03-19 17:05:13 +00:00
|
|
|
%---------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%-- MODIFIED COMMANDS
|
|
|
|
|
|
|
|
%--------------------
|
|
|
|
|
2016-03-22 11:49:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\makeatother
|