Settle some part of code between files.

This commit is contained in:
Jeff Lance 2016-05-12 21:55:28 +02:00
parent 290af8c997
commit c7e03cdf2d
4 changed files with 84 additions and 115 deletions

View File

@ -12,7 +12,7 @@
%-- classe de base %-- classe de base
\LoadClass{beamer} \LoadClassWithOptions{beamer}
%-- % %-- %
@ -24,8 +24,9 @@
%-- % %-- %
%-- definitions %
%-- % % \toggletrue{calculmental}
%
%-- paramètrages %-- paramètrages
@ -95,22 +96,22 @@
} }
\newcounter{questionscounter} % \newcounter{cqcm}
\NewDocumentEnvironment{questions}{O{60}}{ % begin % \NewDocumentEnvironment{qcm}{ G{60} }{ % begin
\stepcounter{questionscounter} % \stepcounter{cqcm}
\section{Question \usecounter{questionscounter}} % \section{Question \usecounter{cqcm}\ }
\begin{frame} % \begin{frame}
\centering % \centering
Question \usecounter{questionscounter}\transduration{3} % Question \usecounter{cqcm}\transduration{3}
\end{frame} % \end{frame}
\begin{frame} % \begin{frame}
\centering % \centering
\begin{beamerboxesrounded}{Q\usecounter{questionscounter}.} % \begin{beamerboxesrounded}{Q\usecounter{cqcm}.\ }
} { % end % }{ % end
\end{beamerboxesrounded} % % \end{beamerboxesrounded} %
\decompte{#1} % % \decompte{#1} %
\end{frame} % % \end{frame} %
} % }
\newcommand{\fin}{% \newcommand{\fin}{%
@ -120,7 +121,7 @@
\end{frame} \end{frame}
\section{Index} \section*{Index}
\begin{frame} \begin{frame}
\begin{center}{\Large Index des questions}\end{center} \begin{center}{\Large Index des questions}\end{center}
\tableofcontents \tableofcontents

View File

@ -40,6 +40,7 @@
\RequirePackage{xstring} \RequirePackage{xstring}
\RequirePackage{multido} \RequirePackage{multido}
\RequirePackage{xparse} \RequirePackage{xparse}
\RequirePackage{etoolbox}
% tableau % tableau
\RequirePackage{array} \RequirePackage{array}
@ -51,6 +52,13 @@
%-- % %-- %
%
% \newtoggle{cours}
% \newtoggle{calculmental}
% \newtoggle{cours_beamer}
%
%% MACROS : DEBUT %% MACROS : DEBUT
\makeatletter \makeatletter
@ -76,54 +84,6 @@
%% rb{largeur} : droite - bas %% rb{largeur} : droite - bas
%\newcolumntype{rb}[1]{>{\raggedleft}b{#1}} %\newcolumntype{rb}[1]{>{\raggedleft}b{#1}}
% questions<[type]>
%
% type = 1 -> \arabic
% type = a -> \alph
% type = A -> \Alph
% type = i -> \roman
% type = I -> \Roman
% \arabic par défaut
\newcounter{questionscounter}
\newcommand{\questionsseparator}{.}
\newenvironment{questions}[1][1] {
\ifthenelse{ \equal{#1}{i} }
{
\def\cType{\roman}
\renewcommand{\questionsseparator}{)}
}
{
\ifthenelse{ \equal{#1}{I} }
{
\def\cType{\Roman}
\renewcommand{\questionsseparator}{.}
}
{
\ifthenelse{ \equal{#1}{a} }
{
\def\cType{\alph}
\renewcommand{\questionsseparator}{)}
}
{
\ifthenelse{ \equal{#1}{A} }
{
\def\cType{\Alph}
\renewcommand{\questionsseparator}{.}
}
{
\def\cType{\arabic}
\renewcommand{\questionsseparator}{.}
}
}
}
}
\begin{list}{\textbf{\cType{questionscounter}\questionsseparator}}{
\usecounter{questionscounter}
\itemindent=0em
\itemsep=8pt \leftmargin=0,54cm}
} {
\end{list}
}
% barrer du texte % barrer du texte
\newcommand\hcancel[2][black]{ \newcommand\hcancel[2][black]{

View File

@ -45,6 +45,10 @@
%--% %--%
%
% \toggletrue{cours}
%
%-- structure de la page %-- structure de la page
@ -208,52 +212,56 @@
} }
% % questions<[type]> % questions<[type]>
% % %
% % type = 1 -> \arabic % type = 1 -> \arabic
% % type = a -> \alph % type = a -> \alph
% % type = A -> \Alph % type = A -> \Alph
% % type = i -> \roman % type = i -> \roman
% % type = I -> \Roman % type = I -> \Roman
% % \arabic par défaut % \arabic par défaut
% \newcounter{questionscounter} \newcounter{cours_questionscounter}
% \newcommand{\questionsseparator}{.} \newcommand{\questionsseparator}{.}
% \newenvironment{questions}[1][1] { \newenvironment{questions}[1][1] {
% \ifthenelse{ \equal{#1}{i} } \ifthenelse{ \equal{#1}{i} }
% { {
% \def\cType{\roman} \def\cType{\roman}
% } \renewcommand{\questionsseparator}{)}
% { }
% \ifthenelse{ \equal{#1}{I} } {
% { \ifthenelse{ \equal{#1}{I} }
% \def\cType{\Roman} {
% } \def\cType{\Roman}
% { \renewcommand{\questionsseparator}{.}
% \ifthenelse{ \equal{#1}{a} } }
% { {
% \def\cType{\alph} \ifthenelse{ \equal{#1}{a} }
% \renewcommand{\questionsseparator}{)} {
% } \def\cType{\alph}
% { \renewcommand{\questionsseparator}{)}
% \ifthenelse{ \equal{#1}{A} } }
% { {
% \def\cType{\Alph} \ifthenelse{ \equal{#1}{A} }
% } {
% { \def\cType{\Alph}
% \def\cType{\arabic} \renewcommand{\questionsseparator}{.}
% } }
% } {
% } \def\cType{\arabic}
% } \renewcommand{\questionsseparator}{.}
% \begin{list}{\textbf{\cType{questionscounter}\questionsseparator}}{ }
% \usecounter{questionscounter} }
% \itemindent=0em }
% \itemsep=8pt \leftmargin=0,54cm} }
% } { \begin{list}{\textbf{\cType{cours_questionscounter}\questionsseparator}}{
% \end{list} \usecounter{cours_questionscounter}
% } \itemindent=0em
% \newcommand{\bq}{\begin{questions}} \itemsep=8pt \leftmargin=0,54cm}
% \newcommand{\eq}{\end{questions}} } {
\end{list}
}
\newcommand{\bq}{\begin{questions}}
\newcommand{\eq}{\end{questions}}
% setAngle{nom}{valeur} % setAngle{nom}{valeur}

View File

@ -184,7 +184,7 @@
\setbeamercolor{block title}{fg=crimson,bg=pink!95!white} \setbeamercolor{block title}{fg=crimson,bg=pink!95!white}
\begin{block} {#1} \begin{block} {#1}
}{%end }{%end
\end{block} \end{block}
} }
% %
\NewDocumentEnvironment{thm}{ G{Théorème} }{%begin \NewDocumentEnvironment{thm}{ G{Théorème} }{%begin