summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-04-20 19:27:15 +0000
committerKarl Berry <karl@freefriends.org>2024-04-20 19:27:15 +0000
commitc355977d7d4278a9d7a389fe85249d55da2be69c (patch)
tree976198cbf765782d11f4cb287d1de833108d21ce
parentcd8bce9ed5e85d0004ab3a6e72567c435c81706c (diff)
proflycee (20apr24)
git-svn-id: svn://tug.org/texlive/trunk@71019 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdfbin1663998 -> 1691169 bytes
-rw-r--r--Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex314
-rw-r--r--Master/texmf-dist/doc/latex/proflycee/ProfLycee-docctan.zipbin270629 -> 272353 bytes
-rw-r--r--Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.tex427
-rw-r--r--Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pythontex.tex242
-rw-r--r--Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty5
-rw-r--r--Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex6
-rw-r--r--Master/texmf-dist/tex/latex/proflycee/proflycee-tools-exams.tex152
8 files changed, 1142 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf
index d83649de1a2..b2c61b2f613 100644
--- a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf
+++ b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex
new file mode 100644
index 00000000000..34da7d98f89
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-doc.tex
@@ -0,0 +1,314 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode}
+% arara: pythontex: {rerun: always}
+% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode}
+% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
+
+\documentclass[a4paper,french,11pt]{article}
+\def\PLversion{3.03d}
+\def\PLdate{20 avril 2024}
+\usepackage{amsfonts}
+\usepackage{ProfLycee}
+\useproflyclib{piton,minted,pythontex,ecritures,espace}
+\usepackage[math-style=french]{fourier-otf}
+\usepackage{mathrsfs}%pour mathscr
+\usepackage{awesomebox}
+\usepackage[lua]{tkz-euclide}
+\usepackage{tkz-tab}
+\tikzstyle{every picture}+=[remember picture]
+\usetikzlibrary{hobby}
+\usepackage[group-minimum-digits=4]{siunitx}
+\sisetup{locale=FR}
+\usepackage{enumitem}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\usepackage{tabularray}
+\usepackage{multicol}
+\DeclareMathSymbol{;}\mathbin{operators}{'73} %espacement avec ;
+%fancy
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily \small [ProfLycee]}
+\cfoot{\sffamily \small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+
+\usepackage{graphics}
+\usepackage{hologo}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\providecommand\PSTricks{\textsf{PSTricks}\xspace}
+\let\pstricks\PSTricks
+\let\TikZ\tikzlogo
+\newcommand\TableauDocumentation{%
+ \begin{tblr}{width=\linewidth,colspec={X[c]X[c]X[c]X[c]X[c]X[c]},cells={font=\huge\sffamily}}
+ {\LaTeX} & {\hologo{pdfLaTeX}} & {\hologo{LuaLaTeX}} & {\TikZ} & {\TeXLive} & {\hologo{MiKTeX}} \\
+ \end{tblr}
+}
+\usepackage{simplekv}
+\usepackage{menukeys}
+\let\tab\relax
+\usepackage{tabto}
+\usepackage{pgf,pgfplots}
+\pgfplotsset{compat=newest,xlabel near ticks,ylabel near ticks}
+\usepackage{listofitems}
+\usepackage{xintexpr}
+\usepackage{codehigh}
+\usepackage{scontents}
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\usepackage{geometry}
+\geometry{margin=1.5cm}
+\usepackage{babel}
+\usepackage{newverbs}
+
+\input{ProfLycee-doc-macropreamb.tex}
+
+\input{ProfLycee-doc-pagegarde.tex}
+
+\newpage
+
+\phantomsection
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Introduction}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-introduction.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Liste des commandes}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-listecommandes.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Écritures mathématiques}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-ecritures.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Outils pour l'analyse}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-outilsanalyse.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Outils graphiques}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-outilsgraphiques.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Présentation de codes}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-prescodes.tex}
+
+\pagebreak
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Outils pour la géométrie}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-outilsgeom.tex}
+
+\pagebreak
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Outils pour la géométrie analytique}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-outilsgeomanalyt.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Outils pour les statistiques}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-stats.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Outils pour les probabilités}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-probas.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Outils pour l'arithmétique}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-arithm.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Écritures, simplifications}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-simplif.tex}
+
+\pagebreak
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Jeux et récréations}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-jeuxrecreat.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Compétences en lycée}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-competences.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Examens}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-exams.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Projets, en test}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-projets.tex}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
+ \Huge\MakeUppercase{Historique}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\input{ProfLycee-doc-historique.tex}
+
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-docctan.zip b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-docctan.zip
index 907dc5d7f9a..918815456de 100644
--- a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-docctan.zip
+++ b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-docctan.zip
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.tex b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.tex
new file mode 100644
index 00000000000..03648eea0c1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pyluatex.tex
@@ -0,0 +1,427 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode}
+% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
+
+\documentclass[french,a4paper,10pt]{article}
+\def\PLver{3.03c}
+\usepackage[margin=1.5cm]{geometry}
+\usepackage{ProfLycee}
+\useproflyclib{piton}
+\usepackage[executable=python,ignoreerrors]{pyluatex}
+\usepackage{babel}
+\sisetup{locale=FR,output-decimal-marker={,},group-minimum-digits=4}
+\usepackage{codehigh}
+
+\begin{document}
+
+\part*{ProfLycee (\PLver), Piton et Pyluatex}
+
+\section{Code \og Piton \fg{}, indépendant de Pyluatex}
+
+\subsection{Préambule basique}
+
+{\small \begin{codehigh}
+\documentclass[french,a4paper,10pt]{article}
+\usepackage{ProfLycee}
+\useproflyclib{piton} % lua
+\end{codehigh}}
+
+\subsection{Exemples}
+
+{\small \begin{codehigh}
+%Sortie par défaut
+\begin{CodePiton}{}
+def valeur_absolue(x) :
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0 :
+ return x
+ else:
+ return -x
+\end{CodePiton}
+\end{codehigh}}
+
+\begin{CodePiton}{}
+def valeur_absolue(x) :
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0 :
+ return x
+ else:
+ return -x
+\end{CodePiton}
+
+{\small \begin{codehigh}
+%Sortie avec style Classique, Largeur=10cm
+\begin{CodePiton}[Largeur=10cm]{}
+def valeur_absolue(x) :
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0 :
+ return x
+ else:
+ return -x
+\end{CodePiton}
+\end{codehigh}}
+
+\begin{CodePiton}[Largeur=10cm]{}
+def valeur_absolue(x) :
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0 :
+ return x
+ else:
+ return -x
+\end{CodePiton}
+
+\pagebreak
+
+{\small \begin{codehigh}
+%Sortie avec Style=Moderne, Sans Titre, Largeur=10cm, centré
+\begin{CodePiton}[Style=Moderne,Largeur=10cm,BarreTitre=false,Alignement=center]{}
+def valeur_absolue(x) :
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0 :
+ return x
+ else:
+ return -x
+\end{CodePiton}
+\end{codehigh}}
+
+\begin{CodePiton}[Style=Moderne,Largeur=10cm,BarreTitre=false,Alignement=center]{}
+def valeur_absolue(x) :
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0 :
+ return x
+ else:
+ return -x
+\end{CodePiton}
+
+{\small \begin{codehigh}
+%Sortie avec Style=Classique, Largeur=0.5\linewidth, aligné à droite, sans Cadre, avec Filigrane
+\begin{CodePiton}%
+ [Largeur=0.5\linewidth,Cadre=false,Alignement=flush right,Filigrane,Titre={Script}]{}
+#environnement piton avec numéros de ligne, pleine largeur, style moderne
+def valeur_absolue(x) :
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0 :
+ return x
+ else:
+ return -x
+\end{CodePiton}
+\end{codehigh}}
+
+\begin{CodePiton}[Largeur=0.5\linewidth,Cadre=false,Alignement=flush right,Filigrane,Titre={Script}]{}
+def valeur_absolue(x) :
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0 :
+ return x
+ else:
+ return -x
+\end{CodePiton}
+
+{\small \begin{codehigh}
+%Sortie Moderne, Largeur=11cm, avec Filigrane, aligné à gauche, sans ligne
+\begin{CodePiton}[Style=Moderne,Largeur=11cm,Filigrane,Alignement=flush left,Lignes=false]{}
+def valeur_absolue(x) :
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0 :
+ return x
+ else:
+ return -x
+\end{CodePiton}
+\end{codehigh}}
+
+\begin{CodePiton}[Style=Moderne,Largeur=11cm,Filigrane,Alignement=flush left,Lignes=false]{}
+def valeur_absolue(x) :
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0 :
+ return x
+ else:
+ return -x
+\end{CodePiton}
+
+\pagebreak
+
+\section{Console \og Piton \fg{}, dépendant de Pyluatex}
+
+\subsection{Préambule, avec le package pyluatex}
+
+{\small \begin{codehigh}
+\documentclass[french,a4paper,10pt]{article}
+\usepackage{ProfLycee}
+\useproflyclib{piton}
+\usepackage[executable=python]{pyluatex} % lua + shell-escape
+\end{codehigh}}
+
+\subsection{Commande}
+
+{\small \begin{codehigh}
+\begin{ConsolePiton}[Options piton]<Clés>{Options tcbox}
+...
+...
+\end{ConsolePiton}
+\end{codehigh}}
+
+\medskip
+
+Les clés, à placer entre \texttt{<...>}, sont :
+
+\begin{itemize}
+ \item \textbf{\textsf{$\langle$Logo$\rangle$}} pour afficher un petit logo dans les \textit{titres} de la console REPL ; \hfill{}défaut : \textbf{\textsf{$\langle$true$\rangle$}}
+ \item \textbf{\textsf{$\langle$Largeur$\rangle$}} pour spécifier la largeur de la console REPL ; \hfill{}défaut : \textbf{\textsf{$\langle$\textbackslash{}linewidth$\rangle$}}
+ \item \textbf{\textsf{$\langle$Alignement$\rangle$}} pour spécifier l'alignement de la console REPL.\hfill{}défaut : \textbf{\textsf{$\langle$flush left$\rangle$}}
+\end{itemize}
+
+\subsection{Exemples}
+
+{\small \begin{codehigh}
+%Déclaration d'une fonction python + librairie random pour utilisation ultérieure
+\begin{python}
+from random import randint
+
+def valeur_absolue(x) :
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0 :
+ return x
+ else:
+ return -x
+\end{python}
+\end{codehigh}}
+
+\begin{python}
+from random import randint
+
+def valeur_absolue(x) :
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0 :
+ return x
+ else:
+ return -x
+\end{python}
+
+{\small \begin{codehigh}
+\begin{ConsolePiton}{}
+1+1
+2**10
+valeur_absolue(-3)
+valeur_absolue(0)
+valeur_absolue(5)
+print(f"La valeur absolue de 5 est {valeur_absolue(5)}")
+print(f"La valeur absolue de -4 est {valeur_absolue(-4)}")
+\end{ConsolePiton}
+\end{codehigh}}
+
+\begin{ConsolePiton}{}
+1+1
+2**10
+valeur_absolue(-3)
+valeur_absolue(0)
+valeur_absolue(5)
+print(f"La valeur absolue de 5 est {valeur_absolue(5)}")
+print(f"La valeur absolue de -4 est {valeur_absolue(-4)}")
+\end{ConsolePiton}
+
+\pagebreak
+
+{\small \begin{codehigh}
+\begin{ConsolePiton}<Largeur=11cm,Alignement=center,Logo=false>{}
+1+1
+2**10
+valeur_absolue(-3)
+valeur_absolue(0)
+valeur_absolue(5)
+print(f"La valeur absolue de 5 est {valeur_absolue(5)}")
+print(f"La valeur absolue de -4 est {valeur_absolue(-4)}")
+liste = [randint(1,20) for i in range(10)]
+print(liste)
+print(max(liste), min(liste), sum(liste))
+\end{ConsolePiton}
+\end{codehigh}}
+
+\begin{ConsolePiton}<Largeur=11cm,Alignement=center,Logo=false>{}
+1+1
+2**10
+valeur_absolue(-3)
+valeur_absolue(0)
+valeur_absolue(5)
+print(f"La valeur absolue de 5 est {valeur_absolue(5)}")
+print(f"La valeur absolue de -4 est {valeur_absolue(-4)}")
+liste = [randint(1,20) for i in range(10)]
+print(liste)
+print(max(liste), min(liste), sum(liste))
+\end{ConsolePiton}
+
+{\small \begin{codehigh}
+\begin{ConsolePiton}<Largeur=10cm,Alignement=center>{}
+[i**2 for i in range(50)]
+\end{ConsolePiton}
+\end{codehigh}}
+
+\begin{ConsolePiton}<Largeur=10cm,Alignement=center>{}
+[i**2 for i in range(50)]
+\end{ConsolePiton}
+
+\pagebreak
+
+\section{Présentation, et exécution, comme avec Thonny}
+
+\subsection{Préambule, avec le package pyluatex}
+
+{\small \begin{codehigh}
+\documentclass[french,a4paper,10pt]{article}
+\usepackage{ProfLycee}
+\useproflyclib{piton}
+\usepackage[executable=python]{pyluatex} % lua + shell-escape
+\end{codehigh}}
+
+\subsection{Commandes}
+
+{\small \begin{codehigh}
+\begin{PitonThonnyEditor}<clé>[options tcbox]{largeur}
+...
+\end{PitonThonnyEditor}
+\end{codehigh}}
+
+\medskip
+
+La clé, à placer entre \texttt{<...>}, est :
+
+\begin{itemize}
+ \item la clé \textbf{\textsf{$\langle$Gobble$\rangle$}} pour spécifier des options liées au \textsf{gobble}, parmi \textbf{\textsf{$\langle$nb/auto$\rangle$}} ;
+
+ \hfill{}à adapter en fonction des situations (!)
+ \item la clé \textbf{\textsf{$\langle$NomFichier$\rangle$}} pour afficher le nom du fichier dans le cartouche \textit{éditeur}.
+
+ \hfill{}défaut : \textbf{\textsf{$\langle$script.py$\rangle$}}
+\end{itemize}
+
+{\small \begin{codehigh}
+\begin{PitonThonnyConsole}<clés>[options tcbox]{largeur}
+...
+\end{PitonThonnyConsole}
+\end{codehigh}}
+
+\medskip
+
+Les clés, à placer entre \texttt{<...>}, sont :
+
+\begin{itemize}
+ \item la clé \textbf{\textsf{$\langle$NomConsole$\rangle$}} pour afficher le nom de la \textit{console} ; \hfill{}défaut \textbf{\textsf{$\langle$console$\rangle$}}
+ \item la clé \textbf{\textsf{$\langle$IntroConsole$\rangle$}} pour afficher le message d'accueil de la console.
+\end{itemize}
+
+\subsection{Exemples}
+
+{\small\begin{codehigh}
+\begin{python}
+from math import gcd
+
+def est_duffy(n) :
+ nb_div, somme_div = 0, 0
+ for i in range(1, n+1) :
+ if n % i == 0 :
+ nb_div += 1
+ somme_div += i
+ if gcd(somme_div, n) == 1 :
+ return True
+ else :
+ return False
+
+\end{python}
+\end{codehigh}}
+
+{\small\begin{codehigh}
+\begin{PitonThonnyEditor}<NomFichier=tpcapytale.py>{12cm}
+#PROJET CAPYTALE
+from math import gcd
+
+def est_duffy(n) :
+ nb_div = 0
+ somme_div = 0
+ for i in range(1, n+1) :
+ if n % i == 0 :
+ nb_div += 1
+ somme_div += i
+ if gcd(somme_div, n) == 1 :
+ return True
+ else :
+ return False
+\end{PitonThonnyEditor}
+\end{codehigh}}
+
+\begin{PitonThonnyEditor}<NomFichier=tpcapytale.py>{12cm}
+#PROJET CAPYTALE
+from math import gcd
+
+def est_duffy(n) :
+ nb_div = 0
+ somme_div = 0
+ for i in range(1, n+1) :
+ if n % i == 0 :
+ nb_div += 1
+ somme_div += i
+ if gcd(somme_div, n) == 1 :
+ return True
+ else :
+ return False
+\end{PitonThonnyEditor}
+
+{\small\begin{codehigh}
+\begin{PitonThonnyConsole}<IntroConsole={python 3.8.10}>{12cm}
+#Run tpcapytale.py
+est_duffy(6)
+est_duffy(13)
+est_duffy(265)
+
+from random import randint
+nb = randint(1,100000)
+nb, est_duffy(nb)
+\end{PitonThonnyConsole}
+\end{codehigh}}
+
+\begin{python}
+from math import gcd
+
+def est_duffy(n) :
+ nb_div, somme_div = 0, 0
+ for i in range(1, n+1) :
+ if n % i == 0 :
+ nb_div += 1
+ somme_div += i
+ if gcd(somme_div, n) == 1 :
+ return True
+ else :
+ return False
+
+\end{python}
+\begin{PitonThonnyConsole}<IntroConsole={python 3.8.10}>{12cm}
+#Run tpcapytale.py
+est_duffy(6)
+est_duffy(13)
+est_duffy(265)
+
+from random import randint
+nb = randint(1,100000)
+nb, est_duffy(nb)
+\end{PitonThonnyConsole}
+
+{\small\begin{codehigh}
+\begin{PitonThonnyConsole}{8cm}
+[i**2 for i in range(50)]
+\end{PitonThonnyConsole}
+\end{codehigh}}
+
+\begin{PitonThonnyConsole}{8cm}
+[i**2 for i in range(50)]
+\end{PitonThonnyConsole}
+
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pythontex.tex b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pythontex.tex
new file mode 100644
index 00000000000..e418300cae1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/proflycee/ProfLycee-exemples-pythontex.tex
@@ -0,0 +1,242 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: lualatex: {shell: no, synctex: yes, interaction: batchmode}
+% arara: pythontex: {rerun: always} if found('pytxcode', 'PYTHONTEX#py')
+% arara: lualatex: {shell: no, synctex: yes, interaction: batchmode} if found('pytxcode', 'PYTHONTEX#py')
+% arara: lualatex: {shell: no, synctex: yes, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
+
+\documentclass[french,a4paper,10pt]{article}
+\def\PLver{2.7.5}
+\usepackage[margin=1.5cm]{geometry}
+\usepackage{ProfLycee}
+\useproflyclib{pythontex}
+\usepackage{babel}
+\sisetup{locale=FR,output-decimal-marker={,},group-minimum-digits=4}
+\usepackage{codehigh}
+
+\begin{document}
+
+\part*{ProfLycee (\PLver), Pythontex}
+
+\section{Code \og Pythontex \fg{}}
+
+\subsection{Préambule basique}
+
+{\small \begin{codehigh}
+\documentclass[french,a4paper,10pt]{article}
+\usepackage{ProfLycee}
+\useproflyclib{pythontex} % compilation spécifique
+\end{codehigh}}
+
+\subsection{Exemples}
+
+{\small \begin{codehigh}
+%Sortie par défaut
+\begin{CodePythontex}{}
+def valeur_absolue(x):
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0:
+ return x
+ else:
+ return -x
+\end{CodePythontex}
+\end{codehigh}}
+
+\begin{CodePythontex}{}
+def valeur_absolue(x):
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0:
+ return x
+ else:
+ return -x
+
+#bla
+#bla
+#bla
+\end{CodePythontex}
+
+{\small \begin{codehigh}
+%Sortie avec Style=Classique, Largeur=10cm, centré
+\begin{CodePythontexAlt}[Largeur=10cm,Centre,PremLigne=10]{}
+def valeur_absolue(x):
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0:
+ return x
+ else:
+ return -x
+\end{CodePythontexAlt}
+\end{codehigh}}
+
+\begin{CodePythontexAlt}[Largeur=10cm,Centre,PremLigne=10]{}
+def valeur_absolue(x):
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0:
+ return x
+ else:
+ return -x
+
+#bla
+#bla
+#bla
+\end{CodePythontexAlt}
+
+\pagebreak
+
+{\small \begin{codehigh}
+%Sortie avec Style=Classique, Largeur=10cm
+\begin{CodePythontexAlt}[Largeur=10cm]{}
+def valeur_absolue(x):
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0:
+ return x
+ else:
+ return -x
+\end{CodePythontexAlt}
+\end{codehigh}}
+
+\begin{CodePythontexAlt}[Largeur=10cm]{}
+def valeur_absolue(x):
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0:
+ return x
+ else:
+ return -x
+\end{CodePythontexAlt}
+
+{\small \begin{codehigh}
+%Sortie avec Style=Classique, Largeur=0.5\linewidth, centré, sans numéro
+\begin{CodePythontexAlt}[Largeur=0.5\linewidth,Centre,Lignes=false]{}
+def valeur_absolue(x):
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0:
+ return x
+ else:
+ return -x
+\end{CodePythontexAlt}
+\end{codehigh}}
+
+\begin{CodePythontexAlt}[Largeur=0.5\linewidth,Centre,Lignes=false]{}
+def valeur_absolue(x):
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0:
+ return x
+ else:
+ return -x
+\end{CodePythontexAlt}
+
+{\small \begin{codehigh}
+%Sortie Moderne, Largeur=11cm, sans ligne
+\begin{CodePythontex}[Largeur=11cm,Lignes=false]{}
+def valeur_absolue(x):
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0:
+ return x
+ else:
+ return -x
+\end{CodePythontex}
+\end{codehigh}}
+
+\begin{CodePythontex}[Largeur=11cm,Lignes=false]{}
+def valeur_absolue(x):
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0:
+ return x
+ else:
+ return -x
+\end{CodePythontex}
+
+\pagebreak
+
+\section{Console \og Pythontex \fg{}}
+
+{\small \begin{codehigh}
+%Déclaration d'une fonction python + librairie random pour utilisation ultérieure
+\begin{pyconcode}
+from random import randint
+
+def valeur_absolue(x):
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0:
+ return x
+ else:
+ return -x
+
+\end{pyconcode}
+\end{codehigh}}
+
+\begin{pyconcode}
+from random import randint
+
+def valeur_absolue(x):
+ "Renvoie la valeur absolue de x"
+ #le petit test qui va bien
+ if x > 0:
+ return x
+ else:
+ return -x
+
+\end{pyconcode}
+
+{\small \begin{codehigh}
+\begin{ConsolePythontex}{}
+1+1
+2**10
+valeur_absolue(-3)
+valeur_absolue(0)
+valeur_absolue(5)
+print(f"La valeur absolue de 5 est {valeur_absolue(5)}")
+print(f"La valeur absolue de -4 est {valeur_absolue(-4)}")
+\end{ConsolePythontex}
+\end{codehigh}}
+
+\begin{ConsolePythontex}{}
+1+1
+2**10
+valeur_absolue(-3)
+valeur_absolue(0)
+valeur_absolue(5)
+print(f"La valeur absolue de 5 est {valeur_absolue(5)}")
+print(f"La valeur absolue de -4 est {valeur_absolue(-4)}")
+\end{ConsolePythontex}
+
+\pagebreak
+
+{\small \begin{codehigh}
+\begin{ConsolePythontex}[Largeur=12cm,Centre]{}
+1+1
+2**10
+valeur_absolue(-3)
+valeur_absolue(0)
+valeur_absolue(5)
+print(f"La valeur absolue de 5 est {valeur_absolue(5)}")
+print(f"La valeur absolue de -4 est {valeur_absolue(-4)}")
+liste = [randint(1,20) for i in range(10)]
+print(liste)
+print(max(liste), min(liste), sum(liste))
+\end{ConsolePythontex}
+\end{codehigh}}
+
+\begin{ConsolePythontex}[Largeur=12cm,Centre]{}
+1+1
+2**10
+valeur_absolue(-3)
+valeur_absolue(0)
+valeur_absolue(5)
+print(f"La valeur absolue de 5 est {valeur_absolue(5)}")
+print(f"La valeur absolue de -4 est {valeur_absolue(-4)}")
+liste = [randint(1,20) for i in range(10)]
+print(liste)
+print(max(liste), min(liste), sum(liste))
+\end{ConsolePythontex}
+
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
index be9319048d3..25a212e65ad 100644
--- a/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
+++ b/Master/texmf-dist/tex/latex/proflycee/ProfLycee.sty
@@ -3,7 +3,8 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2024/03/30 3.03c Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2024/04/20 3.03d Aide pour l'utilisation de LaTeX en lycee]
+% 3.03d Page de garde type BAC
% 3.03c Correction du fonctionnement gobble avec piton + compatibilité luamplib PfC
% 3.03b Compétences Maths Lycées + \pflnum pour num+xint :-) + correction de bugs (div eucl)
% 3.03a Forme canonique + fonction homographique
@@ -227,5 +228,7 @@
\input{proflycee-tools-recreat.tex}
%%------Compétences
\input{proflycee-tools-competences.tex}
+%%------Examens
+\input{proflycee-tools-exams.tex}
\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex
index f013ab3d071..db3f2bc8ac4 100644
--- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex
+++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-arithm.tex
@@ -672,8 +672,8 @@
\NewDocumentCommand\InverseModulo{ s m m }{%
\xdef\PGCDD{\xinteval{gcd(#2,#3)}}%
- \xdef\resinvmod{#2{} n'est pas inversible modulo #3.}
- \xintFor* ##1 in {\xintSeq{1}{#3}}\do{\xintifboolexpr{\xintiiRem{\xinteval{#2*##1}}{#3} == 1}{\xdef\resinvmod{##1}}{}}%
+ \xdef\resinvmod{#2{} n'est pas inversible modulo #3.}%
+ \xintFor* ##1 in {\xintSeq{1}{#3}}\do{\xintifboolexpr{\xintiiRem{\xinteval{#2*##1}}{#3} == 1}{\xdef\resinvmod{##1}}{}}%
\IfBooleanTF{#1}%
{%
On a $\text{PGCD}(#2;#3)=\num{\PGCDD}$.~%
@@ -696,7 +696,7 @@
\ifboolKV[chiffaffine]{Dechiffr}%
{%
\xdef\resinvmod{0}%
- \xintFor* ##1 in {\xintSeq{1}{\tmpmodulo}}\do{
+ \xintFor* ##1 in {\xintSeq{1}{\tmpmodulo}}\do{%
\xintifboolexpr{\xintiiRem{\xinteval{(\tmpcoeffa)*(##1)}}{\tmpmodulo} == 1}%
{\xdef\resinvmod{##1}}{}%
}%
diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-exams.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-exams.tex
new file mode 100644
index 00000000000..940c64d0a43
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-exams.tex
@@ -0,0 +1,152 @@
+% proflycee-tools-stats.tex
+% Copyright 2024 Cédric Pierquet
+% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
+
+%3.03d Page de garde Type BAC
+
+%====PAGE GARDE [BAC]
+\defKV[EnteteSujetBac]{DernierePage=\def\packlastpage{#1},NbExos=\def\packnbexos{#1},Serie=\def\packfiliere{#1}}
+\setKVdefault[EnteteSujetBac]{%
+ Police=\normalfont,%
+ Serie={GÉNÉRAL},%
+ Matiere=MATHÉMATIQUES,%
+ Filiere={SCIENCES ET TECHNOLOGIES DE L’INDUSTRIE ET DU DÉVELOPPEMENT DURABLE},%
+ Session={SESSION \the\year},%
+ AffSession=true,%
+ Jour={Jour 1},%
+ AffJour=true,%
+ Duree=4 heures,%
+ ModeExamen=true,%
+ DernierePage=lastpage,%
+ Justification=true,%
+ TraceRecherche=true,%
+ Clarte=true,%
+ NbExos=4,%
+ Traiter=false,%
+ EspaceAvant=1cm,%
+ LargeurPar={0.85\linewidth}
+}
+
+\NewDocumentCommand\PageGardeSujetBac{ O{} }{%
+ \restoreKV[EnteteSujetBac]%
+ \setKV[EnteteSujetBac]{#1}%
+ \useKV[EnteteSujetBac]{Police}{%
+ \vspace*{\useKV[EnteteSujetBac]{EspaceAvant}}
+
+ \begin{center}
+ {\Huge BACCALAURÉAT~%
+ \IfSubStr{\packfiliere}{GÉN}{GÉNÉRAL}{}%
+ \IfSubStr{\packfiliere}{GEN}{GÉNÉRAL}{}%
+ \IfSubStr{\packfiliere}{TECHNO}{TECHNOLOGIQUE}{}%
+ \IfSubStr{\packfiliere}{PRO}{PROFESSIONNEL}{}%
+ }%
+ \IfSubStr{\packfiliere}{PRO}%
+ {}%
+ {%
+ \vspace*{10mm}
+
+ {\Large ÉPREUVE D’ENSEIGNEMENT DE SPÉCIALITÉ}%
+ }%
+
+ \ifboolKV[EnteteSujetBac]{AffSession}%
+ {%
+ \vspace*{10mm}
+
+ {\Large\bfseries\useKV[EnteteSujetBac]{Session}}%
+ }%
+ {}%
+ \IfSubStr{\packfiliere}{TECHNO}%
+ {%
+ \vspace*{10mm}
+
+ \begin{minipage}{\useKV[EnteteSujetBac]{LargeurPar}}
+ \centering
+ \linespread{1.2}\LARGE\bfseries\useKV[EnteteSujetBac]{Filiere}
+ \end{minipage}%
+ }%
+ {}%
+ \IfSubStr{\packfiliere}{PRO}%
+ {%
+ \vspace*{10mm}
+
+ \begin{minipage}{\useKV[EnteteSujetBac]{LargeurPar}}
+ \centering
+ \linespread{1.2}\LARGE\bfseries\useKV[EnteteSujetBac]{Filiere}
+ \end{minipage}%
+ }%
+ {}%
+ \vspace*{15mm}
+
+ {\LARGE\bfseries \useKV[EnteteSujetBac]{Matiere}}
+
+ \ifboolKV[EnteteSujetBac]{AffJour}%
+ {%
+ \vspace*{15mm}
+
+ {\Large\bfseries \useKV[EnteteSujetBac]{Jour}}%
+ }%
+ {}%
+
+ \vspace*{15mm}
+
+ Durée de l’épreuve : \textbf{\useKV[EnteteSujetBac]{Duree}}%
+
+ \vspace*{15mm}
+
+ \ifboolKV[EnteteSujetBac]{ModeExamen}%
+ {%
+ \textit{L’usage de la calculatrice avec mode examen actif est autorisé.}
+
+ \medskip
+
+ \textit{L’usage de la calculatrice sans mémoire « type collège » est autorisé.}
+ }%
+ {%
+ \textit{L’usage de la calculatrice avec ou sans mode examen est autorisé.}
+ }%
+ \vspace*{10mm}
+
+ Dès que ce sujet vous est remis, assurez-vous qu’il est complet.
+
+ \smallskip
+
+ Ce sujet comporte \IfStrEqCase{\packlastpage}{{lastpage}{\pageref{LastPage}}{zref}{\zpageref{LastPage}}}[\packlastpage]\ pages numérotées de 1/\IfStrEqCase{\packlastpage}{{lastpage}{\pageref{LastPage}}{zref}{\zpageref{LastPage}}}[\packlastpage]\ à \IfStrEqCase{\packlastpage}{{lastpage}{\pageref{LastPage}}{zref}{\zpageref{LastPage}}}[\packlastpage]/\IfStrEqCase{\packlastpage}{{lastpage}{\pageref{LastPage}}{zref}{\zpageref{LastPage}}}[\packlastpage].
+ \end{center}
+ %
+ \begin{center}
+ \parbox{\useKV[EnteteSujetBac]{LargeurPar}}{%
+ \ifboolKV[EnteteSujetBac]{Justification}%
+ {%
+ \vspace*{10mm}
+
+ \noindent\textbf{Sauf mention contraire, toute réponse devra être justifiée.}
+ }%
+ {}%
+ \ifboolKV[EnteteSujetBac]{Traiter}%
+ {%
+ \vspace*{5mm}
+
+ \noindent\textbf{Le candidat doit traiter les \IfStrEqCase{\packnbexos}{{2}{deux}{3}{trois}{4}{quatre}{5}{cinq}{6}{six}{7}{sept}}\ exercices proposés.}
+ }%
+ {}%
+ \ifboolKV[EnteteSujetBac]{TraceRecherche}%
+ {%
+ \vspace*{10mm}
+
+ \noindent\textit{Le candidat est invité à faire figurer sur la copie toute trace de recherche, même incomplète ou non fructueuse, qu’il aura développée.}
+ }%
+ {}%
+ \ifboolKV[EnteteSujetBac]{Clarte}%
+ {%
+ \vspace*{2mm}
+
+ \noindent\textit{La qualité de la rédaction, la clarté et la précision des raisonnements seront prises en compte dans l’appréciation de la copie. Les traces de recherche, même incomplètes ou infructueuses seront valorisées.}
+ }%
+ {}%
+ }%
+ \end{center}%
+ }%
+ \pagebreak
+}
+
+\endinput \ No newline at end of file