diff options
author | Norbert Preining <norbert@preining.info> | 2024-05-19 03:01:32 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-05-19 03:01:32 +0000 |
commit | a65977b7a0d9973e675e06e3b250663288afe988 (patch) | |
tree | 7eafa86719541aa9420bf059a4e78c150a4a0844 /macros/latex | |
parent | 6231c97119299ef4b55ed2760faff69acfddf0e9 (diff) |
CTAN sync 202405190301
Diffstat (limited to 'macros/latex')
17 files changed, 865 insertions, 1170 deletions
diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf Binary files differindex f1bf30aacc..34320ab758 100644 --- a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf +++ b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.pdf diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex index b8352c628d..7335cdbb96 100644 --- a/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex +++ b/macros/latex/contrib/customenvs/doc/customenvs-doc-en.tex @@ -34,8 +34,8 @@ \usepackage[margin=1.5cm]{geometry} \setlength{\parindent}{0pt} -\def\TPversion{0.1.4} -\def\TPdate{04/04/2024} +\def\TPversion{0.1.5} +\def\TPdate{17/05/2024} \usepackage{tcolorbox} \sethlcolor{lightgray!25} \NewDocumentCommand\MontreCode{ m }{% @@ -111,6 +111,8 @@ \section{History} +\verb|v0.1.5|~:~~~~New macros for boxes with \textsf{tcolorbox} (see \texttt{[fr]} documentation) + \verb|v0.1.4|~:~~~~Create a SMS conversation \verb|v0.1.3|~:~~~~Environment for exercise(s) (in french doc) diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf Binary files differindex 87d7507f61..9007eb82b0 100644 --- a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf +++ b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.pdf diff --git a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex index 9cdaeadf73..f76efcea01 100644 --- a/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex +++ b/macros/latex/contrib/customenvs/doc/customenvs-doc-fr.tex @@ -39,8 +39,8 @@ \usepackage[margin=1.5cm]{geometry} \setlength{\parindent}{0pt} -\def\TPversion{0.1.4} -\def\TPdate{4 avril 2024} +\def\TPversion{0.1.5} +\def\TPdate{17 mai 2024} \usepackage{tcolorbox} \tcbuselibrary{listingsutf8} \newtcblisting{DemoCode}[1]{% @@ -66,10 +66,10 @@ keywordstyle={\color{violet}},% classoffset=2,% alsoletter={-},% - morekeywords={\ReponsesQCM,MultiCols,\CreerListeItems,\ListeChoixItems,\TableauCompetences,\CrayonDeCompetences,\StyleEnvtExo,\StyleEnvtExoDefaut,\TitreExo,\ipsum,EnvSMS,\SMSrec,\SMSenv},% + morekeywords={\ReponsesQCM,MultiCols,\CreerListeItems,\ListeChoixItems,\TableauCompetences,\CrayonDeCompetences,\StyleEnvtExo,\StyleEnvtExoDefaut,\TitreExo,\ipsum,EnvSMS,\SMSrec,\SMSenv,BoiteSimple,\SujetTitreExo,\CircledNumber,\AffVignette,\BoiteArrondie},% keywordstyle={\color{green!50!black}},% classoffset=3,% - morekeywords={Largeur,Filets,EspacesCL,NbCols,Labels,PoliceLabels,EspaceLabels,Swap,Type,CoeffEspVert,EpTrait,Alea,LargeurNivs,Niveaux,NoticeNiveaux,Titre,PolTitre,PolNotice,PolComp,LigneSep,CouleurNotice,CouleurNiveaux,CouleurFond,Note,Notice,PoliceCateg,PoliceBloc,Couleurs,LargeurBloc,Echelle,NoirBlanc,Libelle,EpTrait,Police,Type,ComplementTitre,Titre,CodeDebut,Couleur,EchelleImage,Decoration,Trait,Avatar,AffAvatar,NoirBlanc,CouleurE,CouleurR,CouleurFond,Hauteur,Largeur,PoliceTxt,CouleurTitre},% + morekeywords={Largeur,Filets,EspacesCL,NbCols,Labels,PoliceLabels,EspaceLabels,Swap,Type,CoeffEspVert,EpTrait,Alea,LargeurNivs,Niveaux,NoticeNiveaux,Titre,PolTitre,PolNotice,PolComp,LigneSep,CouleurNotice,CouleurNiveaux,CouleurFond,Note,Notice,PoliceCateg,PoliceBloc,Couleurs,LargeurBloc,Echelle,NoirBlanc,Libelle,EpTrait,Police,Type,ComplementTitre,Titre,CodeDebut,Couleur,EchelleImage,Decoration,Trait,Avatar,AffAvatar,NoirBlanc,CouleurE,CouleurR,CouleurFond,Hauteur,Largeur,PoliceTxt,CouleurTitre,AlignH,bg,txt,bthick,bcol,raise,Type,EspH,Fond,Texte,Style},% keywordstyle={\color{orange}} },% #1 @@ -149,6 +149,10 @@ \section{Historique} +\verb|v0.1.5|~:~~~~Vignettes + Numéros encerclés + Création de boîtes 'simples' + +\verb|v0.1.4|~:~~~~Commande pour du texte dans une boîte arrondie, de hauteur 'figée' + 'Chat' SMS + \verb|v0.1.3|~:~~~~Environnement/commande pour des exercices, avec personnalisation(s) \verb|v0.1.2|~:~~~~Crayon de compétences @@ -1058,4 +1062,177 @@ Le code proposé utilise l'environnement, mais la commande simple est complètem \includegraphics{envtexo_exemples.pdf} \end{DemoCode} +\pagebreak + +\section{Boîtes divers} + +\subsection{Introduction} + +L'idée est de proposer (modestement) des commandes, basées sur \MontreCode{tcolorbox}, pour, avec un style prédéfini : + +\begin{itemize} + \item créer des boîtes de présentation ; + \item créer des titres de sujets d'examens, par exemple ; + \item créer des titres d'exercices, pour des sujets d'examens par exemple ; + \item créer des numéros encadrés ; + \item créer de vignettes. +\end{itemize} + +\subsection{Boîtes de présentation} + +\begin{DemoCode}{listing only} +\begin{BoiteSimple}[couleur]<options tcbox>{titre} + ... +\end{BoiteSimple} +\end{DemoCode} + +\begin{DemoCode}{} +\begin{BoiteSimple}[red]{Propriété} +Si M est la matrice d'adjacence d'un graphe simple orienté de sommets $A_1$, $A_2$, \dots, $A_n$, le nombre de chemins de longueur $p$ d'un sommet $A_i$ à un sommet $A_j$ est le nombre situé ligne $i$ et colonne $j$ dans la matrice $M^p$. +\end{BoiteSimple} +\end{DemoCode} + +\begin{DemoCode}{} +\begin{BoiteSimple}[blue]<width=0.75\linewidth,flush right>{Propriété} +Si M est la matrice d'adjacence d'un graphe simple orienté de sommets $A_1$, $A_2$, \dots, $A_n$, le nombre de chemins de longueur $p$ d'un sommet $A_i$ à un sommet $A_j$ est le nombre situé ligne $i$ et colonne $j$ dans la matrice $M^p$. +\end{BoiteSimple} +\end{DemoCode} + +\subsection{Titres de sujets d'examens, titres d'exercices} + +\begin{DemoCode}{listing only} +\begin{TitreSujet}[Couleur=...,AlignH=...]<options tcbox>{titre onglet} +... +\end{TitreSujet} +\end{DemoCode} + +\begin{DemoCode}{} +\begin{TitreSujet}[Couleur=red!50!black]{SUJET} +Métropole, SIO, 16 Mai 2024 +\end{TitreSujet} +\end{DemoCode} + +\begin{DemoCode}{} +\begin{TitreSujet}[Couleur=teal,AlignH=center]{CORRIGÉ} +Baccalauréat Centres étrangers Groupe 1\\ +14 mars 2023 +\end{TitreSujet} +\end{DemoCode} + +\begin{DemoCode}{listing only} +\SujetTitreExo[couleur]{titre} +\end{DemoCode} + +\begin{DemoCode}{} +\SujetTitreExo{Exercice 4 (5 points)} + +\SujetTitreExo[olive]{Exercice 1 [Matrices]\dotfill(5 points)} +\end{DemoCode} + +\subsection{Numéros encerclés} + +\begin{DemoCode}{listing only} +\CircledNumber[bg=...,txt=...,bthick=...,bcol=...,raise=true/false]% + {nombre}{noeud tikz} +\end{DemoCode} + +\begin{DemoCode}{} +En ligne \CircledNumber{1} avec texte après. +\end{DemoCode} + +\begin{DemoCode}{} +{\bfseries\sffamily\Huge En ligne (\CircledNumber[bthick=0.25mm,bcol=red,bg=cyan!25,txt=darkgray]{7}) avec texte après} +\end{DemoCode} + +\begin{DemoCode}{} +{\Large En ligne \CircledNumber[raise=false,bthick=0.5mm,bcol=cyan,bg=cyan!25,txt=orange]{4} avec texte après} +\end{DemoCode} + +\begin{DemoCode}{} +\begin{enumerate}[label={\CircledNumber[raise=false]{\arabic*}}] + \item A + \item B + \item C +\end{enumerate} +\end{DemoCode} + +\subsection{Vignettes} + +\begin{DemoCode}{listing only} +\AffVignette(*)[Type=...,Couleur=...,Police=...]{texte} +% la version étoilée active le \NoAutoSpacing +\end{DemoCode} + +\begin{DemoCode}{} +%vignette de base +\AffVignette{test} ou \AffVignette[Couleur=magenta]{test} +\end{DemoCode} + +\begin{DemoCode}{} +%vignette type algo +\AffVignette[Type=algo]{test} ou \AffVignette[Type=algo,Couleur=teal]{Renvoyer} +\end{DemoCode} + +\begin{DemoCode}{} +%vignette type python, classique +\AffVignette[Type=py]{test} ou \AffVignette[Type=py,Couleur=lime]{return} + +%vignette type python, avec piton (et lualatex) +%\AffVignette[Type=pypit]{from math import sqrt} + +%vignette type python, avec piton et pyluatex (et lualatex + shell-escape) +%\AffVignette[Type=pyl,Couleur=blue]{1+4/5} +\end{DemoCode} + +\begin{DemoCode}{} +%vignette type graphique +\AffVignette[Type=grph]{fonction} ou \AffVignette[Couleur=olive,Type=grph]{intersection} +\end{DemoCode} + +\begin{DemoCode}{} +%vignette type MPM +\AffVignette[Type=mpm]{marge} ou \AffVignette[Type=mpm,Couleur=orange]{chemin} +\end{DemoCode} + +\begin{DemoCode}{} +%vignette type xcas +\AffVignette[Type=xcas]{calcul formel} ou \AffVignette[Type=xcas,Couleur=brown]{calcul formel} +\end{DemoCode} + +\begin{DemoCode}{} +%vignette type shell +\AffVignette[Type=shell,Couleur=red!50!orange]{fenêtre cmd} +\end{DemoCode} + +\begin{DemoCode}{} +%vignette type LaTeX +\AffVignette[Type=tex]{code LaTeX} +\end{DemoCode} + +\begin{DemoCode}{} +%vignette type tableur +\AffVignette[Type=sheet,Couleur=green!50!black,Police=\footnotesize\sffamily] + {cellule A3} +\end{DemoCode} + +\begin{DemoCode}{} +%création d'une macro personnelle +\NewDocumentCommand\VignetteTableur{ m }{% + \AffVignette*[Type=sheet,Couleur=green!50!black,Police=\footnotesize\sffamily] + {#1} +} +On se place dans la plage \VignetteTableur{A3:B5} pour... + +\end{DemoCode} + +\subsection{Boîte arrondie} + +\begin{DemoCode}{listing only} +\BoiteArrondie[Fond=...,Texte=...,EspH=...,Style=...]{texte}[noeud tikz] +\end{DemoCode} + +\begin{DemoCode}{} +On lance le logiciel \BoiteArrondie[Fond=cyan!33,Texte=violet,EspH=2mm,Style=rect]{situé sur le bureau} en cliquant \BoiteArrondie[Fond=lightgray!25,Texte=darkgray]{droit}. +\end{DemoCode} + \end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex b/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex index e782579dec..2daa195179 100644 --- a/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex +++ b/macros/latex/contrib/customenvs/doc/envtexo_exemples.tex @@ -1,80 +1,80 @@ -% !TeX TXS-program:compile = txs:///arara
-% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode}
-% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
-
-\documentclass[a5paper,11pt]{article}
-\usepackage[margin=1cm]{geometry}
-\usepackage{customenvs}
-%facultatif, pour les décorations
-\usepackage{graphicx}
-\usepackage{dashrulex}
-\usepackage{coloredbelts}
-\usepackage{pictochrono}
-%mise en page
-\usepackage{ipsum}
-\setlength{\parindent}{0pt}
-
-\begin{document}
-
-\begin{EnvtExo}%exo1
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\begin{EnvtExo}[Trait=pointilles]%exo2
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\begin{EnvtExo}[Trait=dashilles]%exo3
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\begin{EnvtExo}[Decoration=Icone/\faPython]%exo4
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\begin{EnvtExo}[Decoration=Ceinture/rouge]%exo5
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\begin{EnvtExo}[Decoration=Chrono/20]%exo6
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\begin{EnvtExo}[Decoration=Image/goku_ssj4]%exo7
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\begin{EnvtExo}[Decoration=Image/sseiya_shura]%exo8
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\begin{EnvtExo}[Decoration=Points/7]%exo9
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\begin{EnvtExo}[Type=Perso/{Titre perso }]%exo10
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\StyleEnvtExo[Couleur=red,Police=\bfseries\ttfamily,EpTrait=2pt,Libelle={Exercice n°}]
-
-\begin{EnvtExo}[Decoration=Icone/\faAddressBook]%exo11
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Couleur=red,Trait=dashilles]%exo12
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\StyleEnvtExoDefaut
-
-\begin{EnvtExo}%
- [Type=Perso/{Titre perso~},Decoration=Image/goku_ssj4,Trait=non,Compteur=false]%exo13
- \ipsum<Lang=FR,Type=sent>
-\end{EnvtExo}
-
-\TitreExo[Type=Perso/{Annexe Exercice 3},Compteur=false,Decoration=Image/sseiya_aiolos]%exo14
-
-\ipsum<Lang=FR,Type=sent>
-
+% !TeX TXS-program:compile = txs:///arara +% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} +% arara: pdflatex: {shell: no, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') + +\documentclass[a5paper,11pt]{article} +\usepackage[margin=1cm]{geometry} +\usepackage{customenvs} +%facultatif, pour les décorations +\usepackage{graphicx} +\usepackage{dashrulex} +\usepackage{coloredbelts} +\usepackage{pictochrono} +%mise en page +\usepackage{ipsum} +\setlength{\parindent}{0pt} + +\begin{document} + +\begin{EnvtExo}%exo1 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\begin{EnvtExo}[Trait=pointilles]%exo2 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\begin{EnvtExo}[Trait=dashilles]%exo3 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=Icone/\faPython]%exo4 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=Ceinture/rouge]%exo5 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=Chrono/20]%exo6 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=Image/goku_ssj4]%exo7 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=Image/sseiya_shura]%exo8 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\begin{EnvtExo}[Decoration=Points/7]%exo9 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\begin{EnvtExo}[Type=Perso/{Titre perso }]%exo10 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\StyleEnvtExo[Couleur=red,Police=\bfseries\ttfamily,EpTrait=2pt,Libelle={Exercice n°}] + +\begin{EnvtExo}[Decoration=Icone/\faAddressBook]%exo11 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\begin{EnvtExo}[Type=Perso/{Titre perso },Decoration=Chrono/25,Couleur=red,Trait=dashilles]%exo12 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\StyleEnvtExoDefaut + +\begin{EnvtExo}% + [Type=Perso/{Titre perso~},Decoration=Image/goku_ssj4,Trait=non,Compteur=false]%exo13 + \ipsum<Lang=FR,Type=sent> +\end{EnvtExo} + +\TitreExo[Type=Perso/{Annexe Exercice 3},Compteur=false,Decoration=Image/sseiya_aiolos]%exo14 + +\ipsum<Lang=FR,Type=sent> + \end{document}
\ No newline at end of file diff --git a/macros/latex/contrib/customenvs/tex/customenvs.sty b/macros/latex/contrib/customenvs/tex/customenvs.sty index ee8f4427a2..797a4e65bc 100644 --- a/macros/latex/contrib/customenvs/tex/customenvs.sty +++ b/macros/latex/contrib/customenvs/tex/customenvs.sty @@ -3,9 +3,10 @@ % source pencil...: CC-BY-SA 4.0 https://tex.stackexchange.com/questions/504092/replicating-a-fancy-bordered-text-style-in-latex/504145#504145 \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{customenvs}[2024/04/04 0.1.4 Custom classic environments] +\ProvidesPackage{customenvs}[2024/05/17 0.1.5 Custom classic environments] %====HISTORIQUE +% v 0.1.6 Boxes for exam title + circled numbers + Vignettes + Small simple boxes creation % v 0.1.4 Commande (en/fr) pour du texte dans une boîte arrondie, de hauteur 'figée' + 'Chat' SMS % v 0.1.3 Environnement/Commande pour présentation d'un exercice % v 0.1.2 Crayon de compétences @@ -54,8 +55,9 @@ \RequirePackage{listofitems} \RequirePackage{calc} \RequirePackage{tikz} -\usetikzlibrary{decorations.pathmorphing,positioning,shapes.misc,calc} -\usepackage{tcolorbox} +\usetikzlibrary{decorations.pathmorphing,positioning,shapes.misc,calc,babel} +\RequirePackage{tcolorbox} +\RequirePackage{varwidth} \tcbuselibrary{skins} %%----COMMANDES FR @@ -922,7 +924,7 @@ \setKVdefault[BoiteArrondie]{% Fond=red,% Texte=white,% - EspH=0.25em,% + EspH=0.125em,% Style=rect } \NewDocumentCommand\BoiteArrondie{ O{} m O{char} }{% @@ -1346,25 +1348,23 @@ } %====ROUNDED BOX -\defKV[RoundedBox]{hmargin=\def\RoundedBoxDelta{#1},style=\def\RoundedBoxStyle{#1}} -\setKVdefault[RoundedBox]{% - bg=red,% - txt=white,% - hmargin=0.25em,% - style=rect -} - - - -\NewDocumentCommand\RoundedBox{ O{} m O{char} }{% - \restoreKV[RoundedBox]% - \setKV[RoundedBox]{#1}% - \settototalheight{\tmpheightbox}{\hbox{(EazertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN)#2}}%hauteur globale - \IfStrEqCase{\RoundedBoxStyle}{% - {rect}{\tikz[remember picture,baseline=(#3.base)]{\node[minimum height=\tmpheightbox,shape=rectangle,rounded corners=0.25em,fill={\useKV[RoundedBox]{bg}},inner sep=0.75pt,outer sep=0pt,text={\useKV[RoundedBox]{txt}}] (#3) {\vphantom{(qE)}\kern\RoundedBoxDelta#2\kern\RoundedBoxDelta};}}% - {circle}{\tikz[remember picture,baseline=(#3.base)]{\node[minimum height=\tmpheightbox,shape=circle,fill={\useKV[RoundedBox]{bg}},inner sep=0.75pt,outer sep=0pt,text={\useKV[RoundedBox]{txt}}] (#3) {\vphantom{(qE)}#2};}}% - }\relax -} +% \defKV[RoundedBox]{hmargin=\def\RoundedBoxDelta{#1},style=\def\RoundedBoxStyle{#1}} +% \setKVdefault[RoundedBox]{% + % bg=red,% + % txt=white,% + % hmargin=0.25em,% + % style=rect +% } + +% \NewDocumentCommand\RoundedBox{ O{} m O{char} }{% + % \restoreKV[RoundedBox]% + % \setKV[RoundedBox]{#1}% + % \settototalheight{\tmpheightbox}{\hbox{(EazertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN)#2}}%hauteur globale + % \IfStrEqCase{\RoundedBoxStyle}{% + % {rect}{\tikz[remember picture,baseline=(#3.base)]{\node[minimum height=\tmpheightbox,shape=rectangle,rounded corners=0.25em,fill={\useKV[RoundedBox]{bg}},inner sep=0.75pt,outer sep=0pt,text={\useKV[RoundedBox]{txt}}] (#3) {\vphantom{(qE)}\kern\RoundedBoxDelta#2\kern\RoundedBoxDelta};}}% + % {circle}{\tikz[remember picture,baseline=(#3.base)]{\node[minimum height=\tmpheightbox,shape=circle,fill={\useKV[RoundedBox]{bg}},inner sep=0.75pt,outer sep=0pt,text={\useKV[RoundedBox]{txt}}] (#3) {\vphantom{(qE)}#2};}}% + % }\relax +% } %====Chat SMS %===Keys [EN] @@ -1489,5 +1489,226 @@ title={#2\IfBooleanTF{#1}{}{$\cdot$\scalebox{0.6}[0.6]{\faCheckCircle[regular]\!\faCheckCircle[regular]}~}},left=1mm,right=1mm,boxsep=0mm]{#3}% } +%====SMALL BOXES CREATION +\tikzset{simpleboxrulearrow/.style={line width=0.8pt,|->,>=latex}} + +% \NewTColorBox{SimpleBox}{ O{blue} D<>{} m }{ + % enhanced,nobeforeafter,blanker,size=small,bottom=1mm,before=\par\noindent,%top=0mm,left=1mm,right=1mm, + % title={#3},fonttitle=\sffamily\bfseries\color{#1},lefttitle=1em, + % finish={\draw[#1,simpleboxrulearrow] ([xshift=1em]title.west) --++ (-1em,0) |- (frame.south east) -- ($(frame.south east)!0.5!(frame.north east)$) ;},% + % #2 +% } + +\NewTColorBox{BoiteSimple}{ O{blue} D<>{} m }{ + enhanced,nobeforeafter,blanker,size=small,bottom=1mm,before=\par\noindent,%top=0mm,left=1mm,right=1mm, + title={#3},fonttitle=\sffamily\bfseries\color{#1},lefttitle=1em, + finish={\draw[#1,simpleboxrulearrow] ([xshift=1em]title.west) --++ (-1em,0) |- (frame.south east) -- ($(frame.south east)!0.5!(frame.north east)$) ;},% + #2 +} + +% \NewDocumentCommand\GenSimpleBox{ O{blue} m }{% + % 1 = couleur + % 2 = nom + % \NewTColorBox{#2}{ O{} m }{ + % enhanced,nobeforeafter,blanker,size=small,bottom=1mm,before=\par\noindent,%top=0mm,left=1mm,right=1mm, + % title={##2},fonttitle=\sffamily\bfseries\color{#1},lefttitle=1em, + % finish={\draw[#1,simpleboxrulearrow] ([xshift=1em]title.west) --++ (-1em,0) |- (frame.south east) -- ($(frame.south east)!0.5!(frame.north east)$) ;},% + % ##1 + % } +% } + +\NewDocumentCommand\GenereBoiteSimple{ O{blue} m }{% + %1 = couleur + %2 = nom + \NewTColorBox{#2}{ O{} m }{ + enhanced,nobeforeafter,blanker,size=small,bottom=1mm,before=\par\noindent,%top=0mm,left=1mm,right=1mm, + title={##2},fonttitle=\sffamily\bfseries\color{#1},lefttitle=1em, + finish={\draw[#1,simpleboxrulearrow] ([xshift=1em]title.west) --++ (-1em,0) |- (frame.south east) -- ($(frame.south east)!0.5!(frame.north east)$) ;},% + ##1 + } +} + +%====CIRCLEDNUMBERSSIMPLE +\defKV[CircledBoxNumber]{bg=\def\tmpbordernbcircbox{#1}} +\setKVdefault[CircledBoxNumber]{bg={},txt=black,bthick=0.5pt,bcol=black,raise=true} + +\newlength{\tmpheightnbcircbox} +\newlength{\tmpdepthnbcircbox} +\NewDocumentCommand\CircledNumber{ O{} m O{circnb} }{% + \restoreKV[CircledBoxNumber]% + \setKV[CircledBoxNumber]{#1}% + \settototalheight{\tmpheightnbcircbox}{(1234567890)}%hauteur globale + \settodepth{\tmpdepthnbcircbox}{(1234567890)}% + \ifboolKV[CircledBoxNumber]{raise}% + {% + \IfEq{\tmpbordernbcircbox}{}% + {% + {\tikz[baseline={([yshift=\tmpdepthnbcircbox]current bounding box.south)}]\node[outer sep=0pt,inner sep=0.5pt,minimum height={\tmpheightnbcircbox-\useKV[CircledBoxNumber]{bthick}},draw,{\useKV[CircledBoxNumber]{bcol}},line width={\useKV[CircledBoxNumber]{bthick}},circle,text={\useKV[CircledBoxNumber]{txt}}] (#3) {\ifnum#2<10 #2\else\scalebox{0.5}[1]{#2}\fi} ;}% + }% + {% + {\tikz[baseline={([yshift=\tmpdepthnbcircbox]current bounding box.south)}]\node[outer sep=0pt,inner sep=0.5pt,minimum height={\tmpheightnbcircbox-\useKV[CircledBoxNumber]{bthick}},draw,{\useKV[CircledBoxNumber]{bcol}},line width={\useKV[CircledBoxNumber]{bthick}},circle,fill={\useKV[CircledBoxNumber]{bg}},text={\useKV[CircledBoxNumber]{txt}}] (#3) {\ifnum#2<10 #2\else\scalebox{0.5}[1]{#2}\fi} ;}% + }% + }% + {% + \IfEq{\tmpbordernbcircbox}{}% + {% + {\tikz[baseline=(#3.base)] \node[outer sep=0pt,inner sep=0.5pt,minimum height={\tmpheightnbcircbox-\useKV[CircledBoxNumber]{bthick}},draw,{\useKV[CircledBoxNumber]{bcol}},line width={\useKV[CircledBoxNumber]{bthick}},circle,text={\useKV[CircledBoxNumber]{txt}}] (#3) {\ifnum#2<10 #2\else\scalebox{0.5}[1]{#2}\fi} ;}% + }% + {% + {\tikz[baseline=(#3.base)] \node[outer sep=0pt,inner sep=0.5pt,minimum height={\tmpheightnbcircbox-\useKV[CircledBoxNumber]{bthick}},draw,{\useKV[CircledBoxNumber]{bcol}},line width={\useKV[CircledBoxNumber]{bthick}},circle,fill={\useKV[CircledBoxNumber]{bg}},text={\useKV[CircledBoxNumber]{txt}}] (#3) {\ifnum#2<10 #2\else\scalebox{0.5}[1]{#2}\fi} ;}% + }% + }% +} + +%====EXAM BOX TITLE(s) +\NewDocumentCommand\LetPhantomBox{}{% + \vphantom{(ÉAZERTYUIOPQSDFGHJKLMWXCVBN,éàço)}% +} + +\tcbset{StyleTitreSujet/.style={% + enhanced,size=small, + colback=white!5,boxrule=1.25pt, + attach boxed title to top left={xshift=0.5cm,yshift=1mm-\tcboxedtitleheight}, + varwidth boxed title*=-3cm, + boxed title style={frame code={ + \path[fill=tcbcolframe!50!black] + ([yshift=-1mm,xshift=-1mm]frame.north west) + arc[start angle=0,end angle=180,radius=1mm] + ([yshift=-1mm,xshift=1mm]frame.north east) + arc[start angle=180,end angle=0,radius=1mm]; + \path[fill=tcbcolframe] ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east) [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east) -- (frame.south east) -- (frame.south west) -- ([xshift=-1mm,yshift=-1mm]frame.north west) [sharp corners]-- cycle; + },interior engine=empty,size=fbox, + }, + fonttitle=\bfseries\sffamily, + fontupper=\huge\bfseries\sffamily, + } +} + +\defKV[tcbtitresujet]{% + AlignH=\def\tcbtitresujethalign{#1} +} + +\setKVdefault[tcbtitresujet]{% + Couleur=black, + AlignH=center +} + +\NewDocumentEnvironment{TitreSujet}{ O{} D<>{} m }% +{% + \restoreKV[tcbtitresujet]% + \setKV[tcbtitresujet]{#1}% + \IfStrEqCase{\tcbtitresujethalign}{% + {right}{\tcbset{StyleTitreSujetAlign/.style={halign=flush right}}}% + {left}{\tcbset{StyleTitreSujetAlign/.style={halign=flush left}}}% + }[\tcbset{StyleTitreSujetAlign/.style={halign=flush center}}]% + \tcolorbox[colupper={\useKV[tcbtitresujet]{Couleur}},colframe={\useKV[tcbtitresujet]{Couleur}},StyleTitreSujet,StyleTitreSujetAlign,title={\vphantom{QJ}#3},before upper=\LetPhantomBox,after upper=\LetPhantomBox,#2]% +}% +{% + \endtcolorbox% +} + +\tcbset{StyleTitreSujetSousEpreuve/.style={% + center,after skip=1pt,size=small,boxsep=3pt,boxrule=1pt,colback=white,left=2pt,right=2pt,% + sharp corners,rounded corners=downhill,arc=8pt, + fontupper={\sffamily\bfseries\large} + } +} + +\NewDocumentCommand\SousTitreSujetEpreuve{ O{black} m }{% + \tcbset{StyleTitreSujetSousEpreuveCouleur/.style={colframe=#1,colupper=#1}} + \IfStrEqCase{#2}{% + {}{\tcbox[StyleTitreSujetSousEpreuve,StyleTitreSujetSousEpreuveCouleur]{#2}}% + {U21}{\tcbox[StyleTitreSujetSousEpreuve,StyleTitreSujetSousEpreuveCouleur,before upper=\faSortNumericDown\:\:,after upper=\:\:\faProjectDiagram]{Épreuve U2 - Mathématiques pour l'Informatique}}% + {U2}{\tcbox[StyleTitreSujetSousEpreuve,StyleTitreSujetSousEpreuveCouleur,before upper=\faSortNumericDown\:\:,after upper=\:\:\faProjectDiagram]{Épreuve U2 - Mathématiques pour l'Informatique}}% + {U2CG}{\tcbox[StyleTitreSujetSousEpreuve,StyleTitreSujetSousEpreuveCouleur,before upper=\faSortNumericDown\:\:,after upper=\:\:\faProjectDiagram]{Épreuve U2 - Mathématiques appliquées}}% + {UF2}{\tcbox[StyleTitreSujetSousEpreuve,StyleTitreSujetSousEpreuveCouleur,before upper=\faDice\:\:,after upper=\:\:\faChartLine]{Épreuve UF2 - Mathématiques Approfondies}}% + {U41OL}{\tcbox[StyleTitreSujetSousEpreuve,StyleTitreSujetSousEpreuveCouleur,before upper=\faDice\:\:,after upper=\:\:\faBezierCurve]{Épreuve U41 - Mathématiques}} + }% +} + +\NewDocumentCommand\SujetTitreExo{ O{black} m }{% + \tcolorbox[enhanced,width=\linewidth,size=small,colback=white,colframe=#1,boxrule=0.75pt,fontupper=\color{#1}\Large\sffamily\bfseries,sharp corners,rounded corners=south,arc=4pt,before upper=\LetPhantomBox] + #2 + \endtcolorbox% +} + +%====vignettes +\NewDocumentCommand\LetPhantomVignette{}{% + \vphantom{(AZERTYUIOPQSDFGHJKLMWXCVBN,éàço)}% +} + +\tcbset{cevignettes/.style={% + nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,arc=2pt,boxrule=0.65pt,left=1.75pt,right=1.25pt,top=1.25pt,bottom=0.5pt,colback=white,before upper=\LetPhantomVignette + } +} + +\tcbset{cevignettepy/.style={% + cevignettes,left=6pt,coltitle=tcbcolframe, + underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.55}[0.75]{\textbf{PY}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}} + } +} + +\tcbset{cevignettealgo/.style={% + cevignettes,left=6pt,coltitle=tcbcolframe, + underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.55}[0.75]{\textbf{ALGO}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}} + } +} + +\tcbset{cevignettetableur/.style={% + cevignettes,left=6pt,coltitle=tcbcolframe, + underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.5}[0.75]{\textbf{EXCEL}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}} + } +} + +\tcbset{cevignetteMPM/.style={% + cevignettes,left=6pt,coltitle=white, + underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.55}[0.75]{\textbf{MPM}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}} + } +} + +\tcbset{cevignettegraph/.style={% + cevignettes,left=6pt,coltitle=white, + underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.55}[0.75]{\textbf{GRPH}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}} + } +} + +\tcbset{cevignetteshell/.style={% + cevignettes,left=6pt,coltitle=white, + underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black] {\scalebox{0.5}[0.75]{\textbf{SHELL}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}} + } +} + +\tcbset{cevignettelatex/.style={% + cevignettes,left=6pt,coltitle=white, + underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.55}[0.75]{\textbf{\LaTeX}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}} + } +} + +\tcbset{cevignettexcas/.style={% + cevignettes,left=6pt,coltitle=white,colback=white,% + underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.55}[0.75]{\textbf{XCAS}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}} + } +} + +\defKV[cevignette]{Type=\def\cevignettetype{#1},Couleur=\def\cevignettecolor{#1},Police=\def\cevignettefont{#1}} +\setKVdefault[cevignette]{Type={},Couleur={darkgray},Police=\footnotesize} + +\NewDocumentCommand\AffVignette{ s O{} m }{% + \restoreKV[cevignette]% + \setKV[cevignette]{#2}% + \IfStrEqCase{\cevignettetype}{% + {}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont},cevignettes]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}% + {algo}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont\ttfamily},cevignettealgo]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}% + {py}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont\ttfamily},cevignettepy]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}% + {pypit}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont\ttfamily},cevignettepy]{\piton{#3}}}% + {pyl}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont\ttfamily},cevignettepy]{\piton{\py{#3}}}}% + {mpm}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont},cevignetteMPM]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}% + {grph}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont},cevignettegraph]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}% + {xcas}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont},cevignettexcas]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}% + {shell}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont\ttfamily},cevignetteshell]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}% + {tex}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont\ttfamily},cevignettelatex]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}% + {sheet}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont},cevignettetableur]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}% + }\relax% +} \endinput
\ No newline at end of file diff --git a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf b/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf Binary files differindex 1a049ae58c..dcd5987717 100644 --- a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf +++ b/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf diff --git a/macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex b/macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex index c66c5e1d2c..dfbd3a5d23 100644 --- a/macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex +++ b/macros/latex/contrib/profcollege/latex/PfCPatronPaves.tex @@ -30,6 +30,149 @@ }% }% +\setsepchar{,}\ignoreemptyitems +\readlist*\ListePatronsCube{% + {ooxo,xxxx,ooxo},% + {oxoo,xxxx,xooo},% + {ooxo,xxxx,oxoo},% + {ooox,xxxx,xooo},% + {ooox,xxxx,oxoo},% + {xxxoo,ooxxx},% + {xxoo,oxxo,ooxx},% + {xxoo,oxxx,ooox},% + {xxoo,oxxx,ooxo},% + {ooox,xxxx,ooox},% + {ooxo,xxxo,ooxx}% +}% +\readlist*\ListePatronsCubeCouleurs{% + {LightSteelBlue,Crimson,Yellow,Crimson,Yellow,LightSteelBlue},% + {LightSteelBlue,Crimson,Yellow,Crimson,Yellow,LightSteelBlue},% + {LightSteelBlue,Crimson,Yellow,Crimson,Yellow,LightSteelBlue},% + {LightSteelBlue,Crimson,Yellow,Crimson,Yellow,LightSteelBlue},% + {LightSteelBlue,Crimson,Yellow,Crimson,Yellow,LightSteelBlue},% + {LightSteelBlue,Crimson,LightSteelBlue,Yellow,Crimson,Yellow},% + {LightSteelBlue,Crimson,Yellow,LightSteelBlue,Crimson,Yellow},% + {LightSteelBlue,Crimson,Yellow,LightSteelBlue,Yellow,Crimson},% + {LightSteelBlue,Crimson,Yellow,LightSteelBlue,Yellow,Crimson},% + {LightSteelBlue,Crimson,Yellow,Crimson,Yellow,LightSteelBlue},% + {LightSteelBlue,Crimson,Yellow,Crimson,LightSteelBlue,Yellow}% +}% + +\readlist*\ListePatronsPave{% + {hlpl,lopo,hopo,lopo},% + {hlpo,loph,hopo,lopo},% + {hlpo,lopo,hopl,lopo},% + {hlpo,lopo,hopo,loph},% + {hopo,lhph,hopo,lopo},% + {hopo,lhpo,hopl,lopo},% + {hopo,lhpo,hopo,lopl},% + {hopo,lopo,hlpl,lopo},% + {hopo,lopo,hlpo,loph},% + {hopo,lopo,hopo,lhph},%10 + {plhl,loho,poho,loho},% + {plho,loho,pohl,loho},% + {plho,loho,pohl,loho},% + {plho,loho,poho,lohp},% + {poho,lphp,poho,loho},% + {poho,lpho,pohl,loho},% + {poho,lpho,poho,lohp},% + {poho,loho,plhl,loho},% + {poho,loho,plho,lohp},% + {poho,loho,poho,lphp},% + {phlh,holo,polo,holo},% + {phlo,holp,polo,holo},% + {phlo,holo,polh,holo},% + {phlo,holo,polo,holp},% + {polo,hplp,polo,holo},% + {polo,hplo,polh,holo},% + {polo,hplo,polo,holp},% + {polo,holo,phlh,holo},% + {polo,holo,phlo,holp},% + {polo,holo,polo,hplp},% + {hlpo,lopo,hopl,pool},% + {hopo,lhpo,hopl,pool},% + {hopo,lopo,hlph,pool},% + {lhpo,hopo,loph,pooh},% + {lopo,hlpo,loph,pooh},% + {lopo,hopo,lhoh,pooh},% + {plho,loho,pohl,hool},% + {poho,lpho,pohl,hool},% + {poho,loho,plhl,hool},% + {lpho,poho,lohp,hoop},% + {loho,plho,lohp,hoop},% + {loho,poho,lphp,hoop},% + {phlo,holo,polh,looh},% + {polo,hplo,polh,looh},% + {polo,holo,phlh,looh},% + {hplo,polo,holp,loop},% + {holo,phlo,holp,loop},% + {holo,polo,hplp,loop},% + {hpo,lpo,hpl,pol,hol},% + {lpo,hpo,lph,poh,loh},% + {pho,plo,phl,hol,pol},% + {hpoo,lpho,pohl,hool},% + {lpoo,hplo,polh,looh},% + {phoo,lhpo,hopl,pool} +} + +\readlist*\ListePatronsPaveCouleurs{% + {Orange,Crimson,Orange,LightGreen,Crimson,LightGreen}, + {Orange,Crimson,LightGreen,Orange,Crimson,LightGreen}, + {Orange,Crimson,LightGreen,Crimson,Orange,LightGreen}, + {Orange,Crimson,LightGreen,Crimson,LightGreen,Orange}, + {Crimson,Orange,LightGreen,Orange,Crimson,LightGreen}, + {Crimson,Orange,LightGreen,Crimson,Orange,LightGreen}, + {Crimson,Orange,LightGreen,Crimson,LightGreen,Orange}, + {Crimson,LightGreen,Orange,Crimson,Orange,LightGreen}, + {Crimson,LightGreen,Orange,Crimson,LightGreen,Orange}, + {Crimson,LightGreen,Crimson,Orange,LightGreen,Orange},%10 + {LightGreen,Crimson,LightGreen,Orange,Crimson,Orange},% + {LightGreen,Crimson,Orange,LightGreen,Crimson,Orange},% + {LightGreen,Crimson,Orange,Crimson,LightGreen,Orange},% + {LightGreen,Crimson,Orange,Crimson,Orange,LightGreen},% + {Crimson,LightGreen,Orange,LightGreen,Crimson,Orange},% + {Crimson,LightGreen,Orange,Crimson,LightGreen,Orange},% + {Crimson,LightGreen,Orange,Crimson,Orange,LightGreen},% + {Crimson,Orange,LightGreen,Crimson,LightGreen,Orange},% + {Crimson,Orange,LightGreen,Crimson,Orange,LightGreen},% + {Crimson,Orange,Crimson,LightGreen,Orange,LightGreen},%20 + {Crimson,LightGreen,Crimson,Orange,LightGreen,Orange},% + {Crimson,LightGreen,Orange,LightGreen,Crimson,Orange},% + {Crimson,LightGreen,Orange,LightGreen,Crimson,Orange},% + {Crimson,LightGreen,Orange,LightGreen,Orange,Crimson},% + {LightGreen,Crimson,Orange,Crimson,LightGreen,Orange},% + {LightGreen,Crimson,Orange,LightGreen,Crimson,Orange},% + {LightGreen,Crimson,Orange,LightGreen,Orange,Crimson},% + {LightGreen,Orange,Crimson,LightGreen,Crimson,Orange},% + {LightGreen,Orange,Crimson,LightGreen,Orange,Crimson},% + {LightGreen,Orange,LightGreen,Crimson,Orange,Crimson},%30 + {Orange,Crimson,LightGreen,Crimson,Orange,LightGreen},% + {Crimson,Orange,LightGreen,Crimson,Orange,LightGreen},% + {Crimson,LightGreen,Orange,Crimson,Orange,LightGreen},% + {Orange,LightGreen,Crimson,LightGreen,Orange,Crimson},% + {LightGreen,Orange,Crimson,LightGreen,Orange,Crimson},% + {LightGreen,Crimson,Orange,LightGreen,Orange,Crimson},% + {LightGreen,Crimson,Orange,Crimson,LightGreen,Orange},% + {Crimson,LightGreen,Orange,Crimson,LightGreen,Orange},% + {Crimson,Orange,LightGreen,Crimson,LightGreen,Orange},% + {LightGreen,Orange,Crimson,Orange,LightGreen,Crimson},%40 + {Orange,LightGreen,Crimson,Orange,LightGreen,Crimson},% + {Orange,Crimson,LightGreen,Orange,LightGreen,Crimson},% + {Crimson,LightGreen,Orange,LightGreen,Crimson,Orange},% + {LightGreen,Crimson,Orange,LightGreen,Crimson,Orange},% + {LightGreen,Orange,Crimson,LightGreen,Crimson,Orange},% + {Crimson,Orange,LightGreen,Orange,Crimson,LightGreen},% + {Orange,Crimson,LightGreen,Orange,Crimson,LightGreen},% + {Orange,LightGreen,Crimson,Orange,Crimson,LightGreen},% + {Crimson,LightGreen,Crimson,Orange,LightGreen,Orange},% + {LightGreen,Crimson,LightGreen,Orange,Crimson,Orange},%50 + {Crimson,Orange,Crimson,LightGreen,Orange,LightGreen},% + {Crimson,LightGreen,Orange,Crimson,LightGreen,Orange},% + {LightGreen,Crimson,Orange,LightGreen,Crimson,Orange},% + {Crimson,Orange,LightGreen,Crimson,Orange,LightGreen}% +}% +\reademptyitems + \def\MPPatronCubeCode{% Arete=\useKV[ClesPatron]{Arete}; % diff --git a/macros/latex/contrib/profcollege/latex/PfCVueCubes.tex b/macros/latex/contrib/profcollege/latex/PfCVueCubes.tex index 5f284e051e..9365b7e621 100644 --- a/macros/latex/contrib/profcollege/latex/PfCVueCubes.tex +++ b/macros/latex/contrib/profcollege/latex/PfCVueCubes.tex @@ -1,30 +1,105 @@ %%% % Vue Cubes %%% -\setKVdefault[VueCubes]{Solution=false,Hauteur=5,Profondeur=4,Largeur=3,Angle=60,Nom=Ex1,Trou=false,Echelle=0.25,CouleurCube=LightSteelBlue,CouleurFleche=LightGray,Face=false,Creation=false,Grilles=false,Seul=false} +\setKVdefault[VueCubes]{Solution=false,Hauteur=5,Profondeur=4,Largeur=3,Angle=60,Nom=Ex1,Trou=false,Echelle=0.25,CouleurCube=LightSteelBlue,CouleurFleche=LightGray,Face=false,Creation=false,Grilles=false,Seul=false,Perso=false,EclateX=0,EclateZ=0,EclateY=0} \newtoks\toklisteVueCube% \def\UpdatetoksVueCube#1\nil{\addtotok\toklisteVueCube{#1,}}% +\def\UpdatetoksEmpilementPerso#1\nil{\addtotok\toklisteVueCube{"#1",}}% \NewDocumentCommand\VueCubes{o m}{% \useKVdefault[VueCubes]% - \setKV[VueCubes]{#1} - \ifboolKV[VueCubes]{Solution}{% - \BuildVueCubesSolution% + \setKV[VueCubes]{#1}% + \toklisteVueCube{}% + \ifboolKV[VueCubes]{Perso}{% + \setsepchar[*]{,*/}\ignoreemptyitems% + \readlist*\ListeCouches{#2}% + \reademptyitems% + \foreachitem\compteur\in\ListeCouches{% + \foreachitem\compteurdeux\in\ListeCouches[\compteurcnt]{% + \expandafter\UpdatetoksEmpilementPerso\compteurdeux\nil% + }% + }% + \BuildMPEmpilementPerso{\the\toklisteVueCube}{\ListeCoucheslen}{\listlen\ListeCouches[1]}% }{% - \ifboolKV[VueCubes]{Creation}{%Le nombre de données doit être compatible avec le "volume du pavé droit" - \ignoreemptyitems% - \readlist*\PfCListeHauteursCubes{#2}% - \reademptyitems% - \toklisteVueCube{}% - \foreachitem\compteur\in\PfCListeHauteursCubes{\expandafter\UpdatetoksVueCube\compteur\nil}% - \BuildVueCubes{\useKV[VueCubes]{Angle}}{\the\toklisteVueCube}% + \ifboolKV[VueCubes]{Solution}{% + \BuildVueCubesSolution% }{% - \BuildVueCubes{\useKV[VueCubes]{Angle}}{}% + \ifboolKV[VueCubes]{Creation}{%Le nombre de données doit être compatible avec le "volume du pavé droit" + \ignoreemptyitems% + \readlist*\PfCListeHauteursCubes{#2}% + \reademptyitems% + \foreachitem\compteur\in\PfCListeHauteursCubes{\expandafter\UpdatetoksVueCube\compteur\nil}% + \BuildVueCubes{\useKV[VueCubes]{Angle}}{\the\toklisteVueCube}% + }{% + \BuildVueCubes{\useKV[VueCubes]{Angle}}{}% + }% }% }% }% +\NewDocumentCommand{\BuildMPEmpilementPerso}{mmm}{% + \ifluatex + \mplibforcehmode + \begin{mplibcode} + nbcouches=#2; + nblignes:=#3; + + input PfCSolid; + + intensite:=1.5; + + Ferme[0]:=false; + outcolor:=\useKV[VueCubes]{CouleurCube};% + incolor:=white; + nb:=1;subh:=1; + creux:=true; + + Phi := \useKV[VueCubes]{Angle}; + Echelle:=\useKV[VueCubes]{Echelle}; + EclateX:=\useKV[VueCubes]{EclateX}; + EclateY:=\useKV[VueCubes]{EclateY}; + EclateZ:=\useKV[VueCubes]{EclateZ}; + + string LesSymboles[]; + string LesLignes[][]; + + TotalObj:=0; + + vardef CreationSolide(text t)= + n:=0; + for p_=t: + n:=n+1; + LesSymboles[n]=p_; + endfor; + for l=nbcouches downto 1: + for k=nblignes downto 1: + LesLignes[l][k]=LesSymboles[(nbcouches-l)*nblignes+(nblignes-k+1)]; + endfor; + endfor; + for l=nbcouches downto 1: + for k=nblignes downto 1: + for m=0 upto (length(LesLignes[l][k])-1): + if (substring((m,m+1)) of LesLignes[l][k])="x": + TotalObj:=incr TotalObj; + TR:=(Echelle*(nblignes-k)+Echelle*(nblignes-k)*EclateX,Echelle*(m+m*EclateY),Echelle*l-Echelle*(nbcouches-l)*EclateZ); + ObjetDeplacement[TotalObj](0); + fi; + endfor; + endfor; + endfor; + enddef; + + Initialisation(2500,Phi,20,50); + Objetcube0("a="&decimal(Echelle)); + + CreationSolide(#1); + nbobj:=TotalObj; + DessineFusion; + \end{mplibcode} + \fi +} + \NewDocumentCommand\BuildVueCubes{m m}{% \ifluatex \mplibforcehmode diff --git a/macros/latex/contrib/profcollege/latex/ProfCollege.sty b/macros/latex/contrib/profcollege/latex/ProfCollege.sty index 7c1bad8c3d..ca3b52ba9a 100644 --- a/macros/latex/contrib/profcollege/latex/ProfCollege.sty +++ b/macros/latex/contrib/profcollege/latex/ProfCollege.sty @@ -2,9 +2,9 @@ % licence : Released under the LaTeX Project Public License v1.3c % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e}% -\def\filedate{2024/04/26}% +\def\filedate{2024/05/18}% \let\PfCfiledate\filedate% -\def\fileversion{0.99-A-d}% +\def\fileversion{0.99-A-f}% \let\PfCfileversion\fileversion% \ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]% @@ -165,18 +165,6 @@ \def\bla{}%JCC :) Pour les tests sur arguments vides -%% Colorer en mode mathématique. \color ne gère pas les espaces propres au mode mathématique. Donc besoin de changer -% https://tex.stackexchange.com/questions/21598/how-to-color-math-symbols -%\makeatletter% -%\def\mathcolor#1#{\@mathcolor{#1}}% -%\def\@mathcolor#1#2#3{% -% \protect\leavevmode% -% \begingroup% -% \color#1{#2}#3% -% \endgroup% -%}% -%\makeatother% - % Pb ProfCollege<->Chinois soulev\'e par Denis % Solution by egreg :) \newcommand\getstrut[1]{% @@ -326,20 +314,11 @@ \IfNoValueTF{#1}{\Dotfill}{\makebox[#1]{\Dotfill}}% }% -%\NewDocumentCommand\Lignespointilles{m}{% -% \xintifboolexpr{\fpeval{#1}>1}{% -% \xintFor* ##1 in {\xintSeq {1}{\fpeval{#1}}}\do{% -% \pointilles\par% -% }% -% }{}% -%}% - \NewDocumentCommand\PfCNbLignesRestantes{}{% \edef\measurepage{\dimexpr\pagegoal-\pagetotal\relax}% - \xintifboolexpr{\fpeval{\the\measurepage}>\fpeval{\the\textheight}}{ -% Toto - \edef\measurepage{\dimexpr\textheight\relax} - }{} + \xintifboolexpr{\fpeval{\the\measurepage}>\fpeval{\the\textheight}}{% + \edef\measurepage{\dimexpr\textheight\relax}% + }{}% \xdef\PfCResteLignes{\fpeval{trunc((\the\measurepage)/(\baselineskip),0)}}% }% @@ -509,16 +488,76 @@ \day=\the\PfCrappeljour\relax% } -\newcommand\MelangeLettres[2]{% +\NewDocumentCommand\MelangeLettres{smm}{% % #2 Nombre d'éléments à conserver + % #3 Nom de la commande qui reçoit la liste. \setsepchar{,}\ignoreemptyitems% \readlist*\ListeInter{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z}% \xdef\faa{}% Liste construite \xdef\fii{}% Liste détruite - \xintFor* ##1 in {\xintSeq{1}{#1}}\do{% + \IfBooleanTF{#1}{% + \xintFor* ##1 in {\xintSeq{1}{#2}}\do{% + \xintifboolexpr{\ListeInterlen>1}{% + \xdef\Alea{\fpeval{randint(\ListeInterlen)}}% + \xdef\faa{\faa\ListeInter[\Alea],}% + \xdef\fii{}% + \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{% + \xintifboolexpr{##2 == \Alea}{% + }{% + \xdef\fii{\fii \ListeInter[##2],}% + }% + }% + }{% + \xdef\faa{\faa\ListeInter[1]}% + }% + \readlist*\ListeInter{\fii}% + }% + }{% + \xintFor* ##1 in {\xintSeq{1}{#2}}\do{% + \xintifboolexpr{\ListeInterlen>1}{% + \xdef\Alea{\fpeval{randint(\ListeInterlen)}}% + \xdef\faa{\faa\ListeInter[\Alea]}% + \xdef\fii{}% + \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{% + \xintifboolexpr{##2 == \Alea}{% + }{% + \xdef\fii{\fii \ListeInter[##2],}% + }% + }% + }{% + \xdef\faa{\faa\ListeInter[1]}% + }% + \readlist*\ListeInter{\fii}% + }% + }% + \xdef#3{\faa}% +}% + +\NewDocumentCommand\MelangeListe{smm}{% + \IfBooleanTF{#1}{% + %Si on cherche un seul élément, on peut l'utiliser directement + \MelangeListeOne{#2}{#3}% + }{% + \MelangeListeNoOne{#2}{#3}% + }% +} + +\NewDocumentCommand\MelangeListeOne{mm}{% + % #1 Liste à mélanger + % #2 Nombre d'éléments à conserver + \setsepchar{,}\ignoreemptyitems% + \readlist*\ListeInter{#1}% + \xdef\faa{}% Liste construite + \xdef\fii{}% Liste détruite + % on crée les #2 premieres solutions. + \xintFor* ##1 in {\xintSeq{1}{#2}}\do{% \xintifboolexpr{\ListeInterlen>1}{% \xdef\Alea{\fpeval{randint(\ListeInterlen)}}% - \xdef\faa{\faa\ListeInter[\Alea]}% + \ifnum\fpeval{##1}=1\relax + \xdef\faa{\ListeInter[\Alea]}% + \else + \xdef\faa{\faa,\ListeInter[\Alea]}% + \fi \xdef\fii{}% \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{% \xintifboolexpr{##2 == \Alea}{% @@ -527,14 +566,14 @@ }% }% }{% - \xdef\faa{\faa\ListeInter[1]}% + \xdef\faa{\faa,\ListeInter[1]}% }% \readlist*\ListeInter{\fii}% }% - \xdef#2{\faa}% + \reademptyitems% }% -\newcommand\MelangeListe[2]{% +\NewDocumentCommand\MelangeListeNoOne{mm}{% % #1 Liste à mélanger % #2 Nombre d'éléments à conserver \setsepchar{,}\ignoreemptyitems% @@ -787,6 +826,8 @@ \def\PfCSymbolTimes{\times}% \def\PfCSymbolDiv{\div}% +\input{PfCVisualisationMulDeci} +\input{PfCArbreChiffre} \input{PfCAssemblagesSolides} \input{PfCTicketCaisse} \input{PfCRecyclage} diff --git a/macros/latex/contrib/profcollege/latex/ProfCollegeT.sty b/macros/latex/contrib/profcollege/latex/ProfCollegeT.sty deleted file mode 100644 index 47646fd5a3..0000000000 --- a/macros/latex/contrib/profcollege/latex/ProfCollegeT.sty +++ /dev/null @@ -1,974 +0,0 @@ -% Author : Christophe Poulain -% licence : Released under the LaTeX Project Public License v1.3c -% or later, see http://www.latex-project.org/lppl.txtf -\NeedsTeXFormat{LaTeX2e}% -\def\filedate{2024/05/15}% -\let\PfCfiledate\filedate% -\def\fileversion{0.99-A-e}% -\let\PfCfileversion\fileversion% -\ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]% - -\RequirePackage{verbatim}% - -\RequirePackage{mathtools}% - -\newif\if@shellescape \@shellescapetrue% -\newif\if@amssymb \@amssymbtrue% -% -\newif\if@Euro \@Eurotrue -\newif\if@CFA \@CFAfalse -\newif\if@CFP \@CFPfalse -\newif\if@CHF \@CHFfalse -\newif\if@US \@USfalse -\newif\if@UK \@UKfalse - -\DeclareOption{CFA}{\@Eurofalse\@CFAtrue}% -\DeclareOption{CFP}{\@Eurofalse\@CFPtrue}% -\DeclareOption{CHF}{\@Eurofalse\@CHFtrue}% -\DeclareOption{UK}{\@Eurofalse\@UKtrue}% -\DeclareOption{US}{\@Eurofalse\@UStrue}% -% -\DeclareOption{nonshellescape}{\@shellescapefalse}% -\DeclareOption{nonamssymb}{\@amssymbfalse}% -\ProcessOptions\relax% - -\if@amssymb% -\RequirePackage{amssymb}% -\fi% - -% mathématiques -\RequirePackage{siunitx}% -\sisetup{% - locale=FR,mode = match, - propagate-math-font = true,% - reset-math-version = false, reset-text-family = false,% - reset-text-series = false, reset-text-shape = false,% - text-family-to-math = true, text-series-to-math = true,% - output-decimal-marker={,},% - group-minimum-digits=4,% - quantity-product={~}% -}% -\DeclareSIUnit{\kmh}{\km\per\hour}% -\newcommand\speed[1]{\SI{#1}{\kmh}}% -\newcommand\Speed[1]{\SI[per-mode=symbol]{#1}{\kmh}}% - -\DeclareSIUnit{\are}{a}% -\DeclareSIUnit{\annee}{an}% -\DeclareSIUnit{\mois}{mois}% -\DeclareSIUnit{\jour}{j}% -\DeclareSIUnit{\quintal}{q}% -\DeclareSIUnit{\octet}{o}% -\DeclareSIUnit{\fahrenheit}{\text{\textdegree}F}% -\DeclareSIUnit{\EuRo}{€}% -\DeclareSIUnit{\Dollar}{\$}% -\DeclareSIUnit{\LivreSterling}{£}% -\DeclareSIUnit{\PfCCFA}{F.C.F.A.}% -\DeclareSIUnit{\PfCCFP}{F.C.F.P.}% -\DeclareSIUnit{\PfCCHF}{CHF}% - -% -\if@CFA% - \DeclareSIUnit{\DeviseDefaut}{F.C.F.A.}% -\fi% -\if@CFP% - \DeclareSIUnit{\DeviseDefaut}{F.C.F.P.}% -\fi% -\if@CHF% - \DeclareSIUnit{\DeviseDefaut}{CHF}% -\fi% -\if@Euro% - \DeclareSIUnit{\DeviseDefaut}{€}% -\fi% -\if@US% - \DeclareSIUnit{\DeviseDefaut}{\Dollar}% -\fi% -\if@UK% - \DeclareSIUnit{\DeviseDefaut}{\LivreSterling}% -\fi% - - -\RequirePackage[table,svgnames]{xcolor}%Gestion des couleurs -%\PassOptionsToPackage{table,svgnames}{xcolor} -\RequirePackage{xstring}%Gestion de chaines de caractères -\RequirePackage{simplekv}%Gestion de paramètres sous forme de clés -\RequirePackage{ifthen}% -\RequirePackage{modulus}%Pour certains calculs arithmétiques. -\RequirePackage{xinttools}%Pour la création dynamique d'un tableau - -\RequirePackage{iftex}% - -\ifluatex% -\RequirePackage{luacas}% -\RequirePackage{luamplib}% -\mplibtextextlabel{enable}%à partir de la v2.25 de mplibcode -\everymplib{input PfCSvgnames; input PfCConstantes; input PfCGeometrie; input PfCAfficheur; beginfig(1);}% -\everyendmplib{endfig;}% -\else% -\if@shellescape% -\RequirePackage[shellescape,latex]{gmp}%inclusion de figures metapost "à la volée"% -\else% -% -\RequirePackage[latex]{gmp}%inclusion de figures metapost "à la volée"% -\fi% -\gmpoptions{everymp={prologues:=3; input PfCLaTeX; input PfCSvgnames; input PfCConstantes; input PfCGeometrie; input PfCAfficheur;}}% -\usempxclass{article}% -\usempxpackage{ProfCollege}% -\usempxpackage[utf8]{inputenc}% -\usempxpackage[T1]{fontenc}% -\usempxpackage{fourier}% -\usempxpackage[french]{babel}% -\usempxpackage{pifont}% -\fi% - -\RequirePackage{xintexpr}% -\RequirePackage{listofitems}% -\RequirePackage{datatool}% -\RequirePackage{multido}% - -\RequirePackage{xlop}% - -\RequirePackage{tcolorbox}% -\tcbuselibrary{breakable,external,fitting,hooks,magazine,poster,raster,skins,theorems,listings,listingsutf8} - -\RequirePackage{tikz}% -% https://tex.stackexchange.com/questions/349259/curved-arrow-describing-a-step-in-a-equation-derivation -%https://tex.stackexchange.com/questions/58656/best-way-to-draw-a-chevron-diagram-using-tikz -\usetikzlibrary{calc,shapes,arrows,tikzmark,chains,positioning,shapes.symbols,babel,fit,backgrounds}% - -%\RequirePackage{suffix}%pour la commande étoilée - -\RequirePackage{multicol}% - -\RequirePackage{hhline}% - -\RequirePackage{stackengine}% -\RequirePackage[thicklines]{cancel}% - -\RequirePackage{fontawesome5}% -\RequirePackage{pifont}%Pour la commande \Autonomie -\RequirePackage{nicematrix}% -\NiceMatrixOptions{allow-duplicate-names}% - -\let\myoldmulticolumn\multicolumn% -\AtBeginEnvironment{tabular}{\let\multicolumn\myoldmulticolumn}% - -%\RequirePackage{multirow}% -\RequirePackage{longtable} - -\RequirePackage{fmtcount}% -\FCloadlang{french}% - -% https://stackoverflow.com/questions/3391103/how-to-make-the-grayed-round-box-using-tiks -%\RequirePackage{environ}% - -%%%%% Quelques besoins particuliers - -\def\bla{}%JCC :) Pour les tests sur arguments vides - -% Pb ProfCollege<->Chinois soulev\'e par Denis -% Solution by egreg :) -\newcommand\getstrut[1]{% - \the\expandafter#1\expanded{\strutbox}% -}% - -% Colorer uniquement la barre de soulignement -% https://tex.stackexchange.com/questions/9466/color-underline-a-formula/153884 -\def\mathunderline#1#2{\color{#1}\underline{{\color{black}#2}}\color{black}}% - -% Ecrire des lignes d'équations -\catcode`\@=11% -\def\Eqalign#1{\null\,\vcenter{\openup\jot\m@th\ialign{% - \strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil% - &&\quad\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$% - \hfil\crcr #1\crcr}}\,}% -\catcode`\@=12% - -%%% -% Commandes "utiles" -%%% -\NewDocumentCommand\NumMA{m}{% - \xintifboolexpr{#1<0}{% - (\num{#1})% - }{% - \num{#1}% - }% -}% - -\NewDocumentCommand\NumS{m}{% - \xintifboolexpr{#1==0}{}{\xintifboolexpr{#1>0}{+\num{#1}}{\num{#1}}} -}% - -\newcounter{Marque} - -\NewDocumentCommand\AffichageTab{O{x}mmm}{% - \ifnum#2=0\relax% - \ifnum#3=0\relax% - \ifnum#4=0\relax% - \else% - #4% - \fi% - \else% - #3*#1% - \ifnum#4=0\relax% - \else% - \ifnum#4<0\relax% - #4% - \else% - +#4% - \fi% - \fi% - \fi% - \else% - #2*#1*#1% - \ifnum#3=0\relax% - \ifnum#4=0\relax% - \else% - \ifnum#4<0% - #4% - \else% - +#4% - \fi% - \fi% - \else% - \ifnum#3<0% - #3*#1% - \else% - +#3*#1% - \fi% - \ifnum#4=0\relax% - \else% - \ifnum#4<0% - #4% - \else% - +#4% - \fi% - \fi% - \fi% - \fi% -}% -%encadrer avec des "sommets arrondis" -%\newsavebox{\logobox}% - -\newcommand\Logo[2]{% -\setbox1=\hbox{\includegraphics[scale=#2]{#1}}% -\begin{tikzpicture}% -\clip[rounded corners=5mm] (0,0) rectangle (\wd1,\ht1);% -\node[xshift=0.5\wd1, yshift=0.5\ht1, inner xsep=0pt, inner ysep=0pt] (box) {% -\includegraphics[scale=#2]{#1}% -};% -\end{tikzpicture}% -}% - -\newcommand\LogoTW[2]{% -\setbox1=\hbox{\includegraphics[scale=#2]{#1}}% -\begin{tikzpicture}% - \clip (0,0) circle (4mm);% - \draw (0,0) circle (4mm);% - \node[xshift=0mm, yshift=0mm, inner xsep=0pt, inner ysep=0pt] (0,0) {% - \includegraphics[scale=#2]{#1}% - };% -\end{tikzpicture}% -}% - -\makeatletter -\def\Suspensionfill{% -\leavevmode -\cleaders \hb@xt@\LongBoitePoint{\ldotp}\hfill -\kern\z@} -\makeatother - -\newlength{\LongBoitePoint} - -\NewDocumentCommand\PointsSuspension{m}{% - \setbox2=\hbox{\ldotp}% - \setlength{\LongBoitePoint}{\wd2}% - \ifx\bla#1\bla% - \Suspensionfill% - \else% - \setbox1=\hbox{#1}% - \StrLen{#1}[\LongueurPoints]% - \ifmmode% - \mathinner{% - \xintFor* ##1 in {\xintSeq{1}{\LongueurPoints}}\do{% - \ldotp% - }% - }% - \else% - \xintFor* ##1 in {\xintSeq{1}{\fpeval{round(\wd1/\wd2)}}}\do{% - \ldotp% - }% - \fi% - \fi% -}% - -\makeatletter% -\NewDocumentCommand\Dotfill{}{% -\leavevmode% -\cleaders\hb@xt@.44em{\hss\xleaders\hrule width0.33em\hss}\hfill% -\kern\z@}% - -\NewDocumentCommand\PfCdotover{}{\leavevmode\cleaders\hb@xt@ .22em{\hss $\cdot$\hss}\hfill\kern\z@}% -\makeatother% - -\NewDocumentCommand\pointilles{o}{% - \IfNoValueTF{#1}{\Dotfill}{\makebox[#1]{\Dotfill}}% -}% - -\NewDocumentCommand\PfCNbLignesRestantes{}{% - \edef\measurepage{\dimexpr\pagegoal-\pagetotal\relax}% - \xintifboolexpr{\fpeval{\the\measurepage}>\fpeval{\the\textheight}}{% - \edef\measurepage{\dimexpr\textheight\relax}% - }{}% - \xdef\PfCResteLignes{\fpeval{trunc((\the\measurepage)/(\baselineskip),0)}}% -}% - -\NewDocumentCommand\PfCLignesFinales{}{% - \PfCNbLignesRestantes% - \xintFor* ##1 in {\xintSeq {1}{\PfCResteLignes}}\do{% - \pointilles\par% - }% -}% - -\NewDocumentCommand\Lignespointilles{m}{% - \ifx\bla#1\bla% - \par\PfCLignesFinales% - \else% - \xintifboolexpr{\fpeval{#1}>1}{% - \xintFor* ##1 in {\xintSeq {1}{#1}}\do{% - \pointilles\par% - }% - }{}% - \fi -}% - -%https://tex.stackexchange.com/questions/128991/frac-or-inference-rule-with-dotted-line -\newcommand\PfCfrac[2]{% -\ooalign{$\genfrac{}{}{0pt}{0}{#1}{#2}$\cr\PfCdotover\cr}% -}% - -\NewDocumentCommand\MultiCol{O{}+m+m}{% - \setsepchar[*]{/}% - \readlist*\ListeNombreCol{#2}% - \setsepchar[*]{§}% - \readlist*\ListeContenuCol{#3}% - \xintFor* ##1 in {\xintSeq{1}{\ListeNombreCollen}}\do{% - \itemtomacro\ListeContenuCol[##1]\PfMTexte - \begin{minipage}[#1]{\ListeNombreCol[##1]\linewidth}% - \PfMTexte - \end{minipage}% - \xintifboolexpr{##1<\ListeNombreCollen}{\hfill\vrule width \columnseprule\hfill}{}% - }% -}% - -\newcount\PfCrappeljour% - -\newcommand\Demain{% - \PfCrappeljour=\day\relax% - \advance\day by 1\relax% - \ifnum\month=1\relax% - \ifnum\day>31\relax% - \day=\numexpr1\relax% - \advance\month by 1\relax% - \today\relax% - \advance\month by -1\relax% - \else% - \today\relax% - \fi% - \fi% - \ifnum\month=2\relax% - \ifnum\day>28\relax% - \day=\numexpr1\relax% - \advance\month by 1\relax% - \today\relax% - \advance\month by -1\relax% - \else% - \today\relax% - \fi% - \fi% - \ifnum\month=3\relax% - \ifnum\day>31\relax% - \day=\numexpr1\relax% - \advance\month by 1\relax% - \today\relax% - \advance\month by -1\relax% - \else% - \today\relax% - \fi% - \fi% - \ifnum\month=4\relax% - \ifnum\day>30\relax% - \day=\numexpr1\relax% - \advance\month by 1\relax% - \today\relax% - \advance\month by -1\relax% - \else% - \today\relax% - \fi% - \fi% - \ifnum\month=5\relax% - \ifnum\day>31\relax% - \day=\numexpr1\relax% - \advance\month by 1\relax% - \today\relax% - \advance\month by -1\relax% - \else% - \today\relax% - \fi% - \fi% - \ifnum\month=6\relax% - \ifnum\day>30\relax% - \day=\numexpr1\relax% - \advance\month by 1\relax% - \today\relax% - \advance\month by -1\relax% - \else% - \today\relax% - \fi% - \fi% - \ifnum\month=7\relax% - \ifnum\day>31\relax% - \day=\numexpr1\relax% - \advance\month by 1\relax% - \today\relax% - \advance\month by -1\relax% - \else% - \today\relax% - \fi% - \fi% - \ifnum\month=8\relax% - \ifnum\day>31\relax% - \day=\numexpr1\relax% - \advance\month by 1\relax% - \today\relax% - \advance\month by -1\relax% - \else% - \today\relax% - \fi% - \fi% - \ifnum\month=9\relax% - \ifnum\day>30\relax% - \day=\numexpr1\relax% - \advance\month by 1\relax% - \today\relax% - \advance\month by -1\relax% - \else% - \today\relax% - \fi% - \fi% - \ifnum\month=10\relax% - \ifnum\day>31\relax% - \day=\numexpr1\relax% - \advance\month by 1\relax% - \today\relax% - \advance\month by -1\relax% - \else% - \today\relax% - \fi% - \fi% - \ifnum\month=11\relax% - \ifnum\day>30\relax% - \day=\numexpr1\relax% - \advance\month by 1\relax% - \today\relax% - \advance\month by -1\relax% - \else% - \today\relax% - \fi% - \fi% - \ifnum\month=12\relax% - \ifnum\day>31\relax% - \day=\numexpr1\relax% - \advance\month by 1\relax% - \today\relax% - \advance\month by -1\relax% - \else% - \today\relax% - \fi% - \fi% - \day=\the\PfCrappeljour\relax% -} - -\NewDocumentCommand\MelangeLettres{smm}{% - % #2 Nombre d'éléments à conserver - % #3 Nom de la commande qui reçoit la liste. - \setsepchar{,}\ignoreemptyitems% - \readlist*\ListeInter{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z}% - \xdef\faa{}% Liste construite - \xdef\fii{}% Liste détruite - \IfBooleanTF{#1}{% - \xintFor* ##1 in {\xintSeq{1}{#2}}\do{% - \xintifboolexpr{\ListeInterlen>1}{% - \xdef\Alea{\fpeval{randint(\ListeInterlen)}}% - \xdef\faa{\faa\ListeInter[\Alea],}% - \xdef\fii{}% - \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{% - \xintifboolexpr{##2 == \Alea}{% - }{% - \xdef\fii{\fii \ListeInter[##2],}% - }% - }% - }{% - \xdef\faa{\faa\ListeInter[1]}% - }% - \readlist*\ListeInter{\fii}% - }% - }{% - \xintFor* ##1 in {\xintSeq{1}{#2}}\do{% - \xintifboolexpr{\ListeInterlen>1}{% - \xdef\Alea{\fpeval{randint(\ListeInterlen)}}% - \xdef\faa{\faa\ListeInter[\Alea]}% - \xdef\fii{}% - \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{% - \xintifboolexpr{##2 == \Alea}{% - }{% - \xdef\fii{\fii \ListeInter[##2],}% - }% - }% - }{% - \xdef\faa{\faa\ListeInter[1]}% - }% - \readlist*\ListeInter{\fii}% - }% - }% - \xdef#3{\faa}% -}% - -\NewDocumentCommand\MelangeListe{smm}{% - \IfBooleanTF{#1}{% - %Si on cherche un seul élément, on peut l'utiliser directement - \MelangeListeOne{#2}{#3}% - }{% - \MelangeListeNoOne{#2}{#3}% - }% -} - -\NewDocumentCommand\MelangeListeOne{mm}{% - % #1 Liste à mélanger - % #2 Nombre d'éléments à conserver - \setsepchar{,}\ignoreemptyitems% - \readlist*\ListeInter{#1}% - \xdef\faa{}% Liste construite - \xdef\fii{}% Liste détruite - % on crée les #2 premieres solutions. - \xintFor* ##1 in {\xintSeq{1}{#2}}\do{% - \xintifboolexpr{\ListeInterlen>1}{% - \xdef\Alea{\fpeval{randint(\ListeInterlen)}}% - \ifnum\fpeval{##1}=1\relax - \xdef\faa{\ListeInter[\Alea]}% - \else - \xdef\faa{\faa,\ListeInter[\Alea]}% - \fi - \xdef\fii{}% - \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{% - \xintifboolexpr{##2 == \Alea}{% - }{% - \xdef\fii{\fii \ListeInter[##2],}% - }% - }% - }{% - \xdef\faa{\faa,\ListeInter[1]}% - }% - \readlist*\ListeInter{\fii}% - }% - \reademptyitems% -}% - -\NewDocumentCommand\MelangeListeNoOne{mm}{% - % #1 Liste à mélanger - % #2 Nombre d'éléments à conserver - \setsepchar{,}\ignoreemptyitems% - \readlist*\ListeInter{#1}% - \xdef\faa{}% Liste construite - \xdef\fii{}% Liste détruite - % on crée les #2 premieres solutions. - \xintFor* ##1 in {\xintSeq{1}{#2}}\do{% - \xintifboolexpr{\ListeInterlen>1}{% - \xdef\Alea{\fpeval{randint(\ListeInterlen)}}% - \xdef\faa{\faa \ListeInter[\Alea],}% - \xdef\fii{}% - \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{% - \xintifboolexpr{##2 == \Alea}{% - }{% - \xdef\fii{\fii \ListeInter[##2],}% - }% - }% - }{% - \xdef\faa{\faa \ListeInter[1]}% - }% - \readlist*\ListeInter{\fii}% - }% - \reademptyitems% -}% - -\newcommand\MelangeListeNewTwo[2]{% - % #1 Liste à mélanger - % #2 Nombre d'éléments à conserver - \setsepchar{,}\ignoreemptyitems% - \readlist*\ListeInter{#1}% -% \xdef\faa{}% Liste construite - \xdef\fii{}% Liste détruite - % on crée les #2 premieres solutions. - \xintFor* ##1 in {\xintSeq{1}{#2}}\do{% - \xintifboolexpr{\ListeInterlen>1}{% - \xdef\Alea{\fpeval{randint(\ListeInterlen)}}% - \ifnum\fpeval{##1}=1\relax - \xdef\faa{\ListeInter[\Alea]}% - \else - \xdef\faa{\faa,\ListeInter[\Alea]}% - \fi - \xdef\fii{}% - \xintFor* ##2 in {\xintSeq{1}{\ListeInterlen}}\do{% - \xintifboolexpr{##2 == \Alea}{% - }{% - \xdef\fii{\fii \ListeInter[##2],}% - }% - }% - }{% - \xdef\faa{\faa \ListeInter[1]}% - }% - \readlist*\ListeInter{\fii}% - }% - \reademptyitems% -}% - -%%% -% Smiley -%%% https://tex.stackexchange.com/questions/3695/smileys-in-latex/227226 -\tikzset{face/.style={shape=circle,minimum size=4ex,shading=radial,outer sep=0pt, inner color=white!50!yellow,outer color= yellow!70!orange}} - -\newcommand\emoticon[2][]{% -\scalebox{.5}{\begin{tikzpicture} -\node[face,#1,draw,thick] (emoticon) {}; -%% The eyes are fixed. -\draw[fill=white] (-1ex,0ex) ..controls (-0.5ex,0.2ex)and(0.5ex,0.2ex)..(1ex,0.0ex) ..controls ( 1.5ex,1.5ex)and( 0.2ex,1.7ex)..(0ex,0.4ex) ..controls (-0.2ex,1.7ex)and(-1.5ex,1.5ex)..(-1ex,0ex)--cycle; -#2% -\end{tikzpicture}}% -} - -\newcommand\pupils{ -%% standard pupils -\fill[shift={(0.5ex,0.5ex)},rotate=80] (0,0) ellipse (0.3ex and 0.15ex); -\fill[shift={(-0.5ex,0.5ex)},rotate=100] (0,0) ellipse (0.3ex and 0.15ex);} - -\def\RKsmallsmile{% -\emoticon{% -\pupils -%% mouth -\draw[thick] (-0.5ex,-1ex)..controls (-0.25ex,-1.25ex)and(0.25ex,-1.25ex)..(0.5ex,-1ex); -}%\emoticon -} - -\def\RKsmile{% -\emoticon{% -\pupils -\draw[thick] (-1ex,-1ex)..controls (-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex); -}%\emoticon -} - -\def\RKbigsmile{% -\emoticon{% -\pupils -%% mouth -\draw[thick] (-1.5ex,-0.5ex)..controls (-0.7ex,-1.7ex)and(0.7ex,-1.7ex)..(1.5ex,-0.5ex); -}%\emoticon -} - -\def\RKsad{% -\emoticon{% -%% pupils -\fill[shift={( 0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex); -\fill[shift={(-0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex); -%% mouth -\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-0.5ex)and(0.5ex,-0.5ex)..(1ex,-1ex); -}%\emoticon -} - -\def\RKneutral{% -\emoticon{% -%% pupils -\fill[shift={( 0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex); -\fill[shift={(-0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex); -%% mouth -\draw[thick] (-0.5ex,-1ex)--(0.5ex,-1ex); -}%\emoticon -} - -\def\RKconfused{% -\emoticon{% -\pupils -%% mouth -\draw[thick] (-1ex,-0.75ex)--(1ex,-1.25ex); -}%\emoticon -} - -\def\RKsexy{% -\emoticon{% -\pupils -%% mouth -\draw[very thick,red,line cap=round] (-1ex,-1ex)..controls (-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex); -%% eyelashes -\draw (0.60ex,1.20ex)--(0.60ex,1.60ex) - (0.85ex,1.25ex)--(0.95ex,1.45ex) - (1.00ex,1.00ex)--(1.20ex,1.10ex) - (0.35ex,1.15ex)--(0.25ex,1.35ex) - (-0.60ex,1.20ex)--(-0.60ex,1.60ex) - (-0.85ex,1.25ex)--(-0.95ex,1.45ex) - (-1.00ex,1.00ex)--(-1.20ex,1.10ex) - (-0.35ex,1.15ex)--(-0.25ex,1.35ex); -}%\emoticon -} - -\def\RKangry{% -\emoticon{% -%% pupils -\fill[shift={( 0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex); -\fill[shift={(-0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex); -%% mouth -\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-0.5ex)and(0.5ex,-0.5ex)..(1ex,-1ex); -%% eyebrows -\draw[thick] (0.2ex,1.15ex)--(0.5ex,1.6ex)(-0.2ex,1.15ex)--(-0.5ex,1.6ex); -}%\emoticon -} - -\def\RKlookup{% -\emoticon{% -%% pupils -\fill[shift={( 0.5ex,1.05ex)},rotate= 80] (0,0) ellipse (0.2ex and 0.2ex); -\fill[shift={(-0.5ex,1.05ex)},rotate=100] (0,0) ellipse (0.2ex and 0.2ex); -%% mouth -\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex); -}%\emoticon -} - -\def\RKlookdown{% -\emoticon{% -%% pupils -\fill[shift={( 0.5ex,0.3ex)},rotate= 80] (0,0) ellipse (0.2ex and 0.2ex); -\fill[shift={(-0.5ex,0.3ex)},rotate=100] (0,0) ellipse (0.2ex and 0.2ex); -%% mouth -\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex); -}%\emoticon -} - -\def\RKlookleft{% -\emoticon{% -%% pupils -\fill[shift={( 0.25ex,0.5ex)},rotate=100] (0,0) ellipse (0.3ex and 0.15ex); -\fill[shift={(-0.95ex,0.5ex)},rotate=100] (0,0) ellipse (0.3ex and 0.15ex); -%% mouth -\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex); -}%\emoticon -} - -\def\RKlookright{% -\emoticon{% -%% pupils -\fill[shift={( 0.95ex,0.5ex)},rotate=80] (0,0) ellipse (0.3ex and 0.15ex); -\fill[shift={(-0.25ex,0.5ex)},rotate=80] (0,0) ellipse (0.3ex and 0.15ex); -%% mouth -\draw[thick] (-1.0ex,-1ex)..controls(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex); -}%\emoticon -} - -\def\RKblush{% -\emoticon{% -\pupils -%% mouth -\draw[thick] (-0.5ex,-1ex)..controls (-0.25ex,-1.25ex)and(0.25ex,-1.25ex)..(0.5ex,-1ex); -%% blush -\shade[shading=radial,inner color=white!50!red,outer color= yellow!80!orange] ( 1ex,-0.5ex) circle (0.4ex); -\shade[shading=radial,inner color=white!50!red,outer color= yellow!80!orange] (-1ex,-0.5ex) circle (0.4ex); -}%\emoticon -} - -\def\RKalmostcrying{% -\emoticon{% -%% pupils -\fill[shift={( 0.5ex,0.5ex)},rotate=105] (0,0) ellipse (0.3ex and 0.15ex); -\fill[shift={(-0.5ex,0.5ex)},rotate= 75] (0,0) ellipse (0.3ex and 0.15ex); -%% mouth -\draw[thick] (-1ex,-1ex)..controls -(-0.5ex,-0.8ex)and(0.5ex,-0.8ex)..(1ex,-1ex); -}%\emoticon -} - -\def\RKmartian{% -\emoticon[inner color=white!50!green,outer color=green!70!red]{% -\pupils -%% mouth -\draw[thick] (-1ex,-1ex)..controls -(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex); -}%\emoticon -} - -\def\RKdevilish{% -\raisebox{-0.6ex}[0ex][0ex]{% -\emoticon[inner color=white!50!red,outer color= red!70!red!90!black]{% -\pupils -%% mouth -\draw[thick,line cap=round] (-1ex,-1ex)..controls (-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex); -%% tail -\draw[line width=0.45ex,-stealth,black] (emoticon.330)--++(330:0.01ex)..controls (3ex,-3ex)and(3.5ex,1ex)..(4.25ex,-3ex); -\draw[line width=0.27ex,-stealth,red!90!black] (emoticon.330)--++(330:0.01ex)..controls (3ex,-3ex)and(3.5ex,1ex)..(4.22ex,-2.8ex); -%% horns -\draw[fill] (emoticon.80)..controls ( 0.6ex,2.4ex)..( 1ex,2.5ex)..controls ( 0.8ex,2.3ex)..(emoticon.70); -\draw[fill] (emoticon.100)..controls (-0.6ex,2.4ex)..(-1ex,2.5ex)..controls (-0.8ex,2.3ex)..(emoticon.110); -\draw[thick] (0,0) circle (2ex); -}%\emoticon -}%\raisebox -}% - -\setsepchar[*]{,*/}\ignoreemptyitems -\readlist*\ListeMateriaux{aluminium/'/2.7,chêne/e~/0.69,bouleau/e~/0.65,sapin/e~/0.45,polystyrène/e~/1.04,porcelaine/la/2.5,acier/'/7.85,cuivre/e~/8.92,fer/e~/7.86,or/'/19.3,argent/'/10.5,bronze/e~/8.4,plomb/e~/11.35,marbre/e~/2.75,laiton/e~/7.3,titane/e~/4.5,PVC/e~/1.38} -\setsepchar{,}\reademptyitems - -%Internationalisation -\def\PfCSymbolTimes{\times}% -\def\PfCSymbolDiv{\div}% - -\input{PfCVisualisationMulDeci} -\input{PfCArbreChiffre} -\input{PfCAssemblagesSolides} -\input{PfCTicketCaisse} -\input{PfCRecyclage} -\input{PfCDontCountDots} -\input{PfCConversion} -\input{PfCCritere} -\input{PfCLego} -\input{PfCJeton} -\input{PfCDessinAlgo} -\input{PfCBonbon} -\input{PfCPattern} -\input{PfCNumerationsAnciennes} -\input{PfCSerpent} -\input{PfCFractionNombre} -\input{PfCAllumettes} -\input{PfCFractionAireCarre.tex} -\input{PfCMulJal} -\input{PfCCibleQOp} -\input{PfCFubuki} -\input{PfCMulJap} -\input{PfCCryptarithme} -\input{PfCDefiCalc} -\input{PfCMulArt} -\input{PfCGrimuku} -\input{PfCHorloge} -\input{PfCCible} -\input{PfCMulPiecesPuzzle} -\input{PfCPyraVoca} -\input{PfCAutomatismes} -\input{PfCNumberHive} -\input{PfCPatronPaves} -\input{PfCEratosthene} -\input{PfCDobble} -\input{PfCPavage} -\input{PfCNonogramme} -\input{PfCJeuRangement} -\input{PfCTrio} -\input{PfCCalculsFractions} -\input{PfCDecDeci} -\input{PfCKakurasu} -\input{PfCMidpoint} -\input{PfCGrades} -\input{PfCSquaro} -\input{PfCGaram} -\input{PfCFutoshiki} -\input{PfCRondeInfernale} -\input{PfCHiddenMessage} -\input{PfCPuzzleSommePyramide} -\input{PfCCalisson} -\input{PfCTectonic} -\input{PfCEnigmeAire} -\input{PfCBarresCalculs} -\input{PfCSolides} -\input{PfCVueCubes} -\input{PfCRLE} -\input{PfCEngrenagesBase} -\input{PfCTortueBase} -\input{PfCCompteBon} -\input{PfCNombreAstral} -\input{PfCMentalo} -\input{PfCCalculsCroises} -\input{PfCShikaku} -\input{PfCKakuro} -\input{PfCKenKen} -\input{PfCPixelArt} -\input{PfCYohaku} -\input{PfCRose} -\input{PfCPuissanceQuatre} -\input{PfCBillard} -\input{PfCRepresenterEntier} -\input{PfCCAN} -\input{PfCFrise} -\input{PfCGeometrie} -\input{PfCEnquete} -\input{PfCModeleBarre} -\input{PfCFicheMemo} -\input{PfCOperationsTrou} -\input{PfCCartographie} -\input{PfCReseauxSociaux} -\input{PfCBonSortie} -\input{PfCEcritureLettres} -\input{PfCDecompFracDeci} -\input{PfCPyramideCalculs} -\input{PfCTablesOperations} -\input{PfCDefiTables} -\input{PfCRangementNombres} -\input{PfCMotsCodes} -\input{PfCLabyrintheJeu} -\input{PfCTriominos} -\input{PfCLabyrintheNombre} -\input{PfCMotsCroises} -\input{PfCMotsEmpiles} -\input{PfCColorilude} -\input{PfCMosaique} -\input{PfCQuiSuisJe} -\input{PfCDessinGradue} -\input{PfCAutonomie} -\input{PfCCalculatrice} -\input{PfCQuestionsFlash} -\input{PfCRapido} -\input{PfCRepresenterFraction} -\input{PfCQuestionsRelier} -\input{PfCEcrireunQCM} -\input{PfCSommeAngles} -\input{PfCPythagore} -\input{PfCDistributivite} -\input{PfCFactorisation} -\input{PfCDecomposerNombrePremier} -\input{PfCSimplifierFraction} -\input{PfCThales} -\input{PfCTrigonometrie} -\input{PfCStatistiques} -\input{PfCDiagrammeRadar} -\input{PfCBarreNiveaux} -\input{PfCResoudreEquation} -\input{PfCPropor} -\input{PfCPourcentage} -\input{PfCDessinerRatio} -\input{PfCCartesMentales} -\input{PfCProprietesDroites} -\input{PfCFonctionAffine} -\input{PfCNotionFonction} -\input{PfCRepresentationGraphique} -\input{PfCRappelsFormules} -\input{PfCProbabilites} -\input{PfCReperage} - -%%% -% Puissances -%%% -\newcommand\Puissances[2]{% - \ensuremath{% - \xintifboolexpr{#2==0}{1}{\xintifboolexpr{#2>0}{\xdef\TotalP{\fpeval{#2-1}}#1\xintFor* ##1 in{\xintSeq{1}{\TotalP}}\do{\times#1}}{\xdef\TotalP{\fpeval{-#2-1}}\frac{1}{#1\xintFor* ##1 in{\xintSeq{1}{\TotalP}}\do{\times#1}}}}% - }% -}% - -\input{PfCEcritureUnites} -\input{PfCTableauxUnites} -\input{PfCCartesJeux} -\input{PfCRepresenterTableur} -\input{PfCDomino} -\input{PfCProgrammeCalcul} -\input{PfCPapiers} -\input{PfCScratch}
\ No newline at end of file diff --git a/macros/latex/required/babel/base/README.md b/macros/latex/required/babel/base/README.md index 07a872c4ab..3247ec987f 100644 --- a/macros/latex/required/babel/base/README.md +++ b/macros/latex/required/babel/base/README.md @@ -1,6 +1,6 @@ -## Babel 24.4 +## Babel 24.5 -2024-04-20 +2024-05-18 `babel` is the multilingual framework for localizing documents in LaTeX, LuaLaTeX, XeLaTeX. It manages culturally-determined @@ -10,9 +10,9 @@ languages even work with Plain formats. The latest stable version is available on <https://ctan.org/pkg/babel>. -Changes in version 24.4 are described in: +Changes in version 24.5 are described in: -https://latex3.github.io/babel/news/whats-new-in-babel-24.4.html +https://latex3.github.io/babel/news/whats-new-in-babel-24.5.html Apart from the manual, you can find information on some aspects of babel at: @@ -48,10 +48,14 @@ respective authors. ### Summary of latest changes ``` -24.4 2024-04-20 - * New ‘interchar’ declarations for Cantonese, Chinese, Japanese and - Korean: linebreak.basic (xe). - * Fixed Tibetan line breaking with closing punctuation (lua). +24.5 2024-05-18 + * Change the first item in `abjad` and `maghrebi.abjad` counters + in `ar-DZ`, `ar-MA` and `ar-TN`), from ا to أ. Suggested by + @seloumi. + * Fixed an error when a locale is loaded on the fly and there are empty + captions in another language (#294) + * Fix in transforms (lua): negative values in `space` and `spacefactor` + raised and error. ``` ### Previous changes diff --git a/macros/latex/required/babel/base/babel-code.pdf b/macros/latex/required/babel/base/babel-code.pdf Binary files differindex b157d32efd..fc188152cf 100644 --- a/macros/latex/required/babel/base/babel-code.pdf +++ b/macros/latex/required/babel/base/babel-code.pdf diff --git a/macros/latex/required/babel/base/babel.dtx b/macros/latex/required/babel/base/babel.dtx index 256ec0384c..6a129d2c32 100644 --- a/macros/latex/required/babel/base/babel.dtx +++ b/macros/latex/required/babel/base/babel.dtx @@ -32,7 +32,7 @@ % % \iffalse %<*filedriver> -\ProvidesFile{babel.dtx}[2024/04/20 v24.4 The Babel package] +\ProvidesFile{babel.dtx}[2024/05/18 v24.5 The Babel package] \documentclass{ltxdoc} \GetFileInfo{babel.dtx} \usepackage{fontspec} @@ -2567,11 +2567,11 @@ languages above. So, the previous example is best written as: \babelprovide[_import_]{hungarian} \end{verbatim} -There are about 250 |ini| files, with data taken from the |ldf| files -and the CLDR provided by Unicode. Not all languages in the latter are -complete, and therefore neither are the |ini| files. A few languages -may show a warning about the current lack of suitability of some -features. +There are 380 |ini| files for about 300 languages, with data taken from +the |ldf| files and the CLDR provided by Unicode. Not all languages in +the latter are complete, and therefore neither are the |ini| files. A +few languages may show a warning about the current lack of suitability +of some features. Besides |\today|, this option defines an additional command for dates: |\<language>date|, which takes three arguments, namely, year, month and @@ -3892,22 +3892,26 @@ There are some package options controlling bidi writing. $\string|$ \texttt{basic-r} $\string|$ \texttt{bidi-l} $\string|$ \texttt{bidi-r}} -\New{3.14} Selects the bidi algorithm to be used. With |default| the -bidi mechanism is just activated (by default it is not), but every -change must be marked up. In \xetex{} and \pdftex{} this is the only -option. +\New{3.14} Selects the bidi algorithm to be used. -In \luatex, |basic-r| provides a simple and fast method for R text, -which handles numbers and unmarked L text within an R context many in -typical cases. \New{3.19} Finally, |basic| supports both L and R text, -and it is the preferred method (support for |basic-r| is currently -limited). (They are named \texttt{basic} mainly because they only -consider the intrinsic direction of scripts and weak directionality.) +With |default| the bidi mechanism is just activated (by default it is +not), but every change must be marked up. In \pdftex{} this is the only +option. If the RL text only consists of letters and punctuation, it +will be fine in most cases, but numbers, for example, will be rendered +in the wrong order. -\New{3.29} In \xetex, |bidi-r| and |bidi-l| resort to the package -\textsf{bidi} (by Vafa Khalighi). Integration is still somewhat -tentative, but it mostly works. For RL documents use the former, and -for LR ones use the latter. +In \luatex, the preferred method is |basic|, which supports both L and +R text. |basic-r| was a first attempt to create a bidi algorith and +provides a simple and fast method for R text in some typical cases. +(They are named \texttt{basic} mainly because they only consider the +intrinsic direction of scripts and weak directionality.) + +In \xetex, |bidi-r| and |bidi-l| resort to the package \textsf{bidi} +(by Vafa Khalighi). For RL documents use the former, and for LR ones +use the latter. However, this package patches heavily lots of macros +and packages even if the RL script is not the main one, which can lead +to some surprising results, so for short and simple texts (letters and +punctuation) the |default| method can be preferable. There are samples on GitHub, under \texttt{/required/babel/samples}. See particularly |lua-bidibasic.tex| and |lua-secenum.tex|. @@ -5475,8 +5479,8 @@ wouldn’t exist. % \section{Tools} % % \begin{macrocode} -%<<version=24.4>> -%<<date=2024/04/20>> +%<<version=24.5>> +%<<date=2024/05/18>> % \end{macrocode} % % \textbf{Do not use the following macros in \texttt{ldf} files. They @@ -10354,15 +10358,15 @@ wouldn’t exist. \@namedef{extras#1}{}% \@namedef{noextras#1}{}% \bbl@startcommands*{#1}{captions}% - \ifx\bbl@KVP@captions\@nnil % and also if import, implicit + \ifx\bbl@KVP@captions\@nnil % and also if import, implicit \def\bbl@tempb##1{% elt for \bbl@captionslist - \ifx##1\@empty\else + \ifx##1\@nnil\else \bbl@exp{% \\\SetString\\##1{% \\\bbl@nocaption{\bbl@stripslash##1}{#1\bbl@stripslash##1}}}% \expandafter\bbl@tempb \fi}% - \expandafter\bbl@tempb\bbl@captionslist\@empty + \expandafter\bbl@tempb\bbl@captionslist\@nnil \else \ifx\bbl@initoload\relax \bbl@read@ini{\bbl@KVP@captions}2% % Here letters cat = 11 @@ -14592,10 +14596,10 @@ end }} \begingroup \catcode`\%=12 -\catcode`\^=14 +\catcode`\&=14 \catcode`\'=12 \catcode`\~=12 -\gdef\bbl@seaintraspace{^ +\gdef\bbl@seaintraspace{& \let\bbl@seaintraspace\relax \directlua{ Babel = Babel or {} @@ -14611,7 +14615,7 @@ end function Babel.sea_disc_to_space (head) local sea_ranges = Babel.sea_ranges local last_char = nil - local quad = 655360 ^% 10 pt = 655360 = 10 * 65536 + local quad = 655360 &% 10 pt = 655360 = 10 * 65536 for item in node.traverse(head) do local i = item.id if i == node.id'glyph' then @@ -14621,16 +14625,16 @@ end quad = font.getfont(last_char.font).size for lg, rg in pairs(sea_ranges) do if last_char.char > rg[1] and last_char.char < rg[2] then - lg = lg:sub(1, 4) ^% Remove trailing number of, eg, Cyrl1 + lg = lg:sub(1, 4) &% Remove trailing number of, eg, Cyrl1 local intraspace = Babel.intraspaces[lg] local intrapenalty = Babel.intrapenalties[lg] local n if intrapenalty ~= 0 then - n = node.new(14, 0) ^% penalty + n = node.new(14, 0) &% penalty n.penalty = intrapenalty node.insert_before(head, item, n) end - n = node.new(12, 13) ^% (glue, spaceskip) + n = node.new(12, 13) &% (glue, spaceskip) node.setglue(n, intraspace.b * quad, intraspace.p * quad, intraspace.m * quad) @@ -14641,7 +14645,7 @@ end end end end - }^^ + }& \bbl@luahyphenate} % \end{macrocode} % @@ -15321,9 +15325,11 @@ end rep = rep:gsub('^%s*(insert)%s*,', 'insert = true, ') rep = rep:gsub('(string)%s*=%s*([^%s,]*)', Babel.capture_func) if #1 == 0 or #1 == 2 then - rep = rep:gsub('(space)%s*=%s*([%d%.]+)%s+([%d%.]+)%s+([%d%.]+)', + rep = rep:gsub(&% + '(space)%s*=%s*([%-%d%.]+)%s+([%-%d%.]+)%s+([%-%d%.]+)', 'space = {' .. '%2, %3, %4' .. '}') - rep = rep:gsub('(spacefactor)%s*=%s*([%d%.]+)%s+([%d%.]+)%s+([%d%.]+)', + rep = rep:gsub(&% + '(spacefactor)%s*=%s*([%-%d%.]+)%s+([%-%d%.]+)%s+([%-%d%.]+)', 'spacefactor = {' .. '%2, %3, %4' .. '}') rep = rep:gsub('(kashida)%s*=%s*([^%s,]*)', Babel.capture_kashida) else diff --git a/macros/latex/required/babel/base/babel.ins b/macros/latex/required/babel/base/babel.ins index 4bd22c8667..d70ae40c62 100644 --- a/macros/latex/required/babel/base/babel.ins +++ b/macros/latex/required/babel/base/babel.ins @@ -26,7 +26,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. %% -\def\filedate{2024/04/20} +\def\filedate{2024/05/18} \def\batchfile{babel.ins} \input docstrip.tex diff --git a/macros/latex/required/babel/base/babel.pdf b/macros/latex/required/babel/base/babel.pdf Binary files differindex 55df378a61..b541f0bf05 100644 --- a/macros/latex/required/babel/base/babel.pdf +++ b/macros/latex/required/babel/base/babel.pdf diff --git a/macros/latex/required/babel/base/bbcompat.dtx b/macros/latex/required/babel/base/bbcompat.dtx index f36bd4b705..00e5a6b8b5 100644 --- a/macros/latex/required/babel/base/bbcompat.dtx +++ b/macros/latex/required/babel/base/bbcompat.dtx @@ -30,7 +30,7 @@ % % \iffalse %<*dtx> -\ProvidesFile{bbcompat.dtx}[2024/04/20 v24.4] +\ProvidesFile{bbcompat.dtx}[2024/05/18 v24.5] %</dtx> % %% File 'bbcompat.dtx' |