diff --git a/documentex/constantes_document_latex.py b/documentex/constantes_document_latex.py index 5faf734..a9830f8 100644 --- a/documentex/constantes_document_latex.py +++ b/documentex/constantes_document_latex.py @@ -25,11 +25,11 @@ debug = False Constantes customisant l'en-tête des fichiers LaTeX et remplies automatiquement """ classe_appartenance = "PT" -lycee_appartenance = "Lycée Langevin Wallon" +lycee_appartenance = "Lycée Raspail" institution = "Lycée" -nom_institution = "Langevin Wallon" -lycee_adresse = "126 avenue Roger Salengro" -lycee_complement_adresse = "Champigny-sur-Marne, 94240" +nom_institution = "Langevin Raspail" +lycee_adresse = "5bis, avenue Maurice d'Ocagne" +lycee_complement_adresse = "Paris, 75014" auteur = "D. Denoncin" # est mise d'office sur tout type de document auteur_lettre = "Dr. David Denoncin" auteur_titre = "Professeur Agrégé" @@ -54,13 +54,14 @@ dictionnaire_type_document = {'ds': [False, '', True, True], 'ob': [False, '*', False, True], 'doc': [False, '', False, False], 'let': [False, '', False, True], # Lettre de motivation + 'sob': [False, '*', True, False], } """ Types de documents pour lesquels il faut créer un sous-dossier pour la correction """ -type_document_correction = ['ds', 'dm', 'pb'] +type_document_correction = ['ds', 'dm', 'pb', 'sob'] """ Dictionnaire paramétrant les abréviations pour les numéros de DS (limité à 10 DS) diff --git a/documentex/documentex.py b/documentex/documentex.py index 0fd9c68..e94d459 100644 --- a/documentex/documentex.py +++ b/documentex/documentex.py @@ -126,6 +126,7 @@ def documentex(dossier: str, type_document: str): "choices": [ "LLW", "Lycée de Cachan", + "Lycée Raspail", ] }, { @@ -195,12 +196,12 @@ def documentex(dossier: str, type_document: str): ressource_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)),template_dir) # dossier des templates fichiers = glob.glob(os.path.join(ressource_dir,'*')) fichiers = [fichier for fichier in fichiers if 'Utils' not in fichier ] - image = [fichier for fichier in fichiers if 'LW.png' in fichier][0] - fichiers.remove(image) #on enlève l'image LW.png des fichiers + image = [fichier for fichier in fichiers if 'raspail.png' in fichier][0] + fichiers.remove(image) #on enlève l'image raspail.png des fichiers fichiers_utils = glob.glob(os.path.join(os.path.join(ressource_dir,'Utils'),'*')) if type_document in ['ds','let']: - shutil.copy(image,os.path.join(tex_file_path,'LW.png')) + shutil.copy(image,os.path.join(tex_file_path,'raspail.png')) if type_document == 'ds': ds_numero = constantes.dictionnaire_numero_ds[numero] ## attention mettre numéro épreuve (?) diff --git a/documentex/templates/LW.png b/documentex/templates/LW.png deleted file mode 100644 index 7b2a8e6..0000000 Binary files a/documentex/templates/LW.png and /dev/null differ diff --git a/documentex/templates/Utils/01_paquets.tex b/documentex/templates/Utils/01_paquets.tex index 78e5b2c..f10022a 100644 --- a/documentex/templates/Utils/01_paquets.tex +++ b/documentex/templates/Utils/01_paquets.tex @@ -1,6 +1,8 @@ \BLOCK{ if type_ecrit == 'let' } \documentclass[11pt, a4paper,french]{letter} \usepackage{babel} +\BLOCK{ elif type_ecrit == 'td' } +\documentclass[10pt, a4paper,french,landscape]{letter} \BLOCK{ else } \documentclass[12pt,a4paper]{article} \BLOCK{ endif } diff --git a/documentex/templates/Utils/02_config_paquets.tex b/documentex/templates/Utils/02_config_paquets.tex index 4746f4d..bf8b0ce 100644 --- a/documentex/templates/Utils/02_config_paquets.tex +++ b/documentex/templates/Utils/02_config_paquets.tex @@ -11,6 +11,50 @@ right=3cm, % Right margin %showframe, % Uncomment to show how the type block is set on the page } + +\BLOCK{elif type_ecrit == 'sob'} + +\geometry{% + a4paper, % format de papier + % Définition des marges : + left=1.6cm, % marge intérieure à la page + right = 1.6cm, % marge extérieure + top = 1.8cm, + bottom = 1.8cm, + % En-tête et pied de page : + headheight=5.2mm, % espace réservé à l'en-tête dans la marge top + headsep=3mm, % espace entre le corps et l'en-tête + footskip=9mm % espace entre le corps et le pied de page +} + +% paquet itemize +\setlist[itemize]{label=$\bullet$} + +% paquet lstset +\lstset{inputencoding=utf8} + +% paquet hyperlink +\hypersetup{colorlinks = true, linkcolor = Turquoise, citecolor = red, + urlcolor = red} + +% paquet titlesec +\titleformat{\section}[block] +{\bfseries\normalsize} +{\thesection.}{5pt} +{\filcenter} +\titleformat{\subsection}[block] +{\bfseries\normalsize} +{\thesubsection.}{5pt} +{\filcenter} +\titleformat{\subsubsection}[block] +{\bfseries\normalsize} +{\thesubsubsection.}{5pt} +{\filcenter} + +% paquet fancyhdr +\pagestyle{fancy} +\fancyhead[L]{Oral blanc} + \BLOCK{ else } % zone de texte \geometry{% diff --git a/documentex/templates/Utils/04_environnements.tex b/documentex/templates/Utils/04_environnements.tex index f0a5499..bc4bcfe 100644 --- a/documentex/templates/Utils/04_environnements.tex +++ b/documentex/templates/Utils/04_environnements.tex @@ -55,7 +55,7 @@ %Phone: (000) 111-1111\\ % Your phone number %URL: LaTeXTemplates.com % Your URL } -\logo{LW.png} % Logo filename, your logo should have square dimensions (i.e. roughly the same width and height), if it does not, you will need to adjust spacing within the HEADER STRUCTURE block in structure.tex (read the comments carefully!) +\logo{raspail.png} % Logo filename, your logo should have square dimensions (i.e. roughly the same width and height), if it does not, you will need to adjust spacing within the HEADER STRUCTURE block in structure.tex (read the comments carefully!) \headerlineone{\VAR{ institution }} % Top header line, leave blank if you only want the bottom line \headerlinetwo{\VAR{ nom_institution}} % Bottom header line \BLOCK{ else } @@ -63,7 +63,6 @@ \theoremstyle{plain} \newtheorem*{thmm}{Théorème} \newtheorem*{propp}{Proposition} -\newtheorem*{corr}{Corollaire} \newtheorem*{lemm}{Lemme} \theoremstyle{definition} diff --git a/documentex/templates/Utils/05_macros.tex b/documentex/templates/Utils/05_macros.tex index c6f7171..8f8cc1f 100644 --- a/documentex/templates/Utils/05_macros.tex +++ b/documentex/templates/Utils/05_macros.tex @@ -43,15 +43,16 @@ \newcommand{\bdcap}{\displaystyle \bigcap} \newcommand{\leftexp}[2]{{\vphantom{#2}}^{#1}{#2}} -\newtcbox{\mresult}[1][]{nobeforeafter,#1,colframe=Turquoise,colback=white,leftrule=-1pt,toprule=-1pt,rightrule=1pt,bottomrule=1pt,boxsep=0.3cm,right=0.3cm,left=0.3cm,top=3pt,bottom=3pt,notitle,sharpish corners,math upper,#1} % type de box pour les résultats mathématique +\newtcbox{\mresult}[1][]{nobeforeafter,#1,colframe=Red,colback=white,leftrule=-1pt,toprule=-1pt,rightrule=1pt,bottomrule=1pt,boxsep=0.3cm,right=0.3cm,left=0.3cm,top=3pt,bottom=3pt,notitle,sharpish corners,math upper,#1} % type de box pour les résultats mathématique +\newtcbox{\mres}[1][]{tcbox raise base,nobeforeafter,#1,colframe=Red,colback=white,leftrule=1pt,toprule=1pt,rightrule=1pt,bottomrule=1pt,boxsep=0.05cm,right=0.05cm,left=0.05cm,top=0.05cm,bottom=0.05cm,notitle,sharpish corners,math upper,#1} % type de box pour les résultats mathématique \newcommand{\mathresult}[1]{\begin{empheq}[box=\mresult]{align*}#1\end{empheq}} % commande pour encadrer un résultat mathématique \newcommand{\reseq}[1]{\begin{empheq}[box=\mresult]{align*}#1\end{empheq}} % compatibilité rétrograde -\newtcolorbox{maresult}[1][]{nobeforeafter,colframe=Turquoise,colback=white,leftrule=-1pt,toprule=-1pt,rightrule=1pt,bottomrule=1pt,boxsep=0.3cm,right=0.3cm,left=0.3cm,top=3pt,bottom=3pt,notitle,sharpish corners,math upper,#1} % type de box pour les résultats mathématique trop longs -\newtcolorbox{teresult}[1][]{breakable,enhanced,nobeforeafter,colframe=Turquoise,colback=white,leftrule=-1pt,toprule=-1pt,rightrule=1pt,bottomrule=1pt,boxsep=0.3cm,right=0.3cm,left=0.3cm,top=3pt,bottom=3pt,notitle,sharpish corners,#1} % type de box pour les résultats texte trop long. +\newtcolorbox{maresult}[1][]{nobeforeafter,colframe=Red,colback=white,leftrule=-1pt,toprule=-1pt,rightrule=1pt,bottomrule=1pt,boxsep=0.3cm,right=0.3cm,left=0.3cm,top=3pt,bottom=3pt,notitle,sharpish corners,math upper,#1} % type de box pour les résultats mathématique trop longs +\newtcolorbox{teresult}[1][]{breakable,enhanced,nobeforeafter,colframe=Red,colback=white,leftrule=-1pt,toprule=-1pt,rightrule=1pt,bottomrule=1pt,boxsep=0.3cm,right=0.3cm,left=0.3cm,top=3pt,bottom=3pt,notitle,sharpish corners,#1} % type de box pour les résultats texte trop long. %\newtcolorbox{result}[1][]{breakable,enhanced,nobeforeafter,colframe=Turquoise,colback=white,leftrule=-1pt,toprule=-1pt,rightrule=1pt,bottomrule=1pt,boxsep=0.3cm,right=0.3cm,left=0.3cm,top=3pt,bottom=3pt,notitle,sharpish corners,#1} % resultat en général : permet de mettre du texte et des maths avec align* -\newtcbox{\tresult}[1][]{breakable,enhanced,nobeforeafter,#1,colframe=Turquoise,colback=white,leftrule=-1pt,toprule=-1pt,rightrule=1pt,bottomrule=1pt,boxsep=0.3cm,right=0.3cm,left=0.3cm,top=3pt,bottom=3pt,notitle,sharpish corners,#1} % type de box pour les résultats texte +\newtcbox{\tresult}[1][]{breakable,enhanced,nobeforeafter,#1,colframe=Red,colback=white,leftrule=1pt,toprule=1pt,rightrule=1pt,bottomrule=1pt,boxsep=0.05cm,right=0.05cm,left=0.05cm,top=0.05cm,bottom=0.05cm,notitle,sharpish corners,#1} % type de box pour les résultats texte \newcommand{\textresult}[1]{\begin{center}\tresult{#1}\end{center}} % commande pour encadrer un résultat texte \newcommand{\fresult}[1]{\begin{center}\tresult{#1}\end{center}} % compatibilité rétrograde \newcommand{\result}[1]{\begin{center}\tresult{#1}\end{center}} % compatibilité rétrograde diff --git a/documentex/templates/Utils/06_math_operator.tex b/documentex/templates/Utils/06_math_operator.tex index 876afb9..05794c0 100644 --- a/documentex/templates/Utils/06_math_operator.tex +++ b/documentex/templates/Utils/06_math_operator.tex @@ -2,10 +2,7 @@ \DeclareMathOperator{\Sym}{S} \DeclareMathOperator{\An}{A} \DeclareMathOperator{\Uni}{U} -\DeclareMathOperator{\syl}{Syl} -\DeclareMathOperator{\stab}{Stab} \DeclareMathOperator{\GU}{GU} -\DeclareMathOperator{\PGL}{PGL} \DeclareMathOperator{\SL}{SL} \DeclareMathOperator{\Or}{O} \DeclareMathOperator{\SO}{SO} @@ -15,26 +12,20 @@ \DeclareMathOperator{\Image}{Im} \DeclareMathOperator{\Real}{Re} \DeclareMathOperator{\ID}{id} -\DeclareMathOperator{\tr}{tr} -\DeclareMathOperator{\trace}{trace} +\DeclareMathOperator{\Tr}{Tr} \DeclareMathOperator{\Ker}{Ker} -\DeclareMathOperator{\exponential}{exp} -\DeclareMathOperator{\Modulo}{mod} -\DeclareMathOperator{\spec}{spec} +\DeclareMathOperator{\Spec}{Spec} \DeclareMathOperator{\ch}{ch} \DeclareMathOperator{\sh}{sh} -\DeclareMathOperator{\ppcm}{ppcm} \DeclareMathOperator{\arcos}{arcos} \DeclareMathOperator{\Vect}{Vect} -\DeclareMathOperator{\diag}{diag} \DeclareMathOperator{\mat}{Mat} -\DeclareMathOperator{\Sp}{Sp} \DeclareMathOperator{\Arg}{Arg} \DeclareMathOperator{\Cov}{Cov} \DeclareMathOperator{\I}{I} \DeclareMathOperator{\rang}{rang} \DeclareMathOperator{\M}{M} -\DeclareMathOperator{\mul}{mul} +\DeclareMathOperator{\trace}{Trace} \begin{document} \BLOCK{ if type_ecrit == 'ds' } @@ -42,12 +33,12 @@ \fancyhead{} \begin{figure} \centering - \includegraphics[width=0.1\textwidth]{LW.png} + \includegraphics[width=0.1\textwidth]{raspail.png} \end{figure} \fancyfoot{} \begin{center} \huge{\textbf{\VAR{ ds_numero } \'epreuve de Mathématiques}}\\ - \huge{\textbf{\VAR{ classe } - \VAR{ annee }}}\\ + \huge{\textbf{\VAR{ classe }/\VAR{ classe }$^\star$ - \VAR{ annee }}}\\ \vspace{1em} \Large{Durée : 4h} \end{center} @@ -63,7 +54,7 @@ \vspace{1em} \begin{center} \begin{minipage}[]{.98\textwidth} - \Large{Toute réponse non justifiée \textbf{ne sera pas prise en compte}. \\ \newline Par ailleurs la \textbf{présentation, la qualité de la rédaction, la clarté et la précision des raisonnements} entreront pour une part importante dans l'appréciation des copies.\\ \newline Vous êtes invités à encadrer vos résultats.} + \Large{Toute réponse non justifiée \textbf{ne sera pas prise en compte}. \\ \newline Par ailleurs la \textbf{présentation, la qualité de la rédaction, la clarté et la précision des raisonnements} entreront pour une part importante dans l'appréciation des copies.\\ \newline En particulier, vous devez écrire dans un français correct et encadrer vos résultats à la règle.} \end{minipage} \vspace{5em} @@ -77,7 +68,7 @@ \newpage \renewcommand{\headrulewidth}{0.5pt} \setcounter{page}{1} -\fancyhead[L]{\VAR{ classe } - \VAR{ short_title } - \VAR{ lycee } \VAR{ annee } } +\fancyhead[L]{\VAR{ classe }/\VAR{ classe }$^\star$ - \VAR{ short_title } - \VAR{ lycee } \VAR{ annee } } \fancyhead[R]{\VAR{ auteur }} \fancyfoot[C]{\thepage} diff --git a/documentex/templates/example.tex b/documentex/templates/example.tex index a969e2c..f79f63c 100644 --- a/documentex/templates/example.tex +++ b/documentex/templates/example.tex @@ -5,7 +5,7 @@ } \opening{Chers <++>,} -Je connais <++> car celui-ci a effectué sa deuxième année de classe préparatoire dans la filière PT du lycée Langevin-Wallon dans laquelle j'enseigne les mathématiques. <++> +Je connais <++> car celui-ci a effectué sa deuxième année de classe préparatoire dans la filière PT du lycée Raspail dans lequel j'enseigne les mathématiques. <++> <++> pour ces raisons je me permets de recommander <++> pour son \textbf{inscription au niveau <++>} de <++> @@ -40,9 +40,9 @@ Je connais <++> car celui-ci a effectué sa deuxième année de classe préparat \end{tcolorbox} % Barème % Tableau question de cours : /3 -% Exposé question de cours : /6 +% Exposé question de cours : /5 % Tableau exercice : /3 -% Raisonner : /5 +% Raisonner : /6 % Dialoguer : /3 % Si pas de question de cours @@ -102,3 +102,10 @@ Je connais <++> car celui-ci a effectué sa deuxième année de classe préparat \vspace{17cm} } \BLOCK{ endif } + +\BLOCK{ if type_ecrit == 'td' } +\setlength{\columnseprule}{1pt} +\begin{multicols*}{2} + <++> +\end{multicols*} +\BLOCK{ endif } diff --git a/documentex/templates/raspail.png b/documentex/templates/raspail.png new file mode 100644 index 0000000..92e354f Binary files /dev/null and b/documentex/templates/raspail.png differ