summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-03-26 03:03:59 +0000
committerNorbert Preining <norbert@preining.info>2024-03-26 03:03:59 +0000
commit904f56f2c26edc7eb11d5a27579bccbeca29c618 (patch)
tree8a4d6d2e163e93dd2c13a28db996b419aee856b4 /macros
parent05f8146ef2eea2cd71b9c96583c6d893e6c76af5 (diff)
CTAN sync 202403260303
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/dashrulex/dashrulex.pdfbin58949 -> 58940 bytes
-rw-r--r--macros/latex/contrib/dashrulex/dashrulex.sty181
-rw-r--r--macros/latex/contrib/dashrulex/dashrulex.tex188
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdfbin1640551 -> 1662397 bytes
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex18
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex427
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pythontex.tex242
-rw-r--r--macros/latex/contrib/proflycee/tex/ProfLycee.sty16
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex15
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-competences.tex662
-rw-r--r--macros/latex/contrib/profmaquette/doc/Attention-1.pdfbin11044 -> 0 bytes
-rw-r--r--macros/latex/contrib/profmaquette/doc/Attention-2.pdfbin11099 -> 0 bytes
-rw-r--r--macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdfbin287008 -> 286837 bytes
-rw-r--r--macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.tex1563
-rw-r--r--macros/latex/contrib/profmaquette/doc/TestCAN.pdfbin20353 -> 0 bytes
-rw-r--r--macros/latex/contrib/profmaquette/doc/TestCAN.tex27
-rw-r--r--macros/latex/contrib/profmaquette/doc/TestCANComplement.pdfbin21506 -> 0 bytes
-rw-r--r--macros/latex/contrib/profmaquette/doc/TestCANComplement.tex31
-rw-r--r--macros/latex/contrib/profmaquette/doc/TestParcoursPerso.pdfbin17412 -> 0 bytes
-rw-r--r--macros/latex/contrib/profmaquette/doc/TestParcoursPerso.tex31
-rw-r--r--macros/latex/contrib/profmaquette/doc/pg_0002-crop.pdfbin14470 -> 0 bytes
-rw-r--r--macros/latex/contrib/profmaquette/latex/ProfMaquette.sty142
-rw-r--r--macros/luatex/latex/longmath/README45
-rw-r--r--macros/luatex/latex/longmath/longmath-doc.cls168
-rw-r--r--macros/luatex/latex/longmath/longmath-doc.lua192
-rw-r--r--macros/luatex/latex/longmath/longmath-doc.pdfbin0 -> 175384 bytes
-rw-r--r--macros/luatex/latex/longmath/longmath-doc.tex976
-rw-r--r--macros/luatex/latex/longmath/longmath.lua428
-rw-r--r--macros/luatex/latex/longmath/longmath.sty223
29 files changed, 3025 insertions, 2550 deletions
diff --git a/macros/latex/contrib/dashrulex/dashrulex.pdf b/macros/latex/contrib/dashrulex/dashrulex.pdf
index 5ed12594f6..376eb91c90 100644
--- a/macros/latex/contrib/dashrulex/dashrulex.pdf
+++ b/macros/latex/contrib/dashrulex/dashrulex.pdf
Binary files differ
diff --git a/macros/latex/contrib/dashrulex/dashrulex.sty b/macros/latex/contrib/dashrulex/dashrulex.sty
index 58c104c0e1..86d43d1478 100644
--- a/macros/latex/contrib/dashrulex/dashrulex.sty
+++ b/macros/latex/contrib/dashrulex/dashrulex.sty
@@ -1,92 +1,91 @@
-%
-% ***************** THE DASHRULEX PACKAGE *****************
-%
-% Copyright (C) 2024 by Qu Yi <toquyi@163.com>
-%
-% This work may be distributed and/or modified under the
-% conditions of the CC-BY 4.0 License.
-% The latest version of this license is in
-% https://creativecommons.org/licenses/by/4.0/legalcode
-\NeedsTeXFormat{LaTeX2e}[2012/02/12]
-\RequirePackage{xparse}
-\ProvidesExplPackage{dashrulex}{2024/03/18}{1.00b}
- {Draw dashed rules}
-\DeclareDocumentCommand{\hdashrule}{O{0pt}O{x}mmm}
- {
- \tl_if_blank:nTF {#5}
- { \rule[#1]{#3}{#4} }
- {
- \mbox{}
- \use:c { #2leaders }
- \hbox:n
- {
- \clist_map_inline:nn {#5}
- { \drx@parse@dash{#1}{#4}{##1} }
- }
- \skip_horizontal:n {#3}
- \mbox{}
- }
- }
-\NewDocumentCommand{\drx@parse@dash}
- {mm>{\SplitArgument{1}{|}}m}
- {\drx@parse@dash@inner{#1}{#2}#3}
-\cs_set_protected:Npn \drx@parse@dash@inner #1#2#3#4
- {
- \IfNoValueTF{#4}
- {\vrulemod[#1]{#3}{#2}\skip_horizontal:n {#3}}
- {\vrulemod[#1]{#3}{#2}\skip_horizontal:n {#4}}
- }
-\NewDocumentCommand{\hanyrule}{O{x}mm}
- {
- \mbox{}
- \use:c { #1leaders }
- \hbox:n { \clist_map_inline:nn {#3} {##1} }
- \skip_horizontal:n {#2}
- \mbox{}
- }
-
-\int_new:N \l__drx_vrule_counter_int
-\int_set:Nn \l__drx_vrule_counter_int { 1 }
-\dim_new:N \l__drx_vrule_height_dim
-\tl_new:N \l__drx_tmpa_tl
-\cs_new_protected:Npn \drx@step@counter@height #1
- {
- \int_incr:N \l__drx_vrule_counter_int
- \dim_add:Nn \l__drx_vrule_height_dim {#1}
- }
-\NewDocumentCommand{\vrulemod}{O{0pt}oomm}
- {
- \group_begin:
- \IfValueTF{#2}
- {
- \tl_set:Nn \l__drx_tmpa_tl { [#2] }
- \IfValueT{#3}{\tl_put_right:Nn \l__drx_tmpa_tl { [#3] }}
- }
- {\IfValueT{#3}{\tl_set:Nn \l__drx_tmpa_tl { [#3] }}}
- \exp_last_unbraced:Nnf
- \raisebox{#1}{\l__drx_tmpa_tl}
- {
- \clist_map_inline:nn {#5}
- {
- \int_compare:nNnTF { \l__drx_vrule_counter_int } > { 1 }
- {
- \int_if_even:nTF { \l__drx_vrule_counter_int }
- { \drx@step@counter@height{##1} }
- {
- \kern -#4
- \exp_args:NV
- \raisebox\l__drx_vrule_height_dim{\rule{#4}{##1}}
- \drx@step@counter@height{##1}
- }
- }
- {
- \rule{#4}{##1}
- \drx@step@counter@height{##1}
- }
- }
- }
- \group_end:
- }
-\endinput
-%
+%
+% ***************** THE DASHRULEX PACKAGE *****************
+%
+% Copyright (C) 2024 by Qu Yi <toquyi@163.com>
+%
+% This work may be distributed and/or modified under the
+% conditions of the CC-BY 4.0 License.
+% The latest version of this license is in
+% https://creativecommons.org/licenses/by/4.0/legalcode
+\NeedsTeXFormat{LaTeX2e}[2012/02/12]
+\RequirePackage{xparse}
+\ProvidesExplPackage{dashrulex}{2024/03/25}{1.00c}
+ {Draw dashed rules}
+\DeclareDocumentCommand{\hdashrule}{O{0pt}O{x}mmm}
+ {
+ \tl_if_blank:nTF {#5}
+ { \rule[#1]{#3}{#4} }
+ {
+ \mbox{}
+ \use:c { #2leaders }
+ \hbox:n
+ {
+ \clist_map_inline:nn {#5}
+ { \drx@parse@dash{#1}{#4}{##1} }
+ }
+ \skip_horizontal:n {#3}
+ \mbox{}
+ }
+ }
+\NewDocumentCommand{\drx@parse@dash}
+ {mm>{\SplitArgument{1}{|}}m}
+ {\drx@parse@dash@inner{#1}{#2}#3}
+\cs_set_protected:Npn \drx@parse@dash@inner #1#2#3#4
+ {
+ \IfNoValueTF{#4}
+ {\vrulemod[#1]{#3}{#2}\skip_horizontal:n {#3}}
+ {\vrulemod[#1]{#3}{#2}\skip_horizontal:n {#4}}
+ }
+\NewDocumentCommand{\hanyrule}{O{x}mm}
+ {
+ \mbox{}
+ \use:c { #1leaders }
+ \hbox:n { \clist_map_inline:nn {#3} {##1} }
+ \skip_horizontal:n {#2}
+ \mbox{}
+ }
+
+\int_new:N \l__drx_vrule_counter_int
+\int_set:Nn \l__drx_vrule_counter_int { 1 }
+\dim_new:N \l__drx_vrule_height_dim
+\tl_new:N \l__drx_tmpa_tl
+\cs_new_protected:Npn \drx@step@counter@height #1
+ {
+ \int_incr:N \l__drx_vrule_counter_int
+ \dim_add:Nn \l__drx_vrule_height_dim {#1}
+ }
+\NewDocumentCommand{\vrulemod}{O{0pt}oomm}
+ {
+ \group_begin:
+ \IfValueT{#2}
+ {
+ \tl_set:Nn \l__drx_tmpa_tl { [#2] }
+ \IfValueT{#3}{\tl_put_right:Nn \l__drx_tmpa_tl { [#3] }}
+ }
+ \exp_last_unbraced:Nnf
+ \raisebox{#1}{\l__drx_tmpa_tl}
+ {
+ \clist_map_inline:nn {#5}
+ {
+ \int_compare:nNnTF { \l__drx_vrule_counter_int } > { 1 }
+ {
+ \int_if_even:nTF { \l__drx_vrule_counter_int }
+ { \drx@step@counter@height{##1} }
+ {
+ \kern -#4
+ \exp_args:NV
+ \raisebox\l__drx_vrule_height_dim{\rule{#4}{##1}}
+ \drx@step@counter@height{##1}
+ }
+ }
+ {
+ \rule{#4}{##1}
+ \drx@step@counter@height{##1}
+ }
+ }
+ }
+ \group_end:
+ }
+\endinput
+%
% End of file `dashrulex.sty'. \ No newline at end of file
diff --git a/macros/latex/contrib/dashrulex/dashrulex.tex b/macros/latex/contrib/dashrulex/dashrulex.tex
index fdb4fd69fc..c7db9dd89c 100644
--- a/macros/latex/contrib/dashrulex/dashrulex.tex
+++ b/macros/latex/contrib/dashrulex/dashrulex.tex
@@ -1,95 +1,95 @@
-\documentclass[load-preamble+]{cnltx-doc}
-
-\usepackage{setspace,hologo,dashrulex,tikz}
-\usepackage[noto]{newtxmath}
-\setcnltx
- {
- package = dashrulex,
- title = the dashrulex package,
- version = v1.00b,
- date = 2024/03/18,
- authors = Qu Yi,
- info = Draw dashed rules,
- email = toquyi@163.com,
- abstract =
- {
- The \pkg*{dashrulex} package provides a flexible solution for drawing dashed rules in the body, and currently provides two commands \cs{hdashrule} and \cs{hanyrule}. It's written in \hologo{LaTeX3} and can be used as an alternative to the \pkg*{dashrule} package.
- },
- color-scheme = blue,
- title-format = \huge\bfseries\scshape,
- listings-options = {numbers = none,gobble = 2,lineskip = 1pt},
- pre-output = {\parindent = 0em\setstretch{1.3}},
- before-skip = \smallskipamount,
- after-skip = \smallskipamount
- }
-\makeatletter
-\newcommand{\splitmeta}[3][\code{,}]{\meta{#2}#1\meta{#3}}
-\newcommand{\newsplitarg}[4][\splitmeta]
- {
- \newcommand{#2}[2]
- {\code{\textcolor{argument}{#3\textnormal{#1{##1}{##2}}#4}}}
- }
-\newcommand{\kvsplit}[3]
- {
- \item\code{\option{#1}\cnltx@isvalue\splitmarg{#2}{#3}}
- \cnltx@checkdefault{\hfill\newline}
- }
-\newsplitarg{\splitoarg}{[}{]}
-\newsplitarg{\splitmarg}{\{}{\}}
-\newsplitarg{\splitdarg}{(}{)}
-\newnote{\newtag}[1][New]{\textcolor{red}{\ding{73}\ #1}}
-\renewcommand{\emph}[1]{\textcolor{red}{#1}}
-\renewcommand{\cnltx@write@lastname}{}
-\makeatother
-
-\begin{document}
-\section{Preface}
-Sometimes it is necessary to draw dashed rules when writing documents, such as guides in the table of contents and indexes, horizontal lines in headers and footers, and even adding horizontal lines after headings. Macro packages such as \pkg*{dashrule} and \pkg*{nccrules} are available to accomplish this. Considering that \pkg*{dashrule} has not been updated for a long time, \pkg*{dashrulex} rewrites it using \hologo{LaTeX3} syntax and enhances it a bit.
-
-\section{User commands}
-\begin{commands}
- \command{hdashrule}[\oarg{raise}\oarg{leader}\marg{width}\marg{thickness list}\marg{dash rules}]
- The command to draw horizontal dashed rules, based on the \cs{rule} command, and the same as the \cs{rule} command when the \meta{dash rules} are empty. \meta{raise} is the vertical offset of the rule. \meta{leader} is the alignment of the dashed line fill, which can be empty, \code{c}, or \code{x} (the default), corresponding to the \cs{leaders}, \cs{cleaders}, and \cs{xleaders} commands, respectively. \meta{width} is the length of the dotted line, which can be set to \cs{fill} when used to fill the remaining center of the current text line. \meta{thickness list} is a rule for the height of vertically oriented lines, separated by \textcolor{red}{commas} and written as \splitmeta{height 1}{height a}\code{,...}, where \meta{height 1} denotes the height of a solid line and \meta{height a} denotes the height of a blank space.\meta{dash rules} is expressed as \splitmeta[\code{|}]{length 1}{length a}\code{,}\splitmeta[\code{|}]{length 2}{length b}\code{,...}, where \meta{length 1} represents the length of the solid line and \meta{length a} represents the length of the blank space, such as \code{5pt|2pt,3pt}, if the blank space is empty, then it is equal to the solid line length.
- \begin{example}
- 1X\rule{2cm}{1pt}x \\
- 2X\hdashrule{2cm}{1pt}{}x \\
- 3X\hdashrule{2cm}{1pt}{1pt}x \\
- 4X\hdashrule{4cm}{1pt}{1pt}x \\
- 5X\hdashrule[0.5ex]{4cm}{1pt}{1pt}x \\
- 6X\hdashrule[0.5ex]{4cm}{1pt}{3mm}x \\
- 7X\hdashrule[0.5ex]{4cm}{1mm}{3mm}x \\
- 8X\hdashrule[0.5ex]{4cm}{1mm}{3mm|3pt}x \\
- 9X\hdashrule[0.5ex]{4cm}{1mm}{3mm|3pt,1mm|2pt}x \\
- 10X\hdashrule[0.5ex]{4cm}{2pt,1pt,1pt}{3mm|3pt,1mm|2pt}x
- \end{example}
- \command{vrulemod}[\oarg{raise}\oarg{height}\oarg{depth}\marg{width}\marg{thickness list}]
- The vertical component used to fill the dashed line. \meta{thickness list} is consistent with the \cs{hdashrule} command, \meta{width} represents the length of the component, and the three optional parameters are consistent with those of the \cs{raisebox} command.
- \command{hanyrule}[\oarg{leader}\marg{width}\marg{symbol list}]
- This command sets the length of the dotted rule and fills it with arbitrary symbols. \meta{symbol list} can be more than one symbol and they are separated by \textcolor{red}{commas}. Symbols are best packed in boxes of a certain length, as spacing between symbols is not provided.
- \begin{example}
- \newcommand{\dblelement}
- {%
- \tikz[color=blue]
- {
- \draw[line width=0.8mm](0mm,1.1mm)--(3mm,1.1mm);
- \draw[line width=0.3mm](0mm,0mm)--(3mm,0mm);
- }%
- }
- 1X\hanyrule[]{5cm}{\makebox[8pt][l]{$\cdot$}}x \\
- 2X\hanyrule[c]{5cm}{\makebox[8pt][l]{$\cdot$}}x \\
- 3X\hanyrule[x]{5cm}{\makebox[8pt][l]{$\cdot$}}x \\
- 4X\hanyrule[c]{5cm}{\makebox[8pt]{$\cdot$}}x \\
- 5X\hanyrule[x]{5cm}{\makebox[8pt]{$\cdot$}}x \\
- 6X\hanyrule[x]{5cm}{\makebox[8pt]{$\cdot$},\makebox[8pt]{$\circ$}}x \\
- 7X\hanyrule[x]{5cm}{\makebox[5mm]{\vrulemod{3mm}{2pt,1pt,1pt}}}x \\
- 8X\hanyrule[x]{5cm}{\makebox[5mm]{\dblelement}}x
- \end{example}
-\end{commands}
-
-\section{Known issues}
-Currently only horizontal dashed line drawing is supported, with future plans to support vertical dashed lines, and even box dashed borders and so on.
-
-\appendix
-\nocite{*}
-
+\documentclass[load-preamble+]{cnltx-doc}
+
+\usepackage{setspace,hologo,dashrulex,tikz}
+\usepackage[noto]{newtxmath}
+\setcnltx
+ {
+ package = dashrulex,
+ title = the dashrulex package,
+ version = v1.00c,
+ date = 2024/03/25,
+ authors = Qu Yi,
+ info = Draw dashed rules,
+ email = toquyi@163.com,
+ abstract =
+ {
+ The \pkg*{dashrulex} package provides a flexible solution for drawing dashed rules in the body, and currently provides two commands \cs{hdashrule} and \cs{hanyrule}. It's written in \hologo{LaTeX3} and can be used as an alternative to the \pkg*{dashrule} package.
+ },
+ color-scheme = blue,
+ title-format = \huge\bfseries\scshape,
+ listings-options = {numbers = none,gobble = 2,lineskip = 1pt},
+ pre-output = {\parindent = 0em\setstretch{1.3}},
+ before-skip = \smallskipamount,
+ after-skip = \smallskipamount
+ }
+\makeatletter
+\newcommand{\splitmeta}[3][\code{,}]{\meta{#2}#1\meta{#3}}
+\newcommand{\newsplitarg}[4][\splitmeta]
+ {
+ \newcommand{#2}[2]
+ {\code{\textcolor{argument}{#3\textnormal{#1{##1}{##2}}#4}}}
+ }
+\newcommand{\kvsplit}[3]
+ {
+ \item\code{\option{#1}\cnltx@isvalue\splitmarg{#2}{#3}}
+ \cnltx@checkdefault{\hfill\newline}
+ }
+\newsplitarg{\splitoarg}{[}{]}
+\newsplitarg{\splitmarg}{\{}{\}}
+\newsplitarg{\splitdarg}{(}{)}
+\newnote{\newtag}[1][New]{\textcolor{red}{\ding{73}\ #1}}
+\renewcommand{\emph}[1]{\textcolor{red}{#1}}
+\renewcommand{\cnltx@write@lastname}{}
+\makeatother
+
+\begin{document}
+\section{Preface}
+Sometimes it is necessary to draw dashed rules when writing documents, such as guides in the table of contents and indexes, horizontal lines in headers and footers, and even adding horizontal lines after headings. Macro packages such as \pkg*{dashrule} and \pkg*{nccrules} are available to accomplish this. Considering that \pkg*{dashrule} has not been updated for a long time, \pkg*{dashrulex} rewrites it using \hologo{LaTeX3} syntax and enhances it a bit.
+
+\section{User commands}
+\begin{commands}
+ \command{hdashrule}[\oarg{raise}\oarg{leader}\marg{width}\marg{thickness list}\marg{dash rules}]
+ The command to draw horizontal dashed rules, based on the \cs{rule} command, and the same as the \cs{rule} command when the \meta{dash rules} are empty. \meta{raise} is the vertical offset of the rule. \meta{leader} is the alignment of the dashed line fill, which can be empty, \code{c}, or \code{x} (the default), corresponding to the \cs{leaders}, \cs{cleaders}, and \cs{xleaders} commands, respectively. \meta{width} is the length of the dotted line, which can be set to \cs{fill} when used to fill the remaining center of the current text line. \meta{thickness list} is a rule for the height of vertically oriented lines, separated by \textcolor{red}{commas} and written as \splitmeta{height 1}{height a}\code{,...}, where \meta{height 1} denotes the height of a solid line and \meta{height a} denotes the height of a blank space.\meta{dash rules} is expressed as \splitmeta[\code{|}]{length 1}{length a}\code{,}\splitmeta[\code{|}]{length 2}{length b}\code{,...}, where \meta{length 1} represents the length of the solid line and \meta{length a} represents the length of the blank space, such as \code{5pt|2pt,3pt}, if the blank space is empty, then it is equal to the solid line length.
+ \begin{example}
+ 1X\rule{2cm}{1pt}x \\
+ 2X\hdashrule{2cm}{1pt}{}x \\
+ 3X\hdashrule{2cm}{1pt}{1pt}x \\
+ 4X\hdashrule{4cm}{1pt}{1pt}x \\
+ 5X\hdashrule[0.5ex]{4cm}{1pt}{1pt}x \\
+ 6X\hdashrule[0.5ex]{4cm}{1pt}{3mm}x \\
+ 7X\hdashrule[0.5ex]{4cm}{1mm}{3mm}x \\
+ 8X\hdashrule[0.5ex]{4cm}{1mm}{3mm|3pt}x \\
+ 9X\hdashrule[0.5ex]{4cm}{1mm}{3mm|3pt,1mm|2pt}x \\
+ 10X\hdashrule[0.5ex]{4cm}{2pt,1pt,1pt}{3mm|3pt,1mm|2pt}x
+ \end{example}
+ \command{vrulemod}[\oarg{raise}\oarg{height}\oarg{depth}\marg{width}\marg{thickness list}]
+ The vertical component used to fill the dashed line. \meta{thickness list} is consistent with the \cs{hdashrule} command, \meta{width} represents the length of the component, and the three optional parameters are consistent with those of the \cs{raisebox} command.
+ \command{hanyrule}[\oarg{leader}\marg{width}\marg{symbol list}]
+ This command sets the length of the dotted rule and fills it with arbitrary symbols. \meta{symbol list} can be more than one symbol and they are separated by \textcolor{red}{commas}. Symbols are best packed in boxes of a certain length, as spacing between symbols is not provided.
+ \begin{example}
+ \newcommand{\dblvmod}
+ {%
+ \tikz[color=blue]
+ {
+ \draw[line width=0.8mm](0mm,1.1mm)--(3mm,1.1mm);
+ \draw[line width=0.3mm](0mm,0mm)--(3mm,0mm);
+ }%
+ }
+ 1X\hanyrule[]{5cm}{\makebox[8pt][l]{$\cdot$}}x \\
+ 2X\hanyrule[c]{5cm}{\makebox[8pt][l]{$\cdot$}}x \\
+ 3X\hanyrule[x]{5cm}{\makebox[8pt][l]{$\cdot$}}x \\
+ 4X\hanyrule[c]{5cm}{\makebox[8pt]{$\cdot$}}x \\
+ 5X\hanyrule[x]{5cm}{\makebox[8pt]{$\cdot$}}x \\
+ 6X\hanyrule[x]{5cm}{\makebox[8pt]{$\cdot$},\makebox[8pt]{$\circ$}}x \\
+ 7X\hanyrule[x]{5cm}{\makebox[5mm]{\vrulemod{3mm}{2pt,1pt,1pt}}}x \\
+ 8X\hanyrule[x]{5cm}{\makebox[5mm]{\dblvmod}}x
+ \end{example}
+\end{commands}
+
+\section{Known issues}
+Currently only horizontal dashed line drawing is supported, with future plans to support vertical dashed lines, and even box dashed borders and so on.
+
+\appendix
+\nocite{*}
+
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
index 6401533972..67411ded0e 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
index 55981358f1..d12abe48b8 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
@@ -5,8 +5,8 @@
% 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.03a}
-\def\PLdate{17 mars 2024}
+\def\PLversion{3.03b}
+\def\PLdate{25 mars 2024}
\usepackage{amsfonts}
\usepackage{ProfLycee}
\useproflyclib{piton,minted,pythontex,ecritures,espace}
@@ -260,6 +260,20 @@
\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{Projets, en test}
\end{center}
\end{PART}
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex
deleted file mode 100644
index 937fed22c1..0000000000
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pyluatex.tex
+++ /dev/null
@@ -1,427 +0,0 @@
-% !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.02e}
-\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/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pythontex.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pythontex.tex
deleted file mode 100644
index e418300cae..0000000000
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-exemples-pythontex.tex
+++ /dev/null
@@ -1,242 +0,0 @@
-% !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/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
index f714774351..02c4a3a8f8 100644
--- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty
+++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
@@ -3,7 +3,8 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2024/03/17 3.03a Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2024/03/25 3.03b Aide pour l'utilisation de LaTeX en lycee]
+% 3.03b Compétences Maths Lycées + \pflnum pour num+xint :-) + correction de bugs (div eucl)
% 3.03a Forme canonique + fonction homographique
% 3.02g Correction de bugs avec les arbres de probas
% 3.02f Ajout de petits schémas type pour la géométrie dans l'espace + conformité avec piton
@@ -188,6 +189,17 @@
{}%
}
+%%------patch num et xint
+\NewDocumentCommand\pflnum{ s O{} m }{%
+ \IfBooleanTF{#1}%
+ {%
+ \IfEq{#2}{}{\num{\xintfloateval{#3}}}{\num{\xintfloateval{round(#3,#2)}}}%
+ }%
+ {%
+ \num{\xintiieval{#3}}%
+ }%
+}
+
%%------Codes listings
\input{proflycee-tools-listings.tex}
%%------Trigo
@@ -212,5 +224,7 @@
\input{proflycee-tools-geom.tex}
%%------Récréations diverses
\input{proflycee-tools-recreat.tex}
+%%------Compétences
+\input{proflycee-tools-competences.tex}
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex
index eccfd35733..f013ab3d07 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex
@@ -913,7 +913,7 @@
}%
}
-%====DIV EUCL (OK)
+%====DIV EUCL (OK), 2 versions, mises à jour ;-)
\setKVdefault[diveucl]{%
Quotient=true,%
Reste=true,%
@@ -928,9 +928,16 @@
\setKV[diveucl]{Quotient=false,Reste=false}%
}%
{}%
- \xdef\tmp@quotient{\xintiiQuo{#3}{#4}}\xdef\tmp@reste{\xintiiRem{#3}{#4}}%
- \ensuremath{\num{#3}=\num{#4}\times\ifboolKV[diveucl]{Quotient}{\xintifboolexpr{\tmp@quotient < 0}{(\num{\tmp@quotient})}{\num{\tmp@quotient}}}{\useKV[diveucl]{Pointilles}}+\ifboolKV[diveucl]{Reste}{\num{\tmp@reste}}{\useKV[diveucl]{Pointilles}}}%
- \IfBooleanT{#1}{~avec $0 \leqslant \num{\xintiiRem{#3}{#4}} < \xintifboolexpr{#4 < 0}{\lvert\num{#4}\rvert}{\num{#4}}$}%
+ \xdef\tmpAA{\xinteval{#3}}\xdef\tmpBB{\xinteval{#4}}%
+ \xdef\tmpQuotient{\xintiiQuo{\tmpAA}{\tmpBB}}\xdef\tmpReste{\xintiiRem{\tmpAA}{\tmpBB}}%
+ \ensuremath{\num{\xinteval{#3}}=\num{\xinteval{#4}}\times\ifboolKV[diveucl]{Quotient}{\xintifboolexpr{\tmpQuotient < 0}{(\num{\tmpQuotient})}{\num{\tmpQuotient}}}{\useKV[diveucl]{Pointilles}}+\ifboolKV[diveucl]{Reste}{\num{\tmpReste}}{\useKV[diveucl]{Pointilles}}}%
+ \IfBooleanT{#1}{~avec $0 \leqslant \num{\xintiiRem{\tmpAA}{\tmpBB}} < \xintifboolexpr{\tmpBB < 0}{\lvert\num{\xinteval{#4}}\rvert}{\num{\xinteval{#4}}}$}%
+}
+
+\NewDocumentCommand\DivisionEucl{ m m }{%
+ \xdef\tmpAA{\xinteval{#1}}\xdef\tmpBB{\xinteval{#2}}%
+ \xdef\tmpQuotient{\xintiiQuo{\tmpAA}{\tmpBB}}\xdef\tmpReste{\xintiiRem{\tmpAA}{\tmpBB}}%
+ \ensuremath{\num{\tmpBB}\times\xintifboolexpr{\tmpQuotient < 0}{(\num{\tmpQuotient})}{\num{\tmpQuotient}}+\num{\xintiiRem{\tmpAA}{\tmpBB}}}
}
%====ADDITIONS POSÉES ?
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-competences.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-competences.tex
new file mode 100644
index 0000000000..1fcbbf3a98
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-competences.tex
@@ -0,0 +1,662 @@
+% proflycee-tools-competences.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
+
+%====COMPÉTENCES MATHS LYCÉE
+\setKVdefault[competencesmaths]{%
+ AffCateg=false,%
+ AffNumero=false,%
+ Court=false,%
+ Puce=false,%
+ TypePuce={\textbullet~~}
+}
+
+%les versions individuelles lycée
+\def\tmpcompetAA{Analyser un problème.}
+\def\tmpcompetAB{Extraire, organiser et traiter l’information utile.}
+\def\tmpcompetAC{Observer, s’engager dans une démarche, expérimenter en utilisant éventuellement des outils logiciels, chercher des exemples ou des contre-exemples, simplifier ou particulariser une situation, reformuler un problème, émettre une conjecture.}
+\def\tmpcompetACc{Observer, s’engager dans une démarche, expérimenter [\ldots].}
+\def\tmpcompetAD{Valider, corriger une démarche, ou en adopter une nouvelle.}
+
+\def\tmpcompetBA{Traduire en langage mathématique une situation réelle (à l’aide d’équations, de suites, de fonctions, de configurations géométriques, de graphes, de lois de probabilité, d’outils statistiques, \ldots).}
+\def\tmpcompetBAc{Traduire en langage mathématique une situation réelle adaptée [\ldots].}
+\def\tmpcompetBB{Utiliser, comprendre, élaborer une simulation numérique ou géométrique prenant appui sur la modélisation et utilisant un logiciel.}
+\def\tmpcompetBBc{Utiliser, comprendre, élaborer une simulation numérique ou géométrique [\ldots].}
+\def\tmpcompetBC{Valider ou invalider un modèle.}
+
+\def\tmpcompetCA{Choisir un cadre (numérique, algébrique, géométrique, \ldots) adapté pour traiter un problème ou pour représenter un objet mathématique.}
+\def\tmpcompetCAc{Choisir un cadre adapté [\ldots].}
+\def\tmpcompetCB{Passer d’un mode de représentation à un autre.}
+\def\tmpcompetCC{Changer de registre.}
+
+\def\tmpcompetDA{Effectuer un calcul automatisable à la main ou à l’aide d’un instrument (calculatrice, logiciel).}
+\def\tmpcompetDAc{Effectuer un calcul automatisable à la main ou à l’aide d’un instrument [\ldots].}
+\def\tmpcompetDB{Mettre en \oe{}uvre des algorithmes simples.}
+\def\tmpcompetDC{Exercer l’intelligence du calcul : organiser les différentes étapes d’un calcul complexe, choisir des transformations, effectuer des simplifications.}
+\def\tmpcompetDCc{Exercer l’intelligence du calcul [\ldots].}
+\def\tmpcompetDD{Contrôler les calculs (au moyen d’ordres de grandeur, de considérations de signe ou d’encadrement).}
+\def\tmpcompetDDc{Contrôler les calculs [\ldots].}
+
+\def\tmpcompetEA{Utiliser les notions de la logique élémentaire (conditions nécessaires ou suffisantes, équivalences, connecteurs) pour bâtir un raisonnement.}
+\def\tmpcompetEAc{Utiliser les notions de la logique élémentaire [\ldots].}
+\def\tmpcompetEB{Différencier le statut des énoncés mis en jeu : définition, propriété, théorème démontré, théorème admis\ldots}
+\def\tmpcompetEBc{Différencier le statut des énoncés mis en jeu [\ldots].}
+\def\tmpcompetEC{Utiliser différents types de raisonnement (par analyse et synthèse, par équivalence, par disjonction de cas, par l’absurde, par contraposée, par récurrence\ldots).}
+\def\tmpcompetECc{Utiliser différents types de raisonnement [\ldots].}
+\def\tmpcompetED{Effectuer des inférences (inductives, déductives) pour obtenir de nouveaux résultats, conduire une démonstration, confirmer ou infirmer une conjecture, prendre une décision.}
+\def\tmpcompetEDc{Effectuer des inférences pour obtenir de nouveaux résultats [\ldots].}
+
+\def\tmpcompetFA{Opérer la conversion entre le langage naturel et le langage symbolique formel.}%
+\def\tmpcompetFB{Développer une argumentation mathématique correcte à l’écrit ou à l’oral.}%
+\def\tmpcompetFC{Critiquer une démarche ou un résultat.}%
+\def\tmpcompetFD{S’exprimer avec clarté et précision à l’oral et à l’écrit.}%
+
+%commande principale lycée
+\NewDocumentCommand\CompMathsLyc{ s O{} m }{%
+ \restoreKV[competencesmaths]%
+ \setKV[competencesmaths]{#2}%
+ \IfBooleanTF{#1}{}{\noindent}%
+ \IfSubStr{#3}{/}%
+ {%
+ \StrCut{#3}{/}{\tmpCategCompet}{\tmpItemCompet}%
+ }%
+ {%
+ \xdef\tmpCategCompet{#3}%
+ }%
+ \IfStrEqCase{\tmpCategCompet}{%
+ {CH}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Chercher.~}}{}%
+ \IfStrEqCase{\tmpItemCompet}{%
+ {Analyser}{\tmpcompetAA}%
+ {Extraire}{\tmpcompetAB}%
+ {Observer}{\ifboolKV[competencesmaths]{Court}{\tmpcompetACc}{\tmpcompetAC}}%
+ {Valider}{\tmpcompetAD}%
+ {A}{\tmpcompetAA}%
+ {E}{\tmpcompetAB}%
+ {O}{\ifboolKV[competencesmaths]{Court}{\tmpcompetACc}{\tmpcompetAC}}%
+ {V}{\tmpcompetAD}%
+ {An}{\tmpcompetAA}%
+ {Ex}{\tmpcompetAB}%
+ {Ob}{\ifboolKV[competencesmaths]{Court}{\tmpcompetACc}{\tmpcompetAC}}%
+ {Va}{\tmpcompetAD}%
+ {Tout}{%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetAA}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetAB}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ \ifboolKV[competencesmaths]{Court}{\tmpcompetACc}{\tmpcompetAC}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetAD}%
+ }%
+ }%
+ }%
+ {MO}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Modéliser.~}}{}%
+ \IfStrEqCase{\tmpItemCompet}{%
+ {Traduire}{\ifboolKV[competencesmaths]{Court}{\tmpcompetBAc}{\tmpcompetBA}}%
+ {Utiliser}{\ifboolKV[competencesmaths]{Court}{\tmpcompetBBc}{\tmpcompetBB}}%
+ {Valider}{\tmpcompetBC}%
+ {T}{\ifboolKV[competencesmaths]{Court}{\tmpcompetBAc}{\tmpcompetBA}}%
+ {U}{\ifboolKV[competencesmaths]{Court}{\tmpcompetBBc}{\tmpcompetBB}}%
+ {V}{\tmpcompetBC}%
+ {Tr}{\ifboolKV[competencesmaths]{Court}{\tmpcompetBAc}{\tmpcompetBA}}%
+ {Ut}{\ifboolKV[competencesmaths]{Court}{\tmpcompetBBc}{\tmpcompetBB}}%
+ {Va}{\tmpcompetBC}%
+ {Tout}{%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetBAc}{\tmpcompetBA}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetBBc}{\tmpcompetBB}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetBC}%
+ }%
+ }%
+ }%
+ {RE}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Représenter.~}}{}%
+ \IfStrEqCase{\tmpItemCompet}{%
+ {Cadre}{\ifboolKV[competencesmaths]{Court}{\tmpcompetCAc}{\tmpcompetCA}}%
+ {Passer}{\tmpcompetCB}%
+ {Registre}{\tmpcompetCC}%
+ {C}{\ifboolKV[competencesmaths]{Court}{\tmpcompetCAc}{\tmpcompetCA}}%
+ {P}{\tmpcompetCB}%
+ {R}{\tmpcompetCC}%
+ {Ca}{\ifboolKV[competencesmaths]{Court}{\tmpcompetCAc}{\tmpcompetCA}}%
+ {Pa}{\tmpcompetCB}%
+ {Re}{\tmpcompetCC}%
+ {Tout}{%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetCAc}{\tmpcompetCA}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetCB}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetCC}%
+ }%
+ }%
+ }%
+ {CA}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Calculer.~}}{}%
+ \IfStrEqCase{\tmpItemCompet}{%
+ {Effectuer}{\ifboolKV[competencesmaths]{Court}{\tmpcompetDAc}{\tmpcompetDA}}%
+ {Mettre}{\tmpcompetDB}%
+ {Intellig}{\ifboolKV[competencesmaths]{Court}{\tmpcompetDCc}{\tmpcompetDC}}%
+ {Controler}{\ifboolKV[competencesmaths]{Court}{\tmpcompetDDc}{\tmpcompetDD}}%
+ {E}{\ifboolKV[competencesmaths]{Court}{\tmpcompetDAc}{\tmpcompetDA}}%
+ {M}{\tmpcompetDB}%
+ {I}{\ifboolKV[competencesmaths]{Court}{\tmpcompetDCc}{\tmpcompetDC}}%
+ {C}{\ifboolKV[competencesmaths]{Court}{\tmpcompetDDc}{\tmpcompetDD}}%
+ {Ef}{\ifboolKV[competencesmaths]{Court}{\tmpcompetDAc}{\tmpcompetDA}}%
+ {Me}{\tmpcompetDB}%
+ {In}{\ifboolKV[competencesmaths]{Court}{\tmpcompetDCc}{\tmpcompetDC}}%
+ {Co}{\ifboolKV[competencesmaths]{Court}{\tmpcompetDDc}{\tmpcompetDD}}%
+ {Tout}{%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetDAc}{\tmpcompetDA}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetDB}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetDCc}{\tmpcompetDC}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetDDc}{\tmpcompetDD}}%
+ }%
+ }%
+ }%
+ {RA}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Raisonner.~}}{}%
+ \IfStrEqCase{\tmpItemCompet}{%
+ {Logique}{\ifboolKV[competencesmaths]{Court}{\tmpcompetEAc}{\tmpcompetEA}}%
+ {Differencier}{\ifboolKV[competencesmaths]{Court}{\tmpcompetEBc}{\tmpcompetEB}}%
+ {Raisonnement}{\ifboolKV[competencesmaths]{Court}{\tmpcompetECc}{\tmpcompetEC}}%
+ {Inference}{\ifboolKV[competencesmaths]{Court}{\tmpcompetEDc}{\tmpcompetED}}%
+ {L}{\ifboolKV[competencesmaths]{Court}{\tmpcompetEAc}{\tmpcompetEA}}%
+ {D}{\ifboolKV[competencesmaths]{Court}{\tmpcompetEBc}{\tmpcompetEB}}%
+ {R}{\ifboolKV[competencesmaths]{Court}{\tmpcompetECc}{\tmpcompetEC}}%
+ {I}{\ifboolKV[competencesmaths]{Court}{\tmpcompetEDc}{\tmpcompetED}}%
+ {Lo}{\ifboolKV[competencesmaths]{Court}{\tmpcompetEAc}{\tmpcompetEA}}%
+ {Di}{\ifboolKV[competencesmaths]{Court}{\tmpcompetEBc}{\tmpcompetEB}}%
+ {Ra}{\ifboolKV[competencesmaths]{Court}{\tmpcompetECc}{\tmpcompetEC}}%
+ {In}{\ifboolKV[competencesmaths]{Court}{\tmpcompetEDc}{\tmpcompetED}}%
+ {Tout}{%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetEAc}{\tmpcompetEA}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetEBc}{\tmpcompetEB}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetECc}{\tmpcompetEC}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetEDc}{\tmpcompetED}}%
+ }%
+ }%
+ }%
+ {CO}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Communiquer.~}}{}%
+ \IfStrEqCase{\tmpItemCompet}{%
+ {Operer}{\tmpcompetFA}%
+ {Developper}{\tmpcompetFB}%
+ {Critiquer}{\tmpcompetFC}%
+ {Exprimer}{\tmpcompetFD}%
+ {O}{\tmpcompetFA}%
+ {D}{\tmpcompetFB}%
+ {C}{\tmpcompetFC}%
+ {E}{\tmpcompetFD}%
+ {Op}{\tmpcompetFA}%
+ {De}{\tmpcompetFB}%
+ {Cr}{\tmpcompetFC}%
+ {Ex}{\tmpcompetFD}%
+ {Tout}{%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetFA}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetFB}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetFC}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetFD}%
+ }%
+ }%
+ }%
+ }%
+ \IfStrEqCase{\tmpCategCompet}{%
+ {LYC11}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Chercher.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetAA}}%
+ {LYC12}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Chercher.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetAB}}%
+ {LYC13}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Chercher.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetACc}{\tmpcompetAC}}}%
+ {LYC14}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Chercher.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetAD}}%
+ {LYC1}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Chercher.~}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet1.~}}{}\tmpcompetAA}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet2.~}}{}\tmpcompetAB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet3.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetACc}{\tmpcompetACc}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet4.~}}{}\tmpcompetAD}%
+ }%fin catégorie 1
+ {LYC21}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Modéliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetBAc}{\tmpcompetBA}}}%
+ {LYC22}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Modéliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetBBc}{\tmpcompetBB}}}%
+ {LYC23}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Modéliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetBC}}%
+ {LYC2}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Modéliser.~}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet1.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetBAc}{\tmpcompetBA}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet2.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetBBc}{\tmpcompetBB}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet3.~}}{}\tmpcompetBC}%
+ }%fin catégorie 2
+ {LYC31}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Représenter.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetCAc}{\tmpcompetCA}}}%
+ {LYC32}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Représenter.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetCB}}%
+ {LYC33}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Représenter.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetCC}}%
+ {LYC3}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Représenter.~}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet1.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetCAc}{\tmpcompetCA}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet2.~}}{}\tmpcompetCB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet3.~}}{}\tmpcompetCC}%
+ }%fin catégorie 3
+ {LYC41}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Calculer.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetDAc}{\tmpcompetDA}}}%
+ {LYC42}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Calculer.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetDB}}%
+ {LYC43}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Calculer.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetDCc}{\tmpcompetDC}}}%
+ {LYC44}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Calculer.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetDDc}{\tmpcompetDD}}}%
+ {LYC4}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Calculer.~}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet1.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetDAc}{\tmpcompetDA}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet2.~}}{}\tmpcompetDB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet3.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetDCc}{\tmpcompetDC}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet4.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetDDc}{\tmpcompetDD}}%
+ }%fin catégorie 4
+ {LYC51}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Raisonner.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetEAc}{\tmpcompetEA}}}%
+ {LYC52}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Raisonner.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetEBc}{\tmpcompetEB}}}%
+ {LYC53}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Raisonner.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetECc}{\tmpcompetEC}}}%
+ {LYC54}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Raisonner.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetEDc}{\tmpcompetED}}}%
+ {LYC5}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Raisonner.~}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet1.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetEAc}{\tmpcompetEA}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet2.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetEBc}{\tmpcompetEB}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet3.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetECc}{\tmpcompetEC}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet4.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetEDc}{\tmpcompetED}}%
+ }%fin catégorie 5
+ {LYC61}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Communiquer.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetFA}}%
+ {LYC62}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Communiquer.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetFB}}%
+ {LYC63}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Communiquer.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetFC}}%
+ {LYC64}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Communiquer.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetFD}}%
+ {LYC6}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Communiquer.~}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet1.~}}{}\tmpcompetFA}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet2.~}}{}\tmpcompetFB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet3.~}}{}\tmpcompetFC}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet4.~}}{}\tmpcompetFD}%
+ }
+ {LYC}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Chercher.~\\}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet11.~}}{}\tmpcompetAA}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet12.~}}{}\tmpcompetAB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet13.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetACc}{\tmpcompetACc}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet14.~}}{}\tmpcompetAD}\\%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Modéliser.~\\}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet21.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetBAc}{\tmpcompetBA}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet22.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetBBc}{\tmpcompetBB}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet23.~}}{}\tmpcompetBC}\\%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Représenter.~\\}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet31.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetCAc}{\tmpcompetCA}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet32.~}}{}\tmpcompetCB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet33.~}}{}\tmpcompetCC}\\%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Calculer.~\\}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet41.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetDAc}{\tmpcompetDA}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet42.~}}{}\tmpcompetDB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet43.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetDCc}{\tmpcompetDC}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet44.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetDDc}{\tmpcompetDD}}\\%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Raisonner.~\\}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet51.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetEAc}{\tmpcompetEA}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet52.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetEBc}{\tmpcompetEB}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet53.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetECc}{\tmpcompetEC}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet54.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetEDc}{\tmpcompetED}}\\%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Communiquer.~\\}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet61.~}}{}\tmpcompetFA}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet62.~}}{}\tmpcompetFB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet63.~}}{}\tmpcompetFC}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet64.~}}{}\tmpcompetFD}%
+ }%
+ }%
+}
+
+%les versions individuelles lycée pro
+%S’approprier
+\def\tmpcompetproAA{Rechercher, extraire et organiser l’information.}
+\def\tmpcompetproAB{Traduire des informations, des codages.}
+%Analyser/Raisonner
+\def\tmpcompetproBA{Émettre des conjectures, formuler des hypothèses.}
+\def\tmpcompetproBB{Proposer une méthode de résolution.}
+\def\tmpcompetproBC{Choisir un modèle ou des lois pertinentes.}
+\def\tmpcompetproBD{Élaborer un algorithme.}
+\def\tmpcompetproBE{Choisir, élaborer un protocole.}
+\def\tmpcompetproBF{Évaluer des ordres de grandeur.}
+%Réaliser
+\def\tmpcompetproCA{Mettre en \oe{}uvre les étapes d’une démarche.}
+\def\tmpcompetproCB{Utiliser un modèle.}
+\def\tmpcompetproCC{Représenter (tableau, graphique, \ldots), changer de registre.}
+\def\tmpcompetproCD{Calculer (calcul littéral, calcul algébrique, calcul numérique exact ou approché, instrumenté ou à la main).}
+\def\tmpcompetproCDc{Calculer (calcul littéral, calcul algébrique, [\ldots]).}
+\def\tmpcompetproCE{Mettre en \oe{}uvre des algorithmes.}
+\def\tmpcompetproCF{Expérimenter – en particulier à l’aide d’outils numériques (logiciels ou des dispositifs d’acquisition de données\ldots).}
+\def\tmpcompetproCFc{Expérimenter – en particulier à l’aide d’outils numériques [\ldots].}
+\def\tmpcompetproCG{Faire une simulation.}
+\def\tmpcompetproCH{Effectuer des procédures courantes (représentations, collectes de données, utilisation du matériel, etc).}
+\def\tmpcompetproCHc{Effectuer des procédures courantes (représentations, [\ldots]).}
+\def\tmpcompetproCI{Mettre en \oe{}uvre un protocole expérimental en respectant les règles de sécurité à partir d’un schéma ou d’un descriptif.}
+\def\tmpcompetproCIc{Mettre en \oe{}uvre un protocole expérimental en respectant les règles de sécurité [\ldots].}
+\def\tmpcompetproCJ{Organiser son poste de travail.}
+%Valider
+\def\tmpcompetproDA{Exploiter et interpréter les résultats obtenus ou les observations effectuées afin de répondre à une problématique.}
+\def\tmpcompetproDAc{Exploiter et interpréter les résultats obtenus ou les observations effectuées [\ldots].}
+\def\tmpcompetproDB{Valider ou invalider un modèle, une hypothèse en argumentant.}
+\def\tmpcompetproDC{Contrôler la vraisemblance d’une conjecture.}
+\def\tmpcompetproDD{Critiquer un résultat (signe, ordre de grandeur, identification des sources d’erreur), argumenter.}
+\def\tmpcompetproDDc{Critiquer un résultat [\ldots], argumenter.}
+\def\tmpcompetproDE{Conduire un raisonnement logique et suivre des règles établies pour parvenir à une conclusion (démontrer, prouver).}
+\def\tmpcompetproDEc{Conduire un raisonnement logique et suivre des règles établies [\ldots].}
+%Communiquer
+\def\tmpcompetproEA{Rendre compte d’un résultat en utilisant un vocabulaire adapté et choisir des modes de représentation appropriés.}
+\def\tmpcompetproEAc{Rendre compte d’un résultat en utilisant un vocabulaire adapté [\ldots].}
+\def\tmpcompetproEB{Expliquer une démarche.}
+
+%commande principale lycée
+\NewDocumentCommand\CompMathsLycPro{ s O{} m }{%
+ \restoreKV[competencesmaths]%
+ \setKV[competencesmaths]{#2}%
+ \IfBooleanTF{#1}{}{\noindent}%
+ \IfSubStr{#3}{/}%
+ {%
+ \StrCut{#3}{/}{\tmpCategCompet}{\tmpItemCompet}%
+ }%
+ {%
+ \xdef\tmpCategCompet{#3}%
+ }%
+ \IfStrEqCase{\tmpCategCompet}{%
+ {AP}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{S'approprier.~}}{}%
+ \IfStrEqCase{\tmpItemCompet}{%
+ {Rechercher}{\tmpcompetproAA}%
+ {Traduire}{\tmpcompetproAB}%
+ {R}{\tmpcompetproAA}%
+ {T}{\tmpcompetproAB}%
+ {Re}{\tmpcompetproAA}%
+ {Tr}{\tmpcompetproAB}%
+ {Tout}{%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproAA}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproAB}%
+ }%
+ }%
+ }%
+ {AR}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Analyser/Raisonner.~}}{}%
+ \IfStrEqCase{\tmpItemCompet}{%
+ {Emettre}{\tmpcompetproBA}%
+ {Proposer}{\tmpcompetproBB}%
+ {Modele}{\tmpcompetproBC}%
+ {Algorithme}{\tmpcompetproBD}%
+ {Choisir}{\tmpcompetproBE}%
+ {Grandeur}{\tmpcompetproBF}%
+ {E}{\tmpcompetproBA}%
+ {P}{\tmpcompetproBB}%
+ {M}{\tmpcompetproBC}%
+ {A}{\tmpcompetproBD}%
+ {C}{\tmpcompetproBE}%
+ {G}{\tmpcompetproBF}%
+ {Em}{\tmpcompetproBA}%
+ {Pr}{\tmpcompetproBB}%
+ {Mo}{\tmpcompetproBC}%
+ {Al}{\tmpcompetproBD}%
+ {Ch}{\tmpcompetproBE}%
+ {Gr}{\tmpcompetproBF}%
+ {Tout}{%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproBA}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproBB}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproBC}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproBD}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproBE}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproBF}%
+ }%
+ }%
+ }%
+ {RE}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~}}{}%
+ \IfStrEqCase{\tmpItemCompet}{%
+ {Etapes}{\tmpcompetproCA}%
+ {Modele}{\tmpcompetproCB}%
+ {Representer}{\tmpcompetproCC}%
+ {Calculer}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproCDc}{\tmpcompetproCD}}%
+ {Algorithmes}{\tmpcompetproCE}%
+ {Experimenter}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproCFc}{\tmpcompetproCF}}%
+ {Simulation}{\tmpcompetproCG}%
+ {Effectuer}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproCHc}{\tmpcompetproCH}}%
+ {Protocole}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproCIc}{\tmpcompetproCI}}%
+ {Organiser}{\tmpcompetproCJ}%
+ {E}{\tmpcompetproCA}%
+ {M}{\tmpcompetproCB}%
+ {R}{\tmpcompetproCC}%
+ {C}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproCDc}{\tmpcompetproCD}}%
+ {A}{\tmpcompetproCE}%
+ {Ex}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproCFc}{\tmpcompetproCF}}%
+ {S}{\tmpcompetproCG}%
+ {Ef}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproCHc}{\tmpcompetproCH}}%
+ {P}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproCIc}{\tmpcompetproCI}}%
+ {O}{\tmpcompetproCJ}%
+ {Et}{\tmpcompetproCA}%
+ {Mo}{\tmpcompetproCB}%
+ {Re}{\tmpcompetproCC}%
+ {Ca}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproCDc}{\tmpcompetproCD}}%
+ {Al}{\tmpcompetproCE}%
+ {Si}{\tmpcompetproCG}%
+ {Pr}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproCIc}{\tmpcompetproCI}}%
+ {Or}{\tmpcompetproCJ}%
+ {Tout}{%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproCA}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproCB}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproCC}%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproCDc}{\tmpcompetproCD}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproCE}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproCFc}{\tmpcompetproCF}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproCG}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproCHc}{\tmpcompetproCH}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproCIc}{\tmpcompetproCI}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproCJ}%
+ }%
+ }%
+ }%
+ {VA}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Valider.~}}{}%
+ \IfStrEqCase{\tmpItemCompet}{%
+ {Exploiter}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproDAc}{\tmpcompetproDA}}%
+ {Valider}{\tmpcompetproDB}%
+ {Controler}{\tmpcompetproDC}%
+ {Critiquer}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproDDc}{\tmpcompetproDD}}%
+ {Raisonnement}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproDEc}{\tmpcompetproDE}}%
+ {Ex}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproDAc}{\tmpcompetproDA}}%
+ {Va}{\tmpcompetproDB}%
+ {Co}{\tmpcompetproDC}%
+ {Cr}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproDDc}{\tmpcompetproDD}}%
+ {Ra}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproDEc}{\tmpcompetproDE}}%
+ {E}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproDAc}{\tmpcompetproDA}}%
+ {V}{\tmpcompetproDB}%
+ {R}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproDEc}{\tmpcompetproDE}}%
+ {Tout}{%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproDAc}{\tmpcompetproDA}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproDB}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproDC}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproDDc}{\tmpcompetproDD}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproDEc}{\tmpcompetproDE}}%
+ }%
+ }%
+ }%
+ {CO}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Communiquer.~}}{}%
+ \IfStrEqCase{\tmpItemCompet}{%
+ {Rendre}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproEAc}{\tmpcompetproEA}}%
+ {Expliquer}{\tmpcompetproEB}%
+ {R}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproEAc}{\tmpcompetproEA}}%
+ {E}{\tmpcompetproEB}%
+ {Re}{\ifboolKV[competencesmaths]{Court}{\tmpcompetproEAc}{\tmpcompetproEA}}%
+ {Ex}{\tmpcompetproEB}%
+ {Tout}{%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproEAc}{\tmpcompetproEA}}\\%
+ \ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}%
+ {\tmpcompetproEB}%
+ }%
+ }%
+ }%
+ }%
+ \IfStrEqCase{\tmpCategCompet}{%
+ {LYC11}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{S’approprier.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproAA}}%
+ {LYC12}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{S’approprier.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproAB}}%
+ {LYC1}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{S’approprier.~}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet1.~}}{}\tmpcompetproAA}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet2.~}}{}\tmpcompetproAB}%
+ }%fin catégorie 1
+ {LYC21}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Analyser/Raisonner.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproBA}}%
+ {LYC22}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Analyser/Raisonner.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproBB}}%
+ {LYC23}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Analyser/Raisonner.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproBC}}%
+ {LYC24}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Analyser/Raisonner.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproBD}}%
+ {LYC25}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Analyser/Raisonner.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproBE}}%
+ {LYC26}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Analyser/Raisonner.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproBF}}%
+ {LYC2}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Analyser/Raisonner.~}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet1.~}}{}\tmpcompetproBA}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet2.~}}{}\tmpcompetproBB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet3.~}}{}\tmpcompetproBC}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet4.~}}{}\tmpcompetproBD}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet5.~}}{}\tmpcompetproBE}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet6.~}}{}\tmpcompetproBF}%
+ }%fin catégorie 2
+ {LYC31}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproCA}}%
+ {LYC32}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproCB}}%
+ {LYC33}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproCC}}%
+ {LYC34}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproCDc}{\tmpcompetproCD}}}%
+ {LYC35}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproCE}}%
+ {LYC36}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproCFc}{\tmpcompetproCF}}}%
+ {LYC37}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproCG}}%
+ {LYC38}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproCHc}{\tmpcompetproCH}}}%
+ {LYC39}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproCIc}{\tmpcompetproCI}}}%
+ {LYC3A}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproCJ}}%
+ {LYC3}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet1.~}}{}\tmpcompetproCA}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet2.~}}{}\tmpcompetproCB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet3.~}}{}\tmpcompetproCC}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet4.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproCDc}{\tmpcompetproCD}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet5.~}}{}\tmpcompetproCE}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet6.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproCFc}{\tmpcompetproCF}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet7.~}}{}\tmpcompetproCG}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet8.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproCHc}{\tmpcompetproCH}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet9.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproCIc}{\tmpcompetproCI}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet{}A.~}}{}\tmpcompetproCJ}%
+ }%fin catégorie 3
+ {LYC41}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Valider.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproDAc}{\tmpcompetproDA}}}%
+ {LYC42}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Valider.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproDB}}%
+ {LYC43}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Valider.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproDC}}%
+ {LYC44}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Valider.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproDD}}%
+ {LYC45}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Valider.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproDEc}{\tmpcompetproDE}}}%
+ {LYC4}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Valider.~}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet1.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproDAc}{\tmpcompetproDA}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet2.~}}{}\tmpcompetproDB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet3.~}}{}\tmpcompetproDC}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet4.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproDDc}{\tmpcompetproDD}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet5.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproDEc}{\tmpcompetproDE}}%
+ }%fin catégorie 4
+ {LYC51}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Communiquer.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\ifboolKV[competencesmaths]{Court}{\tmpcompetproEAc}{\tmpcompetproEA}}}%
+ {LYC52}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Communiquer.~}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet.~}}{}%
+ {\tmpcompetproEB}}%
+ {LYC5}{\ifboolKV[competencesmaths]{AffCateg}{\textbf{Communiquer.~}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet1.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproEAc}{\tmpcompetproEA}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet2.~}}{}\tmpcompetproEB}}%
+ {LYC}{%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{S’approprier.~\\}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet11.~}}{}\tmpcompetproAA}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet12.~}}{}\tmpcompetproAB}\\%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Analyser/Raisonner.~\\}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet21.~}}{}\tmpcompetproBA}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet22.~}}{}\tmpcompetproBB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet23.~}}{}\tmpcompetproBC}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet24.~}}{}\tmpcompetproBD}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet25.~}}{}\tmpcompetproBE}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet26.~}}{}\tmpcompetproBF}\\%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Réaliser.~\\}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet31.~}}{}\tmpcompetproCA}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet32.~}}{}\tmpcompetproCB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet33.~}}{}\tmpcompetproCC}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet34.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproCDc}{\tmpcompetproCD}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet35.~}}{}\tmpcompetproCE}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet36.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproCFc}{\tmpcompetproCF}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet37.~}}{}\tmpcompetproCG}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet38.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproCHc}{\tmpcompetproCH}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet39.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproCIc}{\tmpcompetproCI}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet3A.~}}{}\tmpcompetproCJ}\\%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Valider.~\\}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet41.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproDAc}{\tmpcompetproDA}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet42.~}}{}\tmpcompetproDB}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet43.~}}{}\tmpcompetproDC}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet44.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproDDc}{\tmpcompetproDD}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet45.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproDEc}{\tmpcompetproDE}}\\%
+ \ifboolKV[competencesmaths]{AffCateg}{\textbf{Communiquer.~\\}}{}%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet61.~}}{}\ifboolKV[competencesmaths]{Court}{\tmpcompetproEAc}{\tmpcompetproEA}}\\%
+ {\ifboolKV[competencesmaths]{Puce}{\useKV[competencesmaths]{TypePuce}}{}\ifboolKV[competencesmaths]{AffNumero}{\textbf{\tmpCategCompet62.~}}{}\tmpcompetproEB}%
+ }%
+ }%
+}
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/profmaquette/doc/Attention-1.pdf b/macros/latex/contrib/profmaquette/doc/Attention-1.pdf
deleted file mode 100644
index 610035bec8..0000000000
--- a/macros/latex/contrib/profmaquette/doc/Attention-1.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/profmaquette/doc/Attention-2.pdf b/macros/latex/contrib/profmaquette/doc/Attention-2.pdf
deleted file mode 100644
index 731646c80f..0000000000
--- a/macros/latex/contrib/profmaquette/doc/Attention-2.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdf b/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdf
index dc34cdefa9..a4382edbdf 100644
--- a/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdf
+++ b/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.tex b/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.tex
deleted file mode 100644
index 2c53d9fd8c..0000000000
--- a/macros/latex/contrib/profmaquette/doc/ProfMaquette-doc.tex
+++ /dev/null
@@ -1,1563 +0,0 @@
-% with lualatex
-\documentclass[12pt,french]{article}
-\usepackage[nonamssymb]{ProfCollege}
-\usepackage{ProfMaquetteT}
-\usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
-\usepackage[math-style=french]{fourier-otf}
-
-% \newfontfamily\myfontDys{FiraMath-Regular.otf}
-%\newfontfamily\myfontDys{Lato}
-%\newfontfamily\myfontMathDys{LatoMath}
-
-\newfontfamily\myfontDys{KpSans.otf}
-\setmathfont[version=kp]{KpMath-Sans.otf}
-
-\usepackage[a4paper,margin=1.5cm,nohead,includefoot]{geometry}
-\setlength{\parindent}{0pt}
-\pagestyle{empty}
-\usepackage{mflogo}
-
-\usepackage{graphicx}
-
-\usepackage{babel}
-
-\def\MPclipOne#1#2#3{
- \begin{mplibcode}
- vardef paired (expr d) =
- if pair d : d else : (d,d) fi
- enddef ;
-
- primarydef p xyscaled q =
- begingroup ; save qq ; pair qq ; qq = paired(q) ;
- ( p
- if xpart qq<>0 : xscaled (xpart qq) fi
- if ypart qq<>0 : yscaled (ypart qq) fi )
- endgroup
- enddef ;
-
- path fullsquare;
- fullsquare := unitsquare shifted - center unitsquare ;
-
- color myyellow;
- myyellow = (242/255,226/255,149/255);
-
- path p; p := fullsquare xyscaled (#1,#2);% squeezed #3;
-
- %fill (point(0) of p)--(point(1) of p)--(point(2) of p)--(point(3) of p)--cycle;
- pair pp;
- pp=0.5[point(0) of p,point(2) of p];
- height=2pt;
- width=2pt;
- p:=(point(0) of p)--(point(1) of p)--(point(2) of p);
-
- p:=(1/3[point(0) of p,point(1) of p])--(point(1) of p)--(2/3[point(1) of p,point(2) of p]);% withpen pencircle scaled 2bp;
- z1=point(0) of p;
- x2=x12=xpart(point(length p/6) of p);
- x3=x11=xpart(point(2*length p/6) of p);
- x4=xpart(point(3*length p/6) of p)+width;
- x5=x4-(width/3);
- x6=x4-(2*width/3);
- x7=xpart(point(length p) of p);
- x8=x7-(width/3);
- x9=x7-(2*width/3);
- x10=x7-width;
- y2=ypart(point(length p/6) of p)-(height/3);
- y3=ypart(point(2*length p/6) of p)-(2*height/3);
- y4=ypart(point(3*length p/6) of p)-height;
- y12=ypart(point(length p/6) of p)+(height/3);
- y11=ypart(point(2*length p/6) of p)+(2*height/3);
- y10=ypart(point(3*length p/6) of p)+height;
- y5=y9=ypart(point(4*length p/6) of p);
- y6=y8=ypart(point(5*length p/6) of p);
- y7=ypart(point(length p) of p);
- fill z1--z2--cycle--z3--z4--z5--z6--z7--z8--z9--z10--z11--z12--cycle;% withcolor 0.85myyellow;
- fill (z1--z2--cycle--z3--z4--z5--z6--z7--z8--z9--z10--z11--z12--cycle) rotatedabout(pp,180);% withcolor 0.85myyellow;
- \end{mplibcode}
-}
-
-\newsavebox{\tacochapterbox}
-
-\newcommand{\Tacoo}[1]{%
- \begin{lrbox}{\tacochapterbox}
- #1%
- \end{lrbox}
- \ooalign{%
- \MPclipOne{\mpdim{\wd\tacochapterbox+1pc}}% width
- {\mpdim{\ht\tacochapterbox+\dp\tacochapterbox+1pc}}% height
- {0pt}% thickness of the curve
- \cr\kern0.5pc\raisebox{\ht\tacochapterbox\relax}{\usebox\tacochapterbox}%
- }
-}
-
-\NewDocumentEnvironment{CadreMP}{+b}{%
- \begin{lrbox}{\tacochapterbox}%
- \begin{minipage}{0.96\linewidth}
- #1%
- \end{minipage}
- \end{lrbox}%
- \ooalign{%
- \MPclipOne{\mpdim{\wd\tacochapterbox+1pc}}% width
- {\mpdim{\ht\tacochapterbox+\dp\tacochapterbox+1pc}}% height
- {0pt}% thickness of the curve
- \cr\kern0.5pc\raisebox{\ht\tacochapterbox\relax}{\usebox\tacochapterbox}%
- }%
-}{}%
-
-\usepackage{pdfpages}
-\title{%
- \begin{tabular}{c}
- \ttfamily ProfMaquette.sty\\
- \small Factoriser la production de documents
- \end{tabular}
-}%
-\author{C.Poulain}
-\date{v \PfMfileversion -- \PfMfiledate}
-
-\usepackage[colorlinks=true,linkcolor=purple]{hyperref}
-
-\pagestyle{empty}
-
-\usepackage{listings}
-\lstset{
- language = [LaTeX]TeX,
- basicstyle = \ttfamily,%
- breaklines = true,
- commentstyle = \footnotesize\slshape\color{gray},
- emphstyle=\color{purple},
- columns=fullflexible,%
- frame=tb,%
- texcsstyle=*\color{black},%pour colorer la contre-oblique
- classoffset=5,
- texcsstyle=*\color{blue},%pour colorer la contre-oblique
- moretexcs={brm,TikzDM,TikzDMCor,TikzDS,TikzDSCor,TikzIE,TikzIECor,TikzFiche,TikzFicheCor,TikzCours,Competences,TikzParcours,TikzParcoursCor,TikzPdT,TikzPdTCor,PfMCompNA,PfMCompECA,PfMCompA,AfficheParcours,CheminVrai,CheminFaux,TikzContrat,TikzContratCor,TikzFdR,TikzFdRCor,AfficheContrat,AfficheFdR,TikzCAN,TikzCANCor,Complement,PfMTexteEncart,PfMEspaceAvantLignes,PfMEspaceApresLignes,cacheitem},
- emph={Maquette,exercice,Solution,Reponse,Indice},%
- classoffset=1,
- keywords={DM,DS,IE,Fiche,CorrigeFin,CorrigeApres,PdT,Parcours,ParcoursPerso,Cours,FdR,Contrat,CAN,Dys,Taille,VersSolution},
- keywordstyle=\color{OliveDrab},
- classoffset=2,
- keywords={Theme,Niveau,Classe,Date,Calculatrice,Code,Numero,Sujet,Nom,NumSujet,Fichier,Type,CoefQ,CoefR,CoefJ},
- keywordstyle=\color{BlueViolet},%DarkMagenta},
- classoffset=3,
- keywords={Pouce,Direct,PasCorrige,BaremeDetaille,BaremeTotal,Source,Titre,Oral,Calculatrice,Competence,Trajet,Confiance,Route,Stop,Lignes,Encart,TitreSolution,NonUtilise,Profile},
- keywordstyle=\color{DarkGreen},
- classoffset=4,
- keywords={userfiche,userfichecor,userdm,userdmcor,userie,useriecor,userds,userdscor,userparcours,userparcourscor,userpdt,userpdtcor,usercours,usercontrat,usercontratcor,userfdr,userfdrcor,usercan,usercancor},
- keywordstyle=\color{Purple},
-% delim = **[s][\color{purple}]{$}{$},
-% moredelim = **[s][\color{purple}]{\\[}{\\]},
-% moredelim = **[is][\color{black}]{\\Z}{\\Z},
- literate=*{[}{{\textcolor{orange}{[}}}{1}
- {]}{{\textcolor{orange}{]}}}{1}
- {\{}{\textcolor{amber}{\{}}{1}
- {\}}{\textcolor{amber}{\}}}{1}
- {\&}{\textcolor{red}{\&}}{1}
- {\\[}{{\textcolor{purple}{\textbackslash[}}}{2}
- {\\]}{{\textcolor{purple}{\textbackslash]}}}{2}
- {$}{{\textcolor{purple}{\$}}}{1}%$
- {_}{{\textcolor{purple}{\_}}}{1}%
- {^}{{\textcolor{purple}{\^{}}}}{1}%,
-}
-
-% "Rehook" delimiters char table.
-\makeatletter
-\lst@AddToHook{SelectCharTable}{\lst@DefDelims}
-\makeatother
-
-\usepackage{textcomp}%pour les < de listings
-\usepackage{enumitem}
-\usepackage{hhline}
-\usepackage{pifont}
-
-\definecolor{mygray}{RGB}{245,245,245}%pour le background de listing
-\definecolor{drab}{rgb}{0.59, 0.44, 0.09}
-\definecolor{amber}{rgb}{1.0, 0.75, 0.0}
-\definecolor{chocolate}{rgb}{0.82, 0.41, 0.12}
-\colorlet{amber}{chocolate}
-
-\newtcblisting{Codes}[3][]{%
- top=0mm,bottom=0mm,left=2mm,right=2mm,middle=0mm,%
- colback=white,%
- colframe=white!75!black,%
- every listing line={#3},%
- listing options={%
- frame=,%
- backgroundcolor=,%
- },%
- righthand width=#2\linewidth,%
- #1%
-}%
-
-\usepackage{menukeys}
-\newcommand\metamk[1]{\textcolor{chocolate}{\textlangle}{\ttfamily #1}\textcolor{chocolate}{\textrangle}}
-
-\newcommand\Cle[1]{%
- {\sffamily\textlangle #1\textrangle}%
-}%
-
-\newcommand\Defaut[1]{%
-\hfill valeur par défaut : {\sffamily #1}%\\[-1em]%
-}%
-
-\usepackage{parskip}
-
-\newenvironment{Description}
- {\list{}{\labelwidth0pt \leftmargin0pt \itemindent-\leftmargin
- \let\makelabel\Descriptionlabel}}
- {\endlist}
-\newcommand*\Descriptionlabel[1]{\hspace\labelsep
- \normalfont\bfseries #1}
-
-\parindent0pt
-
-\newcommand\TIKZ{Ti\textit{k}Z}
-
-\renewcommand\TikzDM{%
- \begin{tcolorbox}[frame hidden,colback=white,enhanced,%
- borderline north={3pt}{0pt}{gray!85},
- borderline north={2pt}{0.5pt}{gray!15},
- borderline south={3pt}{0pt}{gray!85},
- borderline south={2pt}{0.5pt}{gray!15},
- ]%
- \sffamily Devoir en temps libre \no\useKV[DM]{Numero}\hfill\useKV[DM]{Niveau}\ieme{} \useKV[DM]{Classe}%
- \par{\tiny\jobname}\hfill{\scriptsize Pour le \useKV[DM]{Date}}%
- \end{tcolorbox}%
-}
-\renewcommand\TikzDS{%
- \begin{tcolorbox}[colback=gray!5,%
- enhanced,%
- overlay unbroken and first={%
- \node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice \ifboolKV[DS]{Calculatrice}{autorisée}{interdite} --};
- }
- ]%
- \sffamily Devoir surveillé \no\useKV[DS]{Numero} (Sujet \useKV[DS]{Sujet})\hfill\useKV[DS]{Niveau}\ieme{} \useKV[DS]{Classe}
- \par{\tiny\jobname}\hfill{\scriptsize\useKV[DS]{Date}}
- \end{tcolorbox}%
-}
-\renewcommand\TikzIE{%
- \begin{minipage}{0.6\linewidth}
- \begin{tcolorbox}[colback=gray!5,
- enhanced,%
- overlay unbroken and first={%
- \node[yshift=1em] at (frame.south) {\scriptsize\sffamily-- Calculatrice \ifboolKV[IE]{Calculatrice}{autorisée}{interdite} --};
- }
- ]%
- \sffamily \useKV[IE]{Nom} \no\useKV[IE]{Numero} : \useKV[IE]{Theme} \ifboolKV[IE]{Sujets}{\scriptsize(Sujet \useKV[IE]{NumSujet})}{}
- \vspace{1em}
- \par{\tiny\jobname}\hfill{\scriptsize\useKV[IE]{Date}}
- \end{tcolorbox}%
- \end{minipage}\hfill\begin{minipage}{0.35\linewidth}
- Nom : \dotfill\\[0.5em]
- Prénom : \dotfill\\[0.5em]
- Classe : \dotfill
- \end{minipage}
- \par\bigskip
-}
-
-\tcbset{%
- userfiche/.style={%
- colback=gray!5%
- }%
-}%
-
-\renewcommand\TikzFiche{%
- \begin{tcolorbox}[userfiche]%
- \Large\sffamily \useKV[Fiche]{Theme}\hfill\useKV[Fiche]{Niveau}\ieme{} \useKV[Fiche]{Classe}
- \par{\tiny\jobname}\hfill{\scriptsize\useKV[Fiche]{Date}}
- \end{tcolorbox}%
-}
-
-\renewcommand\TikzParcours{%
- \begin{tcolorbox}[%spread outwards=-1cm,spread inwards=-1cm,
- colback=gray!5]%
- \Large\sffamily \useKV[Parcours]{Theme}\hfill\useKV[Parcours]{Niveau} \useKV[Parcours]{Classe}%
- \par{\tiny\useKV[Parcours]{Code}}\hfill{\scriptsize\useKV[Parcours]{Date}}%
- \end{tcolorbox}%
-}
-
-\renewcommand\TikzPdT{%
- \begin{tcolorbox}[%spread outwards=-1cm,spread inwards=-1cm,
- colback=gray!5]%
- \Large\sffamily \useKV[PdT]{Theme}\hfill\useKV[PdT]{Niveau} \useKV[PdT]{Classe}%
- \par{\tiny\useKV[PdT]{Code}}\hfill{\scriptsize\useKV[PdT]{Date}}%
- \end{tcolorbox}%
-}
-
-\renewcommand\TikzFdR{%
- \begin{tcolorbox}[%spread outwards=-1cm,spread inwards=-1cm,
- colback=gray!5]%
- \Large\sffamily \useKV[FdR]{Theme}\hfill\useKV[FdR]{Niveau} \useKV[FdR]{Classe}%
- \par{\tiny\useKV[FdR]{Code}}\hfill{\scriptsize\useKV[FdR]{Date}}%
- \end{tcolorbox}%
-}
-
-\renewcommand\TikzContrat{%
- \begin{tcolorbox}[%spread outwards=-1cm,spread inwards=-1cm,
- colback=gray!5]%
- \Large\sffamily \useKV[Contrat]{Theme}\hfill\useKV[Contrat]{Niveau} \useKV[Contrat]{Classe}%
- \par{\tiny\useKV[Contrat]{Code}}\hfill{\scriptsize\useKV[Contrat]{Date}}%
- \end{tcolorbox}%
-}
-
-\tcbset{%
- tikzRemarque/.style={%
- before skip=1em,
- enhanced,
- breakable,
- colback=Crimson!15,
- colframe=Crimson!50,
- underlay unbroken and first={%
- \node[%
- name=A,
- ] at (frame.west){\reflectbox{\includegraphics[scale=0.25]{Attention-1}}};
- %%
- \node[%
- name=B,
- ] at (frame.east){\includegraphics[scale=0.25]{Attention-1}};
- %%
- }
- }
-}
-\begin{document}
-\maketitle
-\thispagestyle{empty}
-Après la création du package \lstinline!ProfCollege!, l'idée de poursuivre la factorisation des méthodes de travail a naturellement germé. Produire des fiches, des devoirs, des évaluations\dots{} avec des méthodes différentes, peut vite apparaître fastidieux. Créé pour factoriser ce travail, cet ensemble de macro-commandes est basé, quasi exclusivement, sur les environnements \lstinline!Maquette! et \lstinline!exercice! :
-\begin{itemize}
-\item l'environnement \lstinline!Maquette! indique le type de document souhaité et ses caractéristiques;
-\item l'environnement \lstinline!exercice! adapte la présentation et les fonctions des exercices en accord avec l'environnement \lstinline!Maquette! choisi.
-\end{itemize}
-Le c\oe ur de l'utilisation du package \lstinline!ProfMaquette! est donc une gestion des briques élémentaires du travail d'enseignant, à savoir les exercices.
-\bigskip
-\begin{tcolorbox}[tikzRemarque]
- Conformément aux usages, il est {\em impératif}, pour le bon fonctionnement de ce package, de nommer les fichiers sources sans espaces, sans caractères spéciaux.
-\end{tcolorbox}
-\clearpage
-\section*{L'environnement \lstinline!Maquette!}
-\begin{Codes}[listing only,listing options={frame=,escapechar=!}]{0.4}{}
-\begin{Maquette}[!\\
- \metamk{TypeDocument}!,!\\
- \metamk{Adaptation}!,!\\
- \metamk{TypeCorrection}!,!\\
- \metamk{Autres}!
- ]{!\metamk{Caracteristiques}!}
-\end{Maquette}
-\end{Codes}
-C'est cet environnement qui gère le format général du document :
-\begin{itemize}
-\item \metamk{TypeDocument} indique le type de document souhaité (Devoir Maison / Devoir Surveillé / Interrogation écrite / Fiche d'exercices / Parcours d'exercices / Parcours personnalisé / Plan de travail / Cours / Contrat de confiance / Feuille de route / CAN (Course aux nombres)) ;
-\item \metamk{Adaptation} indique si on doit adapter ce document aux élèves à profils particuliers;
-\item \metamk{TypeCorrection} indique si ce document est corrigé (à la suite d'un exercice ou à la fin du document) ou pas;
-\item \metamk{Autres} modifiera certains paramètres des corrigés;
-\end{itemize}
-et
-\begin{itemize}
-\item \metamk{Caracteristiques} indique les caractéristiques du document souhaité.
-\end{itemize}
-\clearpage
-\subsection*{Les devoirs maison}
-\begin{CadreMP}
- \begin{Description}
-\item[] La clé \Cle{DM}\Defaut{false}
- \begin{itemize}
- \item[]La clé \Cle{Numero}\Defaut{1}
- \item[]La clé \Cle{Date}\Defaut{\lstinline!\\today!}
- \item[]La clé \Cle{Classe}\Defaut{\{\}}
- \item[]La clé \Cle{Niveau}\Defaut{3}
- \item[]La clé \Cle{Code}\footnotemark\Defaut{\{\}}
- \end{itemize}
-\end{Description}
-\end{CadreMP}
-\footnotetext{Outil personnel de classement.}
-\begin{Codes}[]{0.4}{}
-\begin{Maquette}[DM]{Numero=3,Niveau=6,Classe=Zola,Date=25 décembre 2024}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\end{Codes}
-\clearpage
-\subsection*{Les devoirs surveillés}
-\begin{CadreMP}
- \begin{Description}
-\item[La clé \Cle{DS}]\Defaut{false}
- \begin{itemize}
- \item[]La clé \Cle{Numero}\Defaut{1}
- \item[]La clé \Cle{Date}\Defaut{\lstinline!\\today!}
- \item[]La clé \Cle{Classe}\Defaut{}
- \item[]La clé \Cle{Niveau}\Defaut{3}
- \item[]La clé \Cle{Code}\Defaut{}
- \item[]La clé \Cle{Calculatrice} autorisée ou non\Defaut{false}
- \item[]La clé \Cle{Sujet}\Defaut{A}
- \end{itemize}
-\end{Description}
-\end{CadreMP}
-\begin{Codes}[]{0.4}{}
-\begin{Maquette}[DS]{Numero=3,Niveau=6,Classe=Zola,Date=25 décembre 2024}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\end{Codes}
-\clearpage
-\subsection*{Les évaluations écrites}
-\begin{CadreMP}
- \begin{Description}
-\item[La clé \Cle{IE}]\Defaut{false}
- \begin{itemize}
- \item[]La clé \Cle{Numero}\Defaut{1}
- \item[]La clé \Cle{Date}\Defaut{\lstinline!\\today!}
-% \item[]La clé \Cle{Classe}\Defaut{}
- % \item[]La clé \Cle{Niveau}\Defaut{3}
- \item[]La clé \Cle{Code}\Defaut{}
- \item[]La clé \Cle{Calculatrice} autorisée ou nom\Defaut{false}
- \item[]La clé \Cle{Sujet} pour de multiples sujets\Defaut{\{\}}
- \item[]La clé \Cle{Theme} modifie le thème de l'évaluation \Defaut{\{\}}
- \item[]La clé \Cle{Nom} Pour changer le nom \og \'Evaluation\fg\Defaut{\'Evaluation}
- \end{itemize}
-\end{Description}
-\end{CadreMP}
-\begin{Codes}[]{0.4}{}
-\begin{Maquette}[IE]{Numero=3,Niveau=6,Classe=Zola,Date=25 décembre 2024,Theme=La géométrie}%
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\end{Codes}
-\clearpage
-\subsection*{Les fiches d'exercices}
-\begin{CadreMP}
- \begin{Description}
-\item[La clé \Cle{Fiche}]\Defaut{false}
- \begin{itemize}
- \item[]La clé \Cle{Date}\Defaut{\lstinline!\\today!}
- \item[]La clé \Cle{Classe}\Defaut{}
- \item[]La clé \Cle{Niveau}\Defaut{6}
- \item[]La clé \Cle{Theme} modifie le thème de la fiche \Defaut{Les nombres décimaux}
- \item[]La clé \Cle{Code}\Defaut{}
- \item[]La clé \Cle{NomExercice} pour modifier le nom des exercices\Defaut{exercice}
- \end{itemize}
-\end{Description}
-\end{CadreMP}
-\begin{Codes}[]{0.4}{}
-\begin{Maquette}[Fiche]{Niveau=6,Classe=Zola,Date=25 décembre 2024}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\end{Codes}
-%\begin{Maquette}[Fiche]{Niveau=6,Classe=Zola,Date=25 décembre 2024}
-% On considère un triangle $ABC$\dots
-%\end{Maquette}
-\clearpage
-\subsection*{Les parcours}
-\begin{CadreMP}
- \begin{Description}
-\item[La clé \Cle{Parcours}\footnotemark]\Defaut{false}
- \begin{itemize}
- \item[]La clé \Cle{Date}\Defaut{\lstinline!\\today!}
- \item[]La clé \Cle{Classe}\Defaut{}
- \item[]La clé \Cle{Niveau}\Defaut{6}
- \item[]La clé \Cle{Theme} modifie le thème du parcours \Defaut{Les nombres décimaux}
- \item[]La clé \Cle{Code}\Defaut{}
- \item[]La clé \Cle{NomExercice} pour modifier le nom des exercices\Defaut{exercice}
- \end{itemize}
-\end{Description}
-\end{CadreMP}
- \footnotetext{Il dispose des même clés que la clé \Cle{Fiche} et de la même présentation. Ce n'est pas là son utilité\dots}
-\begin{Codes}[]{0.4}{}
-\begin{Maquette}[Parcours]{Niveau=6,Classe=Zola,Date=25 décembre 2024}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\end{Codes}
-\clearpage
-\subsection*{Les parcours fléchés}
-\begin{CadreMP}
- \begin{Description}
-\item[La clé \Cle{PdT}\footnotemark]\Defaut{false}
- \begin{itemize}
- \item[]La clé \Cle{Date}\Defaut{\lstinline!\\today!}
- \item[]La clé \Cle{Classe}\Defaut{}
- \item[]La clé \Cle{Niveau}\Defaut{6}
- \item[]La clé \Cle{Theme} modifie le thème du plan de travail \Defaut{Les nombres décimaux}
- \item[]La clé \Cle{Code}\Defaut{}
- \item[]La clé \Cle{NomExercice} pour modifier le nom des exercices\Defaut{exercice}
- \end{itemize}
-\end{Description}
-\end{CadreMP}
- \footnotetext{Il dispose des même clés que la clé \Cle{Fiche} et de la même présentation. Ce n'est pas là son utilité\dots}
-\begin{Codes}[]{0.4}{}
-\begin{Maquette}[PdT]{Niveau=6,Classe=Zola,Date=25 décembre 2024}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\end{Codes}
-%\begin{Maquette}[PdT]{Niveau=6,Classe=Zola,Date=25 décembre 2024}
-% On considère un triangle $ABC$\dots
-%\end{Maquette}
-\clearpage
-\subsection*{Les parcours personnalisés}
-\begin{CadreMP}
- \begin{Description}
-\item[La clé \Cle{ParcoursPerso}\footnotemark]\Defaut{false}
- \begin{itemize}
- \item[]La clé \Cle{Fichier} est le nom du fichier {\ttfamily csv} à utiliser.\Defaut{}
- \end{itemize}
-\end{Description}
-\footnotetext{La présentation est entièrement basée sur la cle \Cle{Fiche}.}
-\end{CadreMP}
-\begin{Codes}[listing only]{0.4}{}
-\begin{Maquette}[ParcoursPerso]{Fichier=Eleves}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\end{Codes}
-\clearpage
-\subsection*{Les \og cours\fg\footnote{Le package \lstinline!ProfMaquette! n'est pas fait pour des documents longs. D'ailleurs, cette clé \Cle{Cours} n'a été ajouté qu'après forte insistance de ses demandeurs\dots}}
-\begin{CadreMP}
- \begin{Description}
-\item[La clé \Cle{Cours}]\Defaut{false}
- \begin{itemize}
- \item[]La clé \Cle{Theme} modifie le titre du \og cours\fg\Defaut{Trace écrite}
- \item[]La clé \Cle{Couleur} modifie la couleur donnée à l'entête\Defaut{Crimson}
- \item[]La clé \Cle{NomExercice} pour modifier le nom des exercices\Defaut{exercice}
- \end{itemize}
-\end{Description}
-\end{CadreMP}
-\begin{Codes}[listing only]{0.4}{}
-\begin{Maquette}[Cours]{}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\end{Codes}
-\begin{Maquette}[Cours]{}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\clearpage
-\subsection*{Le contrat de confiance\footnote{Basé sur une idée de Thomas {\sc Castanet}.}}
-\begin{CadreMP}
- \begin{Description}
- \item[La clé \Cle{Contrat}\footnotemark]\Defaut{false}
- \begin{itemize}
- \item[]La clé \Cle{Date}\Defaut{\lstinline!\\today!}
- \item[]La clé \Cle{Classe}\Defaut{}
- \item[]La clé \Cle{Niveau}\Defaut{6}
- \item[]La clé \Cle{Theme} modifie le thème du parcours \Defaut{Les nombres décimaux}
- \item[]La clé \Cle{Code}\Defaut{}
- \item[]La clé \Cle{NomExercice} pour modifier le nom des exercices\Defaut{exercice}
- \end{itemize}
- \end{Description}
-\end{CadreMP}
-\footnotetext{Il dispose des même clés que la clé \Cle{Fiche} et de la même présentation. Ce n'est pas là son utilité\dots}
-\begin{Codes}[listing only]{0.4}{}
-\begin{Maquette}[Contrat]{}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\end{Codes}
-\begin{Maquette}[Contrat]{}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\clearpage
-\subsection*{La feuille de route\footnote{Basé sur une idée de Thomas {\sc Castanet}.}}
-\begin{CadreMP}
- \begin{Description}
- \item[La clé \Cle{FdR}\footnotemark]\Defaut{false}
- \begin{itemize}
- \item[]La clé \Cle{Date}\Defaut{\lstinline!\\today!}
- \item[]La clé \Cle{Classe}\Defaut{}
- \item[]La clé \Cle{Niveau}\Defaut{6}
- \item[]La clé \Cle{Theme} modifie le thème du parcours \Defaut{Les nombres décimaux}
- \item[]La clé \Cle{Code}\Defaut{}
- \item[]La clé \Cle{NomExercice} pour modifier le nom des exercices\Defaut{exercice}
- \end{itemize}
- \end{Description}
-\end{CadreMP}
-\footnotetext{Elle dispose des même clés que la clé \Cle{Fiche} et de la même présentation. Ce n'est pas là son utilité\dots}
-\begin{Codes}[listing only]{0.4}{}
-\begin{Maquette}[FdR]{}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\end{Codes}
-\begin{Maquette}[FdR]{}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-\clearpage
-\subsection*{La Course aux nombres}
-\begin{CadreMP}
- \begin{Description}
-\item[La clé \Cle{CAN}]\Defaut{false}
- \begin{itemize}
- \item[]La clé \Cle{Date}\Defaut{\lstinline!\\today!}
- \item[]La clé \Cle{Niveau}\Defaut{6}
- \item[]La clé \Cle{Duree} modifie la durée de la course\Defaut{9}
- \item[]La clé \Cle{CoefQ} modifie, en multipliant \lstinline!\\linewidth! par la valeur donnée, la largeur de la colonne \og Questions\fg{}\Defaut{0.4}\\
- \item[]La clé \Cle{CoefR} modifie, en multipliant \lstinline!\\linewidth! par la valeur donnée, la largeur de la colonne \og Réponse\fg{}\Defaut{0.35}\\
- \item[]La clé \Cle{CoefJ} modifie, en multipliant \lstinline!\\linewidth! par la valeur donnée, la largeur de la colonne \og Jury\fg{}\Defaut{0.1}\\[-1em]
- \end{itemize}
-\end{Description}
-\end{CadreMP}
-\begin{Codes}[listing only]{0.4}{}
-\begin{Maquette}[CAN]{}
- \begin{exercice}
- On considère un triangle $ABC$\dots
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-%\begin{Maquette}[CAN]{}
-% \begin{exercice}
-% On considère un triangle $ABC$\dots
-% \end{exercice}
-%\end{Maquette}
-\clearpage
-\includepdf[nup=1x2,pages=-,landscape]{TestCAN.pdf}
-\clearpage
-\subsection*{Focus sur la clé \Cle{Dys}}\label{PageDys}
-Lorsque cette clé est activée pour l'environnement \lstinline!\Maquette!, le package \lstinline!ProfMaquette! agit automatiquement sur plusieurs paramètres :
-\begin{itemize}
-\item il modifie l'interligne en passant sa valeur à \num{1.8};
-\item il force la non-justification des lignes;
-\item il impose, par défaut, la taille de la fonte à {\ttfamily 14pt}, que la taille demandée soit {\ttfamily 10pt}, {\ttfamily 11pt} ou {\ttfamily 12pt}.\par
-\begin{CadreMP}
- \begin{Description}
-\item[La clé \Cle{Taille}] modifie la taille de la fonte utilisée avec la clé \Cle{Dys}\Defaut{14}
-\end{Description}
-\end{CadreMP}
-\end{itemize}
-\begin{tcolorbox}
- Le choix d'une police étant personnel et les études contradictoires, le package \lstinline!ProfMaquette! ne propose aucune fonte particulière. Dans une distribution \TeX{}Live, la police {\ttfamily Kp-fonts}\footnotemark{} peut convenir, tant pour le texte que pour les mathématiques.
-\end{tcolorbox}
-%Le code ci-dessous montre, à la page suivante, les effets de cette clé \Cle{Dys}.
-\begin{Codes}[listing only]{0.4}{}
-\begin{Maquette}[Fiche,Dys]{Theme=Théorème de Pythagore}
- \myfontDys% Défini dans le préambule : \newfontfamily\myfontDys{KpSans.otf}
- \mathversion{kp}% Défini dans le préambule : \setmathfont[version=kp]{KpMath-Sans.otf}
- \begin{exercice}
- On considère un triangle $ABC$ tel que $AB=7$; $BC=5$ et $CA=6$.
- \begin{enumerate}
- \item Tracer le triangle $ABC$ en vraie grandeur.\\On fera preuve de la plus grande précision possible et du plus grand soin possible. Pour cela, un crayon gris bien taillé, une règle et une gomme propre sont nécessaires et conseillés.
- \item Ce triangle est-il rectangle ? Justifier.
- \end{enumerate}
- \end{exercice}
- \begin{exercice}
- Développer l'expression $2x\times(x+3)$.
- \end{exercice}
-\end{Maquette}
-\begin{Maquette}[Fiche]{Theme=Théorème de Pythagore}
- \begin{exercice}
- On considère un triangle $ABC$ tel que $AB=7$; $BC=5$ et $CA=6$.
- \begin{enumerate}
- \item Tracer le triangle $ABC$ en vraie grandeur.\\On fera preuve de la plus grande précision possible et du plus grand soin possible. Pour cela, un crayon gris bien taillé, une règle et une gomme propre sont nécessaires et conseillés.
- \item Ce triangle est-il rectangle ? Justifier.
- \end{enumerate}
- \end{exercice}
- \begin{exercice}
- Développer l'expression $2x\times(x+3)$.
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\footnotetext{{\ttfamily{KpSans.otf} pour le texte et {\ttfamily KpMath-Sans.otf} pour les mathématiques.}}
-\clearpage
-\begin{Maquette}[Fiche,Dys]{Theme=Théorème de Pythagore}
- \myfontDys%
- \mathversion{kp}%
- \begin{exercice}
- On considère un triangle $ABC$ tel que $AB=7$; $BC=5$ et $CA=6$.
- \begin{enumerate}
- \item Tracer le triangle $ABC$ en vraie grandeur.\\On fera preuve de la plus grande précision possible et du plus grand soin possible. Pour cela, un crayon gris bien taillé, une règle et une gomme propre sont nécessaires et conseillés.
- \item Ce triangle est-il rectangle ? Justifier.
- \end{enumerate}
- \end{exercice}
- \begin{exercice}
- Développer l'expression $2x\times(x+3)$.
- \end{exercice}%}
-\end{Maquette}
-\begin{Maquette}[Fiche]{Theme=Théorème de Pythagore}
- \begin{exercice}
- On considère un triangle $ABC$ tel que $AB=7$; $BC=5$ et $CA=6$.
- \begin{enumerate}
- \item Tracer le triangle $ABC$ en vraie grandeur.\\On fera preuve de la plus grande précision possible et du plus grand soin possible. Pour cela, un crayon gris bien taillé, une règle et une gomme propre sont nécessaires et conseillés.
- \item Ce triangle est-il rectangle ? Justifier.
- \end{enumerate}
- \end{exercice}
- \begin{exercice}
- Développer l'expression $2x\times(x+3)$.
- \end{exercice}
-\end{Maquette}
-\clearpage
-Comme on peut le voir, chaque type de travail est associé à une présentation. Ces présentations sont créées par les commandes associées à des styles \lstinline!tcolorbox! prédéfinis\footnote{Qu'on peut donc redéfinir.} :
-\begin{itemize}[label=\textbullet]
-\item \lstinline!userdm / userdmcor! pour la clé \Cle{DM};
-\item \lstinline!userds / userdscor! pour la clé \Cle{DS};%
-\item \lstinline!userie / useriecor! pour la clé \Cle{IE};%
-\item \lstinline!userfiche / userfichecor! pour la clé \Cle{Fiche};%*
-\item \lstinline!userparcours / userparcourscor! pour la clé \Cle{Parcours};%*
-\item \lstinline!userpdt / userpdtcor! pour la clé \Cle{PdT};%*
-\item \lstinline!usercours! pour la clé \Cle{Cours};
-\item \lstinline!usercontrat / usercontratcor! pour la clé \Cle{Contrat};%*
-\item \lstinline!userfdr / userfdrcor! pour la clé \Cle{FdR};%*
-\item et \lstinline!usercan / usercancor! pour la clé \Cle{CAN}.
-\end{itemize}
-Par exemple, pour une fiche, le style {\em par défaut} permet d'obtenir :
-
-%\begin{Codes}[]{0.4}{}
-\begin{Maquette}[Fiche]{Niveau=6,Classe=Zola,Date=25 décembre 2024}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-%\end{Codes}
-
-En écrivant {\em avant l'appel} à l'environnement \lstinline!Maquette! :
-\begin{Codes}[listing only]{0.4}{}
-\tcbset{%
- userfiche/.style={%
- colframe=Orange!75,
- colback=Orange!15%
- }%
-}%
-\end{Codes}
-
-on obtient :
-
-\tcbset{%
- userfiche/.style={%
- colframe=Orange!75,
- colback=Orange!15%
- }%
-}%
-
-\begin{Maquette}[Fiche]{Niveau=6,Classe=Zola,Date=25 décembre 2024}
- On considère un triangle $ABC$\dots
-\end{Maquette}
-
-\tcbset{%
- userfiche/.style={%
- colback=gray!5%
- }%
-}%
-
-Pour modifier {\em plus finement} les entêtes des différentes maquettes, on dispose des commandes\footnote{Qu'on peut donc redéfinir. Par exemple, c'est ce que j'ai fait dans ce document pour la commande \lstinline!\\TikzFiche! : elle ne commence plus une nouvelle page.} :
-\begin{itemize}[label=\textbullet]
-\item \lstinline!\TikzDM / \TikzDMCor! pour la clé \Cle{DM};
-\item \lstinline!\TikzDS / \TikzDSCor! pour la clé \Cle{DS};%
-\item \lstinline!\TikzIE / \TikzIECor! pour la clé \Cle{IE};%
-\item \lstinline!\TikzFiche / \TikzFicheCor! pour la clé \Cle{Fiche};%*
-\item \lstinline!\TikzParcours / \TikzParcoursCor! pour la clé \Cle{Parcours};%*
-\item \lstinline!\TikzPdT / \TikzPdTCor! pour la clé \Cle{PdT};%*
-\item \lstinline!\TikzCours! pour la clé \Cle{Cours};
-\item \lstinline!\TikzContrat / \TikzContratCor! pour la clé \Cle{Contrat};%*
-\item \lstinline!\TikzFdR / \TikzFdRCor! pour la clé \Cle{FdR};%*
-\item et \lstinline!\TikzCAN / \TikzCANCor! pour la clé \Cle{CAN}.%*
-\end{itemize}
-Leurs modifications seront facilitées en copiant le code fourni par le fichier \lstinline!ProfMaquette.sty!.
-
-\bigskip
-
-On dispose également de la commande \lstinline!\Competences! permettant de construire un tableau de\dots{} compétences données par l'utilisateur; les compétences étant séparées par le symbole \lstinline!/!.
-\begin{Codes}[]{0.4}{}
-\Competences{Utiliser le compas/Utiliser l'équerre}
-\end{Codes}
-Les notations \lstinline!NA!, \lstinline!ECA! et \lstinline!A! peuvent être redéfinies par les commandes \lstinline!\PfMCompNA!, \lstinline!\PfMCompECA! et \lstinline!\PfMCompA!.
-\begin{Codes}[]{0.4}{}
-\renewcommand\PfMCompNA{\rule{0pt}{3ex}\RKangry}
-\renewcommand\PfMCompECA{\RKsad}
-\renewcommand\PfMCompA{\RKbigsmile}
-\Competences{Utiliser le compas/Utiliser l'équerre}
-\end{Codes}
-Si l'on souhaite davantage de niveaux d'évaluations (ou moins), on utilisera les codes suivants :
-\begin{Codes}[]{0.4}{}
-\Competences[4]{0/1/2/3/Utiliser le compas/Utiliser l'équerre}
-\end{Codes}
-\begin{Codes}[]{0.4}{}
-\Competences[2]{A/NA/Utiliser le compas/Utiliser l'équerre}
-\end{Codes}
-\clearpage
-\section*{L'environnement \lstinline!exercice!}
-\begin{Codes}[listing only]{0.4}{}
-\begin{exercice}
-
-\end{exercice}
-\end{Codes}
-\subsection*{Habillage des exercices}
-L'environnement \lstinline!exercice! doit {\em impérativement} être inclus dans un environnement \lstinline!Maquette! car le type de document choisi influence la présentation des exercices.
-\begin{Codes}[]{0.5}{}
-\begin{Maquette}[IE]{Theme=Les fonctions,Niveau=3,Classe=Gide}
- \begin{exercice}%
- La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier.
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\begin{Codes}[listing side text]{0.6}{}
-\begin{Maquette}[DM]{Numero=50,Niveau=3,Classe=Gide}
- \begin{exercice}
- La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier.
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\begin{Codes}[listing side text]{0.6}{}
-\begin{Maquette}[DS]{Numero=50,Niveau=3,Classe=Gide}
- \begin{exercice}
- La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier.
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\begin{Codes}[]{0.4}{}
-\begin{Maquette}[Fiche]{Theme=Les fonctions,Niveau=3,Classe=Gide}
- \begin{exercice}
- La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier.
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\subsection*{La personnalisation}
-On peut, dans un premier temps, utiliser les clés suivantes :
-\begin{Description}
-\item[La clé \Cle{BackGround}] modifie les arrière-plans des exercices.\Defaut{white}
-\item[La clé \Cle{Cadre}] modifie la couleur du cadre des exercices.\Defaut{gray!50}
-\end{Description}
-\begin{Codes}[]{0.4}{}
-\begin{Maquette}[Fiche]{Theme=Les fonctions,Niveau=3,Classe=Gide}
- \begin{exercice}[Background=Orange!15,Cadre=Orange!50]
- La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier.
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-On peut également, pour les maquettes \lstinline!Fiche!, \lstinline!DM!, \lstinline!DS! et \lstinline!IE!, ne pas numéroter un exercice (particulièrement dans le cas où un seul exercice serait présent).
-\begin{Codes}[]{0.4}{}
-\begin{Maquette}[Fiche]{}
- \begin{exercice}*
- La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier.
- \end{exercice}
- \begin{exercice}
- La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier.
- \end{exercice}
- \begin{exercice}*
- La fonction $f:x\mapsto3x+2$ est-elle une fonction affine ? Justifier.
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\begin{tcolorbox}
- Pour la maquette \lstinline!ParcoursPerso!, si un seul exercice se trouve dans la liste, alors il est automatiquement non-numéroté.
-\end{tcolorbox}
-\subsection*{Le barème des exercices}
-On remarque que certains exercices sont associés à un total de point. C'est une des clés disponibles pour l'environnement \lstinline!exercice!. Voici celles pour les barèmes :
-\begin{Description}
-\item[La clé \Cle{BaremeTotal}] qui affichera, dans le coin supérieur droit, le total de points de l'exercice. La valeur de cette clé :
- \begin{itemize}
- \item est {\em fixée} à {\sffamily false} pour les clés \Cle{Fiche}, \Cle{FdR}, \Cle{Parcours}, \Cle{PdT}, \Cle{Contrat};
- \item est positionnée à {\sffamily true} mais {\em modifiable} pour les clés \Cle{DM}, \Cle{DS} et \Cle{IE}.
- \end{itemize}
-\item[La clé \Cle{BaremeDetaille}] a le même fonctionnement que la clé \Cle{BaremeTotal}.
- La commande \lstinline!\brm{}! permet la construction du barème (détaillé et total).\Defaut{false}
-\item[La clé \Cle{MotPoint}] donnée sous forme de texte puisque le pluriel est géré.\Defaut{point}
- \begin{Codes}[listing only]{0.4}{}
-\begin{Maquette}[DS]{Numero=3,Classe=Euler,Niveau=4}
- \begin{exercice} % ici le barème est total, pas de détail : comportement par défaut
- On considère les expressions $A=2x(3x+5)$ et $B=x(7x-1)$.
- \begin{enumerate}
- \item\brm{1} Développer l'expression $A$.
- \item\brm{1.5} Développer l'expression $B$.
- \end{enumerate}
- \end{exercice}
- \begin{exercice}[BaremeDetaille] %ici le barème est total ET détaillé
- On considère les expressions $A=2x(3x+5)$ et $B=x(7x-1)$.
- \begin{enumerate}
- \item\brm{1} Développer l'expression $A$.
- \item\brm{1.5} Développer l'expression $B$.
- \end{enumerate}
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\begin{Maquette}[DS]{Numero=3,Classe=Euler,Niveau=4}
- \begin{exercice} % ici le barème est total, pas de détail : comportement par défaut
- On considère les expressions $A=2x(3x+5)$ et $B=x(7x-1)$.
- \begin{enumerate}
- \item\brm{1} Développer l'expression $A$.
- \item\brm{1.5} Développer l'expression $B$.
- \end{enumerate}
- \end{exercice}
- \begin{exercice}[BaremeDetaille] %ici le barème est total ET détaillé
- On considère les expressions $A=2x(3x+5)$ et $B=x(7x-1)$.
- \begin{enumerate}
- \item\brm{1} Développer l'expression $A$.
- \item\brm{1.5} Développer l'expression $B$.
- \end{enumerate}
- \end{exercice}
-\end{Maquette}
-\end{Description}
-\clearpage
-\subsection*{Source, compétence et titre}
-Si on souhaite citer la source d'un exercice ou lui donner un titre, on dispose des clés :
-\begin{Description}
-\item[La clé \Cle{Source}] pour citer la source de l'exercice.\Defaut{\{\}}
-\item[La clé \Cle{Titre}] pour nommer un exercice.\Defaut{\{\}}
-\item[La clé \Cle{Competence}] pour indiquer une compétence associée à l'exercice.\Defaut{\{\}}
-\begin{Codes}[listing only]{0.4}{}
-\begin{Maquette}[Fiche]{Theme=Algorithmique}
- \colorlet{PfMColCpt}{Crimson}
- \colorlet{PfMColSrc}{NavyBlue}
- \begin{exercice}[Source=Olympiades 2019,Titre=Modifier des mots,Competence=Raisonner]
- Dans ce problème, on appellera {\em mot} toute suite de lettres formée des lettres A, D et G. Par exemple : ADD, A, AAADG sont des {\em mots}.
- \\Astrid possède un logiciel qui fonctionne de la manière suivante : un utilisateur entre un {\em mot} et, après un clic sur EXÉCUTER, chaque lettre A du {\em mot} (s'il y en a) est remplacée par le {\em mot} AGADADAGA. Ceci donne un nouveau {\em mot}.\\Par exemple, si l'utilisateur rentre le {\em mot} AGA, on obtient le {\em mot} AGADADAGAGAGADADAGA. Un deuxième clic sur EXÉCUTER réitère la transformation décrite ci-dessus au nouveau {\em mot}, et ainsi de suite.
- \begin{enumerate}
- \item Quels sont les {\em mots} qui restent inchangés quand on clique sur EXÉCUTER ?
- \end{enumerate}
-\end{exercice}
-\end{Maquette}
-\end{Codes}
-%\clearpage
-\begin{Maquette}[Fiche]{Theme=Algorithmique}
- \colorlet{PfMColCpt}{Crimson}
- \colorlet{PfMColSrc}{NavyBlue}
- \begin{exercice}[Source=Olympiades 2019,Titre=Modifier des mots,Competence=Raisonner]
- Dans ce problème, on appellera {\em mot} toute suite de lettres formée des lettres A, D et G. Par exemple : ADD, A, AAADG sont des {\em mots}.
- \\Astrid possède un logiciel qui fonctionne de la manière suivante : un utilisateur entre un {\em mot} et, après un clic sur EXÉCUTER, chaque lettre A du {\em mot} (s'il y en a) est remplacée par le {\em mot} AGADADAGA. Ceci donne un nouveau {\em mot}.\\Par exemple, si l'utilisateur rentre le {\em mot} AGA, on obtient le {\em mot} AGADADAGAGAGADADAGA. Un deuxième clic sur EXÉCUTER réitère la transformation décrite ci-dessus au nouveau {\em mot}, et ainsi de suite.
- \begin{enumerate}
- \item Quels sont les {\em mots} qui restent inchangés quand on clique sur EXÉCUTER ?
- \end{enumerate}
-\end{exercice}
-\end{Maquette}
-\end{Description}
-\clearpage
-\subsection*{Des parties à compléter ?}
-Après chaque exercice, on peut faire apparaître des zones à compléter.
-\begin{Description}
-\item[La clé \Cle{Lignes}] indique le nombre de lignes à tracer {\em après} la fin de l'exercice.\Defaut{-}
-\item[La clé \Cle{Encart}] indique l'espace à laisser {\em après} la fin de l'exercice.\Defaut{-}\\La valeur attendue est une longueur.
-\end{Description}
-\begin{Codes}[]{0.4}{}
-\begin{Maquette}[Fiche]{Theme=Les triangles}
- \begin{exercice}[Lignes=5]
- On considère un triangle $ABC$ tel que \dots
- \end{exercice}
- \begin{exercice}[Encart=5em]
- On considère un triangle $ABC$ tel que \dots
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-On peut modifier :
-\begin{itemize}
-\item l'espace vertical avant les lignes par {\em la longueur} \lstinline!\PfMEspaceAvantLignes!;\\\phantom{t}\Defaut{1em}
-\item l'espace vertical avant les lignes par {\em la longueur} \lstinline!\PfMEspaceApresLignes!;\\\phantom{t}\Defaut{1em}
-\item le texte d'introduction de l'encart par {\em la commande} \lstinline!\PfMTexteEncart!.
-\end{itemize}
-\clearpage
-\subsection*{Gestion de profils particuliers d'élèves}
-Certains enfants présentent des troubles des apprentissages et ont donc besoin d'aménagements pédagogiques particuliers. Couplées ou pas à la clé \Cle{Dys} (page \pageref{PageDys}), on dispose des clés suivantes.
-\begin{Description}
- \item[La clé \Cle{NonUtilise}] indique que l'exercice {\em et} sa solution ne seront pas utilisés pour la confection du document.\Defaut{false}
- \end{Description}
- \begin{Codes}[]{0.4}{}
-\begin{Maquette}[Fiche]{Theme=Les fractions,Code=423FicheFraction}
- \begin{exercice}
- Calculer $A=\frac{1}{2}+\frac{1}{2}$.
- \end{exercice}
- \begin{exercice}[NonUtilise]
- Calculer $B=\frac{1}{3}+\frac{1}{6}$.
- \end{exercice}
- \begin{exercice}
- Calculer $C=\frac{1}{5}+\frac{1}{7}$.
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\begin{Description}
- \item[La clé \Cle{Profile}] indique que l'exercice {\em et} sa solution sont profilés et peuvent disposer de moins de questions. Cette clé sera utilisée conjointement avec la commande \lstinline!\cacheitem! permettant de cacher un item complet d'une liste.\Defaut{false}
- \end{Description}
-\begin{Codes}[]{0.4}{}
-\begin{Maquette}[Fiche]{Theme=Calcul littéral,Code=323FicheDevelopper}
- \begin{exercice}[Profile]
- \begin{enumerate}
- \item Développer et réduire $A=2x(3+7x)$.
- \item Développer et réduire $B=(x+3)(x+4)$.
- \cacheitem\item Développer et réduire $C=(2x+3)(7x-1)$.
- \cacheitem\item Développer et réduire $D=(4-3x)(x-2)$.
- \item Calculer les valeurs des expressions précédentes lorsque $x=2$.
- \end{enumerate}
- \end{exercice}
- \begin{exercice}[]
- \begin{enumerate}
- \item Développer et réduire $A=2x(3+7x)$.
- \item Développer et réduire $B=(x+3)(x+4)$.
- \cacheitem\item Développer et réduire $C=(2x+3)(7x-1)$.
- \cacheitem\item Développer et réduire $D=(4-3x)(x-2)$.
- \item Calculer les valeurs des expressions précédentes lorsque $x=2$.
- \end{enumerate}
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\clearpage
-\subsection*{Des logos ?}
-Les clés décrites dans cette partie ne sont disponibles que pour les maquettes
-\lstinline!Fiche! / \lstinline!Parcours!.
-\begin{Description}
-\item[La clé \Cle{Oral}] pour indiquer que l'exercice se résout oralement.\Defaut{false}
-\item[La clé \Cle{Calculatrice}] pour afficher que la calculatrice {\em est interdite}.\Defaut{true}
-\end{Description}
- \begin{Codes}[listing only,listing options={frame=,escapechar=!}]{0.4}{}
-\begin{Maquette}[Fiche]{Theme=Calcul mental}
- \begin{exercice}[Oral]
- $1+1=?$
- \end{exercice}
- \begin{exercice}[!\color{DarkGreen}\ttfamily Calculatrice!=false]
- $1+1=?$
- \end{exercice}
- % On peut mélanger les deux logos.
- \begin{exercice}[!\color{DarkGreen}\ttfamily Calculatrice!=false,Oral]
- $1+1=?$
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\begin{Maquette}[Fiche]{Theme=Calcul mental}
- \begin{exercice}[Oral]
- $1+1=?$
- \end{exercice}
- \begin{exercice}[Calculatrice=false]
- $1+1=?$
- \end{exercice}
- \begin{exercice}[Calculatrice=false,Oral]
- $1+1=?$
- \end{exercice}
-\end{Maquette}
-\clearpage
-\subsection*{Focus sur la maquette \lstinline!Parcours!}
-Dans le cas de cette maquette, l'environnement \lstinline!exercice! dispose de la clé \Cle{Trajet} permettant de construire automatiquement le ou les parcours. La commande \lstinline!\AfficheParcours{}! représente un schéma associé à un parcours. Ce schéma se construit seul, automatiquement, après que l'enseignant ait utilisé la clé \Cle{Trajet} dans la création de ses exercices. Il faudra néanmoins deux compilations. \`A noter que ce schéma, avec l'utilisation du package \lstinline!hyperref!, dispose de liens cliquables sur les exercices sélectionnés pour le parcours.
-\begin{Codes}[listing only,listing options={frame=,escapechar=!}]{0.4}{\small}
-\begin{Maquette}[Parcours]{Theme=Calcul mental}
- \begin{description}
- \item[!Parcours! Padawan] \AfficheParcours{Padawan}
- \item[!Parcours! Jedï] \AfficheParcours{Jedi}
- \item[!Parcours! Grand Maître] \AfficheParcours{GrandMaitre}
- \end{description}
- \begin{exercice}[Trajet={Padawan,Jedi,GrandMaitre}]
-
- \end{exercice}
- \begin{exercice}[Trajet={Padawan,Jedi}]
-
- \end{exercice}
- \begin{exercice}[Trajet={Padawan}]
-
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\begin{Maquette}[Parcours]{Theme=Calcul mental}
- \begin{description}
- \item[Parcours Padawan] \AfficheParcours{Padawan}
- \item[Parcours Jedï] \AfficheParcours{Jedi}
- \item[Parcours Grand Maître] \AfficheParcours{GrandMaitre}
- \end{description}
- \begin{exercice}[Trajet={Padawan,Jedi,GrandMaitre}]
-
- \end{exercice}
- \begin{exercice}[Trajet={Padawan,Jedi}]
-
- \end{exercice}
- \begin{exercice}[Trajet={Padawan}]
-
- \end{exercice}
-\end{Maquette}
-\clearpage
-\subsection*{Focus sur la maquette \lstinline!ParcoursPerso!}
-Dans le cas de cette maquette, l'environnement \lstinline!exercice! n'admet aucune clé. En effet, cette maquette utilise :
-\begin{itemize}
-\item un fichier {\ttfamily *.csv} de la forme :
- \begin{Codes}[listing only]{0.4}{}
-Anne,Bec,{1,2}
-Paul,Isse,{1,3}
-Jean,Némar,{1,4}
- \end{Codes}
-\item et une liste d'exercices pour produire les trois pages suivantes à l'aide du code :
-\begin{Codes}[listing only]{0.4}{}
-\begin{Maquette}[ParcoursPerso]{Fichier=Documentation,Theme=L'alphabet,Niveau=6,Classe=Alpha}
- \begin{exercice}
- A
- \end{exercice}
- \begin{exercice}
- B
- \end{exercice}
- \begin{exercice}
- C
- \end{exercice}
- \begin{exercice}
- D
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\end{itemize}
-\clearpage
-\includepdf[pages=-]{TestParcoursPerso.pdf}
-\clearpage
-\subsection*{Focus sur la maquette \lstinline!PdT!}
-Dans le cas de cette maquette, la présentation des exercices est modifiée : il n'y a plus de titre afin de gagner de la place. De plus, chaque exercice définit, en fonction de son numéro, huit points d'ancrages :\lstinline!N-5!, \lstinline!S-5!, \lstinline!O-5!, \lstinline!E-5!, \lstinline!NO-5!, \lstinline!NE-5!, \lstinline!SO-5! et \lstinline!SE-5! pour respectivement les points Nord, Sud, Ouest, Est, Nord-Ouest, Nord-Est, Sud-Ouest et Sud-Est du cadre de l'exercice 5.
-
-On pourra aussi utiliser (avec les même n\oe uds précédés de \lstinline!SOS!) l'environnement \lstinline!SOS! servant d'aide aux élèves en difficulté.
-
-De plus, deux commandes font leur apparition :
-\begin{itemize}
-\item \lstinline!\CheminVrai! listant les liaisons entre exercices sous la forme \lstinline!noeud départ/noeud arrivée!;
-\item \lstinline!\CheminFaux! listant les liaisons entre exercices sous la forme \lstinline!noeud départ/noeud arrivée!.
-\end{itemize}
-L'exemple suivant est obtenu par le code présenté à la page suivante.
-\begin{Maquette}[PdT]{Theme=Plan de travail : Calcul littéral,Niveau=3,Classe=Alpha,Date={},Code={}}
- \setcounter{PfMExo}{0}
- \begin{minipage}{0.35\linewidth}
- \begin{exercice}%exercice 1
- A
- \end{exercice}
- \end{minipage}
- \hfill
- \begin{minipage}{0.3\linewidth}
- \begin{exercice}%exercice 2
- B
- \end{exercice}
- \end{minipage}
- \hfill
- \begin{minipage}{0.15\linewidth}
- \begin{SOS}%SOS 1
- Aide A
- \end{SOS}
- \end{minipage}
-
- \vspace*{2cm}
-
- \begin{minipage}{0.35\linewidth}
- \begin{exercice}%exercice 3
- C
- \end{exercice}
- \end{minipage}
- \hfill
- \begin{minipage}{0.3\linewidth}
- \begin{exercice}%exercice 4
- D
- \end{exercice}
- \end{minipage}
- \hfill
- \begin{minipage}{0.15\linewidth}
- \begin{SOS}%SOS 2
- Aide B
- \end{SOS}
- \end{minipage}
- \CheminVrai{S-1/NO-3}
- \CheminFaux{E-1/O-2,E-2/SOS-O-1}
- \end{Maquette}
- \clearpage
-\begin{Codes}[listing only]{}{}
- \begin{Maquette}[PdT]{Theme=Plan de travail : Calcul littéral,Niveau=3,Classe=Alpha,Date={},Code={}}
- \begin{minipage}{0.35\linewidth}
- \begin{exercice}%exercice 1
- A
- \end{exercice}
- \end{minipage}
- \hfill
- \begin{minipage}{0.3\linewidth}
- \begin{exercice}%exercice 2
- B
- \end{exercice}
- \end{minipage}
- \hfill
- \begin{minipage}{0.15\linewidth}
- \begin{SOS}%SOS 1
- Aide A
- \end{SOS}
- \end{minipage}
-
- \vspace*{2cm}
-
- \begin{minipage}{0.35\linewidth}
- \begin{exercice}%exercice 3
- C
- \end{exercice}
- \end{minipage}
- \hfill
- \begin{minipage}{0.3\linewidth}
- \begin{exercice}%exercice 4
- D
- \end{exercice}
- \end{minipage}
- \hfill
- \begin{minipage}{0.15\linewidth}
- \begin{SOS}%SOS 2
- Aide B
- \end{SOS}
- \end{minipage}
- \CheminVrai{S-1/NO-3}
- \CheminFaux{E-1/O-2,E-2/SOS-O-1}
- \end{Maquette}
-\end{Codes}
-\clearpage
-\subsection*{Focus sur la maquette \lstinline!Contrat!}
-Dans le cas de cette maquette, l'environnement \lstinline!exercice! dispose de la clé \Cle{Confiance} permettant de construire automatiquement le contrat de confiance. La commande \lstinline!\AfficheContrat{}! représente un schéma associé au contrat proposé par l'enseignant : suivant la réalisation des exercices, l'élève choisit un chemin de remédiation (chemin du bas, repéré par la lettre a), soit un chemin d'approfondissement (chemin du haut, repéré par la lettre b).
-\\Ce schéma se construit seul, automatiquement, après que l'enseignant ait utilisé la clé \Cle{Confiance} dans la création de ses exercices. Il faudra néanmoins deux compilations. \`A noter que ce schéma, avec l'utilisation du package \lstinline!hyperref!, dispose de liens cliquables sur les exercices sélectionnés pour le parcours.
-\begin{Codes}[listing only,listing options={frame=,escapechar=!}]{0.4}{\small}
-\begin{Maquette}[Contrat]{Theme=Calcul mental}
- \begin{center}
- \AfficheContrat%
- \end{center}
- \begin{exercice}[Confiance={a,b}]
-
- \end{exercice}
- \begin{exercice}[Confiance={a,b}]
-
- \end{exercice}
- \begin{exercice}[Confiance={a}]
-
- \end{exercice}
- \begin{exercice}[Confiance={b}]
-
- \end{exercice}
- \begin{exercice}[Confiance={a}]
-
- \end{exercice}
- \begin{exercice}[Confiance={a,b}]
-
- \end{exercice}
- \begin{exercice}[Confiance={a,b}]
-
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\clearpage
-\begin{Maquette}[Contrat]{Theme=Calcul mental}
- \begin{center}
- \AfficheContrat%
- \end{center}
- \begin{exercice}[Confiance={a,b}]
-
- \end{exercice}
- \begin{exercice}[Confiance={a,b}]
-
- \end{exercice}
- \begin{exercice}[Confiance={a}]
-
- \end{exercice}
- \begin{exercice}[Confiance={b}]
-
- \end{exercice}
- \begin{exercice}[Confiance={a}]
-
- \end{exercice}
- \begin{exercice}[Confiance={a,b}]
-
- \end{exercice}
- \begin{exercice}[Confiance={a,b}]
-
- \end{exercice}
-\end{Maquette}
-\clearpage
-\subsection*{Focus sur la maquette \lstinline!FdR!}
-%\setcounter{}{0}
-Dans le cas de cette maquette, l'environnement \lstinline!exercice! dispose des clés \Cle{Route} et \Cle{Stop} permettant de construire automatiquement une feuille de route. La commande \lstinline!\AfficheFdR{}! représente un schéma associé à la feuille de route construite par l'enseignant : l'élève réalise les exercices de la ligne du bas puis demande la validation de l'enseignant. Une fois la validation acquise, l'enseignant peut lui proposer de faire les exercices de la ligne du haut ou de poursuivre la feuille de route.
-\\Ce schéma se construit seul, automatiquement, après que l'enseignant ait utilisé les clés \Cle{Route} et \Cle{Stop} dans la création de ses exercices. Il faudra néanmoins deux compilations et vérifier que chaque \og morceau\fg{} de route soit non vide (La ligne haute, quant à elle, pouvant être vide). \`A noter que ce schéma, avec l'utilisation du package \lstinline!hyperref!, dispose de liens cliquables sur les exercices sélectionnés pour le parcours.
-\begin{multicols}{2}
- \begin{Codes}[enhanced,listing only,listing options={frame=,escapechar=!},overlay unbroken and first={%
- \node[text=black,fill=white,anchor=east,xshift=-10pt] at (frame.south east) {\scriptsize Suite\dots};
- }]{0.4}{}
-\begin{Maquette}[FdR]{Theme=Calcul mental}
- \begin{center}
- \AfficheFdR%
- \end{center}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[]
-
- \end{exercice}
- \begin{exercice}[]
-
- \end{exercice}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[Route]
-
- \end{exercice}
-\end{Codes}
-\begin{Codes}[listing only,listing options={frame=,escapechar=!}]{0.4}{}
- \begin{exercice}[]
-
- \end{exercice}
- \begin{exercice}[Route,Stop]
-
- \end{exercice}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[]
-
- \end{exercice}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[]
-
- \end{exercice}
- \begin{exercice}[]
-
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\end{multicols}
-\clearpage
-\begin{Maquette}[FdR]{Theme=Calcul mental}
- \begin{center}
- \AfficheFdR%
- \end{center}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[]
-
- \end{exercice}
- \begin{exercice}[]
-
- \end{exercice}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[]
-
- \end{exercice}
- \begin{exercice}[Route,Stop]
-
- \end{exercice}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[]
-
- \end{exercice}
- \begin{exercice}[Route]
-
- \end{exercice}
- \begin{exercice}[]
-
- \end{exercice}
- \begin{exercice}[]
-
- \end{exercice}
-\end{Maquette}
-\clearpage
-\subsection*{Focus sur la maquette \lstinline!CAN!}
-Dans le cas de cette maquette, l'environnement \lstinline!exercice! n'admet aucune clé. La création de la page de garde et du tableau est automatique mais nécessite {\em au moins} deux compilations pour adapter au mieux les dimensions du tableau. De plus, la compilation crée (dans le répertoire courant) des fichiers \lstinline!*.can! (et éventuellement \lstinline!*.sol!) : ils peuvent être supprimés après l'obtention du document final.
-
-La commande \lstinline!\Complement{}! permet d'ajouter du contenu à la colonne \og Réponse\fg.
-
-\begin{Codes}[listing only]{0.5}{}
-% cet exemple a été créé avec une feuille au format A5
-\begin{Maquette}[CAN]{CoefQ=0.5,CoefR=0.25}
- \begin{exercice}
- $17+19$
- \end{exercice}
- \begin{exercice}
- $ABC$ est un triangle tel que $\widehat{ABC}=\ang{30}$ et $\widehat{BCA}=\ang{70}$. Alors\dots
- \Complement{$\widehat{CAB}=\dots$}
- \end{exercice}
-\end{Maquette}
-\end{Codes}
-\includegraphics{pg_0002-crop.pdf}
-\clearpage
-\subsection*{\og Correction\fg{} des exercices}
- Un exercice avec correction pourra\footnote{Dans les faits, seul l'environnement \lstinline!exercice! est nécessaire. L'absence des environnements \lstinline!Solution!, \lstinline!Reponse! et \lstinline!Indice! n'a pas d'impact sur la compilation.} avoir la forme suivante :
- \begin{Codes}[listing only]{0.4}{}
-\begin{exercice}
-
-\end{exercice}
-\begin{Solution}
-
-\end{Solution}
-\begin{Reponse}
-
-\end{Reponse}
-\begin{Indice}
-
-\end{Indice}
-\end{Codes}
-On peut gérer la correction des exercices à deux niveaux :
-\begin{Description}
- \item[Au niveau de l'environnement ]\lstinline!Maquette!, on dispose des clés :
-\end{Description}
- \begin{Description}
-\item[la clé \Cle{CorrigeApres}]\Defaut{false}\par qui affiche le corrigé, {\em s'il existe}, après l'énoncé de l'exercice.
-\item[la clé \Cle{CorrigeFin}]\Defaut{false}\par qui affiche les corrigés, {\em s'ils existent}, à la fin du document.
- \begin{quote}
- \begin{description}
- \item[la clé \Cle{CorrigeAll}]\Defaut{false}\par est {\em uniquement} valable avec la clé \Cle{Fiche}. Elle affiche une feuille avec tous les corrigés détaillés (environnement \lstinline!Solution!); une feuille avec toutes les réponses brutes (environnement \lstinline!Reponse!) et une feuille avec tous les indices (environnement \lstinline!Indice!).
- \item[La clé \Cle{VersSolution}] permet de se déplacer directement à la solution des exercices en cliquant sur le symbole \faKey. {\em Il est impératif de charger le package} \lstinline!hyperref!.
-\item[la clé \Cle{Colonnes}]\Defaut{1}\par définit le nombre de colonnes utilisées pour afficher les corrigés.
-\item[la clé \Cle{Epaisseur}]\Defaut{0pt}\par modifie l'épaisseur de la barre de séparation des colonnes.
- \end{description}
- \end{quote}
-\end{Description}
-
-Pour les maquettes \lstinline!ParcoursPerso! et \lstinline!CAN!, seule la clé \Cle{CorrigeFin} est autorisée.
-\clearpage
-\begin{Codes}[listing only]{0.4}{\footnotesize}
-\begin{Maquette}[IE,CorrigeApres]{Theme=Calcul littéral}
- \begin{exercice}% n'a pas de correction
- \begin{enumerate}
- \item $1+1=?$
- \end{enumerate}
- \end{exercice}
- \begin{exercice}
- \begin{enumerate}
- \item Développer $A=2(x+3)$.
- \end{enumerate}
- \end{exercice}
- \begin{Solution}
- \begin{enumerate}
- \item $A=2(x+3)=2\times x+2\times3=2x+6$
- \end{enumerate}
- \end{Solution}
-\end{Maquette}
-\end{Codes}
-\begin{Maquette}[IE,CorrigeApres]{Theme=Calcul littéral}
- \begin{exercice}% n'a pas de correction
- \begin{enumerate}
- \item $1+1=?$
- \end{enumerate}
- \end{exercice}
- \begin{exercice}
- \begin{enumerate}
- \item Développer $A=2(x+3)$.
- \end{enumerate}
- \end{exercice}
- \begin{Solution}
- \begin{enumerate}
- \item $A=2(x+3)=2\times x+2\times3=2x+6$
- \end{enumerate}
- \end{Solution}
-\end{Maquette}
-\clearpage
-\begin{Description}
-\item[Au niveau de l'environnement ]\lstinline!exercice!, on peut affiner la correction à l'aide des clés :
- \begin{Description}
- \item[la clé \Cle{TitreSolution}]\Defaut{-}\par affiche (sauf pour les maquettes \lstinline!CAN! et \lstinline!ParcoursPerso!) un titre à la correction de l'exercice considéré {\em uniquement} avec l'utilisation de la clé \Cle{CorrigeFin};
-\item[la clé \Cle{PasCorrige}]\Defaut{false}\par supprime l'affichage de tous types de correction pour l'exercice considéré;
-\item[la clé \Cle{Pouce}]\Defaut{false}\par qui affiche uniquement le contenu de l'environnement \lstinline!Indice!;
-\item[la clé \Cle{Direct}]\Defaut{false}\par qui affiche uniquement le contenu de l'environnement \lstinline!Reponse!.
-\end{Description}
-\end{Description}
-Cela engendre, si nécessaire, la création de fichiers \lstinline!*.sol! pour les solutions, \lstinline!*.rep! pour les réponses et \lstinline!*.cdp! pour les indices. Il conviendra de les effacer à chaque changement de clé (\Cle{PasCorrige}, \Cle{Pouce}, \Cle{Direct}) ou ajout d'exercice(s). En effet, la priorité d'affichage est donnée aux fichiers \lstinline!*.sol! puis \lstinline!*.rep! et enfin \lstinline!*.cdp!.
-\begin{multicols}{2}%[listing only]{0.4}{\scriptsize}
-\begin{Codes}[enhanced,listing only,listing options={frame=,escapechar=!},overlay unbroken and first={%
- \node[text=black,fill=white,anchor=east,xshift=-10pt] at (frame.south east) {\scriptsize Suite\dots};
- }]{0.4}{}
-\begin{Maquette}[DS,CorrigeFin,VersSolution]{Numero=3}
- \begin{exercice}[TitreSolution= : Nombre décimal]
- $1+\dfrac2{10}=$
- \end{exercice}
- \begin{Solution}
- $1+\dfrac2{10}=\num{1.2}$
- \end{Solution}
- \begin{Reponse}
- \num{1.2}
- \end{Reponse}
- \begin{Indice}
- Une unité représente dix dixièmes de l'unité.
- \end{Indice}
- \begin{exercice}[PasCorrige] % Malgré les environnements Solution, Reponse, Indice
- $7(x+5)=$ ?
- \end{exercice}
- \begin{Solution}
- $7(x+5)=7\times x+7\times 5=7x+35$
- \end{Solution}
- \begin{Indice}
- Utiliser la simple distributivité.
- \end{Indice}
- \begin{Reponse}
- $7x+35$
- \end{Reponse}
-\end{Codes}
-\begin{Codes}[listing only]{0.4}{}
- \begin{exercice}[Direct] % On affiche uniquement l'environnement Reponse
- $\dfrac34-\dfrac25=$?
- \end{exercice}
- \begin{Solution}
- $\dfrac34-\dfrac25=\dfrac{15}{20}-\dfrac8{20}=\dfrac7{20}$
- \end{Solution}
- \begin{Reponse}
- $\dfrac7{20}$
- \end{Reponse}
- \begin{Indice}
- C'est une soustraction, il faut réduire au même dénominateur.
- \end{Indice}
- \begin{exercice}[Pouce] % On affiche uniquement l'environnement Indice
- Si $x=3$, que vaut $x^3+4x$ ?
- \end{exercice}
- \begin{Solution}
- $x^3+4x=3^3+4\times3=27+12=39$
- \end{Solution}
- \begin{Indice}
- Que veut dire $x^3$ ? Que veut dire $4x$ ?
- \end{Indice}
- \begin{Reponse}
- 39
- \end{Reponse}
-\end{Maquette}
-\end{Codes}
-\end{multicols}
-\begin{Maquette}[DS,CorrigeFin,VersSolution]{Numero=3}
- % La clé CorrigeFin utilise le contenu de l'environnement Solution
- \begin{exercice}[TitreSolution= : Nombre décimal]
- $1+\dfrac2{10}=$
- \end{exercice}
- \begin{Solution}
- $1+\dfrac2{10}=\num{1.2}$
- \end{Solution}
- \begin{Reponse}
- \num{1.2}
- \end{Reponse}
- \begin{Indice}
- Une unité représente dix dixièmes de l'unité.
- \end{Indice}
- \begin{exercice}[PasCorrige]
- $7(x+5)=$ ?
- \end{exercice}
- \begin{Solution}
- $7(x+5)=7\times x+7\times 5=7x+35$
- \end{Solution}
- \begin{Indice}
- Utiliser la simple distributivité.
- \end{Indice}
- \begin{Reponse}
- $7x+35$
- \end{Reponse}
- \begin{exercice}[Direct]
- $\dfrac34-\dfrac25=$?
- \end{exercice}
- \begin{Solution}
- $\dfrac34-\dfrac25=\dfrac{15}{20}-\dfrac8{20}=\dfrac7{20}$
- \end{Solution}
- \begin{Reponse}
- $\dfrac7{20}$
- \end{Reponse}
- \begin{Indice}
- C'est une soustraction, il faut réduire au même dénominateur.
- \end{Indice}
- \begin{exercice}[Pouce]
- Si $x=3$, que vaut $x^3+4x$ ?
- \end{exercice}
- \begin{Solution}
- $x^3+4x=3^3+4\times3=27+12=39$
- \end{Solution}
- \begin{Indice}
- Que veut dire $x^3$ ? Que veut dire $4x$ ?
- \end{Indice}
- \begin{Reponse}
- 39
- \end{Reponse}
-\end{Maquette}
-\clearpage
-\section*{Historique}
-\begin{description}
-\item[\PfMfiledate{}--v \PfMfileversion] Meilleure gestion des titres d'exercices. Meilleure différentiation des exercices à faire et à ne pas faire lors de l'utilisation de la clé \Cle{FdR}. Gestion automatique du mode recto-verso pour le début des corrections. Amélioration de la documentation.
- % 0.87 Ajout des clés \Cle{NonUtilise} et \Cle{Profile} à l'environnement \lstinline!exercice!. Ajout des clés \Cle{Taille} et \Cle{VersSolution} à l'environnement \lstinline!Maquette!.
- %0.86 Ajout de la clé \Cle{TitreSolution} à l'environnement \lstinline!exercice!. Amélioration de la documentation.
- %0.85 Ajout des clés \lstinline!Lignes! et \lstinline!Encart! à l'environnement \lstinline!exercice!. Amélioration de la documentation.
- %0.82 Correction de bugs.
- %0.80 Ajout d'une clé \Cle{Dys} pour les élèves à profil particulier.
- %0.75 Exercices {\em éventuellement} non numérotés. Correction de bugs (Feuille de route).
- %0.65 Création du format CAN (Course aux nombres).
-\end{description}
-\end{document}
-%%% Local Variables:
-%%% TeX-engine: luatex
-%%% End: \ No newline at end of file
diff --git a/macros/latex/contrib/profmaquette/doc/TestCAN.pdf b/macros/latex/contrib/profmaquette/doc/TestCAN.pdf
deleted file mode 100644
index ce210e3c71..0000000000
--- a/macros/latex/contrib/profmaquette/doc/TestCAN.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/profmaquette/doc/TestCAN.tex b/macros/latex/contrib/profmaquette/doc/TestCAN.tex
deleted file mode 100644
index 58cbf7a758..0000000000
--- a/macros/latex/contrib/profmaquette/doc/TestCAN.tex
+++ /dev/null
@@ -1,27 +0,0 @@
-\documentclass[french]{article}
-\usepackage[nonamssymb]{ProfCollegeT}
-\usepackage{ProfMaquetteT}
-
-\usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
-\usepackage[math-style=french,Scale=0.98]{fourier-otf}
-
-\newfontfamily\myfontScratch[Scale=0.725]{DejaVu Sans}
-
-%\usepackage[a5paper,margin=1cm,noheadfoot]{geometry}
-\setlength{\parindent}{0pt}
-\pagestyle{empty}
-
-\usepackage{babel}
-
-\usepackage{lipsum}
-
-\begin{document}
-\begin{Maquette}[CAN]{}
- \begin{exercice}
- On considère un triangle $ABC$\dots
- \end{exercice}
-\end{Maquette}
-\end{document}
-% Local Variables:
-% TeX-engine: luatex
-% End:
diff --git a/macros/latex/contrib/profmaquette/doc/TestCANComplement.pdf b/macros/latex/contrib/profmaquette/doc/TestCANComplement.pdf
deleted file mode 100644
index a2b2f04465..0000000000
--- a/macros/latex/contrib/profmaquette/doc/TestCANComplement.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/profmaquette/doc/TestCANComplement.tex b/macros/latex/contrib/profmaquette/doc/TestCANComplement.tex
deleted file mode 100644
index 565b168d7e..0000000000
--- a/macros/latex/contrib/profmaquette/doc/TestCANComplement.tex
+++ /dev/null
@@ -1,31 +0,0 @@
-\documentclass[french]{article}
-\usepackage[nonamssymb]{ProfCollegeT}
-\usepackage{ProfMaquetteT}
-
-\usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
-\usepackage[math-style=french,Scale=0.98]{fourier-otf}
-
-\newfontfamily\myfontScratch[Scale=0.725]{DejaVu Sans}
-
-%\usepackage[a5paper,margin=1cm,noheadfoot]{geometry}
-\setlength{\parindent}{0pt}
-\pagestyle{empty}
-
-\usepackage{babel}
-
-\usepackage{lipsum}
-
-\begin{document}
-\begin{Maquette}[CAN]{CoefQ=0.5,CoefR=0.25}
- \begin{exercice}
- $17+19$
- \end{exercice}
- \begin{exercice}
- $ABC$ est un triangle tel que $\widehat{ABC}=\ang{30}$ et $\widehat{BCA}=\ang{70}$. Alors\dots
- \Complement{$\widehat{CAB}=\dots$}
- \end{exercice}
-\end{Maquette}
-\end{document}
-% Local Variables:
-% TeX-engine: luatex
-% End:
diff --git a/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.pdf b/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.pdf
deleted file mode 100644
index b3880c8135..0000000000
--- a/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.tex b/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.tex
deleted file mode 100644
index 9922ddb0ce..0000000000
--- a/macros/latex/contrib/profmaquette/doc/TestParcoursPerso.tex
+++ /dev/null
@@ -1,31 +0,0 @@
-\documentclass[12pt,french]{article}
-\usepackage[nonamssymb]{ProfCollegeT}
-\usepackage{PfMV7}
-\input{Christ7}
-\usepackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
-\usepackage{fourier-otf}
-\usepackage[a4paper,margin=1.5cm,nohead,includefoot]{geometry}
-\setlength{\parindent}{0pt}
-\pagestyle{empty}
-\usepackage{mflogo}
-\usepackage{babel}
-\usepackage{lipsum}
-\begin{document}
-\begin{Maquette}[ParcoursPerso]{Type=Fiche,Fichier=Documentation,Theme=L'alphabet,Niveau=6,Classe=Alpha}
- \begin{exercice}
- A
- \end{exercice}
- \begin{exercice}
- B
- \end{exercice}
- \begin{exercice}
- C
- \end{exercice}
- \begin{exercice}
- D
- \end{exercice}
-\end{Maquette}
-\end{document}
-%%% Local Variables:
-%%% TeX-engine: luatex
-%%% End: \ No newline at end of file
diff --git a/macros/latex/contrib/profmaquette/doc/pg_0002-crop.pdf b/macros/latex/contrib/profmaquette/doc/pg_0002-crop.pdf
deleted file mode 100644
index c146dfabd6..0000000000
--- a/macros/latex/contrib/profmaquette/doc/pg_0002-crop.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
index ffa3eb53ec..a9131f1115 100644
--- a/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
+++ b/macros/latex/contrib/profmaquette/latex/ProfMaquette.sty
@@ -2,12 +2,17 @@
% 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/03/06}%
+\def\filedate{2024/03/24}%
\let\PfMfiledate\filedate%
-\def\fileversion{0.88}%
+\def\fileversion{0.89}%
\let\PfMfileversion\fileversion%
+
\ProvidesPackage{ProfMaquette}[\filedate\space v\fileversion\space Maquettage de documents]%
+\newif\if@Dyslexie \@Dyslexiefalse
+
+\DeclareOption{Dyslexie}{\@Dyslexietrue}
+\ProcessOptions\relax
% packages nécessaires
\RequirePackage{verbatim}%
@@ -36,7 +41,7 @@
\makeatother
%définition des clés
\RequirePackage{simplekv}%
-\setKVdefault[Boulot]{Dys=false,Taille=14,Cours=false,Base=false,BaseHTML=false,CAN=false,Fiche=false,DM=false,DS=false,IE=false,Kholle=false,RecapBrevet=false,PdT=false,Parcours=false,Contrat=false,FdR=false,ParcoursPerso=false,CorrigeApres=false,CorrigeFin=false,CorrigeAll=false,Brevet=false,BaremeComplet=false,BaremeGlobal=false,CorrectionColonnes=false,Epaisseur=0pt,AllDirect=false,AllPouce=false,VersSolution=false}%Les deux derniers pour essayer de mettre tous les exercices d'un même fichier en mode Reponse, en mode Indice. Pas implanté, pas testé
+\setKVdefault[Boulot]{Dys=false,Taille=14,Cours=false,Base=false,BaseHTML=false,CAN=false,Fiche=false,DM=false,DS=false,IE=false,Kholle=false,RecapBrevet=false,PdT=false,Parcours=false,Contrat=false,FdR=false,ParcoursPerso=false,CorrigeSeul=false,CorrigeApres=false,CorrigeFin=false,CorrigeAll=false,Brevet=false,BaremeComplet=false,BaremeGlobal=false,CorrectionColonnes=false,Epaisseur=0pt,AllDirect=false,AllPouce=false,VersSolution=false,Small=false,Footnotesize=false,Scriptsize=false}%Les deux derniers pour essayer de mettre tous les exercices d'un même fichier en mode Reponse, en mode Indice. Pas implanté, pas testé
\defKV[Boulot]{Colonnes=\setKV[Boulot]{CorrectionColonnes}}%
\setKVdefault[Cours]{Couleur=Crimson,Theme=Trace écrite,NomExercice=Exercice}%
\setKVdefault[DM]{Numero=1,Date=\today,Classe={},Niveau=3,Code=\jobname}%
@@ -53,7 +58,7 @@
\setKVdefault[Kholle]{Sujet=1,Numero=1,Date=15,Niveau=TSI-1,Code=\jobname,Lieu=Lycée
du Hainaut (Valenciennes),NomEleve=Albert Einstein,CR=false}%
\setKVdefault[CAN]{Date=\today,Niveau=6,Duree=9,CoefQ=0.4,CoefR=0.35,CoefJ=0.1}%
-\setKVdefault[ClesExercices]{NbQuestions=1,PasTitre=false,AffichageSource=false,BaremeTotal,BaremeDetaille=false,MotPoint=point,AffichageTitre=false,Calculatrice=true,Oral=false,Difficulte=0,AffichageCompetence=false,PasCorrige=false,Direct=false,Pouce=false,Parcours=false,Contrat=false,FdR=false,Routes=false,Stops=false,Background=white,Cadre=gray!50,Numerote,Ligne=false,Cadres=false,TitreSol=false,NonUtilise=false,Profile=false}%
+\setKVdefault[ClesExercices]{NbQuestions=1,PasTitre=false,AffichageSource=false,BaremeTotal,BaremeDetaille=false,MotPoint=point,AffichageTitre=false,Calculatrice=true,Oral=false,Difficulte=0,AffichageCompetence=false,PasCorrige=false,Direct=false,Pouce=false,Parcours=false,Contrat=false,FdR=false,Routes=false,Stops=false,Background=white,Cadre=gray!50,Numerote,Ligne=false,Doublespacing=false,Onehalfspacing=false,Cadres=false,TitreSol=false,NonUtilise=false,Profile=false}%
\defKV[ClesExercices]{TitreSolution=\setKV[ClesExercices]{TitreSol}}%
\defKV[ClesExercices]{Source=\setKV[ClesExercices]{AffichageSource}}%
\defKV[ClesExercices]{Titre=\setKV[ClesExercices]{AffichageTitre}}%
@@ -1015,11 +1020,11 @@
\def\PfMTexteDuCorrige{Corrigé de l'exercice}
\NewDocumentCommand\PfMAffichageCorrige{}{%
- \ifboolKV[Boulot]{CAN}{%Toto
+ \ifboolKV[Boulot]{CAN}{%
\xintFor* ##1 in{\xintSeq{1}{\PfMCANTotalExo}}\do{%
\setcounter{PfMExoSol}{##1}%
\setcounter{PfMAlea}{0}%
- \IfFileExists{\jobname-Ex##1.sol}{\textbf{Question\ifnum\PfMCANTotalExo=1\relax\else~\ref{page-\thePfMMaquette-##1} :\fi}~\input{\jobname-Ex##1.sol}\par\goodbreak}{}%
+ \IfFileExists{\jobname-Ex##1.sol}{\textbf{Question\ifnum\PfMCANTotalExo=1\relax\else~\ref{TestCAN-##1}:\fi}~\input{\jobname-Ex##1.sol}\par\goodbreak}{}%page-\thePfMMaquette-##1
}%
}{%
\setcounter{PfMExoSol}{0}%
@@ -1259,7 +1264,7 @@
}%
}%
-\NewDocumentEnvironment{exerciceDM}{so+b}{%
+\NewDocumentEnvironment{exerciceDM}{so}{%
\setcounter{PfMAlea}{0}%
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#2}%
@@ -1288,11 +1293,11 @@
label=page-\thePfMMaquette-\thePfMExo,%
]%
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
- #3
+ }
+}{%
\end{tcolorbox}%
\PfMApresLesExercices%
- }
-}{}%
+}%
%%Contrat
@@ -1415,7 +1420,7 @@
}%
-\NewDocumentEnvironment{exerciceContrat}{so+b}{%
+\NewDocumentEnvironment{exerciceContrat}{so}{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}%
\useKVdefault[ClesExercices]%
@@ -1451,11 +1456,11 @@
label=page-\thePfMMaquette-\thePfMExo
]
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
- #3
+ }%
+}{%
\end{tcolorbox}
\PfMApresLesExercices%
- }%
-}{}%
+}%
%%% Contrat %%%
\tcbset{%
@@ -1761,7 +1766,7 @@
\immediate\write\@auxout{\noexpand\expandafter\gdef\noexpand\csname \Roman{PfMMaquette}FdR#1\endcsname{\csname \Roman{PfMMaquette}route#1\endcsname}}%
}%
-\NewDocumentEnvironment{exerciceFdR}{so+b}{%
+\NewDocumentEnvironment{exerciceFdR}{so}{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}%
\useKVdefault[ClesExercices]%
@@ -1810,11 +1815,11 @@
label=page-\thePfMMaquette-\thePfMExo
]
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
- #3
+ }%
+}{%
\end{tcolorbox}
\PfMApresLesExercices%
- }%
-}{}%
+}%
%CAN
\setsepchar[*]{,*/}%
@@ -1876,6 +1881,11 @@
}%
}%
+\newlength\PfMEspaceItemPGCAN
+\newlength\PfMEspaceTitreSujetPGCAN
+\setlength{\PfMEspaceItemPGCAN}{0.5em}
+\setlength{\PfMEspaceTitreSujetPGCAN}{12pt}
+
\makeatletter
\NewDocumentCommand\TikzCAN{}{%
\begin{tcolorbox}[usercan]%
@@ -1889,11 +1899,11 @@
\end{minipage}
\tcblower
\begin{itemize}
- \item[\faCheck] \textbf{Durée : \useKV[CAN]{Duree} minutes.}\\[0.5em]
- \item[\faCheck] \textit{L'épreuve comporte \@ifundefined{Op@TotalExo}{Recompilez}{\opexport{TotalExo}{\TotalExo}\TotalExo{} question\ifnum\TotalExo=1\else\relax s\fi.}}\\[0.5em]
+ \item[\faCheck] \textbf{Durée : \useKV[CAN]{Duree} minutes.}\\[\PfMEspaceItemPGCAN]
+ \item[\faCheck] \textit{L'épreuve comporte \@ifundefined{Op@TotalExo}{Recompilez}{\opexport{TotalExo}{\TotalExo}\TotalExo{} question\ifnum\TotalExo=1\else\relax s\fi.}}\\[\PfMEspaceItemPGCAN]
\item[\faCheck] \textit{L'usage de la calculatrice et du brouillon sont interdits. Il n'est pas permis d'écrire des calculs intermédiaires.}
\end{itemize}
- \vspace*{12pt}
+ \vspace*{\PfMEspaceTitreSujetPGCAN}
\end{tcolorbox}%
\begin{center}
\Large Sujet \useKV[CAN]{Niveau}\hspace{0.15\linewidth}\useKV[CAN]{Date}
@@ -2089,7 +2099,7 @@
\def\endexerciceParcoursPerso{\immediate\write\verbatim@out{\string\end{exercice}}\immediate\closeout\verbatim@out\@esphack}%
-\NewDocumentEnvironment{exerciceParcours}{so+b}{%
+\NewDocumentEnvironment{exerciceParcours}{so}{%
\setcounter{PfMAlea}{0}%
\setcounter{PfMNbLogo}{1}%
\useKVdefault[ClesExercices]%
@@ -2125,11 +2135,11 @@
label=page-\thePfMMaquette-\thePfMExo
]
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
- #3
+ }
+}{%
\end{tcolorbox}
\PfMApresLesExercices%
- }
-}{}%
+}%
%%%%%%%%%%%%%%%%%%%%%%%
% Pour encart
@@ -2158,9 +2168,39 @@
}%
}%
+% From setspace.sty
+\NewDocumentCommand\PfMSetStretch{}{%
+ \ifboolKV[ClesExercices]{Doublespacing}{%
+ \setstretch {1.667}% default
+ \ifx\@ptsize\@undefined\else
+ \ifcase \@ptsize \relax% 10pt
+ \setstretch {1.667}%
+ \or % 11pt
+ \setstretch {1.618}%
+ \or % 12pt
+ \setstretch {1.655}%
+ \fi
+ \fi
+ }{%
+ \ifboolKV[ClesExercices]{Onehalfspacing}{%
+ \setstretch{1.25}% default
+ \ifx\@ptsize\@undefined\else
+ \ifcase \@ptsize \relax % 10pt
+ \setstretch {1.25}%
+ \or % 11pt
+ \setstretch {1.213}%
+ \or % 12pt
+ \setstretch {1.241}%
+ \fi%
+ \fi%
+ }{}%
+ }%
+}%
+
\NewDocumentCommand\PfMApresLesExercices{}{%
\ifboolKV[ClesExercices]{Ligne}{%
- \par\vspace{\PfMEspaceAvantLignes}\par\PfMLignespointilles{\useKV[ClesExercices]{Lignes}}%
+ % \vspace{\PfMEspaceAvantLignes}
+ \PfMSetStretch\PfMLignespointilles{\useKV[ClesExercices]{Lignes}}%
\par\vspace*{\PfMEspaceApresLignes}\par%
}{}%
\par%
@@ -2228,6 +2268,7 @@
\refstepcounter{PfMSection}%
\PfMChoixCorrection%
\refstepcounter{PfMExo}%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{%
\PfMChoixTitreSolution%
\PfMChoixHideItemSolution%
\begin{tcolorbox}[%
@@ -2241,9 +2282,10 @@
\ifboolKV[ClesExercices]{Profile}{\PfMshowitems}{}%
\PfMApresLesExercices%
}%
+ }
}{}
-\NewDocumentEnvironment{exerciceDS}{so+b}{%
+\NewDocumentEnvironment{exerciceDS}{so}{%
\setcounter{PfMAlea}{0}%
\useKVdefault[ClesExercices]%
\setKV[ClesExercices]{#2}%
@@ -2273,11 +2315,11 @@
label=page-\thePfMMaquette-\thePfMExo
]
\ifboolKV[Boulot]{Dys}{\raggedright}{}%
- #3
+ }%
+}{%
\end{tcolorbox}%
\PfMApresLesExercices%
- }%
-}{}%
+}%
\NewDocumentEnvironment{ExerciceRecapBrevet}{so+b}{%
\setcounter{PfMAlea}{0}%
@@ -3122,9 +3164,23 @@
}%
}%
+\NewDocumentCommand\PfMChangerTailleCorrection{}{%
+ \ifboolKV[Boulot]{Small}{%
+ \small%
+ }{%
+ \ifboolKV[Boulot]{Footnotesize}{%
+ \footnotesize
+ }{%
+ \ifboolKV[Boulot]{Scriptsize}{%
+ \scriptsize
+ }{}%
+ }%
+ }%
+}%
+
%%%%%%%%%%%%%%% Debut Maquette %%%%%%%
% Environnement englobant le tout.
-%\makeatletter
+\makeatletter
\NewDocumentEnvironment{Maquette}{om}{%
% on remet à zéro les compteurs de solutions : inutile ?
\setcounter{RetiensSol}{0}%
@@ -3141,19 +3197,26 @@
% \AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}%
\useKVdefault[Boulot]%
\setKV[Boulot]{#1}%
+ \ifboolKV[Boulot]{CorrigeSeul}{\setKV[Boulot]{CorrigeFin}}{}%
+ \if@Dyslexie
+ \setKV[Boulot]{Dys}
+ \fi
\PfMBasculeDys%
\IfHookExistsTF{env/exercice/after}{\RemoveFromHook{env/exercice/after}[*]\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}}{\AddToHook{env/exercice/after}[ChoixExo]{\PfMChoixAffichageCorrection}}%
% Test
\IfHookExistsTF{env/exercice/begin}{\RemoveFromHook{env/exercice/begin}[*]}{}%
\IfHookExistsTF{env/Maquette/end}{\RemoveFromHook{env/Maquette/end}[*]}{}%
\ifboolKV[Boulot]{CAN}{%
- \setKV[CAN]{#2}\TikzCAN%
- \setcounter{PfMCNNumQ}{1}%
+ \setKV[CAN]{#2}%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{\TikzCAN}%
+ \PfMChangerTailleCorrection%
+ \setcounter{PfMCNNumQ}{0}%
\setlength{\PfMLargeurQuestion}{\useKV[CAN]{CoefQ}\linewidth}\setlength{\PfMLargeurReponse}{\useKV[CAN]{CoefR}\linewidth}\setlength{\PfMLargeurJury}{\useKV[CAN]{CoefJ}\linewidth}%
\let\exercice\ExoCANWrite\let\endexercice\endExoCANWrite%
\AddToHook{env/exercice/begin}{\setcounter{PfMAlea}{0}}%
\AddToHook{env/Maquette/end}{%
\xdef\PfMCANTotalExo{\thePfMExo}%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{
\setcounter{PfMExo}{0}%
\renewcommand{\arraystretch}{2}%
\begin{longtable}{|c|m{\PfMLargeurQuestion}|>{\centering\arraybackslash}m{\PfMLargeurReponse}|m{\PfMLargeurJury}|}%
@@ -3162,12 +3225,13 @@
\hline%
\endhead%
\xintFor* ##1 in {\xintSeq{1}{\PfMCANTotalExo}}\do{%
- \ttfamily{\thePfMCNNumQ}\stepcounter{PfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ex##1.can}&\CNReponse&\\
+ \refstepcounter{PfMCNNumQ}\ttfamily{\thePfMCNNumQ}\label{TestCAN-\thePfMCNNumQ}&\Complement{}\stepcounter{PfMExo}\setcounter{PfMAlea}{0}\input{\jobname-Ex##1.can}&\CNReponse&\\
\hline%
}%
\end{longtable}%
\renewcommand{\arraystretch}{1}%
}%
+ }%
\ifboolKV[Boulot]{CorrigeFin}{%
\AddToHook{env/Maquette/after}[Correction]{%
\useKVdefault[Boulot]%
@@ -3306,8 +3370,10 @@
}{}%
}{%
\ifboolKV[Boulot]{Fiche}{%
+ \ifboolKV[Boulot]{CorrigeSeul}{}{%
\setKV[Fiche]{#2}%
\TikzFiche%
+ }%
\let\exercice\exerciceFiche\let\endexercice\endexerciceFiche%
\ifboolKV[Boulot]{CorrigeFin}{%
\ifboolKV[Boulot]{CorrigeAll}{%
@@ -3338,10 +3404,12 @@
}{%
\AddToHook{env/Maquette/after}[Correction]{%
\useKVdefault[Boulot]%
- \setKV[Boulot]{#1}%
- \PfMBasculeDys
+ \setKV[Boulot]{#1}%
+ %%
+ \PfMBasculeDys%
\setlength{\columnseprule}{\useKV[Boulot]{Epaisseur}}%
\TikzFicheCor{#2}%
+ \PfMChangerTailleCorrection%
\ifboolKV[Boulot]{CorrectionColonnes}{\begin{multicols}{\useKV[Boulot]{Colonnes}}}{}%
\PfMAffichageCorrige%
\ifboolKV[Boulot]{CorrectionColonnes}{\end{multicols}}{}%
@@ -3414,7 +3482,7 @@
}%
}%
}{}%
-
+\makeatother
%D'après JCC
% Package pour gérer les nombres pseudo-aléatoires
\makeatletter
diff --git a/macros/luatex/latex/longmath/README b/macros/luatex/latex/longmath/README
new file mode 100644
index 0000000000..da1e522891
--- /dev/null
+++ b/macros/luatex/latex/longmath/README
@@ -0,0 +1,45 @@
+
+longmath
+--------
+
+Nested delimiter groups extending over multiple array cells or lines.
+
+The longmath package provides yet another solution to some well known
+typesetting problems solved in a variety of ways: multi line formulas
+with paired and nested delimiters. It tackles the problem at the Lua
+level, which has some advantages over solutions implemented in TeX.
+In particular, the TeX code need not be executed multiple times, and
+there is no interference between TeX grouping and the nesting of
+delimiter groups.
+
+As a byproduct, delimiters can be scaled in various ways, inner
+delimiters come in different flavours like relational and binary
+operators, punctuation symbols etc., and outer delimiters can be
+selected automatically according to the nesting level. Last but not
+least, delimiter groups can even extend across several array cells
+or across the whole document.
+
+A special environment is provided as well, which allows multi line
+expressions to be placed inside a displayed equation and make TeX
+do the line splitting and alignment.
+
+This is the first and in parts still experimental version. If anyone
+actually uses it, the author would be happy to receive bug reports,
+critics and suggestions.
+
+(c) 2024 Hans-Jürgen Matschull [ hjm.tex@matschull.net ]
+
+This work may be distributed and/or modified under the conditions
+of the LaTeX Project Public License version 1.3 or later.
+
+The following files belong to the longmath package version 0.1:
+
+package and documentation: longmath.sty longmath.lua longmath-doc.pdf
+
+documentation source: longmath-doc.tex longmath-doc.cls longmath-doc.lua
+
+
+
+
+
+
diff --git a/macros/luatex/latex/longmath/longmath-doc.cls b/macros/luatex/latex/longmath/longmath-doc.cls
new file mode 100644
index 0000000000..04ce8b2e3d
--- /dev/null
+++ b/macros/luatex/latex/longmath/longmath-doc.cls
@@ -0,0 +1,168 @@
+%%
+%% longmath-doc.cls is part of longmath version 0.1.
+%%
+%% (c) 2024 Hans-Jürgen Matschull
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status 'maintained'.
+%%
+%% The Current Maintainer of this work is Hans-Jürgen Matschull
+%%
+%% see README for a list of files belonging to longmath.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{longmath-doc}[2024/03/25]
+\LoadClass[a4paper,10pt]{scrartcl}
+\RequirePackage{geometry}
+\geometry{hmargin=20mm,vmargin={20mm,30mm}}
+\RequirePackage{tikz}
+
+\let\codefont\normalsize
+\let\execfont\normalsize
+
+\definecolor{pcol}{rgb}{0.1 0.0 0.3}
+\definecolor{pcol}{rgb}{0.1 0.0 0.3}
+
+\RequirePackage[no-math]{fontspec}
+\setmainfont{Linux Libertine}
+\setmonofont[Scale=0.80]{Cascadia Mono PL}
+\setsansfont[Scale=0.85]{Droid Sans}
+
+
+\RequirePackage{unicode-math}
+\setmathfont{Tex Gyre Pagella Math}
+
+\RequirePackage{amsmath}
+
+\def\p#1{\textcolor{pcol}{\textsf{#1}}}
+
+\definecolor{code}{rgb}{0.4 0.6 0.8}
+\definecolor{exec}{rgb}{0.8 0.6 0.3}
+
+\colorlet{codeback}{code!02!white}
+\colorlet{execback}{exec!03!white}
+\colorlet{whiteback}{white}
+
+\colorlet{codebord}{code!50!gray}
+\colorlet{execbord}{exec!50!gray}
+\colorlet{whitebord}{white}
+
+\definecolor{codetext}{rgb}{0.0 0.0 0.1}
+\definecolor{codeword}{rgb}{0.2 0.0 0.2}
+\definecolor{codedefn}{rgb}{0.1 0.2 0.1}
+\definecolor{codenumb}{rgb}{0.1 0.0 0.3}
+\definecolor{codepunc}{rgb}{0.4 0.2 0.0}
+\definecolor{codestring}{rgb}{0.4 0.0 0.0}
+\definecolor{codekey}{rgb}{0.5 0.3 0.0}
+\definecolor{codemacro}{rgb}{0.2 0.0 0.2}
+\definecolor{codeluac}{rgb}{0.3 0.0 0.1}
+\definecolor{codemath}{rgb}{0.4 0.2 0.0}
+\definecolor{codeoper}{rgb}{0.2 0.0 0.2}
+\definecolor{codegroup}{rgb}{0.6 0.3 0.0}
+\definecolor{coderest}{rgb}{0.9 0.0 0.9}
+\definecolor{codespace}{rgb}{0.0 0.0 0.0}
+\definecolor{codecomm}{rgb}{0.3 0.3 0.3}
+
+\newcatcodetable\longmathdoc@cctable@
+\savecatcodetable\longmathdoc@cctable@
+\newcount\longmathdoc@ccnum@
+\longmathdoc@ccnum@=\the\longmathdoc@cctable@
+
+\setbox0\hbox{\codefont\texttt{0}}
+\newdimen\ttwidth\ttwidth=\wd0
+
+\directlua{ longmathdoc = require 'longmath-doc.lua' }
+
+\newsavebox{\codebox}
+\newsavebox{\execbox}
+\newdimen\boxsize
+\newdimen\codesize
+\newdimen\execsize
+\newdimen\halfsize
+\newdimen\fullsize
+
+\newif\ifcode
+
+\def\skipin{\ifhmode\par\fi\ifdim\prevdepth>\dp\strutbox\relax\vskip-0.5\fboxsep\fi}
+\def\skipex{\ifhmode\par\fi\ifdim\prevdepth>\dp\strutbox\relax\vskip 1.0\fboxsep\fi}
+
+\def\xpar{\vskip 0.5\fboxsep\par}
+
+\fboxsep = 1.1mm
+
+\def\codeframe#1{\fcolorbox{#1bord}{#1back}{\box\codebox}}
+\def\execframe#1{\fcolorbox{#1bord}{#1back}{\box\execbox}}
+
+\def\.{\strut\\}
+\def\:{\strut\\[-1.9\baselineskip]}
+
+\def\startcode#1{\begingroup\let\do\@makeother\dospecials\@makeother\"\directlua{longmathdoc.readcode('#1')}}
+\def\startexec{\begin{lrbox}{\execbox}\begin{minipage}[t]{\execsize}
+\execfont\abovedisplayskip 5pt \abovedisplayshortskip 5pt }
+\def\stopexec{\end{minipage}\end{lrbox}\dp\execbox = \dimexpr \dp\execbox + 2pt \relax }
+
+\def\makecodebox{\begin{lrbox}{\codebox}\begin{minipage}[t]{\codesize}\codefont\ttfamily
+ \directlua{longmathdoc.writecode()}\end{minipage}\end{lrbox}}
+
+\newenvironment{code*}
+{\xpar\startcode{code*}}
+{\codesize = \dimexpr \linewidth - 2 \fboxrule - 2 \fboxsep \relax
+ \makecodebox\skipin\par\codeframe{code}\xpar}
+
+\newenvironment{code+}
+{\par\startcode{code+}}
+{\global\codetrue \global\codesize = \codesize }
+
+\newenvironment{code}
+{\par\startcode{code}}
+{\halfsize = \dimexpr 0.5 \linewidth - 2 \fboxrule - 2 \fboxsep - 0.5 \parskip \relax
+ \global\codetrue \ifdim \codesize < \halfsize \relax \global\codesize = \halfsize \fi}
+
+\def\makesize{
+ \ifcode
+ \execsize = \dimexpr \linewidth - 4 \fboxrule - 4 \fboxsep - 1.2 \parskip - \codesize \relax
+ \else
+ \execsize = \dimexpr \linewidth - 2 \fboxrule - 2 \fboxsep \relax
+ \fi
+}
+
+\newenvironment{exec}
+{\makesize\makecodebox\startexec\raggedright}
+{\stopexec\skipin\ifcode\doublebox{code}{exec}\else\xpar\execframe{exec}\fi\global\codefalse\xpar}
+
+\newenvironment{exec*}
+{\makesize\makecodebox\startexec}
+{\stopexec\skipin\ifcode\doublebox{code}{exec}\else\xpar\execframe{exec}\fi\global\codefalse\xpar}
+
+\def\doublebox#1#2{%
+ \ifdim \ht\codebox>\ht\execbox \ht\execbox=\ht\codebox \else \ht\codebox=\ht\execbox \fi
+ \ifdim \dp\codebox>\dp\execbox \dp\execbox=\dp\codebox \else \dp\codebox=\dp\execbox \fi
+ \xpar\codeframe{#1}\hfill\execframe{#2}
+}
+
+\def\ecomm{\quad}
+\def\bcomm{\egroup}
+\begingroup\catcode`\{=\active\global\let{\bcomm\endgroup
+\def\comm{\par\skipex\noindent $\bullet$ \bgroup\aftergroup\ecomm\bgroup\catcode`\{=\active}
+
+\begingroup
+\catcode`"\active
+\gdef\verbA{\begingroup\let\do\@makeother\dospecials\let"\verbB\directlua{ longmathdoc.readstring() }}
+\gdef\verbB{\endgroup\directlua{ longmathdoc.writestring() }}
+\gdef"{\verbA}
+\endgroup
+
+\def\verbC#1{\texttt{\textcolor{codetext!50!black}{#1}}}
+
+\catcode`°\active \def°#1°{\textsl{#1}}
+
+\AtBeginDocument{\catcode`"\active}
+
+\endinput
diff --git a/macros/luatex/latex/longmath/longmath-doc.lua b/macros/luatex/latex/longmath/longmath-doc.lua
new file mode 100644
index 0000000000..e334cc2e57
--- /dev/null
+++ b/macros/luatex/latex/longmath/longmath-doc.lua
@@ -0,0 +1,192 @@
+--
+-- longmath-doc.lua is part of longmath version 0.1.
+--
+-- (c) 2024 Hans-Jürgen Matschull
+--
+-- This work may be distributed and/or modified under the
+-- conditions of the LaTeX Project Public License, either version 1.3
+-- of this license or (at your option) any later version.
+-- The latest version of this license is in
+-- http://www.latex-project.org/lppl.txt
+-- and version 1.3 or later is part of all distributions of LaTeX
+-- version 2005/12/01 or later.
+--
+-- This work has the LPPL maintenance status 'maintained'.
+--
+-- The Current Maintainer of this work is Hans-Jürgen Matschull
+--
+-- see README for a list of files belonging to longmath.
+--
+
+local match = unicode.utf8.match
+local gsub = unicode.utf8.gsub
+local find = unicode.utf8.find
+
+local nixpatt = {
+ { n = 'newl', p = '\n' },
+ { n = 'text', p = '[^\n]*' },
+}
+
+local texpatt = {
+ { n = 'group', p = '%b{}' },
+ { n = 'math', p = '%(%)' },
+ { n = 'defn', p = '\\newcount\\[%w@]+' },
+ { n = 'defn', p = '\\newdimen\\[%w@]+' },
+ { n = 'defn', p = '\\def\\[%w@]+' },
+ { n = 'expl', p = '%%%%%%[^\n]*' },
+ { n = 'expl', p = '%&%&%&[^\n]*' },
+ { n = 'comm', p = '%%[^\n]*' },
+ { n = 'oper', p = '[#]+%d' },
+ { n = 'macro', p = '\\[%w@]+' },
+ { n = 'punc', p = '\\%W' },
+ { n = 'newl', p = '\n' },
+ { n = 'space', p = '[ ]+' },
+ { n = 'inter', p = "»[^«]*«" },
+ { n = 'text', p = '[%w@_….,;:~?!\'€∞]+' },
+ { n = 'math', p = '[-+/^=≠<>≤≥·×÷≈"]+' },
+ { n = 'open', p = '[%[%(%{]' },
+ { n = 'close', p = '[%]%)%}]' },
+ { n = 'punc', p = '[%%&$#*|`\']' },
+}
+
+
+local function write( item, d )
+ if item.n == 'open' then item.n = 'group' if d < 9 then d = d + 1 end end
+ if item.n == 'close' then if d > 0 then d = d - 1 end item.n = 'group' end
+ if item.n == 'newl' then
+ tex.sprint( '\\\\\\strut' )
+ elseif item.n == 'expl' then
+ local t = item.p
+ t = gsub( t, '%%%%%%','' )
+ t = gsub( t, '%-%-%-', '' )
+ t = gsub( t, '%&%&%&', '' )
+ tex.sprint( '\\rlap{\\textrm{'..t..'}}' )
+ elseif item.n == 'inter' then
+ tex.sprint( ( item.p:gsub( '«', '' ):gsub( '»', '' ) ) )
+ else
+ local ex = string.explode( item.p, ' ' )
+ tex.sprint( '\\textcolor{code' .. item.n .. '}{' )
+ for i, t in ipairs( ex ) do
+ if i > 1 then tex.sprint( '{ }' ) end
+ t = t:gsub( '\\%<', '\\{' ):gsub( '\\%>', '\\}' ):gsub( '«', '' ):gsub( '»', '' )
+ tex.write( t )
+ end
+ tex.sprint( '}' )
+ end
+ return d
+end
+
+local function nsplit( code )
+ local list1 = {}
+ while code ~= '' do
+ local a, b
+ for _, p in ipairs( nixpatt ) do
+ a, b = match( code, '^(' .. p.p .. ')(.*)$' )
+ if a and b then table.insert( list1, { n = p.n, p = a } ); code = b; break end
+ end
+ if not a then table.insert( list1, { n = 'rest', p = code } ); code = '' end
+ end
+ return list1
+end
+
+local function tsplit( code )
+ local list1 = {}
+ while code ~= '' do
+ local a, b
+ for _, p in ipairs( texpatt ) do
+ a, b = match( code, '^(' .. p.p .. ')(.*)$' )
+ if a and b then table.insert( list1, { n = p.n, p = a } ); code = b; break end
+ end
+ if not a then table.insert( list1, { n = 'rest', p = code } ); code = '' end
+ end
+ local list2 = {}
+ local lgrp = 0
+ local isub
+ for _, item in ipairs( list1 ) do
+ if item.n == 'luap' then
+ table.insert( list2, { n = 'macro', p = '\\begin' } )
+ table.insert( list2, { n = 'open', p = '{' } )
+ table.insert( list2, { n = 'luac', p = 'luap' } )
+ table.insert( list2, { n = 'close', p = '}' } )
+ isub = lsplit( item.p:gsub( '\\begin{luap}', '' ):gsub( '\\end{luap}', '' ) )
+ for _, i in ipairs( isub ) do table.insert( list2, i ) end
+ table.insert( list2, { n = 'macro', p = '\\end' } )
+ table.insert( list2, { n = 'open', p = '{' } )
+ table.insert( list2, { n = 'luac', p = 'luap' } )
+ table.insert( list2, { n = 'close', p = '}' } )
+ elseif item.n == 'group' then
+ local a, b = item.p:sub( 1, 1 ), item.p:sub( -1, -1 )
+ if lgrp > 0 then
+ item = lsplit( item.p:sub( 2, -2 ) )
+ lgrp = lgrp - 1
+ else
+ item = tsplit( item.p:sub( 2, -2 ) )
+ end
+ table.insert( list2, { n = 'open', p = a } )
+ for _, i in ipairs( item ) do table.insert( list2, i ) end
+ table.insert( list2, { n = 'close', p = b } )
+ elseif item.n == 'macro' then
+ local lc = item.p:sub( 2 )
+ table.insert( list2, item )
+ elseif item.n == 'space' then
+ table.insert( list2, item )
+ else
+ table.insert( list2, item )
+ end
+ end
+ return list2
+end
+
+local codelist = {}
+
+local function readcode( env )
+ local name = string.format( '\\end{%s}', env )
+ local patt = name:gsub( '(%W)', '%%%1' )
+ local typ, line
+ local lines, len, spc = {}, 0, 1000
+ while true do
+ line = token.scan_word()
+ if type( line ) == 'string' then
+ local a, b = line:find( patt )
+ if a and b then break end
+ line = line:gsub( '\\%.[%[%s%w%]]*$', '' ):gsub( '\\%.', '\\\\' )
+ line = line:gsub( '%s*$', '' )
+ local stub = line:gsub( '%%%%%%.*$', '' ):gsub( '%-%-%-.*$', '' )
+ if not typ and stub:match( '[^\\]\\%w' ) then typ = tsplit end
+ len = math.max( len, unicode.utf8.len( stub:gsub( '»[^«]*«', '' ) ) )
+ spc = math.min( spc, line:find( '%S' ) or 1000 )
+ table.insert( lines, line )
+ else
+ token.get_next()
+ table.insert( lines, '' )
+ end
+ end
+ local code = ''
+ for _, line in ipairs( lines ) do code = code .. line:sub( spc ) .. '\n' end
+ code = code:gsub( '\\(%W)', '°%1' ):gsub( '°}', '°>' ):gsub( '°{', '°<' ):gsub( '°', '\\' ):gsub( '\n$', '' )
+ tex.setdimen( 'global', 'codesize', ( len - spc + 1.5 ) * tex.dimen.ttwidth )
+ codelist = ( typ or lsplit )( code )
+ tex.sprint( tex.count['longmathdoc@ccnum@'], '\\endgroup' )
+ tex.sprint( name )
+end
+
+local function writecode()
+ local dep = 0
+ tex.sprint( '\\strut' )
+ for _, item in ipairs( codelist ) do dep = write( item, dep ) end
+end
+
+local dummy
+local function readstring()
+ dummy = string.explode( token.scan_string() )
+end
+local function writestring()
+ for i, c in ipairs( dummy ) do
+ if i > 1 then tex.sprint( '~' ) end
+ tex.sprint( '\\verbC{' ) tex.write( c ) tex.sprint( '}' )
+ end
+end
+
+return { readcode = readcode, writecode = writecode,
+ readstring = readstring, writestring = writestring }
+
diff --git a/macros/luatex/latex/longmath/longmath-doc.pdf b/macros/luatex/latex/longmath/longmath-doc.pdf
new file mode 100644
index 0000000000..2d82bd0a3f
--- /dev/null
+++ b/macros/luatex/latex/longmath/longmath-doc.pdf
Binary files differ
diff --git a/macros/luatex/latex/longmath/longmath-doc.tex b/macros/luatex/latex/longmath/longmath-doc.tex
new file mode 100644
index 0000000000..8e64064d87
--- /dev/null
+++ b/macros/luatex/latex/longmath/longmath-doc.tex
@@ -0,0 +1,976 @@
+%%
+%% longmath-doc.tex is part of longmath version 0.1.
+%%
+%% (c) 2024 Hans-Jürgen Matschull
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status 'maintained'.
+%%
+%% The Current Maintainer of this work is Hans-Jürgen Matschull
+%%
+%% see README for a list of files belonging to longmath.
+%%
+
+\documentclass{longmath-doc}
+
+\usepackage{longmath}
+\usepackage{unicode-math}
+\usepackage{tikz}
+\usepackage{array}
+\usepackage{multido}
+
+
+\def\intro{
+The \p{longmath} package provides yet another solution to some well known
+typesetting problems solved in a variety of ways: multi line formulas
+with paired and nested delimiters. It tackles the problem at the Lua
+level, which has some advantages over solutions implemented in \TeX.
+In particular, the \TeX\ code need not be executed multiple times, and
+there is no interference between \TeX\ grouping and the nesting of
+delimiter groups.
+
+As a byproduct, delimiters can be scaled in various ways, inner
+delimiters come in different flavours like relational and binary
+operators, punctuation symbols etc., and outer delimiters can be
+selected automatically according to the nesting level. Last but not
+least, delimiter groups can even extend across several array cells
+or across the whole document.
+
+A special environment is provided as well, which allows multi line
+expressions to be placed inside a displayed equation and make \TeX\
+do the line splitting and alignment.
+
+This is the first and in parts still experimental version. If anyone
+actually uses it, the author would be happy to receive bug reports,
+critics and suggestions.
+}
+
+\newcommand{\icol}[1]{% inline column vector
+ \lleft(\begin{matrix}#1\end{matrix}\rright)%
+}
+
+\def\tr{\mathrm{Tr}}
+
+\def\lagrange{
+ -\frac{1}{4}
+ \lleft( \partial_\mu B_\nu-\partial_\nu B_\mu \rright )
+ \lleft( \partial^\mu B^\nu-\partial^\nu B^\mu \rright )
+ - \frac{1}{8}\tr\lleft\{
+\lleft[ \partial_\mu W_\nu-\partial_\nu W_\mu+\frac{ig_2}{2}
+ \lleft( W_\mu W_\nu- W_\nu W_\mu\rright) \rright]
+\lleft[ \partial^\mu W^\nu-\partial^\nu W^\mu+\frac{ig_2}{2}
+ \lleft( W^\mu W^\nu- W^\nu W^\mu\rright) \rright]
+ \rright\}
+ - \frac{1}{2}\tr\lleft\{
+ \lleft[\partial_\mu G_\nu-\partial_\nu G_\mu
+ + G_\mu G_\nu- G_\nu G_\mu\rright]
+ \lleft[\vphantom{G_\mu} \partial^\mu G^\nu-\partial^\nu G^\mu
+ + G^\mu G^\nu- G^\nu G^\mu\rright]
+ \rright\}
+ + \icol{\nu_L\\e_L}^\dagger \tilde{\sigma}^\mu i
+ \lleft[\partial_\mu-\frac{ig_1}{2}B_\mu+\frac{ig_2}{2}W_\mu\rright]\icol{\nu_L\\e_L}
+ - \lleft\{\lleft[\partial_\mu-\frac{ig_1}{2}B_\mu+\frac{ig_2}{2}W_\mu\rright]\icol{\nu_L\\e_L}
+ \rright\}^\dagger
+ i \tilde{\sigma}^\mu \icol{\nu_L\\e_L}
+ + e_R^\dagger i \sigma^\mu
+ \lleft[\partial_\mu-ig_1B_\mu\rright]e_R
+ + \nu_R^\dagger i \sigma^\mu\partial_\mu\nu_R
+ - \lleft\{ \left[\partial_\mu-ig_1B_\mu\right] e_R \rright\}^\dagger i \sigma^\mu e_R
+ - \lleft\{ \partial_\mu\nu_R \rright\}^\dagger i \sigma^\mu \nu_R
+ - \frac{\sqrt{2}}{\nu}
+ \lleft[ \icol{\nu_L\\e_L}^\dagger \phi M^ee_R
+ +e_R^\dagger M^{e\dagger} \phi^\dagger \icol{\nu_L\\e_L} \rright]
+ - \frac{\sqrt{2}}{\nu}
+ \lleft[ \icol{ -e_L\\ \nu_L}^\dagger \phi^{*}M^\nu\nu_R
+ + \nu_R^\dagger M^{\nu^\dagger} \phi^T\icol{-e_L\\\nu_L} \rright]
+ + \icol{u_L\\d_L}^\dagger\tilde{\sigma}^\mu i
+ \lleft[\partial_\mu-\frac{ig_1}{6}B_\mu+\frac{ig_2}{2}W_\mu+igG_\mu\rright]\icol{u_L\\d_L}
+ - \lleft\{\lleft[\partial_\mu-\frac{ig_1}{6}B_\mu+\frac{ig_2}{2}W_\mu+igG_\mu\rright]\icol{u_L\\d_L}\rright\}^\dagger
+ i\tilde{\sigma}^\mu \icol{u_L\\d_L}
+ + u_R^\dagger \sigma^\mu i \lleft[\partial_\mu+\frac{ig_1}{3}B_\mu+igG_\mu\rright]u_r
+ - \lleft\{ \lleft[\partial_\mu+\frac{ig_1}{3}B_\mu+igG_\mu\rright]u_r \rright\}^\dagger i \sigma^\mu u_R
+ + d_R^\dagger \sigma^\mu i \lleft[\partial_\mu - \frac{ig_1}{3}B_\mu+igG_\mu\rright]d_R
+ - \lleft\{ \lleft[\partial_\mu - \frac{ig_1}{3}B_\mu+igG_\mu\rright]d_R \rright\}^\dagger i \sigma^\mu d_R
+ - \frac{\sqrt{2}}{\nu}\lleft[\icol{u_L\\d_L}^\dagger \phi M^d d_R
+ + \lleft( M^d d_R\rright) ^\dagger \phi^\dagger \icol{u_L\\d_L}\rright]
+ -\frac{\sqrt{2}}{\nu}\lleft[\icol{-d_L\\u_L}^\dagger \phi^{*} M^u u_R
+ + \lleft( M^u u_R \rright)^\dagger \phi^\top \icol{-d_L\\u_L}\rright]
+ + \lleft\{\lleft[\partial_\mu+\frac{ig_1}{2}B_\mu+\frac{ig_2}{2}W_\mu\rright]\phi\rright\}^\dagger
+ \lleft[\partial^\mu+\frac{ig_1}{2}B^\mu+\frac{ig_2}{2}W^\mu\rright]\phi
+ - \frac{ m_h^2 }{ 2 \nu^2 } \lleft[ \phi^\dagger \phi - \frac{\nu^2}{2} \rright]^2
+}
+
+\begin{document}
+
+\begin{center}
+\tikzset{ txt/.style = { fill=white,fill opacity=0.6,text opacity=1.0 } }
+\begin{tikzpicture}
+ \useasboundingbox (0,0.53\textheight);
+ \node[color=yellow!85!black,rotate=-17,scale=1.8] at (-0.7,0)
+ {$\displaystyle \mathcal{L} = \begin{longmath}[t]{110mm+30mm} \lagrange \end{longmath}$};
+ \node[txt,scale=1.8] at (0,7.2) {\Huge\textbf{\p{longmath}}};
+ \node[txt,scale=1.2] at (0,5.4) {\Large Documentation for Version 0.1};
+ \node[txt,scale=1.2] at (0,4.0) {\large Hans-Jürgen Matschull};
+ \node[txt,scale=1.2] at (0,3.3) {\texttt{hjm.tex@matschull.net}};
+ \node[txt,scale=1.2] at (0,1.7) {\texttt{2024/03/25}};
+ \node[txt,scale=1.0] at (0,-3) {\begin{minipage}{130mm}\parskip 1.3ex \intro\end{minipage}};
+\end{tikzpicture}
+\end{center}
+
+\parskip 1ex plus 3pt
+\parindent 0pt
+\baselineskip 13pt plus 1pt
+\lineskip 2pt plus 1pt
+\lineskiplimit 2pt
+
+\newpage
+
+\section{Delimiters}
+\label{delims}
+
+The \p{longmath} package provides ``long'' versions of the "\left" and "\right" primitives.
+
+\comm{"\lleft" [°scale°] °delimiter°} marks the beginning of a delimiter group and inserts an opening °delimiter°.
+
+\comm{"\rright" [°scale°] °delimiter°} marks the end of a delimiter group and inserts a closing °delimiter°.
+
+The optional °scale° argument will be explained below. The °delimiter° can be anything that is also accepted by "\left" and "\right", including a dot representing an invisible or null delimiter, any character with a "\delcode", or an explicit "\delimiter" or "\Udelimiter". If you want to use the \p{longmath} package with existing documents, or just stick to the familiar notation, and provided that this does not cause conflicts with other packages manipulating the original primitives, it is even save to say "\let\left\lleft" and "\let\right\rright".
+\begin{code}
+ The Sellmann-Yokuzi contribution to the
+ Johansson Entropy is given by
+ $$ S^\top = k · \lleft[ A + \lleft( B_C
+ + D^{E^2} \rright) ^ { \lleft( 3+κ^2 \rright)^2 }
+ + F \rright] $$
+\end{code}
+\begin{exec}
+ The Sellmann-Yokuzi contribution to the
+ Johansson Entropy is given by
+ $$ S^\top = k · \lleft[ A +
+ \lleft( B_C + D^{E^2} \rright)^{\lleft( 3+κ^2 \rright)^2 }
+ + F \rright] $$
+\end{exec}
+The "\lleft" and "\rright" delimiters enclose a \emph{delimiter group}. Within the group, you can have arbitrarily many inner or middle delimiters. As these often have different interpretations, several ``long'' variants of the "\middle" primitive are provided, associated with different types of math atoms.
+
+\comm{"\mmiddle" [°scale°] °delimiter°} inserts an inner °delimiter° into a delimiter group.
+
+\comm{"\mmrel" [°scale°] °delimiter°} interprets the °delimiter° as a relational operator.
+
+\comm{"\mmbin" [°scale°] °delimiter°} interprets the °delimiter° as a binary operator.
+
+\comm{"\mmord" [°scale°] °delimiter°} interprets the °delimiter° as an ordinary symbol.
+
+\comm{"\mmop" [°scale°] °delimiter°} interprets the °delimiter° as a large operator.
+
+\comm{"\mmpunct" [°scale°] °delimiter°} interprets the °delimiter° as a punctuation character.
+
+They differ in the way \TeX\ inserts spaces before and after these delimiters, just as if you had written "\mathrel{"°delimiter°"}", "\mathbin{"°delimiter°"}", etc. Like the "\middle" primitive, the "\mmiddle" variant creates a "\mathinner{"°delimiter°"}".
+\begin{code}
+ The scalar product is written as
+ $$ \lleft\langle A_1 \mmiddle| \tilde A_2 \rright\rangle . $$ %%%
+\end{code}
+\begin{exec}
+ The scalar product is written as
+ $$ \lleft\langle A_1 \mmiddle| \tilde A_2 \rright\rangle . $$
+\end{exec}
+\begin{code}
+ There are three parallel lines
+ $$ \lleft. A_1 B_1 \mmrel \Vert A_2 \hat B_2
+ \mmrel \Vert \hat A_2 B_2 \rright. . $$ %%%
+\end{code}
+\begin{exec}
+ There are three parallel lines
+ $$ \lleft. A_1 B_1 \mmrel \Vert A_2 \hat B_2
+ \mmrel \Vert \hat A_2 B_2 \rright. . $$
+\end{exec}
+\begin{code}
+ The centre of mass is defined as
+ $$ \vec R = \lleft( \sum_{k=1}^{n} m_k \, \vec r_k
+ \mmbin / \sum_{k=1}^{n} m_k \rright) . $$ %%%
+\end{code}
+\begin{exec}
+ The centre of mass is defined as
+ $$ \vec R = \lleft( \sum_{k=1}^{n} m_k \, \vec r_k
+ \mmbin / \sum_{k=1}^{n} m_k \rright) . $$
+\end{exec}
+\begin{code}
+ Vectors can be written as tuples like %%%
+ $$ \lleft( \tilde X_1 \mmpunct| \tilde X_2 \mmpunct|
+ \tilde X_3 \mmpunct| \dots \rright) . $$
+\end{code}
+\begin{exec}
+ Vectors can be written as tuples like
+ $$ \lleft( \tilde X_1 \mmpunct| \tilde X_2 \mmpunct|
+ \tilde X_3 \mmpunct| \dots \rright) . $$
+\end{exec}
+\begin{code}
+ This expression makes no sense:
+ $$ \lleft. \int \mmord( \sum \mmord[ \prod \mmord\} \rright. $$
+\end{code}
+\begin{exec}
+ This expression makes no sense:
+ $$ \lleft. \int \mmord( \sum \mmord[ \prod \mmord\} \rright. $$
+\end{exec}
+Unlike the standard "\left"-"\middle"-"\right" primitives, the long variants do not create subformulas or induce grouping at the \TeX\ level. \TeX nically, each delimiter is actually its own group, paired with an invisible delimiter, and with an empty "\hbox" between them. As such, it behaves like a single mathematical symbol of the respective type, or like an atom in \TeX's language. In particular, sub- and superscripts can be attached to individual delimiters, not only to the whole group, and the operator version really behaves like a big operator.
+\begin{code}
+ Applying the triangular square limit, we get
+ $$ \lleft. W(x) + \mmop \uparrow_n^\infty
+ \frac{ 1-x^n }{ 1-x } \rright. = \log( x ). $$ %%%
+\end{code}
+\begin{exec}
+ Applying the triangular square limit, we get
+ $$ \lleft. W(x) + \mmop \uparrow_n^\infty
+ \frac{ 1-x^n }{ 1-x } \rright. = \log( x ). $$
+\end{exec}
+\begin{code}
+ The relations $1^\star$ and $2^\star$ imply the existence of
+ $$ \lleft[ \lleft( A_k \mmrel |^{\lleft(1^\star\rright)}
+ B_k \mmrel |^{\lleft(2^\star\rright)}
+ C_k \rright) \rright] .$$
+\end{code}
+\begin{exec}
+ The relations $1^\star$ and $2^\star$ imply the existence of
+ $$ \lleft[ \lleft( A_k \mmrel |^{\lleft(1^\star\rright)}
+ B_k \mmrel |^{\lleft(2^\star\rright)}
+ C_k \rright) \rright] .$$
+\end{exec}
+Within a formula or subformula, you can have unbalanced groups, or even inner delimiters only. The formula is then interpreted and typeset as if there were invisible delimiters at one or both ends.
+\begin{code}
+ $$ \prod_{p\in\mathbfit{P}} G(p) \mmbin \uparrow
+ \sum_{q\in\mathbfit{Q}} H(q) \mmbin \downarrow
+ \lim_{x\to\infty} F(x) $$
+\end{code}
+\begin{exec}\:
+ $$ \prod_{p\in\mathbfit{P}} G(p) \mmbin \uparrow
+ \sum_{q\in\mathbfit{Q}} H(q) \mmbin \downarrow
+ \lim_{x\to\infty} F(x) $$
+\end{exec}
+\begin{code}
+ A skewed-rational fraction can be written as
+ $$ \frac{ x × \lleft( 1 - x^2 }
+ { x^2 + 1 \rright) × x } . $$ %%%
+\end{code}
+\begin{exec}
+ A skewed-rational fraction can be written as
+ $$ \frac{ x × \lleft( 1 - x^2 }{ x^2 + 1 \rright) × x } . $$
+\end{exec}
+When the formula is processed, each actual delimiter group is temporarily put in a box and the size of that box is determined. Then the dimensions of the empty "\hbox"es inside the fake delimiter groups are set accordingly, so that \TeX\ can apply its algorithm to finally fix the sizes of the delimiters. As this takes place after the whole formula has been transformed into a list of math nodes, no \TeX\ code has to be processed multiple times. It also allows to add some features that cannot be implemented otherwise, unless you are willing to go really deep into macro and token magic.
+
+For example, the limits of large operators like sums or integrals can be excluded from the box that determines the delimiter size. This feature can be turned on and off with two control sequences.
+
+\comm{"\includelimits"} includes the limits of large operators (default).
+
+\comm{"\ignorelimits"} ignores the limits of large operators.
+
+It is possible to use the switch in the middle of a formula or even inside a delimiter group. The switch position at the moment the operator is created determines whether its limits are included or ignored.
+\begin{code}
+ \ignorelimits
+ $$ \vec R = \lleft( \sum_{k=1}^{n} m_k \, \vec r_k
+ \mmbin / \sum_{k=1}^{n} m_k \rright) . $$ %%%
+\end{code}
+\begin{exec}\:
+ \ignorelimits
+ $$ \vec R = \lleft( \sum_{k=1}^{n} m_k \, \vec r_k
+ \mmbin / \sum_{k=1}^{n} m_k \rright) . $$ %%%
+\end{exec}
+\begin{code}
+ $$ \lleft[ \ignorelimits \sum_{A_X^3}^{A_Y^3} F(Z)
+ + \includelimits \sum_a^c f(x) \rright] $$ %%%
+\end{code}
+\begin{exec}\:
+ $$ \lleft[ \ignorelimits \sum_{A_X^3}^{A_Y^3} F(Z)
+ + \includelimits \sum_a^c f(x) \rright] $$ %%%
+\end{exec}
+\begin{code}
+ \includelimits
+ $$ A = 3 × \lleft[ \int\limits_1^5
+ \lleft( 1 + \sqrt{ 1 + x } \rright) \, \mathrm{d}x \rright] $$
+\end{code}
+\begin{exec}\:
+ \includelimits
+ $$ A = 3 × \lleft[ \int\limits_1^5
+ \lleft( 1 + \sqrt{ 1 + x } \rright) \, \mathrm{d}x \rright] $$
+\end{exec}
+\begin{code}
+ \ignorelimits
+ $$ A = 3 × \lleft[ \int\limits_1^5
+ \lleft( 1 + \sqrt{ 1 + x } \rright) \, \mathrm{d}x \rright] $$
+\end{code}
+\begin{exec}\:
+ \ignorelimits
+ $$ A = 3 × \lleft[ \int\limits_1^5
+ \lleft( 1 + \sqrt{ 1 + x } \rright) \, \mathrm{d}x \rright] $$
+\end{exec}
+There are several ways to fine tune the sizes of delimiters. A priori, the minimal size of all delimiters within a group is determined by the total height and depth of everything in this group, except for the delimiters themselves. \TeX\ then checks if a predefined character with the required size exists in the current math font and uses it. Otherwise it creates a stretched symbol with the required size.
+
+Two plain \TeX\ parameters modify the finally chosen sizes of all delimiters. By default, they are used to shrink them slightly, which makes the final formula look less bulky while keeping it readably. This can be seen in the integral example above. An additional third parameter is provided by the \p{longmath} package, which applies to middle delimiters only.
+
+\comm{"\delimiterfactor" °factor°} scales all delimiters by $°factor°/1000$
+(default \the\delimiterfactor).
+
+\comm{"\delimitershortfall" °dimension°} limits the shrinkage of delimiters to the °dimension°
+(default \the\delimitershortfall).
+
+\comm{"\delimiterscale" °factor°} additionally scales middle delimiters by $°factor°/1000$
+(default \the\delimiterscale).
+
+The parameters "\delimiterfactor" (a count register) and "\delimitershortfall" (a dimension register) are explained in the \TeX book. Briefly summarised, every delimiter is finally resized by the given $°factor°/1000$, but the shrinkage is limited to the given °dimension°. The "\delimiterscale" (another count register) is applied to all middle delimiters before the final scaling is applied, and there is no limited shrinkage at this stage.
+\begin{code}
+ \delimiterscale 400
+ $$ \vec R = \lleft( \sum_{k=1}^{n} m_k \, \vec r_k
+ \mmbin / \sum_{k=1}^{n} m_k \rright) . $$ %%%
+\end{code}
+\begin{exec}\:
+ \delimiterscale 400
+ $$ \vec R = \lleft( \sum_{k=1}^{n} m_k \, \vec r_k
+ \mmbin / \sum_{k=1}^{n} m_k \rright) . $$ %%%
+\end{exec}
+Instead of changing "\delimiterscale", the scale factor can also be applied to each delimiter individually, using the optional °scale° argument. In this case, the "\delimiterscale" is ignored and replaced by the given number.
+\begin{code}
+ $$ X = \lleft ( \sum_k^\infty A \mmbin 900 | \sum_k^\infty B
+ \mmbin 700 | \sum_k^\infty C \mmbin 500 | \sum_k^\infty D
+ \mmbin 300 | \sum_k^\infty E \rright ) $$
+\end{code}
+\begin{exec}\:
+ $$ X = \lleft ( \sum_k^\infty A \mmbin 900 | \sum_k^\infty B
+ \mmbin 700 | \sum_k^\infty C \mmbin 500 | \sum_k^\infty D
+ \mmbin 300 | \sum_k^\infty E \rright ) $$
+\end{exec}
+If you want to produce strange and ugly results, you can even scale the opening and closing delimiters independently, or choose factors greater than $1000$.
+\begin{code}
+ $$ \vec R = \lleft 900 ( \sum_{k=1}^{n} m_k \, \vec r_k
+ \mmbin 1300 \divslash \sum_{k=1}^{n} m_k \rright 700 ) $$
+\end{code}
+\begin{exec}\:
+ $$ \vec R = \lleft 900 ( \sum_{k=1}^{n} m_k \, \vec r_k
+ \mmbin 1300 \divslash \sum_{k=1}^{n} m_k \rright 700 ) $$
+\end{exec}
+
+
+\section{Alignment}
+\label{align}
+
+There are two more special delimiter types not listed in section~\ref{delims}. They are treated as middle delimiters regarding the logical grouping, but when they are finally typeset, they are treated as opening and closing delimiters.
+
+\comm{"\mleft" [°scale°] °delimiter°} typesets a left °delimiter°, but does not open a new group.
+
+\comm{"\mright" [°scale°] °delimiter°} typesets a right °delimiter°, but does not close the current group.
+
+To see what they are useful for, consider the following example.
+\begin{code}
+ $$ \lleft( A + \sum B \rright)
+ \lleft( C + \int D \rright) $$
+\end{code}
+\begin{exec}\:
+ $$ \lleft( A + \sum B \rright)
+ \lleft( C + \int D \rright) $$
+\end{exec}
+Can we make the brackets to have the same size? A few "\vphantom"s would probably fix it. But then we need to know in advance which symbols are the responsible ones, or we have to place the content of each bracket as a phantom inside the other one and make \TeX\ process everything twice. Alternatively, we could include everything in a single group and make the two brackets in the middle inner delimiters. But then the correct spacing between them and the adjacent symbols is lost.
+\begin{code}
+ $$ \lleft( A + \sum B \mmiddle )
+ \mmiddle ( C + \int D \rright) $$
+\end{code}
+\begin{exec}\:
+ $$ \lleft( A + \sum B \mmiddle )
+ \mmiddle 1000 ( C + \int D \rright) $$
+\end{exec}
+With "\mleft" and "\mright", we get the same sizes and the correct spacing. Since in this case we only have these two pairs of brackets, we can simple make the whole formula a single group.
+\begin{code}
+ $$ \mleft( A + \sum B \mright)
+ \mleft( C + \int D \mright) $$
+\end{code}
+\begin{exec}\:
+ $$ \mleft( A + \sum B \mright)
+ \mleft( C + \int D \mright) $$
+\end{exec}
+What "\mleft" and "\mright" basically do is not to adapt the opening and closing delimiters to the content between them, but align them with the enclosing group.
+\begin{code*}
+ $$ \lleft( \mleft( 1 + 2 \mright) \mleft( 1 + 2^2 \mright) \mleft( 1 + 2^{2^2} \mright)
+ \mleft( 1 + 2^{2^{2^2}} \mright) + \mleft( 1 + 3 \mright) \mleft( 1 + 3^3 \mright)
+ \mleft( 1 + 3^{3^3} \mright) + \mleft( 1 + 5 \mright) \mleft( 1 + 5^5 \mright) \rright) $$
+\end{code*}
+\begin{exec}\:
+ $$ \lleft( \mleft( 1 + 2 \mright) \mleft( 1 + 2^2 \mright) \mleft( 1 + 2^{2^2} \mright)
+ \mleft( 1 + 2^{2^{2^2}} \mright) + \mleft( 1 + 3 \mright) \mleft( 1 + 3^3 \mright)
+ \mleft( 1 + 3^{3^3} \mright) + \mleft( 1 + 5 \mright) \mleft( 1 + 5^5 \mright) \rright) $$
+\end{exec}
+But what if there is more stuff inside the enclosing group and we only want to align particular brackets with each other? Something like this, and we want both the square and the round brackets to be aligned.
+\begin{code*}
+ $$ F\lleft[ X \rright] \lleft( 1 + 2^2 \rright) \lleft( 1 + 2^{2^2} \rright)
+ + F\lleft[ X^2 \rright] \lleft( 1 + 3^3 \rright) \lleft( 1 + 3^{3^3} \rright)
+ + F\lleft[ X^3 \rright] \lleft( 1 + 5^5 \rright) \lleft( 1 + 5^{5^5} \rright) $$
+\end{code*}
+\begin{exec}\:
+ $$ F\lleft[ X \rright] \lleft( 1 + 2^2 \rright) \lleft( 1 + 2^{2^2} \rright)
+ + F\lleft[ X^2 \rright] \lleft( 1 + 3^3 \rright) \lleft( 1 + 3^{3^3} \rright)
+ + F\lleft[ X^3 \rright] \lleft( 1 + 5^5 \rright) \lleft( 1 + 5^{5^5} \rright) $$
+\end{exec}
+Now we definitely need "\vphantom"s, right? In principle, yes, but the \p{longmath} package provides a way to set them up automatically and hide them inside the delimiters. To use this feature, we have to attach a tag to those delimiters we want to align. The tag is enclosed in braces and placed between the control sequence and the delimiter symbol.
+
+\comm{"\"°type° "{"°tag°"}" [°scale°] °delimiter°} aligns this °delimiter° with all delimiters with the same °tag°.
+
+Here, "\"°type° is any of the above delimiter types, and the °tag° is any string that would also do as, say, an argument to "\label". The basic idea is to make all delimiters with the same °tag° attached to them behave as if they belong to the same group. So, the problem just posed can be solved as follows.
+\begin{code*}
+ $$ F\lleft {Fx} [ X \rright] \lleft {Pw} ( 1 + 2^2 \rright) \lleft {Pw} ( 1 + 2^{2^2} \rright)
+ + F\lleft {Fx} [ X^2 \rright] \lleft {Pw} ( 1 + 3^3 \rright) \lleft {Pw} ( 1 + 3^{3^3} \rright)
+ + F\lleft {Fx} [ X^3 \rright] \lleft {Pw} ( 1 + 5^5 \rright) \lleft {Pw} ( 1 + 5^{5^5} \rright) $$
+\end{code*}
+\begin{exec}\:
+ $$ F\lleft {Fx} [ X \rright] \lleft {Pw} ( 1 + 2^2 \rright) \lleft {Pw} ( 1 + 2^{2^2} \rright)
+ + F\lleft {Fx} [ X^2 \rright] \lleft {Pw} ( 1 + 3^3 \rright) \lleft {Pw} ( 1 + 3^{3^3} \rright)
+ + F\lleft {Fx} [ X^3 \rright] \lleft {Pw} ( 1 + 5^5 \rright) \lleft {Pw} ( 1 + 5^{5^5} \rright) $$
+\end{exec}
+It is enough to tag only the left delimiters, or just one delimiter per group, because those belonging to the same group are aligned anyway. What we actually do is to align groups with each other, not individual delimiters.
+
+The groups being linked need not belong to a common subformula. Here we want to align the brackets and the division slashed in the numerators.
+\begin{code}
+ $$ \frac{ \lleft ( a + 1 \rright) \mmord / x }{a}
+ + \frac{ \lleft ( \sum_k b^k \rright) \mmord / y }{b}
+ + \frac{ \lleft ( c^2 + 1 \rright) \mmord / z }{c} $$ %%%
+\end{code}
+\begin{exec}\:
+ $$ \frac{ \lleft ( a + 1 \rright) \mmord / x }{a}
+ + \frac{ \lleft ( \sum_k b^k \rright) \mmord / y }{b}
+ + \frac{ \lleft ( c^2 + 1 \rright) \mmord / z }{c} $$
+\end{exec}
+This is how it can be done.
+\begin{code}
+ $$ \frac{ \lleft {f5} ( a + 1 \rright) \mmord / x }{a}
+ + \frac{ \lleft {f5} ( \sum_k b^k \rright) \mmord / y }{b}
+ + \frac{ \lleft {f5} ( c^2 + 1 \rright) \mmord / z }{c} $$
+\end{code}
+\begin{exec}\:
+ $$ \frac{ \lleft {f5} ( a + 1 \rright) \mmord / x }{a}
+ + \frac{ \lleft {f5} ( \sum_k b^k \rright) \mmord / y }{b}
+ + \frac{ \lleft {f5} ( c^2 + 1 \rright) \mmord / z }{c} $$
+\end{exec}
+Note that the division slashes are outside the linked groups. But in each numerator, the slash belongs to the enclosing group, which is the subformula formed by the numerator. As this group also contains the brackets, the size of the slash is also adapted to them and thus all slashes get the same size as well. Alternatively, we could have done it like this.
+\begin{code}
+ $$ \frac{ \mleft ( a + 1 \mright) \mmord {f6} / x }{a}
+ + \frac{ \mleft ( \sum_k b^k \mright) \mmord {f6} / y }{b}
+ + \frac{ \mleft ( c^2 + 1 \mright) \mmord {f6} / z }{c} $$
+\end{code}
+\begin{exec}\:
+ $$ \frac{ \mleft ( a + 1 \mright) \mmord {f6} / x }{a}
+ + \frac{ \mleft ( \sum_k b^k \mright) \mmord {f6} / y }{b}
+ + \frac{ \mleft ( c^2 + 1 \mright) \mmord {f6} / z }{c} $$
+\end{exec}
+But not like this, which aligns the slashes, but not the brackets.
+\begin{code}
+ $$ \frac{ \lleft ( a + 1 \rright) \mmord {f7} / x }{a}
+ + \frac{ \lleft ( \sum_k b^k \rright) \mmord {f7} / y }{b}
+ + \frac{ \lleft ( c^2 + 1 \rright) \mmord {f7} / z }{c} $$
+\end{code}
+\begin{exec}\:
+ $$ \frac{ \lleft ( a + 1 \rright) \mmord {f7} / x }{a}
+ + \frac{ \lleft ( \sum_k b^k \rright) \mmord {f7} / y }{b}
+ + \frac{ \lleft ( c^2 + 1 \rright) \mmord {f7} / z }{c} $$
+\end{exec}
+For the alignment to work, the linked delimiters need not be visible. An invisible inner delimiter basically behaves like a "\vphantom", whose content is the whole group to which this delimiter belongs. More precisely, it is actually the empty "\hbox" that is present in our special delimiters which replaces the "\vphantom". We can use this to align the square roots in the following example.
+\begin{code}
+ $$ \sqrt{ \mleft {sq8} . a + 1 }
+ + \sqrt{ \mleft {sq8} . \sum\nolimits_k b_k } %%%
+ + \sqrt{ \mleft {sq8} . c^2 + 1 } $$
+\end{code}
+\begin{exec}\:
+ $$ \sqrt{ \mleft {sq8} . a + 1 }
+ + \sqrt{ \mleft {sq8} . \sum\nolimits_k b_k }
+ + \sqrt{ \mleft {sq8} . c^2 + 1 } $$
+\end{exec}
+Why did we use "\mleft" here, and not one of the middle delimiters? The first reason is that putting an opening atom at the beginning of a subformula will get the horizontal spacing correct, independent of what kind of symbol follows. The second reason is that a middle delimiter would be scaled by "\delimiterscale", so that it wouldn't have the required size to align the heights of the square roots. The "\delimiterfactor" is irrelevant here, because it doesn't affect an invisible delimiter.
+
+We can even go a step further and link delimiters in different equations and, in fact, all across the document.
+\begin{code}
+ Equations that start with
+ $$ \lleft( \int\limits_1^\infty f(x) \, \mathrm{d}x \rright)
+ \lleft {longeq} ( \sum_k a_k + 1000 + 999 + \cdots $$
+ often go on for pages and end with
+ $$ \cdots + 1 \rright {longeq} ) = 0 . $$
+\end{code}
+\begin{exec}
+ Equations that start with
+ $$ \lleft( \int\limits_1^\infty f(x) \, \mathrm{d}x \rright)
+ \lleft {longeq} ( \sum_k a_k + 1000 + 999 + \cdots $$
+ often go on for pages and end with
+ $$ \cdots + 1 \rright {longeq} ) = 0 . $$
+\end{exec}
+To make this possible, the \LaTeX\ method of storing information in the "aux" file is used. The dimensions of all tagged delimiter groups are saved and reloaded when the document is typeset the next time. It therefore requires a second run to get the sizes of linked delimiters correct. If the size of any delimiter changes while the typesetting is in progress, a warning message is issued at the end, similar to the message that you need to rerun the document to get all the "\ref"erences to "\label"s right.
+
+You will also get a warning message if you set up the tags so that some delimiter group is linked to its own parent or subgroup. In such a case, there is no consistent way to determine the required sizes. With each run, they will change randomly or even start to increase and diverge. It's okay, however, to link delimiters in different math styles. You can link an exponent in script style to its own basis in display style, although this might not make much sense.
+
+For all this to work, the tags must be document wide unique. But unlike equation labels or bibliography entries, they typically only link delimiters within a single equation or an array of equations. It is therefore preferable to have short tags like the ones used above, or even simple letters or numbers. To make this possible, you can locally define a °prefix°, which is added to each tag used within its scope.
+
+\comm{"\delimiterprefix{"°prefix°"}"} prepends the °prefix° to the tags of all tagged delimiters.
+
+It is then sufficient to use a document wide unique prefix for each section, equation, or whatever scope suits best. The setting is local to the \TeX\ group, but if the same prefix is used at different places, the tagged delimiters within those scopes are linked to each other. For example, if the prefix is "introduction-" and the tag "a2" is attached to a delimiter, then the actual tag used internally is "introduction-a2", and this is a global name.
+
+You can even automate this, by setting a dynamical prefix like this in the preamble.
+\begin{code*}
+ \delimiterprefix{\theequation.}
+\end{code*}
+Provided that you use unique equations numbers, and link delimiters within single equations only, your tags will then always be local to the current equation, something like "5.16.a" if the tag "a" is used in equation~(5.16).
+
+The perhaps most useful application of tagged delimiters is to typeset formulas that extend over several cells or lines in an array. Here is a little challenge. In the following array, we want the multiplication and addition operators to be aligned vertically, and of course the brackets to be adapted to the content they enclose. We use the \p{array} package to define a few special column types to get the math style and the spacing correct.
+\begin{code*}
+ \newcolumntype{d}{ >{\displaystyle} c }
+ \newcolumntype{s}{ @{} >{{}} c <{{}} @{} }
+\end{code*}
+ \newcolumntype{d}{ >{\displaystyle} c }
+ \newcolumntype{s}{ @{} >{{}} c <{{}} @{} }
+\begin{code}
+ $$ \begin{array}{dsdsdsd}
+ \lleft [ Z & - & \sum_k A & × &
+ \lleft ( B & + & C^X \rright ) \rright ] \\[3ex] %%%
+ \lleft [ P & × & \lleft ( U & + &
+ \int_R V \rright ) & - & W^Y \rright ]
+ \end{array} $$
+\end{code}
+\begin{exec}
+ $$ \begin{array}{dsdsdsd}
+ \lleft[ Z & - & \sum_k A & × &
+ \lleft( B & + & C^X \rright) \rright] \\[3ex]
+ \lleft[ P & × & \lleft( U & + &
+ \int_R V \rright ) & - & W^Y \rright]
+ \end{array} $$
+\end{exec}
+In an "array", each cell is typeset as a separate formula. Therefore, the delimiters in each cell are adapted only to the content of this particular cell. Apparently, it would be quite a complicated task to fix this with "\vphantom"s. Let's try to simply link the delimiters that belong together.
+\begin{code}
+ $$ \begin{array}{dsdsdsd}
+ \lleft {a1} [ Z & - & \sum_k A & × &
+ \lleft {b1} ( B & + & C^X \rright {b1} ) \rright {a1} ] \\[3ex]
+ \lleft {a2} [ P & × & \lleft {b2} ( U & + &
+ \int_R V \rright {b2} ) & - & W^Y \rright {a2} ]
+ \end{array} $$
+\end{code}
+\begin{exec}
+ $$ \begin{array}{dsdsdsd}
+ \lleft {a1} [ Z & - & \sum_k A & × &
+ \lleft {b1} ( B & + & C^X \rright {b1} ) \rright {a1} ] \\[3ex]
+ \lleft {a2} [ P & × & \lleft {b2} ( U & + &
+ \int_R V \rright {b2} ) & - & W^Y \rright {a2} ]
+ \end{array} $$
+\end{exec}
+A first step, but not the expected result. It seems that we have to look at it more closely and sort out which parts of which cells actually belong to the same groups. But there is in fact a simple solution that doesn't require any deeper thinking or sorting out. We just need to connect the end of each cell to the beginning of the next one. We can do this by inserting invisible delimiters.
+\begin{code}
+ $$ \begin{array}{dsdsdsd}
+ \lleft[ Z \mright{c1}. & - & \mleft{c1}. \sum_k A \mright{c2}.
+ & × & \mleft{c2}. \lleft( B \mright{c3}. & + &
+ \mleft{c3}. C^X \rright ) \rright ] \\[3ex]
+ \lleft[ P \mright{d1}. & × & \mleft{d1}. \lleft ( U \mright{d2}.
+ & + & \mleft{d2}. \int_R V \rright ) \mright{d3}. & - &
+ \mleft{d3}. W^Y \rright ] \end{array} $$
+\end{code}
+\begin{exec}
+ $$ \begin{array}{dsdsdsd}
+ \lleft[ Z \mright{c1}. & - & \mleft{c1}. \sum_k A \mright{c2}.
+ & × & \mleft{c2}. \lleft( B \mright{c3}. & + &
+ \mleft{c3}. C^X \rright ) \rright ] \\[3ex]
+ \lleft[ P \mright{d1}. & × & \mleft{d1}. \lleft ( U \mright{d2}.
+ & + & \mleft{d2}. \int_R V \rright ) \mright{d3}. & - &
+ \mleft{d3}. W^Y \rright ] \end{array} $$
+\end{exec}
+This is the desired output, but the code starts to look complicated. But it is a simple rule, so there should be a way to automate it. Can we include the invisible linking delimiters into the cell template? The problem is that we need a unique tag for each transition from one cell to the next. For this purpose, two macros are provided.
+
+\comm{"\pushdelimiter"} inserts an invisible closing delimiter with an automatically generated unique tag.
+
+\comm{"\pulldelimiter"} inserts an invisible opening delimiter with the previously generated tag.
+
+The generated tags are stored on a stack, so that multiple push and pull operations can be nested. They are globally unique and survive the current \TeX\ group. If we include the macros into the cell template, they connect each cell to the next one. We can also define templates that start a new sequence or end the current one. As Lua\TeX\ allows this, let's use Greek letters for the beginning, the middle, and the end of a row.
+\begin{code*}
+ \newcolumntype{α}{ >{ \displaystyle } c <{ \pushdelimiter } }
+ \newcolumntype{μ}{ >{ \displaystyle \pulldelimiter } c <{ \pushdelimiter } }
+ \newcolumntype{ω}{ >{ \displaystyle \pulldelimiter } c }
+\end{code*}
+ \newcolumntype{α}{ >{ \displaystyle } c <{ \pushdelimiter } }
+ \newcolumntype{μ}{ >{ \displaystyle \pulldelimiter } c <{ \pushdelimiter } }
+ \newcolumntype{ω}{ >{ \displaystyle \pulldelimiter } c }
+Now the code is as simple as it was in the beginning. We can just ignore the cell boundaries and write the formula as if it was a single line in "$$"s, or whatever single line math environment.
+\begin{code}
+ $$ \begin{array}{αsμsμsω}
+ \lleft [ Z & - & \sum_k A & × &
+ \lleft ( B & + & C^X \rright ) \rright ] \\[3ex] %%%
+ \lleft [ P & × & \lleft ( U & + &
+ \int_R V \rright ) & - & W^Y \rright ]
+ \end{array} $$
+\end{code}
+\begin{exec}\.[-4ex]
+ $$ \begin{array}{αsμsμsω}
+ \lleft [ Z & - & \sum_k A & × &
+ \lleft ( B & + & C^X \rright ) \rright ] \\[3ex] %%%
+ \lleft [ P & × & \lleft ( U & + &
+ \int_R V \rright ) & - & W^Y \rright ]
+ \end{array} $$
+\end{exec}
+If you want the formula to continue on the next line with pending delimiters, you can include the push and pull macros into the line separator as well.
+\begin{code}
+ \newcommand\continue[1][0pt]{ \pushdelimiter \\[#1] \pulldelimiter }
+ $$ \begin{array}{αsμsμsω}
+ \lleft \{ Z & - & \sum_k \lleft ( A & × &
+ B^3 \rright ) & + & \continue[3ex] %%%
+ & + & \lleft ( U & + &
+ \int_R V \rright ) & - & W^Y \rright \}
+ \end{array} $$
+\end{code}
+\begin{exec}
+ \newcommand\continue[1][0pt]{ \pushdelimiter \\[#1] \pulldelimiter }
+ $$ \begin{array}{αsμsμsω}
+ \lleft \{ Z & - & \sum_k \lleft ( A & × &
+ B^3 \rright ) & + & \continue[3ex] %%%
+ & + & \lleft ( U & + &
+ \int_R V \rright ) & - & W^Y \rright \}
+ \end{array} $$
+\end{exec}
+A construction like this can also be used with \p{amsmath} environments like "multiline" or "split" , which require explicit line breaks to be inserted into long formulas. The "longmath" environment described in section~\ref{multiline} provides an alternative method to typeset long formulas without the need to specify the breakpoints manually.
+
+\section{Automatic Nesting}
+
+It is possible to select the kinds of brackets used as outer delimiters automatically depending on the nesting level. This might not add much value for formulas that are explicitly written into the document. But it could be useful for semi-automatically produced formulas, where the author doesn't have direct control over individual symbols.
+
+The basic idea is to define a collection of delimiter pairs, and let \TeX\ pick them according to the current nesting level.
+
+\comm{"\autodelimiters{"°sample°"}"} defines a collection of nested delimiters pairs.
+
+The °sample° must be an otherwise empty, nested structure of delimiters enclosing an asterisk "*" as a single object.
+ \autodelimiters{ \lfloor [ \{ ( * ) \} ] \rceil }
+\begin{code*}
+ \autodelimiters{ \lfloor [ \{ ( * ) \} ] \rceil }
+\end{code*}
+Once this is set up, you can pick one of them by using "*" as a variable delimiter.
+\begin{code}
+ The corrected Sellmann-Yokuzi contribution to the
+ Johansson Entropy is given by
+ $$ S^\top = k · \lleft* A + \lleft* B_C +
+ \lleft* D^E \rright* ^ 2 \rright*
+ ^ { \lleft* 3+κ \rright* ^2 } + F \rright* $$
+\end{code}
+\begin{exec}
+ The corrected Sellmann-Yokuzi contribution to the
+ Johansson Entropy is given by
+ $$ S^\top = k · \lleft* A + \lleft* B_C +
+ \lleft* D^E \rright* ^ 2
+ \rright* ^ { \lleft* 3+κ \rright* ^2 } + F \rright* $$
+\end{exec}
+If the nesting level exceeds the number of sample pairs provided, the outermost pair is repeated.
+\begin{code+}
+ $$ \lleft* A + \lleft* B + \lleft* C + \lleft*
+ D + \frac{ \lleft* X + Y \rright* × Z }{ W }
+ \rright* · E \rright* · F \rright* · G \rright* $$
+\end{code+}
+\begin{exec}\:
+ $$ \lleft* A + \lleft* B + \lleft* C + \lleft*
+ D + \frac{ \lleft* X + Y \rright* × Z }{ W }
+ \rright* · E \rright* · F \rright* · G \rright* $$
+\end{exec}
+If variable delimiters are mixed with explicit delimiters, there is an interaction between them. If you use one of the pairs from the collection, it is treated as if it was inserted automatically. Any enclosing bracket will be the next one from the collection. Let's define a larger collection to demonstrate this.
+ \autodelimiters{ < \lceil \lfloor [ \{ ( * ) \} ] \rfloor \rceil > }
+\begin{code*}
+ \autodelimiters{ < \lceil \lfloor [ \{ ( * ) \} ] \rfloor \rceil > }
+\end{code*}
+This is what we get with automatic brackets only. The numbers indicate the actually used level. A negative value for "\delimitershortfall" makes the bracket size increase linearly with the nesting level.
+\begin{code}
+ \delimitershortfall -2pt
+ $$ \lleft* 5 + \lleft* 4 + \lleft* 3
+ + \lleft* 2 + \lleft* 1 + A \rright* + B \rright*
+ + C \rright* + D \rright* + E \rright* $$
+\end{code}
+\begin{exec}
+ \delimitershortfall -2pt
+ $$ \lleft* 5 + \lleft* 4 + \lleft* 3
+ + \lleft* 2 + \lleft* 1 + A \rright* + B \rright*
+ + C \rright* + D \rright* + E \rright* $$
+\end{exec}
+If we replace the second level by explicit square brackets, these are identified as the third level, and the counting continues from there.
+\begin{code}
+ $$ \lleft* 6 + \lleft* 5 + \lleft* 4
+ + \lleft[ 3 + \lleft* 1 + A \rright* + B \rright]
+ + C \rright* + D \rright* + E \rright* $$
+\end{code}
+\begin{exec}\:
+ \delimitershortfall -2pt
+ $$ \lleft* 6 + \lleft* 5 + \lleft* 4
+ + \lleft[ 3 + \lleft* 1 + A \rright* + B \rright]
+ + C \rright* + D \rright* + E \rright* $$
+\end{exec}
+And here the counting restarts further out.
+\begin{code}
+ $$ \lleft* 2 + \lleft( 1 + \lleft* 3
+ + \lleft* 2 + \lleft* 1 + A \rright* + B \rright*
+ + C \rright* + D \rright) + E \rright* $$
+\end{code}
+\begin{exec}\:
+ \delimitershortfall -2pt
+ $$ \lleft* 2 + \lleft( 1 + \lleft* 3
+ + \lleft* 2 + \lleft* 1 + A \rright* + B \rright*
+ + C \rright* + D \rright) + E \rright* $$
+\end{exec}
+A pair that is not in the collection is ignored and the counting continues at the next level.
+\begin{code}
+ $$ \lleft* 4 + \lleft* 3 + \lleft\uparrow 0
+ + \lleft* 2 + \lleft* 1 + A \rright* + B \rright*
+ + C \rright\downarrow + D \rright* + E \rright* $$
+\end{code}
+\begin{exec}\:
+ \delimitershortfall -2pt
+ $$ \lleft* 4 + \lleft* 3 + \lleft\uparrow 0
+ + \lleft* 2 + \lleft* 1 + A \rright* + B \rright*
+ + C \rright\downarrow + D \rright* + E \rright* $$
+\end{exec}
+If variable delimiters are tagged and aligned, this also applies to the chosen delimiter from the collection. Here is a typical example. Without tagging, we get this.
+\begin{code}
+ $$ \lleft * \frac{ n+1 }{ n^2 } \rright * ^2
+ + \lleft * \frac{ n }{ \lleft * n - 1 \rright *^2 } %%%
+ \rright * ^2 $$
+\end{code}
+\begin{exec}\:
+ $$ \lleft * \frac{ n+1 }{ n^2 } \rright * ^2
+ + \lleft * \frac{ n }{ \lleft * n - 1 \rright *^2}
+ \rright * ^2 $$
+\end{exec}
+If the outer brackets are aligned, both become second level brackets.
+\begin{code}
+ $$ \lleft {qx} * \frac{ n+1 }{ n^2 } \rright * ^2
+ + \lleft {qx} * \frac{ n }{ \lleft * n - 1 \rright *^2}
+ \rright * ^2 $$
+\end{code}
+\begin{exec}\:
+ $$ \lleft {qx} * \frac{ n+1 }{ n^2 } \rright * ^2
+ + \lleft {qx} * \frac{ n }{ \lleft * n - 1 \rright *^2}
+ \rright * ^2 $$
+\end{exec}
+As a last challenge, let's consider the array from the previous section with a slight modification. If we replace all brackets with variable delimiters, but do not link the cells, we get this.
+\begin{code}
+ $$ \begin{array}{dsdsdsd}
+ \lleft * Z & - & \sum_k A & × &
+ \lleft * B & + & C^X \rright * \rright * \\[3ex] %%%
+ \lleft * P & × & \lleft * \lleft * U^2 \rright * & + &
+ \int_R V \rright * & - & W^Y \rright *
+ \end{array} $$
+\end{code}
+\begin{exec}\.[-4ex]
+ $$ \begin{array}{dsdsdsd}
+ \lleft * Z & - & \sum_k A & × &
+ \lleft * B & + & C^X \rright * \rright * \\[3ex] %%%
+ \lleft * P & × & \lleft * \lleft * U^2 \rright * & + &
+ \int_R V \rright * & - & W^Y \rright *
+ \end{array} $$
+\end{exec}
+As expected, only the brackets within each cell are set up properly, but with no relation to those in the other cells. If we use the version with linked cells, we get the intended result.
+\begin{code}
+ $$ \begin{array}{αsμsμsω}
+ \lleft * Z & - & \sum_k A & × &
+ \lleft * B & + & C^X \rright * \rright * \\[3ex] %%%
+ \lleft * P & × & \lleft * \lleft * U^2 \rright * & + &
+ \int_R V \rright * & - & W^Y \rright *
+ \end{array} $$
+\end{code}
+\begin{exec}\.[-4ex]
+ \delimiterprefix{A}
+ $$ \begin{array}{αsμsμsω}
+ \lleft * Z & - & \sum_k A & × &
+ \lleft * B & + & C^X \rright * \rright * \\[3ex] %%%
+ \lleft * P & × & \lleft * \lleft * U^2 \rright * & + &
+ \int_R V \rright * & - & W^Y \rright *
+ \end{array} $$
+\end{exec}
+
+
+\section{Multi Line Formulas}
+\label{multiline}
+Unlike the \TeX\ primitives, the \p{longmath} macros do not create a subformula that cannot be broken into lines. In inline math mode, long formulas with delimiter groups can extend over several lines just like ordinary text.
+\begin{code*}
+ \newcommand\polyA{ x^{10} + x^9 - x^8 + 2 x^6 + 9 x^5 + 2 x^4 - 4 x^3 - 2 x^2 + 6 x + 4 }
+ \newcommand\polyB{ x^4 - x^3 + x + 2 } \newcommand\polyC{ x^6 + 2 x^5 + x^4 - 2 x^2 + 2 x + 2 }
+\end{code*}
+ \newcommand\polyA{ x^{10} + x^9 - x^8 + 2 x^6 + 9 x^5 + 2 x^4 - 4 x^3 - 2 x^2 + 6 x + 4 }
+ \newcommand\polyB{ x^4 - x^3 + x + 2 } \newcommand\polyC{ x^6 + 2 x^5 + x^4 - 2 x^2 + 2 x + 2 }
+\begin{code+}
+ Factorising the polynomial
+ $ P\lleft( \polyA \rright) $
+ gives $ P \lleft( \polyB \rright)
+ · P \lleft( \polyC \rright) $. %%%
+\end{code+}
+\begin{exec*}\openup 1pt
+ Factorising the polynomial
+ $ P\lleft( \polyA \rright) $
+ gives $ P \lleft( \polyB \rright)
+ · P \lleft( \polyC \rright) $.
+\end{exec*}
+There is no interference between nested delimiter groups and logical \TeX\ groups. Delimiters can be placed deep inside "\begingroup"-"\endgroup" constructs, and they do not create such groups themselves. The following example uses the \p{multido} package. It wouldn't work with "\left", "\right" and "\middle".
+\begin{code}
+ Applying the Hofstadt Zebelajev theorem, we conclude that
+ $ \lleft( \hat A_0
+ \multido{\i=1+1}{10}{ \mmbin \uparrow \hat A_{\i} }
+ \rright) \in \lleft[\mathcal{H}^\infty\rright]^{11}$.
+\end{code}
+\begin{exec*}\openup 2pt
+ Applying the Hofstadt Zebelajev theorem, we conclude that
+ $ \lleft( \hat A_0
+ \multido{\i=1+1}{10}{ \mmbin \uparrow \hat A_{\i} }
+ \rright) \in \lleft[\mathcal{H}^\infty\rright]^{11}$.
+\end{exec*}
+For multi line formulas in display mode, \p{longmath} provides a special environment.
+
+\comm{"\begin{longmath}["°align°"]{"°width°"}"} begins a multi line expression in display mode.
+
+\comm{"\end{longmath}"} ends a multi line expression in display mode.
+
+It works like the "minipage" environment. You have to specify the °width° of the box the formula will by placed into, and how to °align° it vertically with the rest of the displayed equation. The optional alignment argument is either "c" for centre, which is the default, or "t" for top or "b" for bottom.
+\begin{code*}
+ \newcommand\harm[2]{ \frac{1}{#1} \mmultido{\n=#1+1}{#2}{ + \frac{1}{\n} } }
+\end{code*}
+ \newcommand\harm[2]{ \frac{1}{#1} \mmultido{\n=#1+1}{#2}{ + \frac{1}{\n} } }
+\begin{code+}
+ The harmonic series starts with
+ $$ Q = \begin{longmath}[t]{70mm}
+ 1 + \harm{2}{21} + \cdots %%%
+ \end{longmath} $$
+ and diverges very slowly.
+\end{code+}
+\begin{exec}
+ The harmonic series starts with
+ $$ Q = \begin{longmath}[t]{70mm}
+ 1 + \harm{2}{21} + \cdots
+ \end{longmath} $$
+ and diverges very slowly.
+\end{exec}
+No markers are needed to force line breaks at particular points. \TeX's line breaking algorithm is used to find the ``best'' breakpoints. If you're familiar with it, you can insert penalties into the formula to optimize it.
+
+The °width° can be specified either as an absolute dimension or as fraction of the available width of the display.
+\begin{code+}
+ One can easily prove that
+ $$ \begin{longmath}[b]{0.7}
+ 1 + \harm{2}{21} + \cdots
+ \end{longmath} \to \infty, $$
+ which comes as a surprise for some students.
+\end{code+}
+\begin{exec}
+ One can easily prove that
+ $$ \begin{longmath}[b]{0.7}
+ 1 + \harm{2}{21} + \cdots
+ \end{longmath} \to \infty, $$
+ which comes as a surprise for some students.
+\end{exec}
+As formulas typically have fewer possible breakpoints than ordinary text, no attempt is made to justify the lines. Instead, some flexible glue is inserted at both sides of each line to avoid extreme stretching or shrinking. Only the beginning of the first line and the end of the last line are forced to align with the boundary of the box specified by the °width° parameter. If the whole formula fits into a single line, a box with only the required width is created. This ensures that, regardless of the number of lines, a top aligned "longmath" box always aligns neatly with an expression to the left, and the formula in a bottom aligned "longmath" box can be continued to the right.
+
+Since the "longmath" environment creates a vertical box, you can have several of them in a single display.
+\begin{code+}
+ $$ \lleft[ \begin{longmath}[c]{0.33}
+ \polyA
+ \end{longmath} \rright] =
+ \lleft[ \begin{longmath}[c]{0.33}
+ \lleft( \polyB \rright) \cdot %%%
+ \lleft( \polyC \rright)
+ \end{longmath} \rright] $$
+\end{code+}
+\begin{exec}
+ $$ \lleft[ \begin{longmath}[c]{0.33}
+ \polyA
+ \end{longmath} \rright] =
+ \lleft[ \begin{longmath}[c]{0.33}
+ \lleft( \polyB \rright) \cdot
+ \lleft( \polyC \rright)
+ \end{longmath} \rright] $$
+\end{exec}
+To make this look a bit nicer, you can add some extra space to the width of the box and arrange the lines from the top left to the bottom right. If the °width° parameter is given as °linewidth°"+"°extrawidth°, the lines are stacked so that the total width of the box is the sum of °linewidth° and °extrawidth°. Both values can be given as absolute dimensions or as fractions of the total display width.
+\begin{code+}
+ $$ \lleft[ \begin{longmath}[c]{0.33+0.07}
+ \polyA
+ \end{longmath} \rright] =
+ \lleft[ \begin{longmath}[c]{0.33+0.0.7}
+ \lleft( \polyB \rright) \cdot %%%
+ \lleft( \polyC \rright)
+ \end{longmath} \rright] $$
+\end{code+}
+\begin{exec}
+ $$ \lleft[ \begin{longmath}[c]{0.33+0.07}
+ \polyA
+ \end{longmath} \rright] =
+ \lleft[ \begin{longmath}[c]{0.33+0.07}
+ \lleft( \polyB \rright) \cdot
+ \lleft( \polyC \rright)
+ \end{longmath} \rright] $$
+\end{exec}
+A "longmath" box can replace any kind of subformula. Just specify the maximal width the subformula is allowed to have. If it fits into this width, it will be typeset normally. Otherwise, it is split into several lines.
+\begin{code*}
+ $$ \frac{ \begin{longmath}{40mm+10mm} \polyA \end{longmath} }
+ { \begin{longmath}{40mm+10mm} \polyB \end{longmath} }
+ = \begin{longmath}{40mm+10mm} \polyC \end{longmath} $$
+\end{code*}
+\begin{exec}
+ $$ \frac{ \begin{longmath}{40mm+10mm} \polyA \end{longmath} }
+ { \begin{longmath}{40mm+10mm} \polyB \end{longmath} }
+ = \begin{longmath}{40mm+10mm} \polyC \end{longmath} $$
+\end{exec}
+\begin{code*}
+ \newcommand\polyX{ x^5 - x^4 + x^3 - x^2 + x - 1 }
+ \newcommand\polyY{ x^{10} - 2 x^9 + 3 x^8 - 4 x^7 + 5 x^6 - 6 x^5 + 5 x^4 - 4 x^3 + 3 x^2 - 2 x + 1 }
+ $$ \sqrt{ \begin{longmath}{40mm+10mm} \polyY \end{longmath} }
+ = \begin{longmath}{40mm+10mm} \polyX \end{longmath} $$
+\end{code*}
+\begin{exec}
+ \newcommand\polyX{ x^5 - x^4 + x^3 - x^2 + x - 1 }
+ \newcommand\polyY{ x^{10} - 2 x^9 + 3 x^8 - 4 x^7 + 5 x^6 - 6 x^5 + 5 x^4 - 4 x^3 + 3 x^2 - 2 x + 1 }
+ $$ \sqrt{ \begin{longmath}{50mm+10mm} \polyY \end{longmath} }
+ = \begin{longmath}{50mm+10mm} \polyX \end{longmath} $$
+\end{exec}
+
+There is also a smarter "longmath*" environment, which sets the width of the box ``intelligently'', so that the formula is split into equally long segments and the available space is used efficiently. The idea is to specify a maximal width, then let \TeX\ find the number of lines needed, and adapt the width to the total length divided by the number of lines. This will usually result in a box that is slightly shorter than the given width.
+
+Whether this really succeeds depends on a sufficient number of possible breakpoints and stretchable and shrinkable glue in the formula, so that \TeX's algorithm can actually split it into equally long parts. Take it with a grain of salt and don't mind if it doesn't work properly in difficult cases. As an example, here is what we get without this feature.
+\begin{code*}
+ To prove it, observe that each bracket is larger than $\frac 12$:
+ $$ \lleft\{ \begin{longmath}[c]{0.8+0.1}
+ \lleft( 1 + \frac{1}{2} \rright) + \lleft( \harm{3}{1} \rright) + \lleft( \harm{5}{3} \rright) +
+ \lleft( \harm{9}{7} \rright) + \lleft( \harm{17}{15} \rright) + \lleft( \harm{33}{3}
+ + \cdots \rright. \end{longmath} \rright\} $$
+\end{code*}
+\begin{exec}
+ To prove it, observe that each bracket is larger than $\frac 12$:
+ $$ \lleft\{ \begin{longmath}[c]{0.8+0.1}
+ \lleft( 1 + \frac{1}{2} \rright) + \lleft( \harm{3}{1} \rright) + \lleft( \harm{5}{3} \rright) +
+ \lleft( \harm{9}{7} \rright) + \lleft( \harm{17}{15} \rright) + \lleft( \harm{33}{3}
+ + \cdots \rright. \end{longmath} \rright\} $$
+\end{exec}
+If we replace "longmath" by "longmath*", but stick to the same width specification, we get this.
+\begin{exec}
+ There is even a slightly ``shorter'' proof:
+ $$ \lleft\{ \begin{longmath*}[c]{0.8+0.1}
+ \lleft( 1 + \frac{1}{2} \rright) + \lleft( \harm{3}{1} \rright) + \lleft( \harm{5}{3} \rright) +
+ \lleft( \harm{9}{7} \rright) + \lleft( \harm{17}{15} \rright) + \lleft( \harm{33}{3}
+ + \cdots \rright. \end{longmath*} \rright\} $$
+\end{exec}
+The spacing between the lines is controlled by a dimension register that can be adjusted.
+
+\comm{"\longmathlinesep"} dimension to be added to the line skip in the "longmath" environment (default \the\longmathlinesep).
+
+This dimension is added to the current "\baselineskip" and "\lineskip" when the content of the box is split into lines and placed in a vertical box, basically using \TeX's "\openup" macro. Some additional effort is made to adjust the line spacing if the "longmath" environment is placed in a sub- or superscript as in this final example.
+\begin{code*}
+ $$ \Omega = \lleft| \begin{longmath*}[c]{0.6+0.1}
+ \mathscr{Q} + \lleft[ \lleft( T · H · I^{\lleft(a+b\rright)^4} · S \rright)
+ + I · S + A + \lleft\{ V · E^{\lleft(a^2+2ab+b^2\rright)^2} · R · Y + L · O · N · G
+ + \lleft[ \int\limits_I^N T · \lleft( E^{G^R} \rright) · A_L \rright]
+ - \frac{ D^I · V^I }{ D · E · D } \mmbin / \lleft\{ B · Y
+ + A × \sum\limits_{-\infty}^{\infty} O^F \lleft< S^c_a L^a_r \mmiddle | \prod\nolimits^s \rright>
+ \rright\} \rright\} \rright] + C^\infty \end{longmath*} \rright|
+ ^ { \lleft( \begin{longmath*}[c]{25mm+5mm} a+b+c+d+e+f+g+h+i+j+k+l+m \end{longmath*} \rright) } $$
+\end{code*}
+\begin{exec}
+ \ignorelimits
+ $$ \Omega = \lleft| \begin{longmath*}[c]{0.6+0.1}
+ \mathscr{Q} + \lleft[ \lleft( T · H · I^{\lleft(a+b\rright)^4} · S \rright)
+ + I · S + A + \lleft\{ V · E^{\lleft(a^2+2ab+b^2\rright)^2} · R · Y + L · O · N · G
+ + \lleft[ \int\limits_I^N T · \lleft( E^{G^R} \rright) · A_L \rright]
+ - \frac{ D^I · V^I }{ D · E · D } \mmbin / \lleft\{ B · Y
+ + A × \sum\limits_{-\infty}^{\infty} O^F \lleft< S^c_a L^a_r \mmiddle | \prod\nolimits^s \rright>
+ \rright\} \rright\} \rright] + C^\infty \end{longmath*} \rright|
+ ^ { \lleft( \begin{longmath*}[c]{25mm+5mm} a+b+c+d+e+f+g+h+i+j+k+l+m \end{longmath*} \rright) } $$
+\end{exec}
+
+
+\end{document}
diff --git a/macros/luatex/latex/longmath/longmath.lua b/macros/luatex/latex/longmath/longmath.lua
new file mode 100644
index 0000000000..56c64c8cdb
--- /dev/null
+++ b/macros/luatex/latex/longmath/longmath.lua
@@ -0,0 +1,428 @@
+--
+-- longmath.lua is part of longmath version 0.1.
+--
+-- (c) 2024 Hans-Jürgen Matschull
+--
+-- This work may be distributed and/or modified under the
+-- conditions of the LaTeX Project Public License, either version 1.3
+-- of this license or (at your option) any later version.
+-- The latest version of this license is in
+-- http://www.latex-project.org/lppl.txt
+-- and version 1.3 or later is part of all distributions of LaTeX
+-- version 2005/12/01 or later.
+--
+-- This work has the LPPL maintenance status 'maintained'.
+--
+-- The Current Maintainer of this work is Hans-Jürgen Matschull
+--
+-- see README for a list of files belonging to longmath.
+--
+
+-- Attribute numbers.
+local attr_info = luatexbase.registernumber( 'longmath@info' )
+local attr_limits = luatexbase.registernumber( 'longmath@limits' )
+
+-- Character for tagging parent groups.
+local parent = '+'
+
+
+-- Check for specific node types.
+local ntypes = node.types()
+local function is_noad( nd ) return nd and ntypes[ nd.id ] == 'noad' and nd.subtype end
+local function is_fence( nd ) return nd and ntypes[ nd.id ] == 'fence' and nd.subtype end
+local function is_hlist( nd ) return nd and ntypes[ nd.id ] == 'hlist' and nd.subtype end
+local function is_style( nd ) return nd and ntypes[ nd.id ] == 'style' and nd.subtype end
+local function is_whatsit( nd ) return nd and ntypes[ nd.id ] == 'whatsit' and nd.subtype end
+
+-- Read a command whatsit.
+local function get_comm( nd )
+ if is_whatsit( nd ) == 3 and node.has_attribute( nd, attr_info ) then
+ local comm, data = nd.data:match( '^([^:]+):?(.*)$' )
+ if data == '' then data = nil end
+ return comm, data, node.get_attribute( nd, attr_info )
+ end
+end
+
+-- Iterator over all fields of a node to be copied.
+-- Returns the field name and a boolean indicating if a deep copy is needed.
+-- If the node already has fixed dimensions, its head field is ignored.
+-- If the limits attribute is set on a large operator, scripts are ignored in display style.
+local function fields( nd, disp )
+ local list, oper = {}, is_noad( nd )
+ for _, fld in ipairs( node.fields( nd.id, nd.subtype ) ) do
+ list[fld] = not not node.is_node( nd[fld] )
+ end
+ list.id, list.subtype, list.attr = nil, nil, list.attr and false
+ if list.height ~= nil and list.depth ~= nil then list.head = nil end
+ if ( disp and oper == 1 or oper == 2 ) and node.has_attribute( nd, attr_limits ) then
+ list.sub, list.sup = nil, nil
+ end
+ return pairs( list )
+end
+
+-- Tables representing special delimiters.
+local delim_null = { small_fam = 0, small_char = 0, large_fam = 0, large_char = 0 }
+local delim_auto = { small_fam = 0xF, small_char = 0xEF, large_fam = 0xE, large_char = 0xFE }
+
+-- Check if two delimiters (either real nodes or tables) are equal.
+local function delim_eq( da, db )
+ for i in pairs( delim_null ) do if da[i] ~= db[i] then return false end end
+ return true
+end
+
+-- Make the delimiter node or table da equal to db.
+local function delim_set( da, db )
+ for i in pairs( delim_null ) do da[i] = db[i] end
+ return da
+end
+
+-- Metatable for delimiter sequences. Internalises the overflow check.
+local meta_delims = {}
+function meta_delims.__index( tab, ix )
+ if type( ix ) ~= 'number' then return nil end
+ if ix > #tab then ix = #tab end
+ if ix < 1 then ix = 1 end
+ return rawget( tab, ix )
+end
+
+-- Stack to store auto delimiters.
+-- The last entry in this table is the current one.
+-- It contains two tables "opn" and "cls".
+-- Each contains a sequence of delimiter data for each level.
+local delimiters = {}
+
+-- Scans a sample of auto delimiters.
+-- Inserts the opening and closing delimites into the "opn" and "cls" tables in "tab".
+local function scan_sample( head, tab )
+ local opn, cls
+ for pos in node.traverse( head ) do
+ if is_fence( pos ) == 1 then opn = delim_set( {}, pos.delim )
+ elseif is_fence( pos ) == 3 then cls = delim_set( {}, pos.delim )
+ elseif is_noad( pos ) == 9 then scan_sample( pos.nucleus.head, tab ) end
+ end
+ if opn and cls then table.insert( tab.opn, opn ) table.insert( tab.cls, cls ) end
+end
+
+-- This function is triggered by a "set" command.
+-- The "sample" is a node containing a nested list if delimiter groups.
+-- Push a new item on the stack and scan the sample.
+local function set_auto( sample )
+ local tab = { opn = setmetatable( {}, meta_delims ), cls = setmetatable( {}, meta_delims ) }
+ table.insert( delimiters, tab )
+ scan_sample( sample, tab )
+end
+
+-- This function is triggered by a "res" command.
+-- Remove the topmost item from the stack.
+local function res_auto()
+ table.remove( delimiters )
+end
+
+-- Adapt a fake delimiter group to the given data.
+-- "head" is the node containing the "\math___{}" object.
+-- "level" is the nesting level to be used if this is an auto delimiter.
+-- "ht" and "dp" are the height and depth of the content of the group.
+-- Returns the level if this was an auto delimiter
+-- or a fixed one equal to the auto delimiter of some level.
+local function set_delim( head, level, ht, dp )
+ local type, delim, hbox = head.subtype == 6 and 'opn' or head.subtype == 7 and 'cls'
+ while is_noad( head ) do
+ node.unset_attribute( head, attr_info ) head = head.nucleus
+ node.unset_attribute( head, attr_info ) head = head.head
+ end
+ for pos in node.traverse( head ) do
+ node.unset_attribute( pos, attr_info )
+ if is_fence( pos ) == 3 then delim = pos.delim end
+ if is_noad( pos ) == 0 then hbox = pos.nucleus.head end
+ end
+ if not ( delim and hbox ) then return end
+ local auto = delim_eq( delim, delim_auto )
+ local brks = delimiters[#delimiters]
+ if brks then brks = brks[type] end
+ if type and auto and brks then
+ delim_set( delim, brks[level] )
+ elseif type and brks then
+ level = nil
+ for l = 1, #brks do if delim_eq( brks[l], delim ) then level = l break end end
+ else
+ level = nil
+ end
+ local scale = node.get_attribute( hbox, attr_info )
+ hbox.height, hbox.depth = ht * scale // 1000, dp * scale // 1000
+ if delim_eq( delim, delim_null ) then hbox.width = hbox.width * 2 end
+ return level
+end
+
+-- This creates a deep copy of the node list from start to stop (inclusive).
+-- Ignores whatsits and the content of nodes that have fixed dimension.
+-- Ignores limits of large operators if flagged and "disp" is true.
+-- Ignores nodes that have the info attribute set. These are unprocessed delimiters.
+-- Tries to keep track of the current math style.
+local function copy_list( start, stop, disp )
+ local old, new, copy, last = start
+ while old do
+ if is_style( old ) then disp = old.style:match( 'display' ) end
+ local ign = is_noad( old ) and node.has_attribute( old, attr_info ) or is_whatsit( old )
+ if not ign then
+ new = node.new( old.id, old.subtype )
+ for field, deep in fields( old, disp ) do
+ if deep then
+ local disp = disp and ( field == 'nucleus' or field == 'head' or field == 'display' )
+ new[field] = copy_list( old[field], nil, disp )
+ else
+ new[field] = old[field]
+ end
+ end
+ if not copy then last, copy = new, new
+ else last, copy = new, node.insert_after( copy, last, new ) end
+ end
+ if old == stop then break end
+ old = node.next( old )
+ end
+ return copy
+end
+
+-- Creates a math style node.
+local function style_node( style )
+ local nd = node.new( "style" )
+ nd.style = style
+ return nd
+end
+
+-- Copies the node list from "start" to "stop" and packs it into a temporary hbox.
+-- Returns the height and depth of that box when typeset in "style".
+local function dimensions( start, stop, style )
+ local disp = style == 'display' or style == 0 or style == 1
+ local copy = copy_list( start, stop, disp )
+ if not copy then return 0, 0 end
+ if style then copy = node.insert_before( copy, copy, style_node( style ) ) end
+ local box = node.mlist_to_hlist( copy, 'text', false )
+ if not box then return 0, 0 end
+ local wd, ht, dp = node.dimensions( box )
+ node.flush_list( box )
+ return ht, dp
+end
+
+-- Table containing information read from the aux file.
+local oldgroups = {}
+-- Table containing information to be written to the aux file.
+local newgroups = {}
+-- Table containing tables of tags that are synonyms for the same group.
+local equals = {}
+
+-- Merge information of a group with the inforation from the aux file
+-- and store the new information to be written to the aux file.
+-- A group table contains the following information:
+-- "tags": table of tags attached to the group (as keys with value "true").
+-- "ht", "dp": dimensions
+-- "lv": the maximal level of automatic delimiters used for subgroups.
+local function max( a, b ) return a and b and math.max( a, b ) or a or b end
+local function merge( group )
+ local tags = group.tags
+ if not tags or not next( tags ) then return end
+ if next( tags, ( next( tags ) ) ) then table.insert( equals, tags ) end
+ for tag in pairs( tags ) do
+ local ngrp = newgroups[tag] or {}
+ newgroups[tag] = ngrp
+ ngrp.ht = max( ngrp.ht, group.ht )
+ ngrp.dp = max( ngrp.dp, group.dp )
+ ngrp.lv = max( ngrp.lv, group.lv )
+ end
+ for tag in pairs( tags ) do
+ local ogrp = oldgroups[tag]
+ if ogrp then
+ group.ht = max( group.ht, ogrp.ht )
+ group.dp = max( group.dp, ogrp.dp )
+ group.lv = max( group.lv, ogrp.lv )
+ end
+ end
+end
+
+
+-- Parses a math list and process all delimiters.
+-- "pargrp" is the parent group.
+-- "head" is the head of the math list.
+-- "open" is the opening delimiter if this is a recursive call.
+-- "pos" is the position where to start the scan.
+-- "style" is the current math style, if known.
+-- This will otherwise be set when th first command is detected.
+-- "group" is the group table for this group.
+-- Returns a modified head, and sets information in the parent group.
+-- "delims" collects all delimiters belonging to this group.
+-- When a longmath special is detected, it is removed and the next node is processed:
+-- set/res: set or reset auto delimiters.
+-- opn: an opening delimiter follows. The function is called recursively.
+-- cls: a closing delimiter follows. The current group ends
+-- mid: an inner delimiter follows.
+-- For every other node in the list, its subnodes are parsed recursively.
+local function parse( pargrp, head, open, pos, style, group )
+ if not head then return end
+ local delims, subgrp = { open }
+ group = group or {}
+ pos = pos or head
+ while pos do
+ local comm, data, info = get_comm( pos )
+ if comm then head, pos = node.remove( head, pos )
+ if comm == 'set' then set_auto( pos ) return head end
+ if comm == 'res' then res_auto() return head end
+ style = style or info
+ group.tags = group.tags or {}
+ if comm == 'opn' then
+ local subgrp = { tags = {} }
+ if data then subgrp.tags[data] = true end
+ head, pos = parse( group, head, pos, node.next( pos ), info, subgrp )
+ elseif comm == 'mid' then
+ if data then group.tags[data] = true end
+ table.insert( delims, pos )
+ pos = node.next( pos )
+ elseif comm == 'cls' then
+ if data then group.tags[data] = true end
+ table.insert( delims, pos )
+ break
+ end
+ else
+ for field, deep in fields( pos ) do if deep then
+ pos[field] = parse( group, pos[field] )
+ end end
+ pos = node.next( pos )
+ end
+ end
+ -- if this is an actual delimiter group, measure its demensions.
+ if group.tags then group.ht, group.dp = dimensions( open or head, pos, style ) end
+ -- merge information with aux file
+ merge( group )
+ -- finally set the delimiters and parse any scripts attached to them.
+ local level, auto = group.lv or 0
+ for _, del in ipairs( delims ) do
+ auto = set_delim( del, level+1, group.ht, group.dp ) or auto
+ del.sub = parse( group, del.sub )
+ del.sup = parse( group, del.sup )
+ end
+ if pos and not open then
+ -- this group started without an opening delimiter.
+ -- we use a tail call and proceed as if there was one and this function was called from a parent.
+ pargrp = { lv = auto or group.lv, tags = {} }
+ if group.tags then for tag in pairs( group.tags ) do pargrp.tags[tag..parent] = true end end
+ return parse( {}, head, nil, node.next( pos ), style, pargrp )
+ else
+ -- inform the parent about the auto delimiter level and any tags used in subgroups.
+ pargrp.lv = max( pargrp.lv, auto or group.lv )
+ if pargrp.tags and group.tags then for tag in pairs( group.tags ) do pargrp.tags[tag..parent] = true end end
+ return head, pos
+ end
+end
+
+-- Callback that scans a math list.
+local function scan( head, style, pen )
+ head = parse( {}, head, nil, nil, style )
+ return node.mlist_to_hlist( head, style, true )
+end
+luatexbase.add_to_callback( 'mlist_to_hlist', scan, 'longmath parse' )
+
+-- Creates a glue node.
+local function glue_node( wd )
+ local nd = node.new( "glue", 8 )
+ nd.width = wd
+ return nd
+end
+
+-- Applies a stepwise shift to the hlists in a vlist if "extra" is non-zero.
+local function shift( head )
+ local extra = tex.dimen['longmath@extra']
+ if extra == 0 then return true end
+ local lines = {}
+ for nd in node.traverse( head ) do
+ if is_hlist( nd ) == 1 then table.insert( lines, nd ) end
+ end
+ local n = #lines - 1
+ if n > 0 then
+ for i, nd in ipairs( lines ) do
+ nd.width = nd.width + extra
+ nd.head = node.insert_before( nd.head, nd.head, glue_node( (i-1) * extra / n ) )
+ nd.head = node.insert_after( nd.head, node.tail( nd.head ), glue_node( (n-i+1) * extra / n ) )
+ end
+ end
+ return true
+end
+luatexbase.add_to_callback( 'post_linebreak_filter', shift, 'longmath shift' )
+
+-- Table for functions to be called from TeX.
+longmath = {}
+
+-- Read data for a collection of identical groups.
+function longmath.read_group( tags, tab )
+ for _, tag in ipairs( tags ) do oldgroups[tag] = tab end
+end
+
+-- Check if a tag is not already in a set.
+-- If a subgroup or parent is in the set, inserts it into a the "loops" table.
+local loops = {}
+local loop_patt = '[' .. parent .. ']*$'
+local function is_new( tag, set )
+ if set[tag] then return false end
+ tag = tag:gsub( loop_patt, '' )
+ for tagg in pairs( set ) do if tag == tagg:gsub( loop_patt, '' ) then
+ loops[ tag:gsub( '@$', '' ) ] = true
+ return false
+ end end
+ return true
+end
+
+-- Given a set of tags attached to the same group,
+-- add all other tags attached to the same group to the set.
+local function find_eq( set )
+ local new = {}
+ for tag in pairs( set ) do
+ local app = ''
+ while true do
+ for _, w in ipairs( equals ) do if w[tag] then for tagg in pairs( w ) do
+ if is_new( tagg..app, set ) then new[tagg..app] = true end
+ end end end
+ if tag:sub(-1) ~= parent then break end
+ tag, app = tag:sub(1,-2), app .. parent
+ end
+ end
+ if not next( new ) then return set end
+ for tag in pairs( new ) do set[tag] = true end
+ return find_eq( set )
+end
+
+local loop_mess = '\\PackageWarningNoLine{longmath}{Cyclic delimiter group%s %s detected}'
+local data_mess = '\\PackageWarningNoLine{longmath}{Delimiters may have changed. Rerun to get them right}'
+
+-- Save all groups to the aux file.
+-- Tags that belong to the same group are collected into a single entry.
+function longmath.save_groups( aux )
+ local check, done = true, {}
+ for tag, grp in pairs( newgroups ) do if not done[tag] then
+ local tags, vals, eqs = {}, {}, find_eq( { [tag] = true } )
+ for tagg in pairs( eqs ) do
+ check, done[tagg] = check and oldgroups[tagg], true
+ table.insert( tags, string.format( '%q', tagg ) )
+ while tagg do
+ if newgroups[tagg] then
+ grp.ht, grp.dp = max( grp.ht, newgroups[tagg].ht ), max( grp.dp, newgroups[tagg].dp )
+ grp.lv = max( grp.lv, newgroups[tagg].lv )
+ end
+ tagg = tagg:match( '^(.*)[' .. parent .. ']$' )
+ end
+ end
+ for k, v in pairs( grp ) do
+ table.insert( vals, string.format( '%s=%d', k, v ) )
+ for tagg in pairs( eqs ) do check = check and v == oldgroups[tagg][k] end
+ end
+ tags, vals = table.concat( tags, ',' ), table.concat( vals, ',' )
+ texio.write( aux, string.format( '\\longmath@group{%s}{%s}\n', tags, vals ) )
+ end end
+ local lps = {}
+ for l in pairs( loops ) do
+ if #lps > 5 then table.insert( lps, '...' ) break end
+ table.insert( lps, l )
+ end
+ if #lps > 0 then
+ tex.print( string.format( loop_mess, #lps > 1 and 's' or '', table.concat( lps, ', ' ) ) )
+ end
+ if not check then tex.print( data_mess ) end
+end
+
+return
diff --git a/macros/luatex/latex/longmath/longmath.sty b/macros/luatex/latex/longmath/longmath.sty
new file mode 100644
index 0000000000..2b4848db3c
--- /dev/null
+++ b/macros/luatex/latex/longmath/longmath.sty
@@ -0,0 +1,223 @@
+%%
+%% longmath.sty is part of longmath version 0.1.
+%%
+%% (c) 2024 Hans-Jürgen Matschull
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status 'maintained'.
+%%
+%% The Current Maintainer of this work is Hans-Jürgen Matschull
+%%
+%% see README for a list of files belonging to longmath.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{longmath}[2024/03/25]
+
+\RequirePackage{luatexbase}
+
+% generic attribute used to mark special objects and send mathstyle to Lua.
+\newattribute\longmath@info
+
+% attribute to tag large operators.
+\newattribute\longmath@limits
+\def\ignorelimits{\setattribute{\longmath@limits}{1}}
+\def\includelimits{\unsetattribute{\longmath@limits}}
+
+% Save original primitives.
+\let \longmath@left \left
+\let \longmath@middle \middle
+\let \longmath@right \right
+
+\directlua{ require( 'longmath.lua' ) }
+
+% Registers.
+\newcount\delimiterscale \delimiterscale 902
+\newdimen\longmathlinesep \longmathlinesep 3pt
+
+\newif\iflongmath@star
+\newcount\longmath@lines
+\newdimen\longmath@extra
+\newdimen\longmath@width
+\newcount\longmath@xscale
+\newcount\longmath@yscale
+\newbox\longmath@box
+
+% The prefix for tags.
+\def\longmath@prefix{}
+\def\delimiterprefix#1{\def\longmath@prefix{#1}}
+
+% User macros
+\def\lleft {\longmath@delimA \mathopen {1000}{opn}}
+\def\rright {\longmath@delimA \mathclose {1000}{cls}}
+\def\mleft {\longmath@delimA \mathopen {1000}{mid}}
+\def\mright {\longmath@delimA \mathclose {1000}{mid}}
+\def\mmord {\longmath@delimA \mathord \delimiterscale {mid}}
+\def\mmbin {\longmath@delimA \mathbin \delimiterscale {mid}}
+\def\mmrel {\longmath@delimA \mathrel \delimiterscale {mid}}
+\def\mmpunct{\longmath@delimA \mathpunct \delimiterscale {mid}}
+\def\mmiddle{\longmath@delimA \mathinner \delimiterscale {mid}}
+\def\mmop {\longmath@delimA \mathop \delimiterscale {mid}}
+
+% This sets the math atom type, the default scale factor, and the command to be send to Lua,
+% then checks if a tag in {} is following.
+\def\longmath@delimA #1#2#3{\begingroup
+ \let\longmath@type #1 \longmath@xscale = #2 \relax \edef\longmath@comm{#3}
+ \futurelet \longmath@token \longmath@delimB }
+
+% If a tag is following, read it. Otherwise, skip this step.
+\def\longmath@delimB{\ifx\longmath@token\bgroup \expandafter \longmath@delimC
+ \else \expandafter \longmath@delimD \fi }
+
+% Read the tag, prepend the prefix and append a @, then add it to the command.
+\def\longmath@delimC #1{\edef\longmath@comm{\longmath@comm:\longmath@prefix#1@} \longmath@delimD }
+
+% Read the optional scale factor. If none is given, the scale is set to 0.
+\def\longmath@delimD #1{\afterassignment\longmath@delimE \longmath@yscale = 0#1}
+
+% This creates a \special whatsit with the command as string argument, followed by
+% a fake delimiter group with the requested delimiter always being the right one.
+% For the delimiter nodes, the info attribute is set to the current math style.
+% For the empty \hbox, it is set to the requested scale factor.
+\def\longmath@delimE{
+ \setattribute\longmath@info{\mathstyle} \special{\longmath@comm}
+ \longmath@type\bgroup \longmath@left . \aftergroup\egroup \aftergroup\endgroup
+ \begingroup \setattribute\longmath@info{\ifnum \longmath@yscale < 1 \longmath@xscale \else \longmath@yscale \fi}
+ \hbox to -\nulldelimiterspace{} \endgroup
+ \longmath@right }
+
+
+% magic number to identify the variable delimiter.
+\delcode`* = "FEFEFE %"
+
+% scanner to read the delimiter sample and create a nested \left-\right-group.
+\def\longmath@autoL #1#2\relax{\ifx *#1 \longmath@autoR #2\relax
+ \else \longmath@left #1 \longmath@autoL #2\relax \fi }
+\def\longmath@autoR #1#2\relax{\ifx *#1
+ \else \longmath@right #1 \longmath@autoR #2\relax \fi}
+
+% Read the sample provided by the user, insert a set command, and typeset it into a box.
+\def\autodelimiters #1{\begingroup \longmath@info = 0
+ \setbox\longmath@box\hbox{$ \special{set} \longmath@autoL #1***\relax $}
+ \endgroup\aftergroup\longmath@autoreset}
+
+% To make the setting local to the current TeX group, send a reset command at the end of the group.
+\def\longmath@autoreset{\begingroup \longmath@info = 0
+ \setbox\longmath@box\hbox{$ \special{res} {} $}
+ \endgroup}
+
+
+% Counter for automatic tag generation.
+\newcount\longmath@tagnum
+
+% Stack to store pushed tags, separated by spaces.
+\def\longmath@stack{}
+
+% Create a unique tag.
+\def\longmath@unique{
+ \global\advance\longmath@tagnum\@ne
+ \global\edef\longmath@stack{@\the\longmath@tagnum\space\longmath@stack}
+}
+
+% Create an invisible closing delimiter.
+\def\pushdelimiter{\longmath@unique
+ \expandafter\longmath@push\longmath@stack\relax}
+
+\def\longmath@push #1 #2\relax{\ifmmode\begingroup
+ \def\longmath@comm{mid:#1} \let\longmath@type\mathclose \longmath@yscale=1\relax
+ \longmath@delimE . \fi}
+
+% Create an invisible opening delimiter.
+\def\pulldelimiter{\ifx\longmath@stack\empty \longmath@unique \fi
+ \expandafter\longmath@pull\longmath@stack\relax}
+
+\def\longmath@pull #1 #2\relax{\global\edef\longmath@stack{#2}\ifmmode\begingroup
+ \def\longmath@comm{mid:#1} \let\longmath@type\mathopen \longmath@yscale=1\relax
+ \longmath@delimE . \fi}
+
+
+% Read width argument for the longmath environment.
+% Expects to numbers or dimensions terminted by +.
+% Numbers are multplied by \hsize.
+\def\longmath@gobble #1\relax{}
+\def\longmath@setwidth #1+#2+#3\relax{
+ \afterassignment\longmath@gobble \longmath@width = #1 \hsize \relax
+ \afterassignment\longmath@gobble \longmath@extra = #2 \hsize \relax }
+
+% Alignment for the longmath box.
+\let\longmath@align@t@\vtop
+\let\longmath@align@b@\vbox
+\let\longmath@align@c@\vcenter
+
+% Save and restore the current math style.
+\newcount\longmath@style
+\def\longmath@getstyle{\longmath@style = \mathstyle \relax}
+\def\longmath@setstyle{\ifcase\longmath@style \relax \displaystyle \or \crampeddisplaystyle \or
+ \textstyle \or \crampedtextstyle \or \scriptstyle \or \crampedscriptstyle \or
+ \scriptscriptstyle \or \crampedscriptscriptstyle \else \textstyle \fi }
+
+% Begin of longmath environment.
+% Set alignment and width and save the current math style.
+% Then start a horizontal box in math mode.
+\def\longmath@begin #1#2{\begingroup
+ \expandafter\let\expandafter\longmath@align\csname longmath@align@#1@\endcsname
+ \ifx \longmath@align\relax \let\longmath@align\longmath@align@c@ \fi
+ \longmath@getstyle \longmath@setwidth #2+0+\relax
+ %\rlap{\textcolor{green}{\rule{\longmath@width}{0.1pt}}\textcolor{yellow}{\rule{\longmath@extra}{0.1pt}}}
+ \setbox\longmath@box\hbox\bgroup $ \mathpenaltiesmode = 1 \longmath@setstyle
+}
+
+% End of longmath environment.
+% If the width of the box is smaller than the requsted width, just use it as is.
+% Otherwise, modify the requested width if the * version was used.
+% Then \unhbox the content into a paragraph with the requested width.
+% \box0 and \box1 are used to adapt the baselineskip to the math style.
+% \leftskip and \rightskip are set such that lines are centered but not justified.
+% The glue is removed from the beginning of the first line with \hskip,
+% and from the end of the last line with \parfilskip.
+% If \longmath@extra is non-zero, Lua will stack the lines of the paragraph.
+\def\longmath@end{$\egroup
+ \ifdim \wd\longmath@box < \dimexpr \longmath@width + \longmath@extra \relax
+ \longmath@extra = \z@
+ \box\longmath@box
+ \else
+ \iflongmath@star
+ \longmath@lines = \dimexpr ( 1.1\wd\longmath@box + 0.5\longmath@width ) / \longmath@width \relax
+ \longmath@width = \dimexpr ( 1.1\wd\longmath@box / \longmath@lines )
+ \fi
+ \setbox0\hbox{$1$}
+ \setbox1\hbox{$\longmath@setstyle 1$}
+ \longmath@align{\hsize\longmath@width
+ \baselineskip \dimexpr \baselineskip * \ht1 / \ht0 \relax \lineskip\z@ \lineskiplimit\z@
+ \openup \longmathlinesep
+ \leftskip 0pt plus 0.6\longmath@width
+ \rightskip 0pt plus 0.6\longmath@width
+ \parfillskip-\rightskip \noindent\hskip-\leftskip \unhbox\longmath@box}
+ \longmath@extra = \z@
+ \fi \endgroup
+}
+
+\newenvironment{longmath}[2][c]
+ {\longmath@starfalse\longmath@begin{#1}{#2}}{\longmath@end}
+\newenvironment{longmath*}[2][c]
+ {\longmath@startrue\longmath@begin{#1}{#2}}{\longmath@end}
+
+% Read the dimensions of tagged groups from the aux file.
+\def\longmath@group#1#2{\directlua{longmath.read_group({#1},{#2})}}
+\def\longmath@skip#1#2{}
+
+% Save the dimensions of the tagged groups at the end of the document.
+\def\longmath@save{\let\longmath@group\longmath@skip\directlua{longmath.save_groups(\the\@auxout)}}
+\AtEndDocument{\longmath@save}
+
+
+
+
+
+