This commit is contained in:
Jeff Lance 2018-09-11 07:52:15 +02:00
parent 3162af5cdb
commit 78a38e2fb0
3 changed files with 99 additions and 20 deletions

View File

@ -51,31 +51,43 @@
\RequirePackage{pifont}
\RequirePackage{fontawesome}
\RequirePackage{eurosym}
%\RequirePackage{bbding}
\RequirePackage{frcursive}
% color and graphics
\ifluatex
\RequirePackage{luacolor}
\fi
\RequirePackage{xcolor}
%\RequirePackage[table,xcdraw]{xcolor} % there's a bug when used with some mdframed content
\RequirePackage[]{xcolor}
\RequirePackage[framemethod=tikz]{mdframed}
\RequirePackage{graphicx}
\RequirePackage{transparent}
\RequirePackage{fancybox}
\RequirePackage[tikz]{bclogo}
% maths
\RequirePackage{amsmath}
\RequirePackage{amsmath, amsthm}
\RequirePackage{amssymb}
\RequirePackage{tkz-euclide}
\usetikzlibrary{shadows}
\RequirePackage{calc}
% \RequirePackage{pgffor,pgfmath} % loaded by tikz
\RequirePackage{pgfplots}
\pgfplotsset{compat=1.13}
\RequirePackage{siunitx}
\pgfplotsset{compat=1.16}
\RequirePackage[output-decimal-marker={,}]{siunitx}
\RequirePackage{asymptote}
\RequirePackage{mathrsfs}
\RequirePackage{tabvar}
\RequirePackage{xlop}
% tableaux de signe
%\RequirePackage{tabvar} % replaced by pdftabvar from pdfadd
\RequirePackage{fp}
\RequirePackage[luatex]{pict2e}
\RequirePackage{picture}
\RequirePackage{color}
\input pdftabvar
%
% tables
\RequirePackage{array}
\RequirePackage{tabularx}
@ -85,9 +97,10 @@
% layout
\RequirePackage{varwidth}
\RequirePackage{adjustbox}
\RequirePackage{lscape}
% text
\RequirePackage[dash,phantomtext]{dashundergaps}
\RequirePackage[dash]{dashundergaps}
\RequirePackage{comment}
\RequirePackage{caption}
@ -103,9 +116,8 @@
%
%
\newboolean{display}
\ifthenelse{\boolean{display}}{\includecomment{solution}}{\excludecomment{solution}}
% \providetoggle{display}
% \toggletrue{display}
%
@ -183,6 +195,42 @@
;
}
\NewDocumentCommand \getrandomletter { s G{1} G{26} }{%
\IfBooleanTF { #1 }{
\pgfmathrandominteger{\zzz}{#2}{#3}\csname pgffor@Alpha\endcsname{\zzz}
}{
\pgfmathrandominteger{\zzz}{#2}{#3}\csname pgffor@alpha\endcsname{\zzz}
}
}
\NewDocumentCommand \getbool { }{%
\pgfmathtruncatemacro{\random}{rnd}
%\pgfmathparse{notless(\random, .5)}
\pgfmathparse{(\random > .5) ? true : false}
\pgfmathresult
}
% \NewDocumentCommand \displaysolutions { }{%
% \iftoggle{display}{
% \textbf{Solutions}
% \includecomment{solution}
% }{
% \excludecomment{solution}
% }
% }
%
%
% BCLOGO
%
%
\renewcommand\bcStyleTitre[1]{\textbf{#1}}
\newcommand\bcexample{\centering \normalsize \faPaperclip}
\newcommand\bcremark{\centering \normalsize \faExclamationTriangle}
%
@ -206,7 +254,7 @@
% }
% {}
% \begin{#2}
% \end{#2}
% \end{#2}
% }
%% \underdash[color]{text}

View File

@ -1,6 +1,6 @@
%%%
%%%
%%% Classe : cours_prof.cls
%%% Classe : cours_paper.cls
%%% Version : 1.0
%%% Date : 09/11/16
%%% Auteur : Jeff LANCE
@ -8,7 +8,7 @@
%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{cours_prof}[2016/11/09 Document de cours imprimable A4 pour
\ProvidesClass{cours_paper}[2016/11/09 Document de cours en A4 pour
prof ou élève, V1.0]
@ -17,7 +17,8 @@
% INIT
%
%
\LoadClass[a4paper, 12pt, DIV=24]{scrartcl}
\LoadClassWithOptions{scrartcl}
%\LoadClass[a4paper, 12pt, DIV=24]{scrartcl}
@ -62,6 +63,7 @@
\def\type{#1}%
}
\ExecuteOptions{a4paper, DIV=24}
\ExecuteOptionsX{type}
\ProcessOptionsX
@ -188,16 +190,25 @@
% KOMA-Script version (preferred)
\ohead{}
\ifthenelse{ \equal{\type}{activity} }{
\IfNoValueTF{ \subtitle }{
\cohead[\@title]{\@title}
\rohead[Activité]{Activité}
}{
\cohead[\@title]{\@title}
\rohead[Activité]{Activité - \@subtitle}
}
\cohead[\@title]{\@title}
}{
\rohead[Cours]{Cours - \@title}
\ifthenelse{ \equal{\type}{exercise} }{
\cohead[\@title]{\@title}
\rohead[Exercices]{Exercices}
}{
\rohead[Cours]{Cours - \@title}
}
}
\cofoot*{\thepage\ /\ \pageref{LastPage}}
\pagestyle{scrheadings}
\setkomafont{pagehead}{\normalfont\bfseries}
@ -659,7 +670,7 @@
}
% titre
\NewDocumentCommand \titre { G{Titre} G{Sous-titre} } {%
\NewDocumentCommand \titre { G{Titre} G{Sous-titre} }{%
\setlength{\droptitle}{-2cm}
\title{#1}
\subtitle{#2}
@ -696,6 +707,29 @@
\setlist[questions, 1]{label=\textbf{\arabic*.}}
\setlist[questions, 2]{label=\textbf{\alph*)}}
\newlist{questinl}{enumerate*}{1}
\setlist*[questinl]{label=\textbf{\alph*)}}
\setlist[enumerate, 1]{label=\textbf{\arabic*.}, leftmargin=*, labelsep=.5em}
\setlist[enumerate, 2]{label=\textbf{\alph*)}}
\setlist[description]{font=\sffamily\bfseries}
% amsthm
\newtheoremstyle{exostyle}
{\topsep}% espace avant
{\topsep}% espace apres
{}% Police utilisee par le style de thm
{}% Indentation (vide = aucune, \parindent = indentation paragraphe)
{\bfseries}% Police du titre de thm
{}% Signe de ponctuation apres le titre du thm
{\newline}% Espace apres le titre du thm (\newline = linebreak)
{\thmname{#1}\thmnumber{ #2}\thmnote{ - \normalfont{\textit{#3}}}} % composants du titre du thm : \thmname = nom, \thmnumber = numéro, \thmnote = sous-titre
\theoremstyle{exostyle}
\newtheorem{exercice}{Exercice}
%
\makeatother

View File

@ -37,9 +37,6 @@
%-- Typo
% texte gras
\newcommand{\tb}[1]{\textbf{#1}}
% Another shortcut for white text.
\NewDocumentCommand \ghost { } {%
\white