|
27c11f3478
|
Set the color vars for section and subsection to debianred and lapislazuli.
|
2017-08-24 18:41:50 +02:00 |
|
|
36cefe7310
|
Deactivate the options treatment as they're will be set with templates.
|
2017-08-24 18:40:37 +02:00 |
|
|
342d138239
|
Change default color option options of the class.
|
2017-08-24 18:38:09 +02:00 |
|
|
c1ab3c58af
|
%%%
%%%
%%% Classe : cours_beamer.cls
%%% Version : 1.6
%%% Date : 08/12/14
%%% Auteur : Jeff LANCE
%%%
%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{cours_beamer}[2014/12/08 Beamer de cours, v1.6]
%-- PARENT CLASS
% inutile de passer l'option [utf8] puisque chargee dans commun.sty
\LoadClassWithOptions{beamer}
%---------------
%-- PACKAGES CALLS
% perso
\RequirePackage{couleurs}
\RequirePackage{commun}
\RequirePackage{shortcuts}
% autres
\RequirePackage{media9}
\RequirePackage{xkeyval}
%-----------------
\makeatletter
%-- DEF OPTIONS
% sectioncolor / subsectioncolor
% option de classe
% couleurs générales du beamer
%
% "classical" way
% \def\sectioncolor{red}%
% \define@key{cours_beamer.cls}{section}[red]{%
% \def\sectioncolor{#1}%
% }
%
% \def\subsectioncolor{blue}%
% \define@key{cours_beamer.cls}{subsectioncolor}[blue]{%
% \def\subsectioncolor{#1}%
% }
\DeclareOptionX{sectioncolor}[red]{%
\def\sectioncolor{#1}%
}
\DeclareOptionX{subsectioncolor}[blue]{%
\def\subsectioncolor{#1}%
}
\ExecuteOptionsX{sectioncolor, subsectioncolor}
\ProcessOptionsX
%--------------
%-- SETTINGS
\graphicspath{{images/}}
\addmediapath{{videos/}}
%%% COLORS USED IN BLOCKS %%%
% Colors used in block and environments
% I don't like the default flashy green and the blue so i redefined it
\colorlet{green}{green!40!gray}
\colorlet{blue}{airforceblue}
\colorlet{definition}{red}
\colorlet{theorem}{red}
\colorlet{property}{red}
\colorlet{proof}{violet}
\colorlet{vocabulary}{blue}
\colorlet{remark}{red}
\colorlet{method}{orange}
\colorlet{example}{green}
\colorlet{exercise}{blue}
\colorlet{application}{blue}
\colorlet{sectioncolor}{\sectioncolor}
\colorlet{subsectioncolor}{\subsectioncolor}
%%% DEFAULT BEAMER THEME OPTIONS %%%
\usetheme{Madrid}
\useinnertheme{circles}
\useoutertheme{default}
\usefonttheme{professionalfonts}
\setbeamertemplate{footline}{}
%%%%%%%%%%%%%%%%%%%%
%%% ENUMERATE %%%
\setbeamerfont{enumerate item}{family=\rmfamily}
\setbeamercolor*{enumerate item}{fg=black}
\setbeamertemplate{enumerate item}{\textbf{\insertenumlabel.}}
%%%%%%%%%%%%%%%%%
%%% ITEMIZE %%%
\setbeamertemplate{itemize item}[circle]
\setbeamercolor*{itemize item}{fg=black}
\setbeamertemplate{itemize subitem}{\textendash}
%%%%%%%%%%%%%%%
%%% NAVIGATION %%%
\setbeamertemplate{navigation symbols}{%
\insertframenavigationsymbol
\insertsectionnavigationsymbol
}
%%%%%%%%%%%%%%%%%%
%%% ToC %%%
% change l'espace vertical entre les sections
\patchcmd{\beamer@sectionintoc}
{\vfill}
{\setlength{\itemsep}{10pt}\vskip\itemsep}
{}
{}
% change le symbole pour lister
\defbeamertemplate{subsection in toc}{bullets}{%
\leavevmode
\parbox[t]{1em}{\textbullet\hfill}%
\parbox[t]{\dimexpr\textwidth-1em\relax}{\inserttocsubsection}\par
}
\defbeamertemplate{section in toc}{sections numbered roman}{%
\leavevmode%
{\bfseries
\MakeUppercase{\romannumeral\inserttocsectionnumber}.\ %
\inserttocsection\par
}
}
\setbeamertemplate{section in toc}[sections numbered roman]
\setbeamercolor{section in toc}{fg=sectioncolor}
\setbeamertemplate{subsection in toc}[bullets]
\setbeamercolor{subsection in toc}{fg=subsectioncolor}
%%%%%%%%%%%
%%% MDFRAMED %%%
\pgfdeclarehorizontalshading{partiebkg}{100bp}{
color(0bp)=(white!40);color(100bp)=(black!0)
}
%
\pgfdeclarehorizontalshading{sspartiebkg}{100bp}{
color(0bp)=(white!40);color(100bp)=(black!0)
}
\mdfdefinestyle{partie}{
outerlinewidth=1em, outerlinecolor=white,%
% leftmargin=-1em, rightmargin=-1em,%
middlelinewidth=1.2pt, linecolor={sectioncolor},roundcorner=5pt,%
apptotikzsetting={
\tikzset{
mdfbackground/.append style={
shading=partiebkg
}
}
}
}
%
\mdfdefinestyle{sspartie}{
outerlinewidth=1em, outerlinecolor=white,%
% leftmargin=-1em, rightmargin=-1em,%
middlelinewidth=1.2pt, linecolor=subsectioncolor,roundcorner=5pt,%
apptotikzsetting={
\tikzset{
mdfbackground/.append style={
shading=partiebkg
}
}
}
}
%%%%%%%%%%%%%%%%
%-----------
%-- OWN COMMANDS
% \titre{TITRE}{ANNÉE}{AUTEUR}{LIEU}
% defini le titre du document
\newcommand{\titre}[4]{%
\title{#1}
\subtitle{#2}
\date{#3}
\author{Cours}
\institute{#4}
}
% \debut et \fin
% renvoie les slides d'intro et de cloture du document
\newcommand{\debut}{%
\begin{frame}
\titlepage
\end{frame}
}
\newcommand{\fin}{%
\section*{Plan}
\begin{frame}
\begin{center}{\Large Plan }\end{center}
\tableofcontents
\end{frame}
}
% \partie{TITRE} et \sspartie{TITRE}
% definie un slide de titre pour une (sous)section
\newcounter{partiecounter}
\newcounter{sspartiecounter}
\NewDocumentCommand \partie { G{Partie} } {%
\def\cType{\Roman}
\stepcounter{partiecounter}
\setcounter{sspartiecounter}{0}
\section{#1}
\begin{frame}
\begin{center}
\begin{mdframed}[style=partie]
\centering \textcolor{sectioncolor}{\textbf{ \cType{partiecounter}. #1}}
\end{mdframed}
\end{center}
\end{frame}
}
\NewDocumentCommand \sspartie { G{Sous-Partie} } {%
\def\cType{\arabic}
\stepcounter{sspartiecounter}
\subsection{#1}
\begin{frame}
\begin{center}
\begin{mdframed}[style=sspartie]
\centering \textcolor{subsectioncolor}{\textbf{ \cType{sspartiecounter}) #1}}
\end{mdframed}
\end{center}
\end{frame}
}
% \ftitre
% definie le titre des frames de section et de sous-section en fonction
% des (sous)sections actuellement definies
\NewDocumentCommand \ftitre { }{%
\ifnum \value{partiecounter}>0
\frametitle{\textbf{\Roman{partiecounter}. \insertsection}}
\fi
\ifnum \value{sspartiecounter}>0
\framesubtitle{\textbf{\arabic{sspartiecounter}) \insertsubsection}}
\fi
}
%%% BLOCKS %%%
% definition de divers blocks personnels : definition, theoreme, exemple,
% exercice (avec numerotation), remarque, method.
% Auxiliary command to set color of certain element of beamer
\NewDocumentCommand \setbeamercolorto { g }{%
\setbeamercolor*{block title}{fg=#1,bg=#1!10!white}
\setbeamercolor*{enumerate item}{fg=#1}
\setbeamercolor*{enumerate subitem}{fg=#1}
\setbeamercolor*{enumerate subsubitem}{fg=#1}
\setbeamercolor*{itemize item}{fg=#1}
\setbeamercolor*{itemize subitem}{fg=#1}
\setbeamercolor*{itemize subsubitem}{fg=#1}
\setbeamercolor*{item}{fg=#1}
}
% déf(*)(TITRE)
\NewDocumentEnvironment{déf}{ s g }{%begin
\setbeamercolorto{definition}
\IfBooleanTF #1
{
\IfNoValueTF {#2} {
\begin{block} {}
}{
\begin{block} {#2}
}
}{
\IfNoValueTF {#2} {
\begin{block} {Définition}
}{
\begin{block} {Définition - #2}
}
}
}{%end
\end{block}
}
% thm(TITRE)
\NewDocumentEnvironment{thm}{ g }{%begin
\setbeamercolorto{theorem}
\IfNoValueTF {#1} {
\begin{block} {Théorème}
}{
\begin{block} {Théorème - #1}
}
}{%end
\end{block}
}
% ppt(*)(TITRE)
\NewDocumentEnvironment{ppt}{ s g }{%begin
\setbeamercolorto{property}
\IfBooleanTF #1
{
\IfNoValueTF {#2} {
\begin{block} {}
}{
\begin{block} {#2}
}
}{
\IfNoValueTF {#2} {
\begin{block} {Propriété}
}{
\begin{block} {Propriété - #2}
}
}
}{%end
\end{block}
}
% pre(TITRE)
\NewDocumentEnvironment{pre}{ g }{%begin
\setbeamercolorto{proof}
\IfNoValueTF {#1} {
\begin{block} {Preuve}
}{
\begin{block} {#1}
}
}{%end
\end{block}
}
% voc(TITRE)
\NewDocumentEnvironment{voc}{ g }{%begin
\setbeamercolorto{vocabulary}
\IfNoValueTF {#1} {
\begin{block} {Vocabulaire}
}{
\begin{block} {#1}
}
}{%end
\end{block}
}
% rmq(TITRE)
\NewDocumentEnvironment{rmq}{ G{Remarque} }{%begin
\setbeamercolorto{remark}
\begin{block} {\faExclamationTriangle \hspace{.125em} #1}
}{%end
\end{block}
}
% met<0|i|I|a|A|1>(TITRE)
\newcounter{methodecounter}
\NewDocumentEnvironment{met} { O{0} g }{%begin
\setbeamercolorto{method}
\ifthenelse{ \NOT \equal{#1}{0} }{
\ifthenelse{ \equal{#1}{i} }
{
\def\cType{\roman}
}
{
\ifthenelse{ \equal{#1}{I} }
{
\def\cType{\Roman}
}
{
\ifthenelse{ \equal{#1}{a} }
{
\def\cType{\alph}
}
{
\ifthenelse{ \equal{#1}{A} }
{
\def\cType{\Alph}
}
{
\def\cType{\arabic}
}
}
}
}
\stepcounter{methodecounter}
\IfNoValueTF {#2} {
\begin{block}{\faCogs \hspace{.125em} Méthode \cType{methodecounter}\ }
}{
\begin{block}{\faCogs \hspace{.125em} Méthode \cType{methodecounter}\ - #2}
}
}{
\IfNoValueTF {#2} {
\begin{block}{\faCogs \hspace{.125em} Méthode\ }
}{
\begin{block}{\faCogs \hspace{.125em} Méthode\ - #2}
}
}
}{%end
\end{block}
}
% exe(TITRE)
\NewDocumentEnvironment{exe}{ G{Exemple} }{%begin
\setbeamercolorto{example}
\begin{block} {\faLightbulbO \hspace{.125em} #1}
}{%end
\end{block}
}
% exo<0|i|I|a|A|1>(TITRE)
\newcounter{exercicecounter}
\NewDocumentEnvironment{exo} { O{0} G{Exercice} }{%begin
\setbeamercolorto{exercise}
\ifthenelse{ \NOT \equal{#1}{0} }{
\ifthenelse{ \equal{#1}{i} }
{
\def\cType{\roman}
}
{
\ifthenelse{ \equal{#1}{I} }
{
\def\cType{\Roman}
}
{
\ifthenelse{ \equal{#1}{a} }
{
\def\cType{\alph}
}
{
\ifthenelse{ \equal{#1}{A} }
{
\def\cType{\Alph}
}
{
\def\cType{\arabic}
}
}
}
}
\stepcounter{exercicecounter}
\begin{block}{#2 \cType{exercicecounter}\ }
}{
\begin{block}{#2\ }
}
}{%end
\end{block}
}
% app<0|i|I|a|A|1>(TITRE)
\newcounter{applicationcounter}
\NewDocumentEnvironment{app} { O{0} G{Application} }{%begin
\setbeamercolorto{application}
\ifthenelse{ \NOT \equal{#1}{0} }{
\ifthenelse{ \equal{#1}{i} }
{
\def\cType{\roman}
}
{
\ifthenelse{ \equal{#1}{I} }
{
\def\cType{\Roman}
}
{
\ifthenelse{ \equal{#1}{a} }
{
\def\cType{\alph}
}
{
\ifthenelse{ \equal{#1}{A} }
{
\def\cType{\Alph}
}
{
\def\cType{\arabic}
}
}
}
}
\stepcounter{applicationcounter}
\begin{block}{\faFileTextO \hspace{.125em} #2 \cType{applicationcounter}\ }
}{
\begin{block}{\faFileTextO \hspace{.125em} #2\ }
}
}{%end
\end{block}
}
%%%%%%%%%%%%%%
%%% TiKZ %%%
% Define the possibility to make (dis)appear something in a beamer.
\tikzset{
invisible/.style={opacity=0},
visible on/.style={alt=#1{}{invisible}},
alt/.code args={<#1>#2#3}{%
\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
},
}
%%%%%%%%%%%%
%%% AUTRES %%%
% \includemovie
% permet d'inclure une video dans une frame
\newcommand{\includemovie}[3]{%
\includemedia[%
width=#1,height=#2,%
activate=pagevisible,%
deactivate=pageclose,%
addresource=#3,%
flashvars={%
source=#3 % same path as in addresource!
&autoPlay=false % default: false; if =true, automatically starts playback after activation (see option ‘activation)’
&loop=false % if loop=true, media is played in a loop
&controlBarAutoHideTimeout=0 % time span before auto-hide
}%
]{}{VPlayer.swf}%
}
%%%%%%%%%%%%%%
%%% Continue numbering in lists %%%
\newcounter{saveenumi}
\newcommand{\seti}{\setcounter{saveenumi}{\value{enumi}}}
\newcommand{\conti}{\setcounter{enumi}{\value{saveenumi}}}
\resetcounteronoverlays{saveenumi}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------
\makeatother
|
2017-08-24 18:30:25 +02:00 |
|
|
1434b40245
|
Change options name: firstcolor/secondcolor -> subsectioncolor/sectioncolor.
|
2017-08-24 16:46:22 +02:00 |
|
|
a5bd1c1bcc
|
Change default color: purple -> violet.
|
2017-08-24 16:32:08 +02:00 |
|
|
0f51b22cb5
|
Set color for (sub)sections to main1 and main2 defined names. And change purple to violet.
|
2017-08-24 16:31:13 +02:00 |
|
|
60de34ac19
|
Revert Clean code.
|
2017-08-24 16:20:53 +02:00 |
|
|
3b3a085f1f
|
Clean code.
|
2017-08-24 16:11:42 +02:00 |
|
|
9198bb3748
|
Set color for (sub)sections to main1 and main2 defined names. And change purple to violet..
|
2017-08-24 01:49:25 +02:00 |
|
|
51aba024f1
|
Define color of items in env the same as the current block they are: red items for definitions as the block is red colored.
|
2017-08-24 01:15:57 +02:00 |
|
|
17df4a8c39
|
Set the color of enumerate and itemize items in block/env the same as the block/env color.
|
2017-08-23 10:23:26 +02:00 |
|
|
221c8ce720
|
Define colors blocks and envs. Names are generic so don't need to change color code in block but at the beginning of the file
|
2017-08-23 10:12:54 +02:00 |
|
|
2236ef5d69
|
Update.
|
2017-08-21 17:26:22 +02:00 |
|
|
34cde02426
|
Initial commit.
Class to use with emacs org-mode.
|
2017-05-12 21:26:29 +02:00 |
|
|
dea5d01f42
|
Update code.
|
2017-05-12 21:24:21 +02:00 |
|
|
cfd0bead5e
|
Update code.
|
2017-05-12 21:23:41 +02:00 |
|
|
7e0cb23743
|
Update code.
|
2017-05-12 21:22:35 +02:00 |
|
|
7444b2f5eb
|
Update \veci and \vecj command: add \ensuremath.
|
2017-05-12 21:22:03 +02:00 |
|
|
0693768f5c
|
New env without pencil icon
|
2017-04-21 21:57:44 +02:00 |
|
|
da3662beb4
|
Clean code.
|
2017-04-16 20:49:48 +02:00 |
|
|
03cd9f4ba3
|
Redirect all standard previously defined environments to their starred version
as they don't display numbering.
|
2017-03-29 22:23:16 +02:00 |
|
|
e9d6351104
|
Add macro allowing to frame text as it was a key on a keyboard.
Reason: menukeys and tipfr packages do not run well with beamer.
|
2017-03-29 21:38:03 +02:00 |
|
|
650f7fd716
|
Bump.
|
2017-03-29 17:56:33 +02:00 |
|
|
62bd666c74
|
Too much changes.
|
2017-03-29 17:53:10 +02:00 |
|
|
f01325f770
|
Deactivate call bbding package as it breaks org-mode compilation in emacs.
|
2017-03-29 15:43:07 +02:00 |
|
|
c03417fd3e
|
Bump
|
2017-03-29 15:41:26 +02:00 |
|
|
4b3b5cbe6b
|
Add method mdframed env with cogs icon.
|
2017-03-29 15:34:44 +02:00 |
|
|
06d52d0ee8
|
Made some commented changes to dotted mdtheorem environment.
|
2017-03-21 12:16:40 +01:00 |
|
|
32a29ff90f
|
Change icon for méthode block.
|
2017-03-21 12:13:13 +01:00 |
|
|
d7e503ae2a
|
Add icon to example block.
|
2017-03-21 12:09:06 +01:00 |
|
|
5a70b7729b
|
cLEAN CODE.
|
2017-03-19 18:32:05 +01:00 |
|
|
04d33ef6a7
|
cLEAN CODE.
|
2017-03-19 18:31:17 +01:00 |
|
|
96567177c9
|
cLEAN CODE.
|
2017-03-19 18:31:07 +01:00 |
|
|
e7d709187d
|
Clean code.
|
2017-03-19 18:09:37 +01:00 |
|
|
85f3107f00
|
Clean code.
|
2017-03-19 18:09:25 +01:00 |
|
|
2bae774a67
|
Clean code.
|
2017-03-19 18:05:13 +01:00 |
|
|
f9eed075e8
|
Clean code.
|
2017-03-19 16:27:16 +01:00 |
|
|
47f137b0a6
|
Change description.
|
2017-03-19 16:23:56 +01:00 |
|
|
a8154a3a73
|
Move \newColorCommand to commun.sty.
|
2017-03-19 16:22:05 +01:00 |
|
|
78f7a23fd5
|
Move the newColorCommand macro from shortcuts as it's not a shortcut
but a global new macro.
|
2017-03-19 16:21:14 +01:00 |
|
|
6fbefa8a43
|
Clean code.
|
2017-03-19 14:01:36 +01:00 |
|
|
58c4fe2c09
|
New mdtheorem envs.
|
2017-03-19 00:38:07 +01:00 |
|
|
5a4414e4dc
|
Change name of macro.
|
2017-03-19 00:34:51 +01:00 |
|
|
b6901418ba
|
New shortcut for putting text in white.
|
2017-03-18 22:41:47 +01:00 |
|
|
97bf350c08
|
Create color white.
|
2017-03-18 22:40:53 +01:00 |
|
|
6a4727e723
|
Clean code.
|
2017-03-18 21:54:57 +01:00 |
|
|
c8d92cb436
|
Change names of the fonts called to make new fonts family.
|
2017-03-18 21:34:36 +01:00 |
|
|
162e961811
|
Add fontawesome icon to méthode block.
|
2017-03-05 21:37:39 +01:00 |
|
|
e1a28e1d23
|
Add new mdtheorem style and rename the others.
|
2017-03-05 19:37:31 +01:00 |
|