summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-03-06 03:05:29 +0000
committerNorbert Preining <norbert@preining.info>2023-03-06 03:05:29 +0000
commit75cd005305bd2c2a0ec383f30ee5b1749ed15183 (patch)
tree65b5e6b912547ab4610badf5a7f61ce70e5aad02 /macros/latex/contrib
parenta2d17a09f7ecd91acd8826216349bb14cc5602cd (diff)
CTAN sync 202303060305
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/README.md26
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamercolorthemeArguelles.sty4
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerfontthemeArguelles.sty5
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerinnerthemeArguelles.sty19
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerouterthemeArguelles.sty4
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerthemeArguelles.sty18
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles-sans.gifbin203366 -> 0 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles-serif.gifbin215467 -> 0 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles.tex2
-rw-r--r--macros/latex/contrib/mismath/mismath.dtx47
-rw-r--r--macros/latex/contrib/mismath/mismath.pdfbin269532 -> 269577 bytes
-rw-r--r--macros/latex/contrib/opencolor/README.md12
-rw-r--r--macros/latex/contrib/opencolor/demo-opencolor.pdfbin15089 -> 15089 bytes
-rw-r--r--macros/latex/contrib/opencolor/demo-opencolor.tex2
-rw-r--r--macros/latex/contrib/opencolor/opencolor.sty4
-rw-r--r--macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdfbin9671406 -> 9020920 bytes
-rw-r--r--macros/latex/contrib/profcollege/latex/ProfCollege.sty1257
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCGeometrie.mp426
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCScratch.mp2
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp2
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md13
-rw-r--r--macros/latex/contrib/siunitx/siunitx-abbreviation.dtx7
-rw-r--r--macros/latex/contrib/siunitx/siunitx-angle.dtx7
-rw-r--r--macros/latex/contrib/siunitx/siunitx-binary.dtx7
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin620743 -> 641978 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.tex6
-rw-r--r--macros/latex/contrib/siunitx/siunitx-command.dtx7
-rw-r--r--macros/latex/contrib/siunitx/siunitx-complex.dtx7
-rw-r--r--macros/latex/contrib/siunitx/siunitx-compound.dtx7
-rw-r--r--macros/latex/contrib/siunitx/siunitx-emulation.dtx5
-rw-r--r--macros/latex/contrib/siunitx/siunitx-locale.dtx7
-rw-r--r--macros/latex/contrib/siunitx/siunitx-number.dtx216
-rw-r--r--macros/latex/contrib/siunitx/siunitx-print.dtx5
-rw-r--r--macros/latex/contrib/siunitx/siunitx-quantity.dtx5
-rw-r--r--macros/latex/contrib/siunitx/siunitx-symbol.dtx5
-rw-r--r--macros/latex/contrib/siunitx/siunitx-table.dtx7
-rw-r--r--macros/latex/contrib/siunitx/siunitx-unit.dtx5
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx7
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin667978 -> 691123 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx.tex3
40 files changed, 1863 insertions, 293 deletions
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/README.md b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/README.md
index 9c8d32bade..f8408448f7 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/README.md
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/README.md
@@ -1,8 +1,8 @@
<!--
-- Argüelles v1.2.2
-- Copyright (c) 2020 Michele Piazzai. Contact: michele.piazzai@uc3m.es
-- This work is released under the MIT License and is free to use, copy, modify,
-- merge, publish, distribute, sublicense, and/or sell. See LICENSE for details.
+arguelles v2.1.0
+author: Michele Piazzai
+contact: michele.piazzai@uc3m.es
+license: MIT
-->
# arguelles
@@ -11,12 +11,6 @@ Argüelles is a beamer theme that helps you create beautiful presentations. It a
The theme requires the packages [Alegreya/AlegreyaSans](https://ctan.org/pkg/alegreya), [eulervm](https://ctan.org/pkg/eulervm), [mathalpha](https://www.ctan.org/pkg/mathalpha), [microtype](https://ctan.org/pkg/microtype), [fontawesome5](https://ctan.org/pkg/fontawesome5), [opencolor](https://www.ctan.org/pkg/opencolor), [enumitem](https://www.ctan.org/pkg/enumitem), [parskip](https://www.ctan.org/pkg/parskip), and [tikz/pgf](https://ctan.org/pkg/pgf) to be installed on your computer. These are included in common LaTeX distributions, such as [MiKTeX](https://ctan.org/pkg/miktex) and [TeXLive](https://ctan.org/pkg/texlive).
-### Options
-
-By default, the theme uses serif fonts for body text. Loading it with the `sans` options makes sans-serif fonts default, keeping serif only for math type. Because sans-serif font is more space-efficient, this could be useful for slides that contain more text and bullet points. See the two animations below for comparison.
-
-The `mp` option loads additional dependencies that could be useful for designing scientific presentations. These currently include [ulem](https://ctan.org/pkg/ulem), [booktabs](https://ctan.org/pkg/booktabs), [dcolumn](https://ctan.org/pkg/dcolumn), [makecell](https://ctan.org/pkg/makecell), [colortbl](https://www.ctan.org/pkg/colortbl), [cancel](https://www.ctan.org/pkg/cancel), [pgfplots](https://www.ctan.org/pkg/pgfplots) (with `compat=1.18`), and [csvsimple](https://www.ctan.org/pkg/csvsimple). In addition, the option loads the `calc` library for TikZ and the `statistics` and `fillbetween` libraries for PGFPlots.
-
## Demo
The files `demo.tex` and `demo.pdf` demonstrate the main features of the theme.
@@ -31,7 +25,15 @@ The files `demo.tex` and `demo.pdf` demonstrate the main features of the theme.
## Installation
-Argüelles is [hosted on CTAN](https://ctan.org/pkg/beamertheme-arguelles) and distributed as part of MikTex and TeXLive. It can also be installed manually by cloning this repository in your `$HOME/texmf/tex/latex` folder, which is automatically searched by LaTeX. If you do not have this folder, you can [create one](https://www.ias.edu/math/computing/faq/local-latex-style-files).
+Argüelles is hosted on CTAN and distributed as part of MikTex and TeXLive. It can also be installed manually by cloning this repository in your `$HOME/texmf/tex/latex` folder, which is automatically searched by LaTeX. If you do not have this folder, you can [create one](https://www.ias.edu/math/computing/faq/local-latex-style-files).
+
+## Usage
+
+By default, the theme uses serif fonts for body text. Loading it with the `sans` option makes sans-serif fonts default, keeping serif only for math type. Because sans-serif font is more space-efficient, this could be useful for slides that contain more text and bullet points. See the two animations below for comparison.
+
+The `frameno` option adds frame numbering in the bottom right corner of each frame. By default, frame numbers are hidden on title and plain frames. They can also be suppressed on individual frames by `\begin{frame}[noframenumbering]`.
+
+The `mp` option loads additional dependencies that could be useful for designing scientific presentations. These currently include [ulem](https://ctan.org/pkg/ulem), [booktabs](https://ctan.org/pkg/booktabs), [dcolumn](https://ctan.org/pkg/dcolumn), [makecell](https://ctan.org/pkg/makecell), [colortbl](https://www.ctan.org/pkg/colortbl), [cancel](https://www.ctan.org/pkg/cancel), [pgfplots](https://www.ctan.org/pkg/pgfplots), and [csvsimple](https://www.ctan.org/pkg/csvsimple). In addition, the option loads the [calc](https://tikz.dev/library-calc) library for TikZ, and the [statistics](https://tikz.dev/pgfplots/libs-statistics) and [fillbetween](https://tikz.dev/pgfplots/libs-fillbetween) libraries for PGFplots.
## Customization
@@ -88,7 +90,7 @@ Both old-style and lining figures are also available in a monospaced version, wh
## Known issues
-Argüelles is built with the intention to reserve as much space as possible for the content of your slides. When using subsections, the progress bar in the headline places dots on multiple lines, which takes space away from your content. The theme does not handle this situation well. You can force the dots to appear on the same line by loading beamer with the `compress` option, as in `demo.tex`:
+Argüelles is built with the intention to reserve as much space as possible for the content of your slides. When using subsections, the progress bar in the headline places dots on multiple lines, which takes space away from your content. The theme does not handle this situation well. You can force the dots to appear on the same line by loading beamer with the `compress` option, as in the demo:
```tex
\documentclass[compress]{beamer}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamercolorthemeArguelles.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamercolorthemeArguelles.sty
index c47a3f614a..36ffbdad99 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamercolorthemeArguelles.sty
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamercolorthemeArguelles.sty
@@ -1,10 +1,10 @@
-% arguelles v2.0.0
+% arguelles v2.1.0
% author: Michele Piazzai
% contact: michele.piazzai@uc3m.es
% license: MIT
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamercolorthemeArguelles}[2022/12/10 Argüelles]
+\ProvidesPackage{beamercolorthemeArguelles}[2023/02/02 Argüelles]
\mode<presentation>
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerfontthemeArguelles.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerfontthemeArguelles.sty
index 7f65d14dfd..5e637f9ce4 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerfontthemeArguelles.sty
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerfontthemeArguelles.sty
@@ -1,10 +1,10 @@
-% arguelles v2.0.0
+% arguelles v2.1.0
% author: Michele Piazzai
% contact: michele.piazzai@uc3m.es
% license: MIT
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamerfontthemeArguelles}[2022/12/10 Argüelles]
+\ProvidesPackage{beamerfontthemeArguelles}[2023/02/02 Argüelles]
\mode<presentation>
@@ -22,6 +22,7 @@
% frame elements
\setbeamerfont{headline section}{series=\AlegreyaSans\scshape}
+\setbeamerfont{footline section}{series=\AlegreyaSans\scshape,size=\footnotesize}
\setbeamerfont{frame title}{series=\mediumfont,size=\Large}
\setbeamerfont{frame subtitle}{series=\mediumfont,size=\large}
\setbeamerfont{block title}{series=\mediumfont\itshape}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerinnerthemeArguelles.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerinnerthemeArguelles.sty
index 09465ef23b..88ee7563f7 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerinnerthemeArguelles.sty
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerinnerthemeArguelles.sty
@@ -1,10 +1,10 @@
-% arguelles v2.0.0
+% arguelles v2.1.0
% author: Michele Piazzai
% contact: michele.piazzai@uc3m.es
% license: MIT
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamerinnerthemeArguelles}[2022/12/10 Argüelles]
+\ProvidesPackage{beamerinnerthemeArguelles}[2023/02/02 Argüelles]
\mode<presentation>
@@ -29,6 +29,7 @@
{\usebeamerfont{institute}\insertinstitute}\par
{\usebeamerfont{email}\insertemail}
\end{beamercolorbox}
+ \addtocounter{framenumber}{-1}
}
% lists
@@ -78,6 +79,7 @@
\booltrue{Arguelles@standout}
\begingroup
\setbeamertemplate{background}{}
+ \setbeamercolor*{footline}{fg=structure.bg}
\beamer@frametopskip=0pt plus 1fill\relax%
\beamer@framebottomskip=0pt plus 1.25fill\relax%
\color{structure.bg}
@@ -89,5 +91,18 @@
}{}
}{}{}
+% suppress frame numbering
+\providebool{Arguelles@noframenumbering}
+\define@key{beamerframe}{noframenumbering}[true]{
+ \booltrue{Arguelles@noframenumbering}
+ \begingroup
+ \setbeamertemplate{footline}{}
+}
+\pretocmd{\beamer@reseteecodes}{
+ \ifbool{Arguelles@noframenumbering}{
+ \endgroup\boolfalse{Arguelles@noframenumbering}
+ }{}
+}{}{}
+
\mode<all>
\endinput
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerouterthemeArguelles.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerouterthemeArguelles.sty
index 22f16c50d1..7eee0e9c2f 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerouterthemeArguelles.sty
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerouterthemeArguelles.sty
@@ -1,10 +1,10 @@
-% arguelles v2.0.0
+% arguelles v2.1.0
% author: Michele Piazzai
% contact: michele.piazzai@uc3m.es
% license: MIT
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamerouterthemeArguelles}[2022/12/10 Argüelles]
+\ProvidesPackage{beamerouterthemeArguelles}[2023/02/02 Argüelles]
\mode<presentation>
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerthemeArguelles.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerthemeArguelles.sty
index 71694847ef..af6b9f7854 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerthemeArguelles.sty
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/beamerthemeArguelles.sty
@@ -1,10 +1,10 @@
-% arguelles v2.0.0
+% arguelles v2.1.0
% author: Michele Piazzai
% contact: michele.piazzai@uc3m.es
% license: MIT
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamerthemeArguelles}[2022/12/10 Argüelles]
+\ProvidesPackage{beamerthemeArguelles}[2023/02/02 Argüelles]
\mode<presentation>
@@ -31,11 +31,15 @@
\newif\if@optSans
\@optSansfalse
\DeclareOption{sans}{\@optSanstrue}
+\newif\if@optFrameno
+\@optFramenofalse
+\DeclareOption{frameno}{\@optFramenotrue}
\newif\if@optMp
\@optMpfalse
\DeclareOption{mp}{\@optMptrue}
\ProcessOptions
+% sans font
\if@optSans
\usefonttheme[onlymath]{serif}
\newcommand\mediumfont{\AlegreyaSansMedium}
@@ -44,7 +48,17 @@
\newcommand\mediumfont{\AlegreyaMedium}
\fi
+% frame numbers
+\if@optFrameno
+\defbeamertemplate*{footline}{Arguelles}{
+ \usebeamerfont{footline section}\hfill\raisebox{.025\paperheight}{
+ \insertframenumber\hspace{.01\paperwidth}
+ }
+}
+\fi
+
\if@optMp
+% extra packages
\RequirePackage[normalem]{ulem}
\RequirePackage{booktabs}
\RequirePackage{dcolumn}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles-sans.gif b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles-sans.gif
deleted file mode 100644
index cd53a67138..0000000000
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles-sans.gif
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles-serif.gif b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles-serif.gif
deleted file mode 100644
index ac112eccad..0000000000
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles-serif.gif
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles.tex
index 00459fe223..caa0604b40 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles.tex
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-arguelles/demo/demo-arguelles.tex
@@ -1,4 +1,4 @@
-% arguelles v2.0.0
+% arguelles v2.1.0
% author: Michele Piazzai
% contact: michele.piazzai@uc3m.es
% license: MIT
diff --git a/macros/latex/contrib/mismath/mismath.dtx b/macros/latex/contrib/mismath/mismath.dtx
index 1db0844782..f8224c848f 100644
--- a/macros/latex/contrib/mismath/mismath.dtx
+++ b/macros/latex/contrib/mismath/mismath.dtx
@@ -20,13 +20,12 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{mismath}
- [2023/03/01 v2.6 .dtx mismath file]
+ [2023/03/05 v2.7 .dtx mismath file]
%</package>
%<*driver>
\documentclass{ltxdoc}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
-%\usepackage{textcomp}
\usepackage[english]{babel}
\usepackage[charter]{mathdesign} % in case of font change, modify 2.1 (3rd §)
\usepackage[ibrackets]{mismath}
@@ -36,7 +35,6 @@
\usepackage{sectsty}
\usepackage{xcolor}
\usepackage{spacingtricks}
-\usepackage{centeredline}
\usepackage{array}
\usepackage{metalogo} % for logos of XeLaTeX et LuaLaTeX
@@ -71,7 +69,7 @@
%</driver>
% \fi
%
-% \CheckSum{635}
+% \CheckSum{618}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -183,17 +181,25 @@
% - small changes in the documentation}
%
% \changes{v2.6}{2023/03/01}{
-% - A bug correction with the \C macro when using babel with russian
+% - A bug correction in mm@macro
+% - incompatibility of \C macro solved, when using babel with russian
% (thanks to Murray Eisenberg for this bug report on TeX StackExchange)
+% - mathrm added in macro eqdef* (useful if italicized Greek uppercase Delta)
% - Tiny changes in the documentation}
%
+% \changes{v2.7}{2023/03/05}{
+% - Macros for sets of numbers (\R, \C,...) now available only in math mode
+% (following remarks by David Carlisle and Enrico Gregorio)
+% - special (not generic) warning when loading babel with russian
+% (\C will not be defined in that case)}
+%
% \GetFileInfo{mismath.sty}
%
% \title{\textsf{mismath}\\ Miscellaneous mathematical macros\thanks{This document
% corresponds to \textsf{mismath}~\fileversion, dated \filedate.
% Thanks to François Bastouil for help in English translation.}}
% \author{Antoine Missier \\ \texttt{antoine.missier@ac-toulouse.fr}}
-% \date{March 1, 2023}
+% \date{March 5, 2023}
%
% \maketitle
% \tableofcontents
@@ -331,7 +337,8 @@
% |\MathNumbers{e,i}| is equivalent to |\MathUp{e}\MathUp{i}|.
% In |\MathNumbers| the comma separator can be changed or deleted.
% This macro has no effect on other letters than e, i or j.
-% On the other hand |\MathNormal| can be used for probability also (see section \ref{operators})
+% On the other hand |\MathNormal| can be used for probability also
+% (see section \ref{operators})
% and can take any comma separated list argument.
%
% \medskip
@@ -632,7 +639,7 @@
% and likewise to designate a field: $\F$ or $\K$ (Körper in German).
% We get these symbols with the macros
% \footnote{The \texttt{\bslash C} macro is incompatible with \texttt{russian} option
-% of \textsf{babel}; then it will not be defined by \textsf{mismath}.}:
+% of \textsf{babel}; it will not be redefined in that case.}:
% \begin{center}
% |\R|, |\C|, |\Z|, |\N|, |\Q|, |\F|, |\K|.
% \end{center}
@@ -646,7 +653,7 @@
%
% \medskip
% \DescribeMacro{\ds}
-% The |\displaystyle| command being very common, alias |\ds| is provided.
+% The |\displaystyle| command being very common, the |\ds| alias is provided.
% Not only it eases typing but also it makes source code more readable.
%
% \medskip
@@ -807,6 +814,7 @@
% \[ \lbar{Z} = \lfrac{\lbar{z_1-z_2}}{\lbar{z_1+z_2}} \]
% \end{minipage}
%
+% \medskip
% \DescribeMacro{[ibrackets]}
% Open intervals are usually represented with parenthesis, \eg $(0, +\infty)$,
% but sometimes we find also
@@ -1374,16 +1382,17 @@
\mm@operator[lito]{\lito}{o}
\mm@macro{mathset}{\mathbf}
-\mm@macro{R}{\ensuremath{\mathset{R}}\xspace}
-%\mm@macro{C}{\ensuremath{\mathset{C}}\xspace}
-\AtBeginDocument{\@ifpackagewith{babel}{russian}{\mm@warning{C}
- }{\mm@macro{C}{\ensuremath{\mathset{C}}\xspace}}
-}
-\mm@macro{N}{\ensuremath{\mathset{N}}\xspace}
-\mm@macro{Z}{\ensuremath{\mathset{Z}}\xspace}
-\mm@macro{Q}{\ensuremath{\mathset{Q}}\xspace}
-\mm@macro{F}{\ensuremath{\mathset{F}}\xspace}
-\mm@macro{K}{\ensuremath{\mathset{K}}\xspace}
+\mm@macro{R}{\mathset{R}}
+\@ifpackagewith{babel}{russian}{
+ \PackageWarningNoLine{mismath}{Option russian of babel
+ is loaded\MessageBreak
+ Command \bslash C will not be redefined}
+ }{\mm@macro{C}{\mathset{C}}}
+\mm@macro{N}{\mathset{N}}
+\mm@macro{Z}{\mathset{Z}}
+\mm@macro{Q}{\mathset{Q}}
+\mm@macro{F}{\mathset{F}}
+\mm@macro{K}{\mathset{K}}
\mm@macro{ds}{\displaystyle}
\mm@macro{dlim}{\lim\limits}
diff --git a/macros/latex/contrib/mismath/mismath.pdf b/macros/latex/contrib/mismath/mismath.pdf
index 41b750cf13..2fe670309c 100644
--- a/macros/latex/contrib/mismath/mismath.pdf
+++ b/macros/latex/contrib/mismath/mismath.pdf
Binary files differ
diff --git a/macros/latex/contrib/opencolor/README.md b/macros/latex/contrib/opencolor/README.md
index 4debc90ece..a336a5e2ac 100644
--- a/macros/latex/contrib/opencolor/README.md
+++ b/macros/latex/contrib/opencolor/README.md
@@ -1,11 +1,11 @@
<!--
-opencolor-latex v1.0.0
+opencolor v1.0.1
Author: Michele Piazzai
Contact: michele.piazzai@uc3m.es
License: MIT
-->
-# opencolor-latex
+# opencolor
This is a simple LaTeX package that provides hexadecimal color definitions of the 130 colors included in the [Open Color](https://yeun.github.io/open-color/) library (v1.9.1). Open Color's goal is to provide a selection of colors optimized for UI design. Although LaTeX is a typesetting system primarily intended for print, many of the documents it produces never get printed, in which case it makes sense to use colors suitable for on-screen reading.
@@ -15,15 +15,15 @@ The package's only dependency is [xcolor](https://www.ctan.org/pkg/xcolor), whic
## Demo
-![](https://github.com/piazzai/opencolor-latex/blob/master/demo-opencolor.png)
+![](https://github.com/piazzai/opencolor/blob/master/demo-opencolor.png)
## Installation
-The package is hosted on CTAN and distributed as part of MikTeX and TeXLive. It can also be installed manually by cloning this repository in your `$HOME/texmf/tex/latex` folder. If you do not have this folder, [you can create it](https://www.ias.edu/math/computing/faq/local-latex-style-files).
+The package is hosted on CTAN and distributed as part of MikTeX and TeXLive. It can also be installed manually by cloning this repository in your `$HOME/texmf/tex/latex` folder. If you do not have it, [you can create it](https://www.ias.edu/math/computing/faq/local-latex-style-files).
## Usage
-The choice of colors for a document is a responsibility of the author, but UI design principles can provide helpful guidelines. For example, in a beamer presentation, `oc-gray-1` could be used instead of white and `oc-gray-9` instead of black in order to reduce eye strain. If a color like `oc-teal-6` is used for a plot, then it would be best for other plots to use colors at the same brightness level, like `oc-orange-6`, for visual consistency.
+The choice of colors for a document is a responsibility of the author, but UI design principles can provide helpful guidelines. For example, in a beamer presentation, `oc-gray-1` could be used instead of white and `oc-gray-9` instead of black to reduce eye strain. If a color like `oc-teal-6` is used for a plot, then it would be best for other plots to use colors at the same brightness level, like `oc-orange-6`, for consistency.
## Minimal working example
@@ -42,4 +42,4 @@ The choice of colors for a document is a responsibility of the author, but UI de
## Bugs
-The package merely loads xcolor and then provides color definitions, so any error or warning is most likely due to xcolor. Nonetheless, if you encounter any problem using this package, please [open an issue](https://github.com/piazzai/opencolor-latex/issues).
+The package merely loads xcolor and then provides color definitions, so any error or warning is most likely due to xcolor. Nonetheless, if you encounter any problem using this package, please [open an issue](https://github.com/piazzai/opencolor/issues).
diff --git a/macros/latex/contrib/opencolor/demo-opencolor.pdf b/macros/latex/contrib/opencolor/demo-opencolor.pdf
index 1f38189fec..0c4dcd89a4 100644
--- a/macros/latex/contrib/opencolor/demo-opencolor.pdf
+++ b/macros/latex/contrib/opencolor/demo-opencolor.pdf
Binary files differ
diff --git a/macros/latex/contrib/opencolor/demo-opencolor.tex b/macros/latex/contrib/opencolor/demo-opencolor.tex
index a8bc47018b..691235c89b 100644
--- a/macros/latex/contrib/opencolor/demo-opencolor.tex
+++ b/macros/latex/contrib/opencolor/demo-opencolor.tex
@@ -1,4 +1,4 @@
-% opencolor-latex v1.0.0
+% opencolor v1.0.1
% Author: Michele Piazzai
% Contact: michele.piazzai@uc3m.es
% License: MIT
diff --git a/macros/latex/contrib/opencolor/opencolor.sty b/macros/latex/contrib/opencolor/opencolor.sty
index df34ae2a76..e609da806e 100644
--- a/macros/latex/contrib/opencolor/opencolor.sty
+++ b/macros/latex/contrib/opencolor/opencolor.sty
@@ -1,10 +1,10 @@
-% opencolor-latex v1.0.0
+% opencolor v1.0.1
% Author: Michele Piazzai
% Contact: michele.piazzai@uc3m.es
% License: MIT
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{opencolor}[2022/09/15 Open Color]
+\ProvidesPackage{opencolor}[2023/03/05 Open Color]
\RequirePackage{xcolor}
diff --git a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf b/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf
index 4e59174d84..562263c921 100644
--- a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf
+++ b/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/profcollege/latex/ProfCollege.sty b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
index 15a4cd6b73..e6f559aa71 100644
--- a/macros/latex/contrib/profcollege/latex/ProfCollege.sty
+++ b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
@@ -2,16 +2,27 @@
% licence : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}%
-\def\filedate{2023/01/23}%
+\def\filedate{2023/03/06}%
\let\PfCfiledate\filedate%
-\def\fileversion{0.99-z-e}%
+\def\fileversion{0.99-z-f}%
\let\PfCfileversion\fileversion%
\ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]
\RequirePackage{verbatim}
\RequirePackage{mathtools}
+
+\newif\if@shellescape \@shellescapetrue
+\newif\if@amssymb \@amssymbtrue
+\DeclareOption{nonshellescape}{\@shellescapefalse}
+\DeclareOption{nonamssymb}{\@amssymbfalse}
+\ProcessOptions\relax
+
+%\ProcessOptions\relax
+
+\if@amssymb
\RequirePackage{amssymb}
+\fi
% mathématiques
\RequirePackage{siunitx}
@@ -44,10 +55,6 @@
\RequirePackage{modulus}%Pour certains calculs arithmétiques.
\RequirePackage{xinttools}%Pour la création dynamique d'un tableau
-\newif\if@shellescape \@shellescapetrue
-\DeclareOption{nonshellescape}{\@shellescapefalse}
-\ProcessOptions\relax
-
\RequirePackage{iftex}
\ifluatex
@@ -60,7 +67,8 @@
\RequirePackage[shellescape,latex]{gmp}%inclusion de figures metapost "à la volée"%
\gmpoptions{everymp={prologues:=3; input PfCLaTeX; input PfCSvgnames; input PfCConstantes; input PfCGeometrie; input PfCAfficheur;}}
\usempxclass{article}
-\usempxpackage[locale=FR,mode = match, propagate-math-font = true,reset-math-version = false, reset-text-family = false,reset-text-series = false, reset-text-shape = false,text-family-to-math = true, text-series-to-math = true, output-decimal-marker={,},group-minimum-digits=4]{siunitx}
+\usempxpackage{ProfCollege}
+%\usempxpackage[locale=FR,mode = match, propagate-math-font = true,reset-math-version = false, reset-text-family = false,reset-text-series = false, reset-text-shape = false,text-family-to-math = true, text-series-to-math = true, output-decimal-marker={,},group-minimum-digits=4]{siunitx}
\usempxpackage[utf8]{inputenc}
\usempxpackage[T1]{fontenc}
\usempxpackage{fourier}
@@ -70,7 +78,8 @@
\RequirePackage[latex]{gmp}%inclusion de figures metapost "à la volée"%
\gmpoptions{everymp={prologues:=3; input PfCLaTeX; input PfCSvgnames; input PfCConstantes; input PfCGeometrie; input PfCAfficheur;}}
\usempxclass{article}
-\usempxpackage[locale=FR,mode = match, propagate-math-font = true,reset-math-version = false, reset-text-family = false,reset-text-series = false, reset-text-shape = false,text-family-to-math = true, text-series-to-math = true, output-decimal-marker={,},group-minimum-digits=4]{siunitx}
+\usempxpackage{ProfCollege}
+%\usempxpackage[locale=FR,mode = match, propagate-math-font = true,reset-math-version = false, reset-text-family = false,reset-text-series = false, reset-text-shape = false,text-family-to-math = true, text-series-to-math = true, output-decimal-marker={,},group-minimum-digits=4]{siunitx}
\usempxpackage[utf8]{inputenc}
\usempxpackage[T1]{fontenc}
\usempxpackage{fourier}
@@ -93,6 +102,7 @@
% https://tex.stackexchange.com/questions/349259/curved-arrow-describing-a-step-in-a-equation-derivation
%https://tex.stackexchange.com/questions/58656/best-way-to-draw-a-chevron-diagram-using-tikz
\usetikzlibrary{calc,shapes,arrows,tikzmark,chains,positioning,shapes.symbols,babel,fit}
+\usetikzlibrary{backgrounds}
\RequirePackage{suffix}%pour la commande étoilée
@@ -348,6 +358,742 @@
}
%%%
+% Kakurasu
+%%%
+\setKVdefault[Kakurasu]{Solution=false,Longueur=6,Largeur=6,Echelle=8mm,Graines=false,Trace=false}
+\defKV[Kakurasu]{Graine=\setKV[Kakurasu]{Graines}}
+\defKV[Kakurasu]{Traces=\setKV[Kakurasu]{Trace}}
+
+\NewDocumentCommand\Kakurasu{o}{%
+ \useKVdefault[Kakurasu]%
+ \setKVdefault[Kakurasu]{#1}%
+ \BuildKakurasu%
+}
+
+\NewDocumentCommand\BuildKakurasu{}{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ boolean Graines,Solution,Trace;
+ Graines=\useKV[Kakurasu]{Graines};
+ Solution=\useKV[Kakurasu]{Solution};
+ Trace=\useKV[Kakurasu]{Trace};
+
+ if Graines:
+ randomseed:=\useKV[Kakurasu]{Graine};
+ fi;
+
+ numeric Longueur,Largeur;
+ Longueur=\useKV[Kakurasu]{Longueur};
+ Largeur=\useKV[Kakurasu]{Largeur};
+
+ u:=\useKV[Kakurasu]{Echelle};
+
+ pair A[][];%centre des carrés.
+ boolean Allume[][];
+ numeric NombreLigne[][],NombreColonne[][];
+
+ for k=-1 upto Largeur+1:
+ for l=-1 upto Longueur+1:
+ Allume[k][l]=false;
+ endfor;
+ endfor;
+
+ for k=0 upto Largeur-1:
+ for l=0 upto Longueur-1:
+ A[k][l]=u*(l,-k);
+ trace (unitsquare scaled u) shifted A[k][l];
+ endfor;
+ endfor;
+
+ for k=0 upto Largeur-1:
+ for l=0 upto Longueur-1:
+ if Allume[k][l]:
+ else:
+ Allume[k][l]:=true;
+ m:=uniformdeviate(1);
+ if m<0.5:
+ % on ne met pas de case noire
+ else:
+ % on met une case noire
+ NombreLigne[k][l]=l+1;
+ NombreColonne[k][l]=k+1;
+ if Solution:
+ fill (unitsquare scaled 0.9u) shifted (A[k][l]+0.05*u*(1,1));
+ fi;
+ fi;
+ fi;
+ endfor;
+ endfor;
+
+ % on compte le nombre de chiffres dans les lignes et on les ajoute
+ for k=0 upto Largeur-1:
+ Somme:=0;
+ for l=0 upto Longueur-1:
+ if unknown NombreLigne[k][l]:
+ else:
+ Somme:=Somme+NombreLigne[k][l];
+ fi;
+ endfor;
+ label(TEX(decimal(Somme)),u*(-0.5,-k+0.5));
+ endfor;
+
+ % on compte le nombre de chiffres dans les colonnes et on les ajoute
+ for k=0 upto Longueur-1:
+ Somme:=0;
+ for l=0 upto Largeur-1:
+ if unknown NombreColonne[l][k]:
+ else:
+ Somme:=Somme+NombreColonne[l][k];
+ fi;
+ endfor;
+ label(TEX(decimal(Somme)),u*(k+0.5,1.5));
+ endfor;
+
+ % On affiche les valeurs des cases noires.
+ drawoptions(withcolor 0.5white);
+ for k=0 upto Longueur-1:
+ label(TEX("\footnotesize"&decimal(k+1)),u*(k+0.5,-Largeur+0.5));
+ endfor;
+ for k=0 upto Largeur-1:
+ label(TEX("\footnotesize"&decimal(k+1)),u*(Longueur+0.5,-k+0.5));
+ endfor;
+ drawoptions();
+ if Trace:
+ \useKV[Kakurasu]{Traces};
+ fi;
+ \end{mplibcode}
+ \fi
+}%
+
+%%%
+% Midpoint
+%%%
+\setKVdefault[MidPoint]{Solution=false,Graines=false,Hard=false}
+\defKV[MidPoint]{Graine=\setKV[MidPoint]{Graines}}
+
+\NewDocumentCommand\MidPoint{o}{%
+ \useKVdefault[MidPoint]%
+ \setKV[MidPoint]{#1}%
+ \BuildMidPoint
+}
+
+\NewDocumentCommand\BuildMidPoint{}{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ numeric Longueur,Largeur;
+ Longueur=8;
+ Largeur=4;
+ boolean Horizontal,Vertical,RetiensSens;
+ Horizontal=false;
+ Vertical=false;
+
+ boolean Solution,Hard,Graines;
+ Solution:=\useKV[MidPoint]{Solution};
+ Hard:=\useKV[MidPoint]{Hard};
+ Graines:=\useKV[MidPoint]{Graines};
+ if Graines:
+ randomseed:=\useKV[MidPoint]{Graine}
+ fi;
+
+ u:=8mm;
+
+ pair A[][];%centre des carrés.
+
+ vardef CherchePoint(expr basek,basel)=
+ % Si le déplacement précédent est horizontal, il faut passer en vertical
+ % Si le déplacement précédent est vertical, il faut passer en horizontal
+ p:=p+1;
+ if basel=ColonneArrivee:
+ RP[p]:=Arrivee;
+ else:
+ if Vertical:
+ %deplacement horizontal
+ ecart:=ColonneArrivee-basel;
+ if ecart=1:
+ Basel:=ColonneArrivee;
+ RP[p]:=A[basek][ColonneArrivee];
+ else:
+ Basel:=ceiling(basel+uniformdeviate(ecart));
+ RP[p]:=A[basek][Basel];
+ fi;
+ Basek:=basek;
+ Horizontal:=true;
+ Vertical:=false;
+ else:
+ %on vérifie qu'on peut se déplacer dans les deux sens.
+ % on choisit vertical positif ou vertical négatif
+ if basek=1:
+ choix:=0.75;
+ elseif basek=Largeur:
+ choix:=0.25;
+ else:
+ choix:=uniformdeviate(1);
+ fi;
+ if choix<0.5:
+ ecart:=basek-1;
+ if ecart=1:
+ Basek:=1;
+ RP[p]:=A[1][basel];
+ else:
+ Basek:=ceiling(uniformdeviate(ecart));
+ RP[p]:=A[Basek][basel];
+ fi;
+ Basel:=basel;
+ else:
+ ecart:=Largeur-basek;
+ if ecart=1:
+ Basek:=Largeur;
+ RP[p]:=A[Largeur][basel];
+ else:
+ Basek:=basek+ceiling(uniformdeviate(ecart));
+ RP[p]:=A[Basek][basel];
+ fi;
+ Basel:=basel;
+ fi;
+ Horizontal:=false;
+ Vertical:=true;
+ fi;
+ fi;
+enddef;
+
+vardef MidPoint(expr Aa,Bb)=
+ save $;
+ picture $;
+ $=image(
+ if Solution:
+ trace Aa--Bb withpen pencircle scaled 1.5;
+ fi;
+ if Hard:
+ NbMid:=NbMid+1;
+ if NbMid mod 2=0:
+ remplis cercles(1/2[Aa,Bb],1mm);
+ fi;
+ else:
+ remplis cercles(1/2[Aa,Bb],1mm);
+ fi;
+ );
+ $
+enddef;
+
+ % tracé de la grille
+ for k=1 upto 2*Largeur:
+ for l=-3 upto Largeur+Longueur-4:
+ trace (unitsquare scaled u) shifted (u*(l,-k)-center (unitsquare scaled u)) withcolor 0.5*white;
+ endfor;
+ endfor;
+
+ for k=1 upto Largeur:
+ for l=1 upto Longueur:
+ A[k][l]=u*(l,-k);
+ %trace (unitsquare scaled u) shifted (A[k][l]-center (unitsquare scaled u)) withcolor 0.5*white;
+ endfor;
+ endfor;
+
+%On choisit le premier déplacement
+ choix:=uniformdeviate(1);
+ if choix<0.5:
+ Horizontal:=true;
+ else:
+ Vertical:=true;
+ fi;
+
+ p:=0;
+ NbMid=ceiling(uniformdeviate(2));%Pour le niveau Hard
+
+ %1er rectangle
+LigneDepart:=2;%2;
+ColonneDepart:=1;
+LigneArrivee:=4;%4;
+ColonneArrivee:=8;
+pair Depart,Arrivee;
+Depart=A[LigneDepart][ColonneDepart];
+Arrivee=A[LigneArrivee][ColonneArrivee];
+
+pair RP[];%RetiensPoints
+RP[0]=Depart;
+
+Basek:=LigneDepart;
+Basel:=ColonneDepart;
+forever:
+ CherchePoint(Basek,Basel);
+ exitif RP[p]=Arrivee;
+endfor;
+
+if ypart(RP[p])=ypart(RP[p-1]):
+ RetiensSens:=true;
+else:
+ RetiensSens:=false;
+ p:=p-1;
+fi;
+
+%2eme rectangle
+for k=1 upto Largeur:
+ for l=1 upto Longueur:
+ A[k][l]:=u*(Longueur+l,-k);
+ endfor;
+endfor;
+
+LigneDepart:=4;
+ColonneDepart:=1;
+LigneArrivee:=2;
+ColonneArrivee:=8;
+Depart:=A[LigneDepart][ColonneDepart];
+Arrivee:=A[LigneArrivee][ColonneArrivee];
+
+Basek:=LigneDepart;
+Basel:=ColonneDepart;
+Retiens:=p;
+RP[p+1]:=Depart;
+
+forever:
+ CherchePoint(Basek,Basel);
+ exitif RP[p]=Arrivee;
+endfor;
+
+if ypart(RP[p])=ypart(RP[p-1]):
+ RetiensSens:=true;
+ p:=p-1;
+else:
+ RetiensSens:=false;
+fi;
+
+for h=(Retiens+1) upto p:
+ RP[h]:=symetrie(RP[h],u*(Longueur+0.5,-Largeur-0.5));
+endfor;
+%3eme Rectangle
+for k=1 upto Largeur:
+ for l=1 upto Longueur:
+ A[k][l]:=u*(2*Longueur+l,-k);
+ endfor;
+endfor;
+
+LigneDepart:=4;
+ColonneDepart:=2;
+LigneArrivee:=1;
+ColonneArrivee:=4;
+Depart:=A[LigneDepart][ColonneDepart];
+Arrivee:=A[LigneArrivee][ColonneArrivee];
+
+
+Basek:=LigneDepart;
+Basel:=ColonneDepart;
+Retiens:=p;
+RP[p+1]:=Depart;
+forever:
+ CherchePoint(Basek,Basel);
+ exitif RP[p]=Arrivee;
+endfor;
+for h=(Retiens+1) upto p:
+ RP[h]:=rotation(RP[h],u*(2*Longueur+0.5,-Largeur-0.5),90) shifted(u*(-2*Longueur,-Largeur));
+endfor;
+%4eme rectangle. On termine la boucle ?
+for k=1 upto Largeur:
+ for l=1 upto Longueur:
+ A[k][l]:=u*(3*Longueur+l,-k);
+ endfor;
+endfor;
+
+LigneDepart:=4;
+ColonneDepart:=1;
+LigneArrivee:=2;
+ColonneArrivee:=4;
+Depart:=A[LigneDepart][ColonneDepart];
+Arrivee:=A[LigneArrivee][ColonneArrivee];
+
+Basek:=LigneDepart;
+Basel:=ColonneDepart;
+Retiens:=p;
+RP[p+1]:=Depart;
+forever:
+ CherchePoint(Basek,Basel);
+ exitif RP[p]=Arrivee;
+endfor;
+
+if ypart(RP[p])=ypart(RP[p-1]):
+ p:=p-1;
+fi;
+
+if ypart(RP[0])=ypart(RP[1]):
+ RetiensSens:=true;
+else:
+ RetiensSens:=false;
+fi;
+
+for h=(Retiens+1) upto p:
+ RP[h]:=RP[h] shifted(u*(-3.5*Longueur,0));
+endfor;
+
+if RetiensSens:
+ RP[p+1]:=RP[1];
+ go:=1;
+else:
+ RP[p+1]:=RP[0];
+ go:=0;
+fi;
+
+for h=go upto p:
+ draw MidPoint(RP[h],RP[h+1]);
+endfor;
+\end{mplibcode}
+\fi
+}
+
+%%%
+% Grades
+%%%
+\setKVdefault[Grades]{Solution=false,Longueur=9,Largeur=9,Echelle=8mm,Graines=false}
+\defKV[Grades]{Graine=\setKV[Grades]{Graines}}
+
+\NewDocumentCommand\Grades{o}{%
+ \useKVdefault[Grades]%
+ \setKVdefault[Grades]{#1}%
+ \BuildGrades%
+}
+
+\NewDocumentCommand\BuildGrades{}{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ boolean Graines,Solution;
+ Graines=\useKV[Grades]{Graines};
+ Solution=\useKV[Grades]{Solution};
+
+ if Graines:
+ randomseed:=\useKV[Grades]{Graine};
+ fi;
+
+ numeric Longueur,Largeur;
+ Longueur=\useKV[Grades]{Longueur};
+ Largeur=\useKV[Grades]{Largeur};
+
+ u:=\useKV[Grades]{Echelle};
+
+ p:=0;
+ pair A[];%centre des carrés.
+ boolean Allume[][];
+ numeric Nombre[][];
+
+ for k=-1 upto Largeur+1:
+ for l=-1 upto Longueur+1:
+ Allume[k][l]=false;
+ endfor;
+ endfor;
+
+ for k=0 upto Longueur-1:
+ for l=0 upto Largeur-1:
+ p:=p+1;
+ A[p]=u*(k,-l);
+ trace (unitsquare scaled u) shifted A[p];
+ endfor;
+ endfor;
+
+ for k=0 upto Largeur-1:
+ for l=0 upto Longueur-1:
+ if Allume[k][l]:
+ else:
+ Allume[k][l]:=true;
+ m:=uniformdeviate(1);
+ if m<0.5:
+ % on ne met pas de nombre
+ else:
+ % on met un nombre
+ Nombre[k][l]=floor(1+uniformdeviate(9));
+ Allume[k][l+1]:=true;
+ Allume[k+1][l-1]:=true;
+ Allume[k+1][l]:=true;
+ Allume[k+1][l+1]:=true;
+ if Solution:
+ label(TEX(decimal(Nombre[k][l])),u*(l+0.5,-k+0.5));
+ fi;
+ fi;
+ fi;
+ endfor;
+ endfor;
+
+ % on compte le nombre de chiffres dans les lignes et on les ajoute
+ for k=0 upto Largeur-1:
+ p:=0;
+ Somme:=0;
+ for l=0 upto Longueur-1:
+ if unknown Nombre[k][l]:
+ else:
+ p:=p+1;
+ Somme:=Somme+Nombre[k][l];
+ fi;
+ endfor;
+ label(TEX(decimal(p)),u*(-0.5,-k+0.5));
+ label(TEX(decimal(Somme)),u*(Longueur+0.5,-k+0.5));
+ endfor;
+
+ % on compte le nombre de chiffres dans les colonnes et on les ajoute
+ for k=0 upto Longueur-1:
+ p:=0;
+ Somme:=0;
+ for l=0 upto Largeur-1:
+ if unknown Nombre[l][k]:
+ else:
+ p:=p+1;
+ Somme:=Somme+Nombre[l][k];
+ fi;
+ endfor;
+ label(TEX(decimal(p)),u*(k+0.5,1.5));
+ label(TEX(decimal(Somme)),u*(k+0.5,-Largeur+0.5));
+ endfor;
+ \end{mplibcode}
+ \fi
+}%
+
+%%%
+% Squaro
+%%%
+\setKVdefault[Squaro]{Solution=false,Longueur=8,Largeur=8,Echelle=8mm,Nom=Jeu1,Graines=false}
+\defKV[Squaro]{Graine=\setKV[Squaro]{Graines}}%
+
+\NewDocumentCommand\SquarO{o}{%
+ \useKVdefault[Squaro]%
+ \setKVdefault[Squaro]{#1}%
+ \ifboolKV[Squaro]{Solution}{\BuildSquaroSolution}{\BuildSquaro}%
+}
+
+\NewDocumentCommand\BuildSquaro{}{%
+ \ifluatex
+ \mplibforcehmode
+ \xdef\PfCSquaroNom{\useKV[Squaro]{Nom}}%
+ \begin{mplibcode}[\PfCSquaroNom]
+ numeric Longueur,Largeur;
+ Longueur=\useKV[Squaro]{Longueur};
+ Largeur=\useKV[Squaro]{Largeur};
+ boolean Solution,Graines;
+ Solution=\useKV[Squaro]{Solution};
+ Graines:=\useKV[Squaro]{Graines};
+ if Graines:
+ randomseed:=\useKV[Squaro]{Graine};
+ fi;
+
+ u:=\useKV[Squaro]{Echelle};
+
+ p:=0;
+ pair A[];%centre des carrés.
+ boolean Allume[][];
+
+ for k=0 upto Longueur-1:
+ for l=0 upto Largeur-1:
+ p:=p+1;
+ A[p]=u*(k,-l);
+ trace (unitsquare scaled u) shifted A[p];
+ endfor;
+ endfor;
+
+ for k=0 upto Largeur:
+ for l=0 upto Longueur:
+ m:=uniformdeviate(1);
+ if m<0.5:
+ Allume[k][l]=true;
+ fill cercles(u*(l,-k+1),1mm) if Solution=false:withcolor white fi;
+ else:
+ Allume[k][l]=false;
+ fill cercles(u*(l,-k+1),1mm) withcolor white;
+ fi;
+ trace cercles(u*(l,-k+1),1mm);
+ endfor;
+ endfor;
+
+ for k=0 upto Largeur-1:
+ for l=0 upto Longueur-1:
+ Retiens:=0;
+ if Allume[k][l]:Retiens:=Retiens+1 fi;
+ if Allume[k][l+1]:Retiens:=Retiens+1 fi;
+ if Allume[k+1][l]:Retiens:=Retiens+1 fi;
+ if Allume[k+1][l+1]:Retiens:=Retiens+1 fi;
+ label(TEX(decimal(Retiens)),u*(l+0.5,-k+0.5));
+ endfor;
+ endfor;
+ \end{mplibcode}
+ \fi
+}
+
+\NewDocumentCommand\BuildSquaroSolution{}{%
+ \ifluatex
+ \mplibforcehmode
+ \xdef\PfCSquaroNom{\useKV[Squaro]{Nom}}%
+ \begin{mplibcode}[\PfCSquaroNom]
+ u:=\useKV[Squaro]{Echelle};
+ p:=0;
+ for k=0 upto Longueur-1:
+ for l=0 upto Largeur-1:
+ p:=p+1;
+ trace (unitsquare scaled u) shifted A[p];
+ endfor;
+ endfor;
+
+ for k=0 upto Largeur:
+ for l=0 upto Longueur:
+ if Allume[k][l]=true:
+ fill cercles(u*(l,-k+1),1mm);
+ else:
+ fill cercles(u*(l,-k+1),1mm) withcolor white;
+ fi;
+ trace cercles(u*(l,-k+1),1mm);
+ endfor;
+ endfor;
+
+ for k=0 upto Largeur-1:
+ for l=0 upto Longueur-1:
+ Retiens:=0;
+ if Allume[k][l]:Retiens:=Retiens+1 fi;
+ if Allume[k][l+1]:Retiens:=Retiens+1 fi;
+ if Allume[k+1][l]:Retiens:=Retiens+1 fi;
+ if Allume[k+1][l+1]:Retiens:=Retiens+1 fi;
+ label(TEX(decimal(Retiens)),u*(l+0.5,-k+0.5));
+ endfor;
+ endfor;
+ \end{mplibcode}
+ \fi
+}
+
+%%%
+% Garam
+%%%
+\setKVdefault[Garam]{Taille=7,Largeur=15pt,Solution=false,CouleurSolution=Black}
+\newlength\PfCGaramHeight
+
+\NewDocumentCommand\Garam{o m}{%
+ \useKVdefault[Garam]
+ \setKV[Garam]{#1}%
+ \setlength{\PfCGaramHeight}{\useKV[Garam]{Largeur}+\tabcolsep}%
+ \reademptyitems%
+ \setsepchar[*]{§*,*/}%
+ \readlist*\PfCListeGaram{#2}%
+ \colorlet{PfCGaramCoulSol}{\useKV[Garam]{CouleurSolution}}%
+ \begin{NiceTabular}{*{\useKV[Garam]{Taille}}{m{\useKV[Garam]{Largeur}}}}
+ \CodeBefore
+ \xintFor* ##1 in{\xintSeq{2}{\fpeval{\useKV[Garam]{Taille}}}}\do{%
+ \tikz{\draw[dashed,LightGray] (1-|##1)--(last-|##1);}%
+ }%
+ \xintFor* ##1 in{\xintSeq{2}{\fpeval{\PfCListeGaramlen-1}}}\do{%
+ \tikz{\draw[dashed,LightGray] (##1-|1)--(##1-|last);}%
+ }%
+ \tikz{\draw (1-|1) rectangle (last-|last);}%
+ \Body
+ \xintFor* ##1 in{\xintSeq{1}{\PfCListeGaramlen}}\do{%
+ \rule{0pt}{\PfCGaramHeight}\xintFor* ##2 in {\xintSeq{1}{\useKV[Garam]{Taille}}}\do{%
+ \xintifForFirst{}{&}\StrChar{\PfCListeGaram[##1,##2,1]}{1}[\PfCCaracGaram]%
+ \IfStrEq{\PfCCaracGaram}{*}{\Block[draw,fill=black]{1-1}{}}{%
+ \IfStrEq{\PfCCaracGaram}{!}{\Block{}{\ifboolKV[Garam]{Solution}{\StrGobbleLeft{\PfCListeGaram[##1,##2,1]}{1}}{}}}{\Block{}{\color{PfCGaramCoulSol}\PfCListeGaram[##1,##2,1]}}%
+ }%
+ }\\
+ }%
+ \CodeAfter
+ % On place les symboles
+ \xintFor* ##1 in{\xintSeq{1}{\PfCListeGaramlen}}\do{%
+ \xintFor* ##2 in {\xintSeq{1}{\useKV[Garam]{Taille}}}\do{%
+ \StrChar{\PfCListeGaram[##1,##2,1]}{1}[\PfCCaracGaram]%
+ \IfStrEq{\PfCCaracGaram}{*}{}{%
+ \tikz{%
+ \StrSubstitute{\PfCListeGaram[##1,##2,2]}{x}{\times}[\PfCGaramUn]%
+ \StrSubstitute{\PfCGaramUn}{:}{\div}[\PfCGaramUn]%
+ \StrSubstitute{\PfCListeGaram[##1,##2,3]}{x}{\times}[\PfCGaramDeux]%
+ \StrSubstitute{\PfCGaramDeux}{:}{\div}[\PfCGaramDeux]%
+ \xintifForLast{}{\node at (\fpeval{##1+0.5}-|\fpeval{##2+1}) {$\PfCGaramUn$};}
+ \node at (\fpeval{##1+1}-|\fpeval{##2+0.5}) {$\PfCGaramDeux$};
+ }%
+ }%
+ }%
+ }%
+ \end{NiceTabular}
+}%
+
+%%%
+% Futoshiki
+%%%
+\setKVdefault[Futo]{Largeur=15pt,Solution=false,CouleurSolution=Black,CouleurCase=Cornsilk,StyleTexte={}}
+
+\newlength\PfCFutoHeight
+
+\NewDocumentCommand\Futoshiki{o m}{%
+ \useKVdefault[Futo]
+ \setKV[Futo]{#1}%
+ \setlength{\PfCFutoHeight}{\useKV[Futo]{Largeur}+\tabcolsep}%
+ \setsepchar{\\/,}%
+ \readlist\ListeFuto{#2}%
+ \xdef\PfCTailleFuto{\ListeFutolen}%
+ \def\PfCFutoStyleTexte{\useKV[Futo]{StyleTexte}}%
+ \colorlet{PfCFutoCase}{\useKV[Futo]{CouleurCase}}%
+ \begin{NiceTabular}{*{\fpeval{\PfCTailleFuto-1}}{m{\useKV[Futo]{Largeur}}m{5pt}}m{\useKV[Futo]{Largeur}}}%[hvlines]
+ \xintFor* ##1 in{\xintSeq{1}{\PfCTailleFuto}}\do{%
+ \xintFor* ##2 in{\xintSeq{1}{\PfCTailleFuto}}\do{%
+ \rule{0pt}{\PfCFutoHeight}%
+ \StrChar{\ListeFuto[##1,\fpeval{2*##2-1}]}{1}[\PfCCaracFuto]%
+ \IfStrEq{\PfCCaracFuto}{*}{%
+ \StrGobbleLeft{\ListeFuto[##1,\fpeval{2*##2-1}]}{1}[\PfCResteFuto]%
+ \Block[draw]{}{\PfCFutoStyleTexte\PfCResteFuto}%
+ }{%
+ \IfStrEq{\PfCCaracFuto}{!}{%
+ \StrGobbleLeft{\ListeFuto[##1,\fpeval{2*##2-1}]}{1}[\PfCResteFuto]%
+ \Block[draw,fill=PfCFutoCase]{}{\PfCFutoStyleTexte\PfCResteFuto}%
+ }{%
+ \ifboolKV[Futo]{Solution}{\Block[draw]{}{\PfCFutoStyleTexte\color{\useKV[Futo]{CouleurSolution}}\ListeFuto[##1,\fpeval{2*##2-1}]}}{\Block[draw]{}{}}%
+ }%
+ }%
+ \xintifForLast{}{&&}%
+ }\\
+ \rule{0pt}{\fpeval{5pt+\tabcolsep}pt}\Block[]{}{}\\
+ }%
+ \CodeAfter%Pour écrire les symboles
+ \xintFor* ##1 in{\xintSeq{1}{\PfCTailleFuto}}\do{%
+ \xintFor* ##2 in{\xintSeq{1}{\PfCTailleFuto}}\do{%
+ \IfStrEq{\ListeFuto[##1,2*##2]}{>}{%
+ \tikz{%
+ \draw[transform canvas={xshift=\fpeval{2pt+0.5\tabcolsep}pt}] (\fpeval{2*##1-1}-|\fpeval{2*##2})--(\fpeval{2*##1-0.5}-|\fpeval{2*##2+0.5})--(\fpeval{2*##1}-|\fpeval{2*##2});
+ }%
+ }{}%
+ \IfStrEq{\ListeFuto[##1,2*##2]}{<}{%
+ \tikz{%
+ \draw[transform canvas={xshift=\fpeval{2pt+0.5\tabcolsep}pt}] (\fpeval{2*##1-1}-|\fpeval{2*##2+0.5})--(\fpeval{2*##1-0.5}-|\fpeval{2*##2})--(\fpeval{2*##1}-|\fpeval{2*##2+0.5});
+ }%
+ }{}%
+ \IfStrEq{\ListeFuto[##1,2*##2]}{v}{%
+ \tikz{%
+ \draw[transform canvas={yshift=\fpeval{2pt+0.5\tabcolsep}pt}] (\fpeval{2*##1-1.5}-|\fpeval{2*##2-1})--(\fpeval{2*##1-1}-|\fpeval{2*##2-0.5})--(\fpeval{2*##1-1.5}-|\fpeval{2*##2});
+ }%
+ }{}%
+ \IfStrEq{\ListeFuto[##1,2*##2]}{A}{%
+ \tikz{%
+ \draw[transform canvas={yshift=\fpeval{2pt+0.5\tabcolsep}pt}] (\fpeval{2*##1-1}-|\fpeval{2*##2-1})--(\fpeval{2*##1-1.5}-|\fpeval{2*##2-0.5})--(\fpeval{2*##1-1}-|\fpeval{2*##2});
+ }%
+ }{}%
+ \IfStrEq{\ListeFuto[##1,2*##2]}{>A}{%
+ \tikz{%
+ \draw[transform canvas={xshift=\fpeval{2pt+0.5\tabcolsep}pt}] (\fpeval{2*##1-1}-|\fpeval{2*##2})--(\fpeval{2*##1-0.5}-|\fpeval{2*##2+0.5})--(\fpeval{2*##1}-|\fpeval{2*##2});
+ \draw[transform canvas={yshift=\fpeval{2pt+0.5\tabcolsep}pt}] (\fpeval{2*##1-1}-|\fpeval{2*##2-1})--(\fpeval{2*##1-1.5}-|\fpeval{2*##2-0.5})--(\fpeval{2*##1-1}-|\fpeval{2*##2});
+ }%
+ }{}%
+ \IfStrEq{\ListeFuto[##1,2*##2]}{>v}{%
+ \tikz{%
+ \draw[transform canvas={xshift=\fpeval{2pt+0.5\tabcolsep}pt}] (\fpeval{2*##1-1}-|\fpeval{2*##2})--(\fpeval{2*##1-0.5}-|\fpeval{2*##2+0.5})--(\fpeval{2*##1}-|\fpeval{2*##2});
+ \draw[transform canvas={yshift=\fpeval{2pt+0.5\tabcolsep}pt}] (\fpeval{2*##1-1.5}-|\fpeval{2*##2-1})--(\fpeval{2*##1-1}-|\fpeval{2*##2-0.5})--(\fpeval{2*##1-1.5}-|\fpeval{2*##2});
+ }%
+ }{}%
+ \IfStrEq{\ListeFuto[##1,2*##2]}{<A}{%
+ \tikz{%
+ \draw[transform canvas={xshift=\fpeval{2pt+0.5\tabcolsep}pt}] (\fpeval{2*##1-1}-|\fpeval{2*##2+0.5})--(\fpeval{2*##1-0.5}-|\fpeval{2*##2})--(\fpeval{2*##1}-|\fpeval{2*##2+0.5});
+ \draw[transform canvas={yshift=\fpeval{2pt+0.5\tabcolsep}pt}] (\fpeval{2*##1-1}-|\fpeval{2*##2-1})--(\fpeval{2*##1-1.5}-|\fpeval{2*##2-0.5})--(\fpeval{2*##1-1}-|\fpeval{2*##2});
+ }%
+ }{}%
+ \IfStrEq{\ListeFuto[##1,2*##2]}{<v}{%
+ \tikz{%
+ \draw[transform canvas={xshift=\fpeval{2pt+0.5\tabcolsep}pt}] (\fpeval{2*##1-1}-|\fpeval{2*##2+0.5})--(\fpeval{2*##1-0.5}-|\fpeval{2*##2})--(\fpeval{2*##1}-|\fpeval{2*##2+0.5});
+ \draw[transform canvas={yshift=\fpeval{2pt+0.5\tabcolsep}pt}] (\fpeval{2*##1-1.5}-|\fpeval{2*##2-1})--(\fpeval{2*##1-1}-|\fpeval{2*##2-0.5})--(\fpeval{2*##1-1.5}-|\fpeval{2*##2});
+ }%
+ }{}%
+ }%
+ }%
+ \end{NiceTabular}
+}%
+
+%%%
% Ronde infernale
%%%
\newcommand\TestNombrePremier[1]{%
@@ -742,11 +1488,11 @@
fi;
else:
if p_="*":
- label.top(TEX("$\times"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ label.top(LATEX("$\times"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
elseif p_="/":
- label.top(TEX("$\div"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ label.top(LATEX("$\div"&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
else:
- label.top(TEX("$"&p_&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
+ label.top(LATEX("$"&p_&Nombre[n]&"$"),1/2[A[n-1],A[n]]);
fi;
fi;
endfor;
@@ -783,7 +1529,7 @@
O=(0,0);
A[0]=O;
for k=1 upto nbcase:
- A[k]-A[k-1]=(Rayon,0);
+ A[k]-A[k-1]=(Rayon+2cm,0);
endfor;
for k=0 upto nbcase-2:
drawarrow (A[k]--A[k+1]) cutbefore (BoiteRectangle shifted A[k]) cutafter (BoiteRectangle shifted A[k+1]) withpen pencircle scaled 1.5;
@@ -805,12 +1551,12 @@
fi;
if Vide=false:
if Perso:
- label(TEX("$"&Depart&"$"),A[0]);
+ label(LATEX("$"&Depart&"$"),A[0]);
else:
- label(TEX("$"&decimal(Depart)&"$"),A[0]);
+ label(LATEX("$"&decimal(Depart)&"$"),A[0]);
fi;
fi;
- \end{mplibcode}
+ \end{mpost}
\fi
}%
@@ -1477,13 +2223,23 @@
%%%
% Enigme Aire
%%%
-\setKVdefault[EnigmeAire]{Modele=A,Couleur=LightSteelBlue,Echelle=7mm,Etape=1}
+\setKVdefault[EnigmeAire]{Modele=A,Couleur=LightSteelBlue,Echelle=7mm,Etape=1,Solution=false,Graines=false}
+\defKV[EnigmeAire]{Graine=\setKV[EnigmeAire]{Graines}}
\def\MPEnigmeAireA{%
\ifluatex
\mplibforcehmode
\begin{mplibcode}
+ boolean Graines,Solution;
+ Graines:=\useKV[EnigmeAire]{Graines};
+ Solution:=\useKV[EnigmeAire]{Solution};
+
+ if Graines:
+ randomseed:=\useKV[EnigmeAire]{Graine};
+ fi;
+
u:=\useKV[EnigmeAire]{Echelle};
+
pair A[],B[];
numeric la[];
la1=ceiling(3+uniformdeviate(7));
@@ -1502,7 +2258,12 @@
trace polygone(B1,B2,B3,B4);
trace polygone(A1,A2,A3,A4);
label(TEX("\Aire[m]{"&decimal(la1*la4)&"}"),iso(A1,B4));
+ if Solution:
+ label(TEX(decimal(la2*la4)&"\,\si{\square\meter}"),iso(B1,B3));
+ else:
label(TEX("?\,\si{\square\meter}"),iso(B1,B3));
+ fi;
+
label(TEX("\Aire[m]{"&decimal(la3*la4)&"}"),iso(B2,A3));
trace cotation(A4,B3,3mm,3mm,TEX("\Lg[m]{"&decimal(la1+la2)&"}"));
trace cotation(B1,A2,-3mm,-3mm,TEX("\Lg[m]{"&decimal(la3+la2)&"}"));
@@ -1514,6 +2275,14 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
+ boolean Graines,Solution;
+ Graines:=\useKV[EnigmeAire]{Graines};
+ Solution:=\useKV[EnigmeAire]{Solution};
+
+ if Graines:
+ randomseed:=\useKV[EnigmeAire]{Graine};
+ fi;
+
u:=\useKV[EnigmeAire]{Echelle};
pair A[],B[];
numeric La[],la[],Ca[];
@@ -1538,7 +2307,12 @@
trace polygone(A1,A2,A3,A4,A5,A6);
trace chemin(A7,A4);
label(TEX("\Aire[m]{"&decimal(la1*La1)&"}"),iso(A1,A3));
+ if Solution:
+ label(TEX(decimal(Ca1*Ca2)&"\,\si{\square\meter}"),iso(B1,B3));
+ else:
label(TEX("?\,\si{\square\meter}"),iso(B1,B3));
+ fi;
+
label(TEX("\Aire[m]{"&decimal(la2*La2)&"}"),iso(A7,A5));
trace appelation(A6,A5,3mm,TEX("\Lg[m]{"&decimal(La2)&"}"));
trace appelation(B1,A3,3mm,TEX("\Lg[m]{"&decimal(La1-La2-Ca1)&"}"));
@@ -1552,6 +2326,14 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
+ boolean Graines,Solution;
+ Graines:=\useKV[EnigmeAire]{Graines};
+ Solution:=\useKV[EnigmeAire]{Solution};
+
+ if Graines:
+ randomseed:=\useKV[EnigmeAire]{Graine};
+ fi;
+
u:=\useKV[EnigmeAire]{Echelle};
pair A[];
numeric la[],La[];
@@ -1588,7 +2370,11 @@
trace cotation(A1,A4,-3mm,-3mm,TEX("\Lg[cm]{"&decimal(La1+La2+La3)&"}"));
label.lft(TEX("\Lg{"&decimal(la1)&"}"),iso(A1,A10));
label.lft(TEX("\Lg{"&decimal(la2)&"}"),iso(A9,A8));
+ if Solution:
+ label.lft(TEX(decimal(la3)&"\,\si{\centi\meter}"),iso(A7,A6));
+ else:
label.lft(TEX("?\,\si{\centi\meter}"),iso(A7,A6));
+ fi;
\end{mplibcode}
\fi
}
@@ -1597,6 +2383,14 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
+ boolean Graines,Solution;
+ Graines:=\useKV[EnigmeAire]{Graines};
+ Solution:=\useKV[EnigmeAire]{Solution};
+
+ if Graines:
+ randomseed:=\useKV[EnigmeAire]{Graine};
+ fi;
+
u:=\useKV[EnigmeAire]{Echelle};
Etape:=\useKV[EnigmeAire]{Etape};
pair A[];
@@ -1613,7 +2407,11 @@
A[6*(k-1)+6]-A[6*(k-1)+5]=A[6*(k-1)+2]-A[6*(k-1)+1];
trace polygone(A[6*(k-1)+1],A[6*(k-1)+2],A[6*(k-1)+3],A[6*(k-1)+4]);
trace segment(A[6*(k-1)+5],A[6*(k-1)+6]);
+ if Solution:
+ trace cotation(A[6*(k-1)+5],A[6*(k-1)+1],-3mm,-3mm,TEX("\Lg{"&decimal(la[k])&"}"));
+ else:
trace cotation(A[6*(k-1)+5],A[6*(k-1)+1],-3mm,-3mm,TEX("?\,\si{\centi\meter}"));
+ fi;
label(TEX("\Aire{"&decimal(la[k]*La[k])&"}"),iso(A[6*(k-1)+5],A[6*(k-1)+2]));
label(TEX("\Aire{"&decimal(la[k+1]*La[k])&"}"),iso(A[6*(k-1)+4],A[6*(k-1)+6]));
if Etape<2:
@@ -1644,6 +2442,14 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
+ boolean Graines,Solution;
+ Graines:=\useKV[EnigmeAire]{Graines};
+ Solution:=\useKV[EnigmeAire]{Solution};
+
+ if Graines:
+ randomseed:=\useKV[EnigmeAire]{Graine};
+ fi;
+
u:=\useKV[EnigmeAire]{Echelle};
pair A[];
numeric la[],La[];
@@ -1673,7 +2479,11 @@
trace cotationarc(A5,A4,5mm,4,1,TEX("\Lg[cm]{"&decimal(La3)&"}") rotated 90);
trace cotationarc(A9,A8,3mm,4,1,TEX("\Lg[cm]{"&decimal(la3-la1)&"}") rotated 180);
trace cotationarc(A4,A3,3mm,4,1,TEX("\Lg[cm]{"&decimal(la3-la2)&"}"));
+ if Solution:
+ trace cotationarc(A3,A1,5mm,3,1,TEX("\Lg{"&decimal(La1+La2)&"}") rotated 90);
+ else:
trace cotationarc(A3,A1,5mm,3,1,TEX("?") rotated 90);
+ fi;
\end{mplibcode}
\fi
}
@@ -1682,6 +2492,14 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
+ boolean Graines,Solution;
+ Graines:=\useKV[EnigmeAire]{Graines};
+ Solution:=\useKV[EnigmeAire]{Solution};
+
+ if Graines:
+ randomseed:=\useKV[EnigmeAire]{Graine};
+ fi;
+
u:=\useKV[EnigmeAire]{Echelle};
pair A[];
numeric la[],La[];
@@ -1710,7 +2528,11 @@
trace polygone(A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13);
trace segment(A7,A13);
trace segment(A10,A4);
+ if Solution:
+ label(TEX("\Aire{"&decimal(la2*La2)&"}"),iso(A1,A6));
+ else:
label(TEX("?\,\si{\square\centi\meter}"),iso(A1,A6));
+ fi;
label(TEX("\Aire[cm]{"&decimal(la1*La1)&"}"),iso(A2,A4));
label(TEX("\Aire[cm]{"&decimal(la3*La3)&"}"),iso(A10,A8));
label(TEX("\Aire[cm]{"&decimal(la4*La4)&"}"),iso(A12,A1));
@@ -7989,11 +8811,13 @@ transform canvas={xshift=0em,yshift=0em}},rectangle,rounded corners,ultra thick,
%%%
% D\'ecomposition de fractions d\'ecimales
%%%
-\setKVdefault[ClesFracDeci]{Complete=false,SansZero=false,Remediation=false}
+\setKVdefault[ClesFracDeci]{Complete=false,SansZero=false,Remediation=false,Longueur=1cm}
+\newlength{\PfCLongueurP}%
\newcommand\FractionDecimale[2][]{%
\useKVdefault[ClesFracDeci]%
\setKV[ClesFracDeci]{#1}%
+ \setlength{\PfCLongueurP}{\useKV[ClesFracDeci]{Longueur}}%
\setsepchar[*]{/}%
\readlist*\ListeFractionDecimale{#2}%
\xdef\FractionDeciNum{\ListeFractionDecimale[1]}%
@@ -8005,14 +8829,14 @@ transform canvas={xshift=0em,yshift=0em}},rectangle,rounded corners,ultra thick,
\StrLen{\fpeval{\FractionDeciNum}}[\LongueurFracDeciNum]%
\xintifboolexpr{\PartieEntiereFractionDeci == 0}{\xdef\LongueurPartieEntiere{0}}{\StrLen{\PartieEntiereFractionDeci}[\LongueurPartieEntiere]}%
\xintifboolexpr{\PartieEntiereFractionDeci == \fpeval{\FractionDeciNum/\FractionDeciDeno}}{%
- \ensuremath{\ifboolKV[ClesFracDeci]{Remediation}{\dots}{\num{\PartieEntiereFractionDeci}}}%
+ \ensuremath{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\PartieEntiereFractionDeci}}}%
}{%
\ifboolKV[ClesFracDeci]{SansZero}{%
\ensuremath{%
- \xintifboolexpr{\PartieEntiereFractionDeci == 0}{}{\ifboolKV[ClesFracDeci]{Remediation}{\dots}{\num{\PartieEntiereFractionDeci}}+}%
+ \xintifboolexpr{\PartieEntiereFractionDeci == 0}{}{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\PartieEntiereFractionDeci}}+}%
\xintFor* ##1 in {\xintSeq{1}{\LongueurPartieDecimale}}\do{%
\StrMid{\PartieDecimaleFractionDeci}{##1}{##1}[\ChiffrePartieDecimale]%
- \xintifForFirst{}{\xintifboolexpr{\ChiffrePartieDecimale == 0}{}{+}}\xintifboolexpr{\ChiffrePartieDecimale == 0}{}{\frac{\ifboolKV[ClesFracDeci]{Remediation}{\dots}{\num{\ChiffrePartieDecimale}}}{\num{\fpeval{10**(\LongueurFracDeciDeno-1-\LongueurPartieDecimale+##1)}}}}%
+ \xintifForFirst{}{\xintifboolexpr{\ChiffrePartieDecimale == 0}{}{+}}\xintifboolexpr{\ChiffrePartieDecimale == 0}{}{\frac{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\ChiffrePartieDecimale}}}{\num{\fpeval{10**(\LongueurFracDeciDeno-1-\LongueurPartieDecimale+##1)}}}}%
}%
}%
}{%
@@ -8020,24 +8844,24 @@ transform canvas={xshift=0em,yshift=0em}},rectangle,rounded corners,ultra thick,
\xintifboolexpr{\FractionDeciNum>\FractionDeciDeno}{%
\ensuremath{%
% on affiche la partie entière.
- \xintifboolexpr{\PartieEntiereFractionDeci == 0}{}{\ifboolKV[ClesFracDeci]{Remediation}{\dots}{\num{\PartieEntiereFractionDeci}}+}%
+ \xintifboolexpr{\PartieEntiereFractionDeci == 0}{}{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\PartieEntiereFractionDeci}}+}%
\StrGobbleLeft{\FractionDeciNum}{\fpeval{\LongueurPartieEntiere}}[\DecompositionFracDeciComplete]%
% on affiche la partie décimale.
\xintFor* ##1 in {\xintSeq{1}{\fpeval{\LongueurFracDeciNum-\LongueurPartieEntiere}}}\do{%
- \xintifForFirst{}{+}\StrMid{\DecompositionFracDeciComplete}{##1}{##1}[\ChiffrePartieDecimale]\frac{\ifboolKV[ClesFracDeci]{Remediation}{\dots}{\num{\ChiffrePartieDecimale}}}{\num{\fpeval{10**##1}}}%
+ \xintifForFirst{}{+}\StrMid{\DecompositionFracDeciComplete}{##1}{##1}[\ChiffrePartieDecimale]\frac{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\ChiffrePartieDecimale}}}{\num{\fpeval{10**##1}}}%
}%
}%
}{%
\ensuremath{%
\xintFor* ##1 in {\xintSeq{1}{\LongueurPartieDecimale}}\do{%
\StrMid{\PartieDecimaleFractionDeci}{##1}{##1}[\ChiffrePartieDecimale]%
- \xintifForFirst{}{+}\frac{\ifboolKV[ClesFracDeci]{Remediation}{\dots}{\num{\ChiffrePartieDecimale}}}{\num{\fpeval{10**(\LongueurFracDeciDeno-1-\LongueurPartieDecimale+##1)}}}%
+ \xintifForFirst{}{+}\frac{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\ChiffrePartieDecimale}}}{\num{\fpeval{10**(\LongueurFracDeciDeno-1-\LongueurPartieDecimale+##1)}}}%
}%
}%
}%
}{%
\ensuremath{%
- \xintifboolexpr{\PartieEntiereFractionDeci == 0}{}{\ifboolKV[ClesFracDeci]{Remediation}{\dots}{\num{\PartieEntiereFractionDeci}}+}\frac{\ifboolKV[ClesFracDeci]{Remediation}{\dots}{\num{\PartieDecimaleFractionDeci}}}{\num{\FractionDeciDeno}}%
+ \xintifboolexpr{\PartieEntiereFractionDeci == 0}{}{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\PartieEntiereFractionDeci}}+}\frac{\ifboolKV[ClesFracDeci]{Remediation}{\pointilles[\PfCLongueurP]}{\num{\PartieDecimaleFractionDeci}}}{\num{\FractionDeciDeno}}%
}%
}%
}%
@@ -8777,6 +9601,8 @@ transform canvas={xshift=0em,yshift=0em}},rectangle,rounded corners,ultra thick,
\tikzset{FIndirect/.style={stealth-}}
\tikzset{FBidirect/.style={stealth-stealth}}
+\newlength{\LabyLongCM}
+
\newcommand\Labyrinthe[3][]{%
\useKVdefault[Labyrinthe]%
\setKV[Labyrinthe]{#1}%
@@ -8787,6 +9613,7 @@ transform canvas={xshift=0em,yshift=0em}},rectangle,rounded corners,ultra thick,
\readlist*\ListeLabySol{#3}%
}{}%
\xdef\LabyLong{\useKV[Labyrinthe]{Longueur}}%
+% \setlength{\LabyLongCM}{\fpeval{\LabyLong*28.3465}pt}%
\xdef\LabyHaut{\useKV[Labyrinthe]{Hauteur}}%
\ifboolKV[Labyrinthe]{SensImpose}{%
\xdef\TotalLaby{\fpeval{4*(\useKV[Labyrinthe]{Colonnes}-1)+1}}%
@@ -8802,7 +9629,11 @@ transform canvas={xshift=0em,yshift=0em}},rectangle,rounded corners,ultra thick,
\foreach \compteurh in {1,...,\useKV[Labyrinthe]{Colonnes}}{%
\xdef\ColorFill{\ListeLaby[\fpeval{\useKV[Labyrinthe]{Colonnes}*(\compteurv-1)+\compteurh},2]}%
\node[fill=\ColorFill,draw,minimum height=\LabyHaut*1cm,minimum width=\LabyLong*1cm,name=A-\compteurh-\compteurv] at
- (\fpeval{\LabyLong+\useKV[Labyrinthe]{EcartH}}*\compteurh,-\fpeval{\LabyHaut+\useKV[Labyrinthe]{EcartV}}*\compteurv) {\ListeLaby[\fpeval{\useKV[Labyrinthe]{Colonnes}*(\compteurv-1)+\compteurh},1]};%
+ (\fpeval{\LabyLong+\useKV[Labyrinthe]{EcartH}}*\compteurh,-\fpeval{\LabyHaut+\useKV[Labyrinthe]{EcartV}}*\compteurv) {%
+% \begin{minipage}{\LabyLongCM}
+ \ListeLaby[\fpeval{\useKV[Labyrinthe]{Colonnes}*(\compteurv-1)+\compteurh},1]%
+% \end{minipage}
+ };%
}%
}%
% fin des cadres
@@ -13791,14 +14622,15 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul.
% y a dans un "seul calcul".
\setcounter{NbCalculDistri}{0}
-\setKVdefault[ClesDistributivite]{Cours=false,Etape=1,Lettre=x,Fleches=false,AideMul=false,Reduction=false,AideAdda=false,AideAddb=false,CouleurAide=red,CouleurReduction=black,CouleurFH=blue,CouleurFB=red,Somme=false,Difference=false,RAZ=false,Oppose=false,All=false,NomExpression=A,Fin=4,Numerique=false,Remarquable=false,Echange=0,Tuile=false,Vide=false,Impression=false,Tableau=false}%,AideAdd=false:inutile ?
+\setKVdefault[ClesDistributivite]{Cours=false,Etape=1,Lettre=x,Fleches=false,AideMul=false,Reduction=false,AideAdda=false,AideAddb=false,CouleurAide=red,CouleurReduction=black,CouleurFH=blue,CouleurFB=red,Somme=false,Difference=false,RAZ=false,Oppose=false,All=false,NomExpression=A,Fin=4,Numerique=false,Remarquable=false,Echange=0,Tuile=false,Vide=false,Reperes=false,Impression=false,Tableau=false}%,AideAdd=false:inutile ?
\newcommand\Tuile[4]{%
\ifluatex
\mplibforcehmode
\begin{mplibcode}
- boolean Vide,Print;
+ boolean Vide,Reperes,Print;
Vide=\useKV[ClesDistributivite]{Vide};
+ Reperes=\useKV[ClesDistributivite]{Reperes};
Print=\useKV[ClesDistributivite]{Impression};
pair _CoinTuilev;
_CoinTuilev=(0,0);
@@ -13891,7 +14723,52 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul.
labeloffset:=labeloffset*2;
label.ulft(TEX("$\times$"),iso(u*(largeur/2,ecart/2),u*(largeur+ecart/2,largeur/2+ecart)));
labeloffset:=labeloffset/2;
- if Vide=false:
+ if Vide:
+ if Reperes:
+ %%%%
+ %% tuile a*c
+ if #1*#3<>0:
+ for k=0 upto (abs(#3)-1):
+ for l=0 upto (abs(#1)-1):
+ path titi;
+ titi=polygone((0,0),u*(longueur,0),u*(longueur,-longueur),u*(0,-longueur)) shifted (u*(largeur+ecart,0)+(u*(k*longueur,-l*longueur)));
+ trace titi withcolor 0.6white;
+ endfor;
+ endfor;
+ fi;
+ %tuile a*d
+ if #1*#4<>0:
+ for k=0 upto (abs(#4)-1):
+ for l=0 upto (abs(#1)-1):
+ path titi;
+ titi=polygone((0,0),u*(largeur,0),u*(largeur,-longueur),u*(0,-longueur)) shifted (u*(largeur+ecart+abs(#3)*longueur,0)+(u*(k*largeur,-l*longueur)));
+ trace titi withcolor 0.6white;
+ endfor;
+ endfor;
+ fi;
+ %tuile b*c
+ if #2*#3<>0:
+ for k=0 upto (abs(#3)-1):
+ for l=0 upto (abs(#2)-1):
+ path titi;
+ titi=polygone((0,0),u*(longueur,0),u*(longueur,-largeur),u*(0,-largeur)) shifted (u*(largeur+ecart,-abs(#1)*longueur)+(u*(k*longueur,-l*largeur)));
+ trace titi withcolor 0.6white;
+ endfor;
+ endfor;
+ fi;
+ %tuile b*d
+ if #2*#4<>0:
+ for k=0 upto (abs(#4)-1):
+ for l=0 upto (abs(#2)-1):
+ path titi;
+ titi=polygone((0,0),u*(largeur,0),u*(largeur,-largeur),u*(0,-largeur)) shifted (u*(largeur+ecart+abs(#3)*longueur,-abs(#1)*longueur)+(u*(k*largeur,-l*largeur)));
+ trace titi withcolor 0.6white;
+ endfor;
+ endfor;
+ fi;
+ fi;
+ %%%
+ else:
%% tuile a*c
if #1*#3<>0:
for k=0 upto (abs(#3)-1):
@@ -14233,6 +15110,17 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul.
\DistriEchange[#1]{#2}{#3}{#4}{#5}%
}{%
\ifboolKV[ClesDistributivite]{Remarquable}{%
+ \ifboolKV[ClesDistributivite]{Numerique}{%
+ \ifx\bla#4\bla%
+ \xintifboolexpr{#3>0}{%
+ \num{\fpeval{#2+#3}}^2=(\num{#2}+\num{#3})^2=\num{#2}^2+2\times\num{#2}\times\num{#3}+\num{#3}^2=\num{\fpeval{#2*#2}}+\num{\fpeval{2*#2*#3}}+\num{\fpeval{#3*#3}}=\num{\fpeval{(#2+#3)**2}}
+ }{%
+ \num{\fpeval{#2+#3}}^2=(\num{#2}\num{#3})^2=\num{#2}^2-2\times\num{#2}\times\num{\fpeval{-#3}}+\num{\fpeval{-#3}}^2=\num{\fpeval{#2*#2}}-\num{\fpeval{2*#2*abs(#3)}}+\num{\fpeval{#3*#3}}=\num{\fpeval{(#2-abs(#3))**2}}
+ }
+ \else
+ \num{\fpeval{#2+#3}}\times\num{\fpeval{#4+#5}}=(\num{#2}+\num{#3})\times(\num{#4}\num{#5})=\num{#2}^2-\num{#3}^2=\num{\fpeval{#2*#2}}-\num{\fpeval{#3*#3}}=\num{\fpeval{(#2+#3)*(#2-#3)}}
+ \fi%
+ }{%
\xintifboolexpr{\useKV[ClesDistributivite]{Etape}==1}{%
\ifx\bla#4\bla(\Affichage{0}{#2}{#3})^2\else(\Affichage{0}{#2}{#3})(\Affichage{0}{#4}{#5})\fi%
}{}
@@ -14282,6 +15170,8 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul.
\ifboolKV[ClesDistributivite]{Difference}{\xdef\SommeA{\fpeval{\SommeA-#2*#4}}\xdef\SommeB{\fpeval{\SommeB-#2*#5-#3*#4}}\xdef\SommeC{\fpeval{\SommeC-#3*#5}}}{}%
\fi%
}{}%
+ % fin Remarquable
+ }%
}{%
\ifboolKV[ClesDistributivite]{Numerique}{%
\xintifboolexpr{\useKV[ClesDistributivite]{Etape}==0}{%
@@ -14449,8 +15339,25 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul.
\xintifboolexpr{#2==0}{\xintifboolexpr{#3==-1}{-}{\num{#3}}}{\xintifboolexpr{#3==-1}{-}{-\num{\fpeval{abs(#3)}}}}
}\LETTRE}%
% partie du x^2
- \xintifboolexpr{#4==0}{}{\xintifboolexpr{#4>0}{\xintifboolexpr{#2==0}{\xintifboolexpr{#3==0}{}{+}}{+}\xintifboolexpr{#4==1}{}{\num{#4}}}{%
- \xintifboolexpr{#2==0}{\xintifboolexpr{#3==0}{\num{#4}}{-\num{\fpeval{abs(#4)}}}}{-\num{\fpeval{abs(#4)}}}}\LETTRE^2}%
+ \xintifboolexpr{#4==0}{}{%
+ \xintifboolexpr{#4>0}{%
+ \xintifboolexpr{#2==0}{%
+ \xintifboolexpr{#3==0}{%
+ }{+}%
+ }{+}%
+ \xintifboolexpr{#4==1}{}{\num{#4}%
+ }%
+ }{%
+ \xintifboolexpr{#2==0}{%
+ \xintifboolexpr{#3==0}{%
+ \num{#4}%
+ }{-\num{\fpeval{abs(#4)%
+ }%
+ }%
+ }%
+ }{%
+ \xintifboolexpr{#4==-1}{-}{-\num{\fpeval{abs(#4)}}}}}%
+ \LETTRE^2}%
}%
}%
@@ -17004,10 +17911,10 @@ couleur indiquée, le nombre de cases donné par le résultat du calcul.
\end{multicols}
}{\ifboolKV[ClesThales]{Figurecroisee}{%
% \StrMid{#2}{1}{1}[\NomA]\StrMid{#2}{2}{2}[\NomB]\StrMid{#2}{3}{3}[\NomC]\StrMid{#2}{4}{4}[\NomM]\StrMid{#2}{5}{5}[\NomN]
- \fbox{\begin{minipage}{0.4\linewidth}%
+ \begin{minipage}{0.4\linewidth}%
{\em La figure est donn\'ee \`a titre indicatif.}%
\[\MPFigReciThalesCroisee{\NomA}{\NomB}{\NomC}{\NomM}{\NomN}{\useKV[ClesThales]{Angle}}\]%
- \end{minipage}}
+ \end{minipage}
\hfill
\begin{minipage}{0.55\linewidth}%
\ReciThales[#1]{\StrMid{#2}{1}{1}}{\StrMid{#2}{2}{2}}{\StrMid{#2}{3}{3}}{\StrMid{#2}{4}{4}}{\StrMid{#2}{5}{5}}\par
@@ -21943,7 +22850,7 @@ Barre=false,Longueur=10cm,Hauteur=5mm,Bicolore=false,EcartBarre=0%Grille est dis
%%%
% Diff\'erentes représentations graphiques
%%%
-\setKVdefault[TraceG]{Grille=false,Graduations=false,PasGradX=1,PasGradY=1,PasGrilleX=1,PasGrilleY=1,Xmin=-5.5,Xmax=5.5,Xstep=1,Ymin=-5.5,Ymax=5.5,Ystep=1,Bornea=-5.5,Borneb=5.5,LabelX={},LabelY={},LabelC=0.5,NomCourbe={},Origine={(5.5,5.5)},Fonction=false,Points=false,Invisible=false,CouleurPoint=red,CouleurTrace=black,Epaisseur=1,Relie=false,RelieSegment=false,Marque=dot,Code=false,Vide=false}%
+\setKVdefault[TraceG]{Grille=false,Graduations=false,PasGradX=1,PasGradY=1,PasGrilleX=1,PasGrilleY=1,Xmin=-5.5,Xmax=5.5,Xstep=1,Ymin=-5.5,Ymax=5.5,Ystep=1,Bornea=-5.5,Borneb=5.5,LabelX={},LabelY={},LabelC=0.5,NomCourbe={},Origine={(5.5,5.5)},Fonction=false,Points=false,Invisible=false,CouleurPoint=red,CouleurTrace=black,Epaisseur=1,Relie=false,RelieSegment=false,Marque=dot,Code=false,Vide=false,NbPointsCourbe=100}%
\defKV[TraceG]{Traces=\setKV[TraceG]{Code}}%
\newcommand\TraceGraphique[2][]{%
@@ -22149,6 +23056,7 @@ Barre=false,Longueur=10cm,Hauteur=5mm,Bicolore=false,EcartBarre=0%Grille est dis
\begin{mplibcode}
borneinf=\useKV[TraceG]{Bornea};
bornesup=\useKV[TraceG]{Borneb};
+ nbpointsCourbe:=\useKV[TraceG]{NbPointsCourbe};
xmin=\useKV[TraceG]{Xmin};
xmax=\useKV[TraceG]{Xmax};
ymin=\useKV[TraceG]{Ymin};
@@ -22263,7 +23171,7 @@ Barre=false,Longueur=10cm,Hauteur=5mm,Bicolore=false,EcartBarre=0%Grille est dis
drawoptions();
if Vide:
else:
- draw courbe1(borneinf,bornesup,100)(#2) withpen (pencircle scaled Epaisseur) withcolor colortrace;
+ draw courbe1(borneinf,bornesup,nbpointsCourbe)(#2) withpen (pencircle scaled Epaisseur) withcolor colortrace;
% labelisation
numeric t;
t=pos*length Cb1;
@@ -22285,7 +23193,7 @@ Barre=false,Longueur=10cm,Hauteur=5mm,Bicolore=false,EcartBarre=0%Grille est dis
\usepackage{ProfCollege}
\setKV[TraceG]{#1}
}
- \begin{mpost}[mpsettings={borneinf=\useKV[TraceG]{Bornea};bornesup=\useKV[TraceG]{Borneb};xmin=\useKV[TraceG]{Xmin};xmax=\useKV[TraceG]{Xmax};ymin=\useKV[TraceG]{Ymin};ymax=\useKV[TraceG]{Ymax};pasx=\useKV[TraceG]{Xstep};pasy=\useKV[TraceG]{Ystep};xu=1cm/\useKV[TraceG]{Xstep};yu=1cm/\useKV[TraceG]{Ystep};grillex=\useKV[TraceG]{PasGrilleX};grilley=\useKV[TraceG]{PasGrilleY};pos=\useKV[TraceG]{LabelC};Epaisseur=\useKV[TraceG]{Epaisseur}; color colortrace;colortrace=\useKV[TraceG]{CouleurTrace};boolean Grille,Vide;Grille=\useKV[TraceG]{Grille};Vide=\useKV[TraceG]{Vide};boolean Graduations;Graduations=\useKV[TraceG]{Graduations};
+ \begin{mpost}[mpsettings={borneinf=\useKV[TraceG]{Bornea};bornesup=\useKV[TraceG]{Borneb};nbpointsCourbe:=\useKV[TraceG]{NbPointsCourbe};xmin=\useKV[TraceG]{Xmin};xmax=\useKV[TraceG]{Xmax};ymin=\useKV[TraceG]{Ymin};ymax=\useKV[TraceG]{Ymax};pasx=\useKV[TraceG]{Xstep};pasy=\useKV[TraceG]{Ystep};xu=1cm/\useKV[TraceG]{Xstep};yu=1cm/\useKV[TraceG]{Ystep};grillex=\useKV[TraceG]{PasGrilleX};grilley=\useKV[TraceG]{PasGrilleY};pos=\useKV[TraceG]{LabelC};Epaisseur=\useKV[TraceG]{Epaisseur}; color colortrace;colortrace=\useKV[TraceG]{CouleurTrace};boolean Grille,Vide;Grille=\useKV[TraceG]{Grille};Vide=\useKV[TraceG]{Vide};boolean Graduations;Graduations=\useKV[TraceG]{Graduations};
pair Origine;
Origine=(xmin,ymin)+\useKV[TraceG]{Origine};}]
@@ -22365,7 +23273,7 @@ Barre=false,Longueur=10cm,Hauteur=5mm,Bicolore=false,EcartBarre=0%Grille est dis
drawoptions();
if Vide:
else:
- draw courbe1(borneinf,bornesup,100)(#2) withpen (pencircle scaled Epaisseur) withcolor colortrace;
+ draw courbe1(borneinf,bornesup,nbpointsCourbe)(#2) withpen (pencircle scaled Epaisseur) withcolor colortrace;
% % labelisation
numeric t;
t=pos*length Cb1;
@@ -23371,7 +24279,7 @@ u:=\useKV[ClesFormule]{Echelle};
{cube}{%
\begin{center}
\MPFigureCube\par
- Volume d'une cube : $a^3\quad(a\times a\times a)$
+ Volume d'un cube : $a^3\quad(a\times a\times a)$
\end{center}
}%
{pave}{%
@@ -24990,46 +25898,67 @@ u:=\useKV[ClesFormule]{Echelle};
n:=0;
for p_=t:
n:=n+1;
+ if substring(1,2) of p_="*":
+ label.top(TEX(substring(2,length p_) of p_),unitp*(valeur[n],0));
+ else:
label.top(TEX(p_),unitp*(valeur[n],0));
+ fi;
+ if p_<>"":
pointe(unitp*(valeur[n],0));
+ fi;
endfor;
fi;
- if AffichageCoord=3:
+ % On ajoute une paramétrisation possible à chaque point.
+ if AffichageCoord>0:
n:=0;
for p_=t:
n:=n+1;
+ if substring(1,2) of p_="*":
+ ACoord:=scantokens(substring(0,1) of p_);
+ if ACoord=3:
+ drawarrow (unitp*(valeur[n],-1))--(unitp*(valeur[n],-0.3));
+ label.bot(btex \hbox to2em{\dotfill} etex,(unitp*(valeur[n],-1)));
+ pointe(unitp*(valeur[n]-ValeurOrigine,0));
+ elseif ACoord=2:
+ if ((ValeurUnitex*valeur[n]) mod pasx)<>0:
+ label.bot(TEX("\footnotesize$\frac{\num{\fpeval{"&decimal(ValeurUnitex)&"*"&decimal(valeur[n])&"}}}{\num{"&decimal(pasx)&"}}$"),unitp*(valeur[n],0));
+ else:
+ label.bot(TEX("\footnotesize\num{\fpeval{"&decimal(ValeurUnitex)&"*"&decimal(valeur[n])&"/"&decimal(pasx)&"}}"),unitp*(valeur[n],0));
+ fi;
+ pointe(unitp*(valeur[n],0));
+ elseif ACoord=1:
+ label.bot(TEX("\footnotesize\num{\fpeval{"&decimal(ValeurOrigine)&"+"&decimal(ValeurUnitex-(ValeurOrigine))&"*"&decimal(valeur[n])&"/"&decimal(pasx)&"}}"),unitp*(valeur[n],0));
+ pointe(unitp*(valeur[n],0));
+ fi;
+ else:
+ if AffichageCoord=3:
if p_<>"":
drawarrow (unitp*(valeur[n],-1))--(unitp*(valeur[n],-0.3));
- label.bot(btex \pointilles[2em] etex,(unitp*(valeur[n],-1)));
+ label.bot(btex \hbox to2em{\dotfill} etex,(unitp*(valeur[n],-1)));
+ pointe(unitp*(valeur[n],0));
fi;
- endfor;
elseif AffichageCoord=2:
- n:=0;
- for p_=t:
- n:=n+1;
if p_<>"":
if ((ValeurUnitex*valeur[n]) mod pasx)<>0:
- label.bot(TEX("\footnotesize$\frac{\num{\fpeval{"&decimal(ValeurOrigine*pasx)&"+"&decimal(ValeurUnitex-ValeurOrigine)&"*"&decimal(valeur[n])&"}}}{\num{"&decimal(pasx)&"}}$"),unitp*(valeur[n],0));
+ label.bot(TEX("\footnotesize$\frac{\num{\fpeval{"&decimal(ValeurUnitex)&"*"&decimal(valeur[n])&"}}}{\num{"&decimal(pasx)&"}}$"),unitp*(valeur[n],0));
else:
label.bot(TEX("\footnotesize\num{\fpeval{"&decimal(ValeurUnitex)&"*"&decimal(valeur[n])&"/"&decimal(pasx)&"}}"),unitp*(valeur[n],0));
fi;
pointe(unitp*(valeur[n],0));
fi;
- endfor;
elseif AffichageCoord=1:
- n:=0;
- for p_=t:
- n:=n+1;
if p_<>"":
- label.bot(TEX("\footnotesize\num{\fpeval{"&decimal(ValeurOrigine)&"+"&decimal(ValeurUnitex-ValeurOrigine)&"*"&decimal(valeur[n])&"/"&decimal(pasx)&"}}"),unitp*(valeur[n],0));
+ label.bot(TEX("\footnotesize\num{\fpeval{"&decimal(ValeurOrigine)&"+"&decimal(ValeurUnitex-(ValeurOrigine))&"*"&decimal(valeur[n])&"/"&decimal(pasx)&"}}"),unitp*(valeur[n],0));
pointe(unitp*(valeur[n],0));
fi;
+ fi;
+ fi;
endfor;
fi;
enddef;
%----
tata(#2);
- clip currentpicture to polygone(u*(-1,-1),((maxx+0.75)*unitp,-u),((maxx+0.75)*unitp,u),u*(-1,1));
+% clip currentpicture to polygone(u*(-1,-2),((maxx+0.75)*unitp,-2u),((maxx+0.75)*unitp,2u),u*(-1,2));
\end{mplibcode}
\else
\begin{mpost}[mpsettings={unitex:=\useKV[ClesReperage]{Unitex}*cm; pasx:=\useKV[ClesReperage]{Pasx}; unitp:=unitex/pasx; ValeurUnitex:=\useKV[ClesReperage]{ValeurUnitex}; ValeurOrigine:=\useKV[ClesReperage]{ValeurOrigine}; AffichageGrad:=\AffichageGrad; AffichageCoord:=\useKV[ClesReperage]{AffichageAbs}; AffichageNom:=\AffichageNom;}]
@@ -26293,7 +27222,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
%%%
% Tableaux d'unit\'es
%%%
-\setKVdefault[ClesTableaux]{Virgule=true,Incline=false,Entiers=false,Decimaux=false,Milliards=false,Millions=false,Micro=false,Nano=false,Partie=false,CouleurG=gray!15,CouleurM=gray!15,Couleurm=gray!15,Couleuru=gray!15,Couleurd=gray!15,Classes=false,Nombres=false,Puissances=false,NbLignes=2,Metre=false,Are=false,Capacite=false,Carre=false,Cube=false,Litre=false,Gramme=false,Fleches=false,FlechesB=false,FlechesH=false,Colonnes=false,Prefixes=false,Escalier=false,Taille=5,Largeur=4.75em,Nom=PfCTableau,CodeAfter={},PuissancesSeules=false,Colonne=-1}
+\setKVdefault[ClesTableaux]{Virgule=true,Incline=false,Entiers=false,Decimaux=false,Milliards=false,Millions=false,Micro=false,Nano=false,Partie=false,CouleurG=gray!15,CouleurM=gray!15,Couleurm=gray!15,Couleuru=gray!15,Couleurd=gray!15,Classes=false,Nombres=false,Puissances=false,NbLignes=2,Metre=false,Are=false,Capacite=false,Carre=false,Cube=false,Litre=false,Gramme=false,Fleches=false,FlechesB=false,FlechesH=false,Colonnes=false,Prefixes=false,Escalier=false,Taille=5,Largeur=4.75em,Nom=PfCTableau,CodeAfter={},PuissancesSeules=false,Colonne=-1,Octet=false}
\newcommand\PfCTBstrut{\rule[-1.2ex]{0pt}{3.8ex}}% Top and Bottom strut
\newcommand\PfCTstrut{\rule{0pt}{3.8ex}}% Top strut
@@ -26323,6 +27252,74 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
}{}%
\PfCTableauIncline%
}{%
+ %
+ %%% Clé Octet
+ %
+ \ifboolKV[ClesTableaux]{Octet}{%
+ \[\renewcommand{\arraystretch}{1.15}%
+ \setlength{\tabcolsep}{0.275\tabcolsep}%
+ \xdef\DecalageLigne{0}
+ \begin{NiceTabular}{*{5}{wc{15pt}wc{15pt}wc{15pt}}}
+ \Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}\\
+ \hline
+ \ifboolKV[ClesTableaux]{Classes}{%
+ \xdef\DecalageLigne{\fpeval{\DecalageLigne+1}}\Block[borders={left,top,right}]{1-3}{téraoctet\PfCTBstrut}&&&\Block[borders={top,right}]{1-3}{gigaoctet\PfCTBstrut}&&&\Block[borders={top,right}]{1-3}{mégaoctet\PfCTBstrut}&&&\Block[borders={top,right}]{1-3}{kilooctet\PfCTBstrut}&&&\Block[borders={top,right}]{1-3}{octet\PfCTBstrut}&&\\
+ \hline
+ }{}%
+ \Block[borders={left,top,right}]{1-3}{To\PfCTBstrut}&&&\Block[borders={top,right}]{1-3}{Go\PfCTBstrut}&&&\Block[borders={top,right}]{1-3}{Mo\PfCTBstrut}&&&\Block[borders={top,right}]{1-3}{ko\PfCTBstrut}&&&\Block[borders={top,right}]{1-3}{o\PfCTBstrut}&&\\
+ \hline
+ \xintFor* ##1 in {\xintSeq{1}{\useKV[ClesTableaux]{NbLignes}}}\do{%
+ &&&&&&&&&&&&&&\\
+ }%
+ \Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}%
+ &&&\Block[]{1-3}{}\\
+ \CodeAfter
+ % on trace les lignes verticales
+ \xintFor* ##1 in {\xintSeq{1}{6}}\do{%
+ \tikz\draw (3-|\fpeval{3*(##1-1)+1})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*(##1-1)+1});
+ }%
+ \xintifboolexpr{\useKV[ClesTableaux]{Colonnes}}{%
+ \xintFor* ##1 in {\xintSeq{1}{5}}\do{%
+ \tikz\draw[gray!50] (3-|\fpeval{3*(##1-1)+2})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*(##1-1)+2});
+ \tikz\draw[gray!50] (3-|\fpeval{3*##1})--(\fpeval{3+\useKV[ClesTableaux]{NbLignes}}-|\fpeval{3*##1});
+ }%
+ }{}%
+ % On place le nombre éventuel
+ \ifx\bla#2\bla%
+ \else%
+ \setsepchar[*]{,*/}
+ \readlist*\ListeNombreAPlacer{#2}%
+ \xintFor* ##2 in{\xintSeq {1}{\ListeNombreAPlacerlen}}\do{%
+ \StrLen{\ListeNombreAPlacer[##2,1]}[\TabLongueurNombre]%
+ \xintFor* ##1 in{\xintSeq {1}{\TabLongueurNombre}}\do{%
+ \tikz\node at (\fpeval{\DecalageLigne+##2+2.5}-|\fpeval{\ListeNombreAPlacer[##2,2]-0.5+##1}) {\PfCTBstrut\StrMid{\ListeNombreAPlacer[##2,1]}{##1}{##1}};%
+ }%
+ }%
+ \fi%
+ % on trace les flèches
+ \ifboolKV[ClesTableaux]{Fleches}{\setKV[ClesTableaux]{FlechesH,FlechesB}}{}%
+ \ifboolKV[ClesTableaux]{FlechesH}{%
+ \xintFor* ##1 in {\xintSeq{1}{4}}\do{%
+ \tikz\draw[gray,->,>=latex,out=30,in=150] (1.5-|\fpeval{2.5+3*(##1-1)}) to node[above, midway]{\small$\times\num{1000}$}(1.5-|\fpeval{2.5+3*##1});%
+ }%
+ }{}%
+ \ifboolKV[ClesTableaux]{Classes}{\xdef\PfCTableauDepart{4}}{\xdef\PfCTableauDepart{3}}%
+ \ifboolKV[ClesTableaux]{FlechesB}{%
+ \xintFor* ##1 in {\xintSeq{1}{4}}\do{%
+ \tikz\draw[gray,->,>=latex,out=-150,in=-30] (\fpeval{\PfCTableauDepart+\useKV[ClesTableaux]{NbLignes}+0.5}-|\fpeval{2.5+3*##1}) to node[below,midway]{\small$\div\num{1000}$}(\fpeval{\PfCTableauDepart+\useKV[ClesTableaux]{NbLignes}+0.5}-|\fpeval{2.5+3*(##1-1)});%
+ }%
+ }{}%
+ \useKV[ClesTableaux]{CodeAfter}%
+ \end{NiceTabular}
+ \]%
+ }{}%
%
%%% Cl\'e Prefixes
%
@@ -27308,7 +28305,6 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\]%
}%
{}%
-
%
%%% Prise en compte de la cl\'e Carre
%
@@ -27653,14 +28649,27 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
colbacktitle=TrameCouleur,%
}
+\makeatletter
\newtcolorbox{MyboxJQ}[2]{%
- enhanced,
- nobeforeafter,
- left=0pt,right=0pt,top=0pt,
- text fill,
- width=\largeurcarte,
- height=\hauteurcarte,
- arc=5pt,
+ enhanced,%
+ nobeforeafter,%
+ left=0pt,right=0pt,top=0pt,%
+ text fill,%
+ width=\largeurcarte,%
+ height=\hauteurcarte,%
+ arc=5pt,%
+ underlay={%
+ \ifboolKV[Cards]{BackgroundAv}{%
+ \begin{tcbclipinterior}
+ \node[anchor=center,opacity=1]
+ at (interior.center) {%
+ \includegraphics[%
+ height=\tcb@height,
+ width=\tcb@width,
+ ]{\useKV[Cards]{ImageAv}}};%
+ \end{tcbclipinterior}%
+ }{}%
+ },%
overlay unbroken and first={%
\coordinate[yshift=-0.5\hauteurtitre] (A1) at (frame.north west);
\coordinate[yshift=0\hauteurtitre] (S3) at (frame.center);
@@ -27681,10 +28690,32 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\end{center}%
\end{minipage}};
},
- colback=white,
+ colback=white
}
-
-\usetikzlibrary{backgrounds}
+%
+\newtcolorbox{MyboxJQAr}{%
+ enhanced,%
+ nobeforeafter,%
+ left=0pt,right=0pt,top=0pt,%
+ text fill,%
+ width=\largeurcarte,%
+ height=\hauteurcarte,%
+ arc=5pt,%
+ underlay={%
+ \ifboolKV[Cards]{BackgroundAv}{%
+ \begin{tcbclipinterior}
+ \node[anchor=center,opacity=1]
+ at (interior.center) {%
+ \includegraphics[%
+ height=\tcb@height,
+ width=\tcb@width,
+ ]{\useKV[Cards]{ImageAr}}};%
+ \end{tcbclipinterior}%
+ }{}%
+ },%
+ colback=white
+}
+\makeatother
\makeatletter
%https://tex.stackexchange.com/questions/347434/clip-background-image-inside-tcolorbox
@@ -27706,7 +28737,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
height=\tcb@height,
width=\tcb@width,
]{\useKV[Cards]{ImageAv}}};%
- \end{tcbclipinterior},%
+ \end{tcbclipinterior}%
}{}%
},%
overlay unbroken and first={%
@@ -27775,7 +28806,8 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\newlength{\margeh}%
\newlength{\margev}%
-\NewEnviron{Trame}{%
+% \NewEnviron{Trame}{%
+\NewDocumentEnvironment{Trame}{+b}{%
\begin{tikzpicture}[remember picture,overlay]
% quadrillages horizontal et vertical
\coordinate[yshift=-\margev] (A) at (current page.north west);%
@@ -27796,11 +28828,11 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\coordinate[xshift=\largeurcards] (D2) at (D1);%
\coordinate[xshift=\largeurcards] (C3) at (C2);%
\coordinate[xshift=\largeurcards] (D3) at (D2);%
- \draw (A) -- (B);%
- \draw (A1) -- (B1);%
- \draw (A2) -- (B2);%
- \draw (A3) -- (B3);%
- \draw (A4) -- (B4);%
+ \draw (A)--(B);%
+ \draw (A1)--(B1);%
+ \draw (A2)--(B2);%
+ \draw (A3)--(B3);%
+ \draw (A4)--(B4);%
\draw (C)--(D);%
\draw (C1)--(D1);%
\draw (C2)--(D2);%
@@ -27815,7 +28847,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte7) at (Carte4);%
\coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte8) at (Carte5);%
\coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte9) at (Carte6);%
- \BODY%
+ #1%
\end{tikzpicture}%
}%
@@ -27825,11 +28857,12 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
Trivial=false,Symboles={\faInfinity,\faSignal,\faProjectDiagram,\faHiking,\faRuler,\faLockOpen}
}%
-\newcommand\Cartes[2][]{%
+\NewDocumentCommand\Cartes{o +m}{%[2][]{%
\useKVdefault[Cards]%
\setKV[Cards]{#1}%
\setsepchar[*]{§*/}%
\readlist*\ListeCards{#2}%
+ \setsepchar{,}%
\ifboolKV[Cards]{Landscape}{%
\setlength{\hauteurcarte}{\fpeval{\useKV[Cards]{Largeur}-\useKV[Cards]{Marge}}mm}%
\setlength{\largeurcarte}{\fpeval{\useKV[Cards]{Hauteur}-\useKV[Cards]{Marge}}mm}%
@@ -27856,17 +28889,17 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\ifboolKV[Cards]{Trame}{%
\clearpage%
\thispagestyle{empty}%
- \begin{Trame}
+ \begin{Trame}%
\multido{\i=1+1}{9}{%
\node[] at (Carte\i) {%
\begin{MyboxTrivial}%
\begin{center}
- \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[9,m]}[hvlines]
+ \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[9,m]}[hvlines]%
\xintFor* ##1 in{\xintSeq{1}{6}}\do{%
\rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\i,\fpeval{1+2*(##1-1)}]\\
}%
- \end{NiceTabular}
- \end{center}
+ \end{NiceTabular}%
+ \end{center}%
\end{MyboxTrivial}%
};%
}%
@@ -27874,43 +28907,43 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\ifboolKV[Cards]{AffichageSolution}{%
\clearpage%
\thispagestyle{empty}%
- \begin{Trame}
+ \begin{Trame}%
\multido{\i=1+1}{3}{%
\node at (Carte\i) {%
\begin{MyboxTrivial}%
- \begin{center}
- \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]
+ \begin{center}%
+ \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]%
\xintFor* ##1 in{\xintSeq{1}{6}}\do{%
\rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\fpeval{4-\i},\fpeval{2*##1}]\\
}%
- \end{NiceTabular}
- \end{center}
+ \end{NiceTabular}%
+ \end{center}%
\end{MyboxTrivial}%
};%
}%
\multido{\i=4+1}{3}{%
\node at (Carte\i) {%
\begin{MyboxTrivial}%
- \begin{center}
- \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]
+ \begin{center}%
+ \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]%
\xintFor* ##1 in{\xintSeq{1}{6}}\do{%
\rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\fpeval{10-\i},\fpeval{2*##1}]\\
}%
- \end{NiceTabular}
- \end{center}
+ \end{NiceTabular}%
+ \end{center}%
\end{MyboxTrivial}%
};%
}%
\multido{\i=7+1}{3}{%
\node at (Carte\i) {%
- \begin{MyboxTrivial}
- \begin{center}
- \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]
+ \begin{MyboxTrivial}%
+ \begin{center}%
+ \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]%
\xintFor* ##1 in{\xintSeq{1}{6}}\do{%
\rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[\fpeval{16-\i},\fpeval{2*##1}]\\
}%
- \end{NiceTabular}
- \end{center}
+ \end{NiceTabular}%
+ \end{center}%
\end{MyboxTrivial}%
};%
}%
@@ -27919,23 +28952,23 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
}{}%
}{%
\begin{MyboxTrivial}%
- \begin{center}
- \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]
+ \begin{center}%
+ \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]%
\xintFor* ##1 in{\xintSeq{1}{6}}\do{%
\rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[1,\fpeval{1+2*(##1-1)}]\\
}%
- \end{NiceTabular}
- \end{center}
+ \end{NiceTabular}%
+ \end{center}%
\end{MyboxTrivial}%
\ifboolKV[Cards]{AffichageSolution}{%
\begin{MyboxTrivial}%
- \begin{center}
- \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]
+ \begin{center}%
+ \begin{NiceTabular}[width=0.9\largeurcarte]{X[1,m]X[10,m]}[hvlines]%
\xintFor* ##1 in{\xintSeq{1}{6}}\do{%
\rule{0pt}{0.12\hauteurcards}\Block{1-1}{\ListeSymbolesTrivial[##1]}&\ListeCards[1,\fpeval{2*##1}]\\
}%
- \end{NiceTabular}
- \end{center}
+ \end{NiceTabular}%
+ \end{center}%
\end{MyboxTrivial}%
}{}%
}%
@@ -27945,7 +28978,7 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
\ifboolKV[Cards]{Trame}{%
\clearpage%
\thispagestyle{empty}%
- \begin{Trame}
+ \begin{Trame}%
\multido{\i=1+1}{9}{%
\node at (Carte\i) {%
\begin{MyboxJQ}{\ListeCards[\i,1]}{\ListeCards[\i,2]}%
@@ -27955,10 +28988,34 @@ label.lft(LATEX("\noexpand\footnotesize\noexpand\SI{\noexpand\fpeval{"&decimal(V
}%
\end{Trame}%
\clearpage%
+ \ifboolKV[Cards]{AffichageSolution}{%
+ \thispagestyle{empty}%
+ \begin{Trame}
+ \multido{\i=1+1}{3}{%
+ \node at (Carte\i) {%
+ \begin{MyboxJQAr}%
+ \end{MyboxJQAr}%
+ };%
+ }%
+ \multido{\i=4+1}{3}{%
+ \node at (Carte\i) {%
+ \begin{MyboxJQAr}%
+ \end{MyboxJQAr}%
+ };%
+ }%
+ \multido{\i=7+1}{3}{%
+ \node at (Carte\i) {%
+ \begin{MyboxJQAr}%
+ \end{MyboxJQAr}%
+ };%
+ }%
+ \end{Trame}%
+ \clearpage%
+ }{}%
}{%
- \begin{MyboxJQ}{\ListeCards[1,1]}{\ListeCards[1,2]}%
+ \begin{MyboxJQAr}%
%%
- \end{MyboxJQ}%
+ \end{MyboxJQAr}%
}%
}{%
\ifboolKV[Cards]{Loop}{%
diff --git a/macros/latex/contrib/profcollege/metapost/PfCGeometrie.mp b/macros/latex/contrib/profcollege/metapost/PfCGeometrie.mp
index 3c5ed4be0d..dd49ba8c3b 100644
--- a/macros/latex/contrib/profcollege/metapost/PfCGeometrie.mp
+++ b/macros/latex/contrib/profcollege/metapost/PfCGeometrie.mp
@@ -1534,4 +1534,430 @@ vardef compas(expr centre,extre,n)=
piccompas
enddef;
+%Grilles
+boolean orig,uni;
+orig=false;
+uni=false;
+
+vardef origine(expr p)=
+ x.origine:=x.so+xpart(p)*quad.u;
+ y.origine:=y.so+ypart(p)*quad.u;
+ orig:=true;
+enddef;
+
+vardef unites(expr g,h)=
+ x.u:=g*cm;
+ y.u:=h*cm;
+ uni:=true;
+enddef;
+
+vardef axes=
+ path axehor,axever;
+ axehor=(x.so*cm,y.origine)--(x.ne*cm,y.origine);
+ axever=(x.origine,y.so*cm)--(x.origine,y.ne*cm);
+ picture axx;
+ axx=image(
+ drawarrow (x.so*cm,y.origine)--(x.ne*cm,y.origine);
+ drawarrow (x.origine,y.so*cm)--(x.origine,y.ne*cm);
+ label.llft(btex $O$ etex,z.origine);
+ );
+ axx
+enddef;
+
+vardef axesvide=
+ path axehor,axever;
+ axehor=(x.so*cm,y.origine)--(x.ne*cm,y.origine);
+ axever=(x.origine,y.so*cm)--(x.origine,y.ne*cm);
+ picture axxx;
+ axxx=image(
+ drawarrow (x.so*cm,y.origine)--(x.ne*cm,y.origine);
+ drawarrow (x.origine,y.so*cm)--(x.origine,y.ne*cm);
+ );
+ axxx
+enddef;
+
+vardef axesvideorigine=
+ path axehor,axever;
+ axehor=(x.origine,y.origine)--(x.ne*cm,y.origine);
+ axever=(x.origine,y.origine)--(x.origine,y.ne*cm);
+ picture axxx;
+ axxx=image(
+ drawarrow (x.origine,y.origine)--(x.ne*cm,y.origine);
+ drawarrow (x.origine,y.origine)--(x.origine,y.ne*cm);
+ );
+ axxx
+enddef;
+
+def enplace=
+ if orig:
+ xscaled x.u yscaled y.u shifted (z.origine)
+ else:
+ xscaled x.u yscaled y.u shifted (z.so)
+ fi
+enddef;
+
+vardef placepoint(expr q,r)=
+ (q,r) enplace
+enddef;
+
+vardef pp(expr qq,rr)=placepoint(qq,rr)
+enddef;
+
+def replace=
+ xscaled (1/x.u) yscaled (1/y.u) shifted (-z.origine)
+enddef;
+
+def retrouvecoord(expr p)=%trasnforme les coordonées du point d'affixe p dans le repère absolu de metapost en les coordonnées du point dans le repère défini par l'utilisateur
+ p replace
+enddef;
+
+vardef placepointtri(expr q,r)=
+ save $;
+ pair $;
+ if orig:
+ $=z.origine shifted (q*(x.u,0)+r*(x.u/2,y.u));
+ else:
+ $=z.so*cm shifted (q*(x.u,0)+r*(x.u/2,y.u));
+ fi;
+ $
+enddef;
+
+vardef pptri(expr qq,rr)=placepointtri(qq,rr)
+enddef;
+
+vardef placepointiso(expr q,r)=
+ save $;
+ pair $;
+ $=if orig: z.origine else: (z.so+((sqrt(3)/2),0.5))*cm fi shifted (q*(sqrt(3)*cm,0)+0.5*r*cm*(sqrt(3),1));
+ $
+enddef;
+
+vardef ppiso(expr qq,rr)=placepointiso(qq,rr)
+enddef;
+
+vardef reperehexa(expr colo,lign)=
+ save $;
+ path $;
+ if (colo mod 2)=1:
+ $=(hexa shifted(0.5cm,0)) shifted((colo-1)*1.5*cm,(lign-1)*2*((sqrt 3)/2)*cm);
+ else:
+ $=(hexa shifted(0.5cm,0)) shifted((colo-1)*1.5*cm,((lign-1)*2+1)*((sqrt 3)/2)*cm);
+ fi;
+ $
+enddef;
+
+vardef Centrehexa(expr colo,lign)=
+ save $;
+ pair $;
+ if (colo mod 2)=1:
+ $=(centrehexa shifted(0.5cm,0)) shifted((colo-1)*1.5*cm,(lign-1)*2*((sqrt 3)/2)*cm);
+ else:
+ $=(centrehexa shifted(0.5cm,0)) shifted((colo-1)*1.5*cm,((lign-1)*2+1)*((sqrt 3)/2)*cm);
+ fi;
+ $
+enddef;
+
+%%Les grilles
+
+vardef grille(expr t)=
+ save gri;
+ picture gri;
+ orig:=false;
+ x.u:=t*cm;
+ y.u:=t*cm;
+ quad.u:=t*cm;
+ gri=image(
+ path p[];
+ %horizontale
+ p1:=(x.so*cm,0)--(x.ne*cm,0);
+ %verticale
+ p2:=(0,y.so*cm)--(0,y.ne*cm);
+ %options
+ %horizontales
+ for i:=0 step t until (y.ne-y.so):
+ draw p1 shifted (0,i*cm);
+ endfor;
+ %verticales
+ for i:=0 step t until (x.ne-x.so) :
+ draw p2 shifted (i*cm,0);
+ endfor;
+ );
+ gri
+enddef;
+
+vardef papiermillimetre=
+ save $;
+ picture $;
+ orig:=false;
+ x.u:=1cm;
+ y.u:=1cm;
+ quad.u:=1cm;
+ $=image(
+ path p[];
+ %horizontale
+ p1:=(x.so*cm,0)--(x.ne*cm,0);
+ %verticale
+ p2:=(0,y.so*cm)--(0,y.ne*cm);
+ %grille millimétrique
+ pickup pencircle scaled 0.2;
+ %horizontales
+ for j:=y.so step 0.1 until y.ne:
+ draw p1 shifted (0,j*cm);
+ endfor;
+ %verticales
+ for j:=x.so step 0.1 until x.ne :
+ draw p2 shifted (j*cm,0);
+ endfor;
+ %grille demi-centimétrique
+ pickup pencircle scaled 0.5;
+ %horizontales
+ for j:=y.so step 0.5 until y.ne:
+ draw p1 shifted (0,j*cm);
+ endfor;
+ %verticales
+ for j:=x.so step 0.5 until x.ne :
+ draw p2 shifted (j*cm,0);
+ endfor;
+ %grille centimétrique
+ pickup pencircle scaled 0.7;
+ %horizontales
+ for j:=y.so step 1 until y.ne:
+ draw p1 shifted (0,j*cm);
+ endfor;
+ %verticales
+ for j:=x.so step 1 until x.ne :
+ draw p2 shifted (j*cm,0);
+ endfor;
+ %grille penta-centimétrique
+ pickup pencircle scaled 1;
+ %horizontales
+ for j:=y.so step 5 until y.ne:
+ draw p1 shifted (0,j*cm);
+ endfor;
+ %verticales
+ for j:=x.so step 5 until x.ne :
+ draw p2 shifted (j*cm,0);
+ endfor;
+ );
+ $
+enddef;
+
+vardef Pointe(text t)=
+ for p_=t: if pair p_:
+ fill fullcircle scaled 1mm shifted p_;
+ fi;
+ endfor;
+enddef;
+
+vardef papiercahier=
+ save $;
+ orig:=false;
+ picture $;
+ x.u:=8mm;
+ y.u:=8mm;
+ quad.u:=8mm;
+ $=image(
+ path p[];
+ %horizontale
+p1:=(x.so*cm,0)--(x.ne*cm,0);
+ %verticale
+p2:=(0,y.so*cm)--(0,y.ne*cm);
+ %grille 2-millimétrique
+ pickup pencircle scaled 0.5;
+ %lignes horizontales
+ for i:=y.ne step -0.2 until y.so:
+ draw p1 shifted (0,i*cm);
+ endfor;
+ %grille 8-millimétrique
+ pickup pencircle scaled 1bp;
+ %lignes horizontales
+ for i:=y.ne step -0.8 until y.so:
+ draw p1 shifted (0,i*cm);
+ endfor;
+ %lignes verticales
+ for i:=x.so step 0.8 until (x.ne+1):
+ draw p2 shifted (i*cm,0);
+ endfor;
+ );
+ $
+enddef;
+
+vardef papierdeuxlignes=
+ save $;
+ orig:=false;
+ picture $;
+ x.u:=8mm;
+ y.u:=6mm;
+ $=image(
+ path p[];
+ %horizontale
+ p1:=(x.so*cm,0)--(x.ne*cm,0);
+ %grille 2-millimétrique
+ pickup pencircle scaled 0.5;
+ %lignes horizontales
+ for i:=y.so+0.2 step 0.6 until y.ne:
+ draw p1 shifted (0,i*cm);
+ endfor;
+ %grille 8-millimétrique
+ pickup pencircle scaled 1;
+ %lignes horizontales
+ for i:=y.so step 0.6 until y.ne:
+ draw p1 shifted (0,i*cm);
+ endfor;
+ );
+ $
+enddef;
+
+vardef papierpointe=
+ save $;
+ picture $;
+ orig:=false;
+ x.u:=5mm;
+ y.u:=5mm;
+ quadu:=5mm;
+ $=image(
+ for i:=0 upto 2*(xpart(retrouvecoord(z.ne*cm))-xpart(retrouvecoord(z.so*cm))):
+ for j:=0 upto 2*(ypart(retrouvecoord(z.ne*cm))-ypart(retrouvecoord(z.so*cm))):
+ fill ((fullcircle scaled 1bp shifted(z.so*cm)) shifted ((i/2,j/2)*cm));
+ endfor
+ endfor;
+ );
+ $
+enddef;
+
+vardef papiertriangle=
+ save $;
+ orig:=false;
+ if uni=false:
+ x.u:=1cm;
+ y.u:=(sqrt(3)/2)*cm;
+ fi;
+ picture $;
+ $=image(
+ path p[];
+ %triangle haut
+ %p1:=(x.so*cm,0)--(x.so*cm+1cm,0)--((x.so*cm,0) rotatedabout((x.so*cm+1cm,0),-60))--cycle;
+ p1:=(x.so*cm,0)--(x.so*cm+x.u,0)--((x.so*cm,0) rotatedabout((x.so*cm+x.u,0),-60))--cycle;
+ %triangle bas
+ %p2:=((x.so*cm,0)--(x.so*cm+1cm,0)--((x.so*cm,0) rotatedabout((x.so*cm+1cm,0),60))--cycle) shifted (-0.5cm,((sqrt3)/2)*cm);
+ p2:=((x.so*cm,0)--(x.so*cm+x.u,0)--((x.so*cm,0) rotatedabout((x.so*cm+x.u,0),60))--cycle) shifted (-x.u/2,y.u);
+ %grille horizontale1
+ pickup pencircle scaled 0.5;
+ numeric etag;
+ etag=floor(2*cm*(ypart(retrouvecoord(z.ne*cm))-ypart(retrouvecoord(z.so*cm)))/(y.u))+1;
+ for i:=0 step 2 until etag:
+ for j:=0 upto (xpart(retrouvecoord(z.ne*cm))-xpart(retrouvecoord(z.so*cm))):
+ draw p1 shifted (j*x.u,i*y.u);
+ draw p2 shifted (j*x.u,i*y.u);
+ endfor
+ endfor;
+ %grille horizontale 2
+ pickup pencircle scaled 0.5;
+ for i:=1 step 2 until etag:
+ for j:=0 upto (xpart(retrouvecoord(z.ne*cm))-xpart(retrouvecoord(z.so*cm))):
+ draw p1 shifted ((j-1/2)*x.u,i*y.u);
+ draw p2 shifted ((j+1/2)*x.u,i*y.u);
+ endfor
+ endfor;
+ );
+ $
+enddef;
+
+vardef papiertrianglepointe=
+ save $;
+ orig:=false;
+ if uni=false:
+ x.u:=1cm;
+ y.u:=(sqrt(3)/2)*cm;
+ fi;
+ picture $;
+ $=image(
+ pickup pencircle scaled 0.5;
+ numeric etag;
+ etag=floor(2*cm*(ypart(retrouvecoord(z.ne*cm))-ypart(retrouvecoord(z.so*cm)))/(y.u))+1;
+ for i:=0 step 2 until etag:
+ for j:=0 upto (xpart(retrouvecoord(z.ne*cm))-xpart(retrouvecoord(z.so*cm))):
+ fill (fullcircle scaled 1bp shifted(z.so*cm)) shifted (j*x.u,i*y.u);
+ endfor
+ endfor;
+ for i:=1 step 2 until etag:
+ for j:=0 upto (xpart(retrouvecoord(z.ne*cm))-xpart(retrouvecoord(z.so*cm))):
+ fill (fullcircle scaled 1bp shifted(z.so*cm)) shifted ((j-1/2)*x.u,i*y.u);
+ endfor
+ endfor;
+ );
+ $
+enddef;
+
+vardef papierisometriquepointe=
+ save $;
+ orig:=false;
+ y.u:=1cm;
+ x.u:=(sqrt(3)/2)*cm;
+ picture $;
+ $=image(
+ %grille horizontale1
+ pickup pencircle scaled 0.5;
+ for i:=0 step 1 until (ypart(retrouvecoord(z.ne*cm))-ypart(retrouvecoord(z.so*cm))):
+ for j:=0 step 2 until (xpart(retrouvecoord(z.ne*cm))-xpart(retrouvecoord(z.so*cm))+2):
+ fill (fullcircle scaled 1bp shifted (z.so*cm)) shifted (j*((sqrt3)/2)*cm,i*cm);
+ endfor
+ endfor;
+ %grille horizontale 2
+ for i:=0 step 1 until (ypart(retrouvecoord(z.ne*cm))-ypart(retrouvecoord(z.so*cm))-1):
+ for j:=1 step 2 until (xpart(retrouvecoord(z.ne*cm))-xpart(retrouvecoord(z.so*cm))+1):
+ fill (fullcircle scaled 1bp shifted (z.so*cm)) shifted (j*((sqrt3)/2)*cm,(i+0.5)*cm);
+ endfor
+ endfor;
+ );
+ $
+enddef;
+
+vardef papierisometrique=
+ save $;
+ orig:=false;
+ x.u:=(sqrt(3)/2)*cm;
+ y.u:=1cm;
+ picture $;
+ $=image(
+ path p[];
+ %triangle haut
+ p1:=(x.so*cm,1cm)--((x.so*cm,0) rotatedabout((x.so*cm,1cm),60))--(x.so*cm,0);
+ %triangle bas
+ p2:=((x.so*cm,1cm)--((x.so*cm,0) rotatedabout((x.so*cm,1cm),-60))--(x.so*cm,0)) shifted (((sqrt3)/2)*cm,0);
+ %grille horizontale1
+ pickup pencircle scaled 0.5;
+ for i:=0 step 2 until (xpart(retrouvecoord(z.ne*cm))-xpart(retrouvecoord(z.so*cm))):
+ for j:=0 upto (ypart(retrouvecoord(z.ne*cm))-ypart(retrouvecoord(z.so*cm))-1):
+ draw p1 shifted (i*((sqrt3)/2)*cm,j*cm);
+ draw p2 shifted ((i+1)*((sqrt3)/2)*cm,j*cm);
+ endfor
+ endfor;
+ );
+ $
+enddef;
+
+vardef papierhexagonal=
+ save $;
+ picture $;
+ orig:=false;
+ path hexa;
+ %hexagone de départ
+ hexa:=z.so*cm--(x.so*cm+1cm,y.so*cm)--(z.so*cm rotatedabout((x.so*cm+1cm,y.so*cm),-120))--((x.so*cm+1cm,y.so*cm) rotatedabout((z.so*cm rotatedabout((x.so*cm+1cm,y.so*cm),-120)),-120))--((z.so*cm rotatedabout((x.so*cm+1cm,y.so*cm),-120)) rotatedabout(((x.so*cm+1cm,y.so*cm) rotatedabout((z.so*cm rotatedabout((x.so*cm+1cm,y.so*cm),-120)),-120)),-120))--(((x.so*cm+1cm,y.so*cm) rotatedabout((z.so*cm rotatedabout((x.so*cm+1cm,y.so*cm),-120)),-120)) rotatedabout(((z.so*cm rotatedabout((x.so*cm+1cm,y.so*cm),-120)) rotatedabout(((x.so*cm+1cm,y.so*cm) rotatedabout((z.so*cm rotatedabout((x.so*cm+1cm,y.so*cm),-120)),-120)),-120)),-120))--cycle;
+ $=image(
+ pair centrehexa;
+ centrehexa=1/2[z.so*cm,((x.so*cm+1cm,y.so*cm) rotatedabout((z.so*cm rotatedabout((x.so*cm+1cm,y.so*cm),-120)),-120))];
+ pickup pencircle scaled 0.5;
+ numeric etag;
+ etag=floor((abs(y.ne*cm-y.so*cm))/((sqrt(3)/2)*cm));
+ for i:=0 step 3 until (abs(x.ne*cm-x.so*cm)/1cm):
+ for j:=0 step 2 until etag:
+ draw hexa shifted ((i+0.5)*cm,j*((sqrt 3)/2)*cm);
+ draw hexa shifted ((i+2)*cm,(j+1)*((sqrt 3)/2)*cm);
+ endfor
+ endfor;
+ );
+ $
+enddef;
+
endinput;
diff --git a/macros/latex/contrib/profcollege/metapost/PfCScratch.mp b/macros/latex/contrib/profcollege/metapost/PfCScratch.mp
index 10a8972ef8..3c6826777a 100644
--- a/macros/latex/contrib/profcollege/metapost/PfCScratch.mp
+++ b/macros/latex/contrib/profcollege/metapost/PfCScratch.mp
@@ -1858,7 +1858,7 @@ vardef Sinon=
drawoptions();
texto=image(
labeloffset:=0;
- label.lrt(TEX("\barre\,\hbox to"&decimal(LongRep[numblocrep])&"pt{}"),if unknown _coinprec: (0,0) else:_coinprec fi) if print=false : withcolor blanc fi;
+ label.lrt(TEX("\longbarre\,\hbox to"&decimal(LongRep[numblocrep])&"pt{}"),if unknown _coinprec: (0,0) else:_coinprec fi) if print=false : withcolor blanc fi;
labeloffset:=3;
);
path cadre;
diff --git a/macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp b/macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp
index f3acd75d3d..f0ef36f1e0 100644
--- a/macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp
+++ b/macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp
@@ -1885,7 +1885,7 @@ vardef Sinon=
drawoptions();
texto=image(
labeloffset:=0;
- label.lrt(LATEXSCRATCH("\, \hbox to"&decimal(LongRep[numblocrep])&"pt{\bfseries\barre sinon}"),if unknown _coinprec: (0,0) else:_coinprec fi) if print=false : withcolor blanc fi;
+ label.lrt(LATEXSCRATCH("\, \hbox to"&decimal(LongRep[numblocrep])&"pt{\bfseries\longbarre sinon}"),if unknown _coinprec: (0,0) else:_coinprec fi) if print=false : withcolor blanc fi;
labeloffset:=3;
);
path cadre;
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index fe99aadd7a..3fef1b87f7 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,16 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.2.2] - 2023-03-04
+
+### Fixed
+- Value of uncertainty around decimal marker when rounding
+ to `10` (see issues
+ [\#644](https://github.com/josephwright/siunitx/issues/644)
+ and [\#646](https://github.com/josephwright/siunitx/issues/646))
+- Exponent format output when rounding to an uncertainty (see issue
+ [\#645](https://github.com/josephwright/siunitx/issues/645))
+
## [v3.2.1] - 2023-02-21
### Fixed
@@ -1866,7 +1876,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Added
- First public testing release (as `si`)
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.2.1...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.2.2...HEAD
+[v3.2.2]: https://github.com/josephwright/siunitx/compare/v3.2.1...v3.2.2
[v3.2.1]: https://github.com/josephwright/siunitx/compare/v3.2.0...v3.2.1
[v3.2.0]: https://github.com/josephwright/siunitx/compare/v3.1.11...v3.2.0
[v3.1.11]: https://github.com/josephwright/siunitx/compare/v3.1.10...v3.1.11
diff --git a/macros/latex/contrib/siunitx/siunitx-abbreviation.dtx b/macros/latex/contrib/siunitx/siunitx-abbreviation.dtx
index 11ebc290cb..152f56608a 100644
--- a/macros/latex/contrib/siunitx/siunitx-abbreviation.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-abbreviation.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% File: siunitx-abbreviation.dtx Copyright (C) 2018,2019,2021,2022 Joseph Wright
+% File: siunitx-abbreviation.dtx Copyright (C) 2018,2019,2021-2023 Joseph Wright
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
\usepackage{siunitx}
@@ -47,8 +49,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx-angle.dtx b/macros/latex/contrib/siunitx/siunitx-angle.dtx
index ac1c19638c..866fae193f 100644
--- a/macros/latex/contrib/siunitx/siunitx-angle.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-angle.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% File: siunitx-angle.dtx Copyright (C) 2016-2019,2021,2022 Joseph Wright
+% File: siunitx-angle.dtx Copyright (C) 2016-2019,2021-2023 Joseph Wright
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
\ProvideDocumentCommand\foreign{m}{\textit{#1}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
@@ -48,8 +50,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx-binary.dtx b/macros/latex/contrib/siunitx/siunitx-binary.dtx
index f3e3afff3e..bcb643808e 100644
--- a/macros/latex/contrib/siunitx/siunitx-binary.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-binary.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% File: siunitx-binary.dtx Copyright (C) 2021 Joseph Wright
+% File: siunitx-binary.dtx Copyright (C) 2021,2023 Joseph Wright
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
\usepackage{siunitx}
@@ -47,8 +49,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index 7f915ef16f..b6daad35bc 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-code.tex b/macros/latex/contrib/siunitx/siunitx-code.tex
index a4c3978310..a0a4319e23 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.tex
+++ b/macros/latex/contrib/siunitx/siunitx-code.tex
@@ -1,6 +1,6 @@
\iffalse meta-comment
-File: siunitx-code.tex Copyright (C) 2016-2022 Joseph Wright
+File: siunitx-code.tex Copyright (C) 2016-2023 Joseph Wright
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -47,6 +47,7 @@ for those people who are interested.
}
\makeatother
\ExplSyntaxOff
+\NewDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
\NewDocumentCommand\foreign{m}{\textit{#1}}
% Standard settings
@@ -67,8 +68,7 @@ for those people who are interested.
Joseph Wright%
\thanks{%
E-mail:
- \href{mailto:joseph.wright@morningstar2.co.uk}
- {joseph.wright@morningstar2.co.uk}%
+ \email{joseph.wright@morningstar2.co.uk}%
}%
}
diff --git a/macros/latex/contrib/siunitx/siunitx-command.dtx b/macros/latex/contrib/siunitx/siunitx-command.dtx
index 354ab3734c..a862676ade 100644
--- a/macros/latex/contrib/siunitx/siunitx-command.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-command.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% File: siunitx-command.dtx Copyright (C) 2019,2021 Joseph Wright
+% File: siunitx-command.dtx Copyright (C) 2019,2021,2023 Joseph Wright
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
\ProvideDocumentCommand\foreign{m}{\textit{#1}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
@@ -48,8 +50,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx-complex.dtx b/macros/latex/contrib/siunitx/siunitx-complex.dtx
index 8303c9f302..fe23598950 100644
--- a/macros/latex/contrib/siunitx/siunitx-complex.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-complex.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% File: siunitx-complex.dtx Copyright (C) 2021,2022 Joseph Wright
+% File: siunitx-complex.dtx Copyright (C) 2021-2023 Joseph Wright
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
\ProvideDocumentCommand\foreign{m}{\textit{#1}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
@@ -48,8 +50,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx-compound.dtx b/macros/latex/contrib/siunitx/siunitx-compound.dtx
index a11121a4ac..c4d2248845 100644
--- a/macros/latex/contrib/siunitx/siunitx-compound.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-compound.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% File: siunitx-compound.dtx Copyright (C) 2018-2021 Joseph Wright
+% File: siunitx-compound.dtx Copyright (C) 2018-2021,2023 Joseph Wright
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
\ProvideDocumentCommand\foreign{m}{\textit{#1}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
@@ -48,8 +50,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx-emulation.dtx b/macros/latex/contrib/siunitx/siunitx-emulation.dtx
index 65db65b664..9cb54d21c2 100644
--- a/macros/latex/contrib/siunitx/siunitx-emulation.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-emulation.dtx
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
\usepackage{siunitx}
@@ -47,8 +49,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx-locale.dtx b/macros/latex/contrib/siunitx/siunitx-locale.dtx
index cbf3ec14a0..6a0aa3ffea 100644
--- a/macros/latex/contrib/siunitx/siunitx-locale.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-locale.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% File: siunitx-locale.dtx Copyright (C) 2020-2022 Joseph Wright
+% File: siunitx-locale.dtx Copyright (C) 2020-2023 Joseph Wright
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
\usepackage{siunitx}
@@ -47,8 +49,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx-number.dtx b/macros/latex/contrib/siunitx/siunitx-number.dtx
index f4d44ea5cc..8df5670c25 100644
--- a/macros/latex/contrib/siunitx/siunitx-number.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-number.dtx
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
\ProvideDocumentCommand\foreign{m}{\textit{#1}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
@@ -48,8 +50,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
@@ -3160,18 +3161,20 @@
% \end{macro}
%
% \begin{macro}[EXP]{\@@_round_uncertainty:nnnnnnn}
-% \begin{macro}[EXP]{\@@_round_uncertainty_end:nn}
% \begin{macro}[EXP]{\@@_round_uncertainty:nnn}
% \begin{macro}[EXP]{\@@_round_uncertainty:nnnn}
% \begin{macro}[EXP]{\@@_round_uncertainty:nnnnnn}
% \begin{macro}[EXP]
% {
-% \@@_round_uncertainty_simple:nnnnnn ,
-% \@@_round_uncertainty_shift:nnnnnn
+% \@@_round_uncertainty_auxi:nnnnn ,
+% \@@_round_uncertainty_auxii:nnnnn
% }
-% \begin{macro}[EXP]{\@@_round_uncertainty_shift:nn}
-% \begin{macro}[EXP]{\@@_round_uncertainty_shift:nnnw}
-% \begin{macro}[EXP]{\@@_round_uncertainty_shift_aux:nnnnn}
+% \begin{macro}[EXP]{\@@_round_uncertainty_auxiii:nnnnnnn}
+% \begin{macro}[EXP]{\@@_round_uncertainty_zeros:nnnn}
+% \begin{macro}[EXP]{\@@_round_uncertainty_auxiv:nnnnnnN}
+% \begin{macro}[EXP]{\@@_round_uncertainty_auxv:nnnN}
+% \begin{macro}[EXP]{\@@_round_uncertainty_auxvi:nn}
+% \begin{macro}[EXP]{\@@_round_uncertainty_auxvii:nnNnnn}
% \begin{macro}[EXP]
% {
% \@@_round_uncertainty_engineering:nnn ,
@@ -3202,13 +3205,11 @@
\exp_not:n { {#1} {#2} }
\exp_args:Nnno \@@_round_uncertainty:nnn
{#3} {#4} { \use_ii:nn #5 }
- \@@_round_uncertainty_end:nn {#6} {#7}
+ {#6} {#7}
}
{ \exp_not:n { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } }
}
}
-\cs_new:Npn \@@_round_uncertainty_end:nn #1#2
- { \exp_not:n { {#1} {#2} } }
% \end{macrocode}
% Round the uncertainty first: this is needed to get the number of places
% correct. Once that is done, it's just a question of working out the digits
@@ -3233,123 +3234,142 @@
}
}
% \end{macrocode}
-% Here, we need to work out how many digits to zero-fill the uncertainty, for
-% the case where it crosses into the integer part. This depends on whether
-% the uncertainty rounded up, which also links to additional treatment. We
-% therefore split paths here.
+% The number of digits to remove from the main part and the detail of
+% zero filling depends on whether we rounded up the uncertainty. So there
+% is a split here.
% \begin{macrocode}
\cs_new:Npn \@@_round_uncertainty:nnnnnn #1#2#3#4#5#6
{
\tl_if_blank:nTF {#1}
- {
- \exp_args:Nf \@@_round_uncertainty_simple:nnnnn
- {
- \prg_replicate:nn
- {
- \int_max:nn
- {
- \tl_if_blank:nTF {#4}
- { #5 }
- { ( \tl_count:n {#6} - \tl_count:n {#4} ) - \tl_count:n {#2} }
- }
- { 0 }
- }
- { 0 }
- }
- {#3} {#4} {#2} {#5}
- }
- { \@@_round_uncertainty_shift:nnnnn {#3} {#4} {#1} {#2} {#5} }
-
+ { \@@_round_uncertainty_auxi:nnnnn }
+ { \@@_round_uncertainty_auxii:nnnnn }
+ {#2} {#3} {#4} {#5} {#6}
}
% \end{macrocode}
-% The simple case: round and pad out the uncertainty as required.
+% The simple case: just round to the same number of digits and do zero
+% filling.
% \begin{macrocode}
-\cs_new:Npn \@@_round_uncertainty_simple:nnnnn #1#2#3#4#5
+\cs_new:Npn \@@_round_uncertainty_auxi:nnnnn #1#2#3#4#5
{
- \@@_round:nnn
- {#5}
- {#2} {#3}
- { { S } { #4 #1 } }
+ \exp_args:Nf \@@_round_uncertainty_auxiv:nnnnnnN
+ { \@@_round_uncertainty_zeros:nnnn {#1} {#3} {#4} {#5} }
+ {#4}
+ {#2} {#3} {#1} { }
+ \@@_round_uncertainty_auxvi:nn
}
% \end{macrocode}
+% When the uncertainty rounds up, zero filling is dependent on whether we
+% cross the boundary for the integer part.
% \begin{macrocode}
-\cs_new:Npn \@@_round_uncertainty_shift:nnnnn #1#2#3#4#5
+\cs_new:Npn \@@_round_uncertainty_auxii:nnnnn #1#2#3#4#5
{
- \exp_args:Ne \@@_round_uncertainty_shift:nn
- { \@@_round:fnn { \int_eval:n { #5 + 1 } } {#1} {#2} }
- {#5}
+ \exp_args:Nff \@@_round_uncertainty_auxiii:nnnnnnn
+ { \tl_count:n {#5} }
+ { \tl_count:n {#3} }
+ {#1} {#2} {#3} {#4} {#5}
}
-% \end{macrocode}
-% If the padding length is the same as the number of integer digits, then
-% we have a pathological case and need to filter out. They show up as they
-% have the either the precision greater than the length of the integer
-% part, or have a value of exactly $10$ when the exponent mode is
-% scientific. The latter test has to deal with an exponent threshold too:
-% there we are looking for cases where the threshold will have forced
-% scientific presentation.
-% \begin{macrocode}
-\cs_new:Npn \@@_round_uncertainty_shift:nn #1#2
- { \@@_round_uncertainty_shift:nnnw #1 {#2} }
-\cs_new:Npn \@@_round_uncertainty_shift:nnnw
- #1#2#3 #4 \@@_round_uncertainty_end:nn #5#6
+\cs_new:Npn \@@_round_uncertainty_auxiii:nnnnnnn #1#2#3#4#5#6#7
{
- #4
- \bool_lazy_and:nnTF
- { \int_compare_p:nNn {#3} > { \tl_count:n {#1} } }
+ \int_compare:nNnTF {#1} < { #2 + 1 }
{
- ! \bool_lazy_and_p:nn
+ \bool_lazy_and:nnTF
+ { \int_compare_p:nNn \l_@@_round_precision_int = 2 }
+ { \int_compare_p:nNn {#1} = {#2} }
{
- \bool_lazy_or_p:nn
- { \str_if_eq_p:Vn \l_@@_exponent_mode_tl { scientific } }
- {
- \bool_lazy_and_p:nn
- { \str_if_eq_p:Vn \l_@@_exponent_mode_tl { threshold } }
- {
- ! \bool_lazy_or_p:nn
- {
- \int_compare_p:nNn {#5#6} >
- \l_@@_lower_threshold_int
- }
- {
- \int_compare_p:nNn {#5#6} <
- \l_@@_upper_threshold_int
- }
- }
- }
+ \exp_args:Nnf \@@_round_uncertainty_auxiv:nnnnnnN
+ { 0 }
}
- { \str_if_eq_p:nn { #1.#2 } { 10. } }
+ {
+ \exp_args:Nnf \@@_round_uncertainty_auxiv:nnnnnnN
+ { }
+ }
+ { \int_eval:n { #6 + 1 } }
+ {#4} {#5} { 1 } { }
+ \@@_round_uncertainty_auxvii:nnNnnn
}
{
- \exp_args:Nf \@@_round_uncertainty_shift_aux:nnnnn
+ \exp_args:Nff \@@_round_uncertainty_auxiv:nnnnnnN
+ { \@@_round_uncertainty_zeros:nnnn {#3} {#5} {#6} {#7} }
+ { \int_eval:n { #6 + 1 } }
+ {#4} {#5} { 1 } {#3}
+ \@@_round_uncertainty_auxvii:nnNnnn
+ }
+ }
+\cs_new:Npn \@@_round_uncertainty_zeros:nnnn #1#2#3#4
+ {
+ \prg_replicate:nn
+ {
+ \int_max:nn
{
- \prg_replicate:nn
+ \tl_if_blank:nTF {#2}
+ { #3 }
{
- \tl_if_blank:nTF {#2}
- { \int_min:nn {#3} { \tl_count:n {#1} - 1 } }
- { 0 }
+ ( \tl_count:n {#4} - \tl_count:n {#2} )
+ - \tl_count:n {#1}
}
- { 0 }
}
- {#1} {#2}
+ { 0 }
}
+ { 0 }
+ }
+% \end{macrocode}
+% Back together for the business end. If there has been a shift, we may need
+% to tidy up.
+% \begin{macrocode}
+\cs_new:Npn \@@_round_uncertainty_auxiv:nnnnnnN #1#2#3#4#5#6#7
+ {
+ \use:e
{
- \use:c
- { @@_round_uncertainty_ \l_@@_exponent_mode_tl :nnn }
- {#1}
+ \exp_not:N \@@_round_uncertainty_auxv:nnnN
+ \@@_round:nnn {#2} {#3} {#4}
}
- {#5} {#6}
+ {#3} #7
+ \@@_round_end:nnn { { S } { #5#6 #1 } }
}
-\cs_new:Npn \@@_round_uncertainty_shift_aux:nnnnn #1#2#3#4#5
+\cs_new:Npn \@@_round_uncertainty_auxv:nnnN #1#2#3#4
{
- \use:c
- { @@_round_ \l_@@_exponent_mode_tl :nn }
- {#2} {#3}
- \@@_round_end:nnn { { S } { 1 #1 } } {#4} {#5}
+ \int_compare:nNnT { \tl_count:n {#1} } > { \tl_count:n {#3} }
+ { #4 }
+ {#1} {#2}
}
+\cs_new:Npn \@@_round_uncertainty_auxvi:nn #1#2
+ { \use:c { @@_round_ \l_@@_exponent_mode_tl :nn } {#1} {#2} }
% \end{macrocode}
-% With the data available, adjust the output such that the uncertainty
-% is of the right length.
+% If there was a rounding up in the uncertainty, there is a bit more to do.
% \begin{macrocode}
+\cs_new:Npn \@@_round_uncertainty_auxvii:nnNnnn #1#2#3#4#5#6
+ {
+ \bool_lazy_any:nTF
+ {
+ { \str_if_eq_p:Vn \l_@@_exponent_mode_tl { engineering } }
+ { \str_if_eq_p:Vn \l_@@_exponent_mode_tl { scientific } }
+ {
+ \bool_lazy_and_p:nn
+ { \str_if_eq_p:Vn \l_@@_exponent_mode_tl { threshold } }
+ {
+ ! \bool_lazy_or_p:nn
+ {
+ \int_compare_p:nNn {#5#6} >
+ \l_@@_lower_threshold_int
+ }
+ {
+ \int_compare_p:nNn {#5#6} <
+ \l_@@_upper_threshold_int
+ }
+ }
+ }
+ }
+ {
+ \use:c
+ { @@_round_uncertainty_ \l_@@_exponent_mode_tl :nnn }
+ {#1}
+ }
+ {
+ \@@_round_uncertainty_auxvi:nn {#1} {#2}
+ \@@_round_end:nnn {#4}
+ }
+ {#5} {#6}
+ }
\cs_new:Npn \@@_round_uncertainty_engineering:nnn #1#2#3
{
\use:c
@@ -3413,6 +3433,8 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_zero_decimal:NN}
% \begin{macro}[EXP]{\@@_zero_decimal:nnnnnnn}
diff --git a/macros/latex/contrib/siunitx/siunitx-print.dtx b/macros/latex/contrib/siunitx/siunitx-print.dtx
index d02eefdf51..236cbbab80 100644
--- a/macros/latex/contrib/siunitx/siunitx-print.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-print.dtx
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
\ProvideDocumentCommand\foreign{m}{\textit{#1}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
@@ -48,8 +50,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx-quantity.dtx b/macros/latex/contrib/siunitx/siunitx-quantity.dtx
index b7e6352bdd..e16f6ffa8b 100644
--- a/macros/latex/contrib/siunitx/siunitx-quantity.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-quantity.dtx
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
\ProvideDocumentCommand\foreign{m}{\textit{#1}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
@@ -48,8 +50,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx-symbol.dtx b/macros/latex/contrib/siunitx/siunitx-symbol.dtx
index 6d55931ce7..2a359b5fe0 100644
--- a/macros/latex/contrib/siunitx/siunitx-symbol.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-symbol.dtx
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
\usepackage{siunitx}
@@ -47,8 +49,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx-table.dtx b/macros/latex/contrib/siunitx/siunitx-table.dtx
index 10b9b9a7cd..4b7cd9ea9f 100644
--- a/macros/latex/contrib/siunitx/siunitx-table.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-table.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% File: siunitx-table.dtx Copyright (C) 2016-2019,2021,2022 Joseph Wright
+% File: siunitx-table.dtx Copyright (C) 2016-2019,2021-2023 Joseph Wright
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
\ProvideDocumentCommand\foreign{m}{\textit{#1}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
@@ -48,8 +50,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx-unit.dtx b/macros/latex/contrib/siunitx/siunitx-unit.dtx
index 3b2defb6ea..eccc0349bb 100644
--- a/macros/latex/contrib/siunitx/siunitx-unit.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-unit.dtx
@@ -26,6 +26,7 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
\ExplSyntaxOn
\makeatletter
\NewDocumentCommand \acro { m }
@@ -40,6 +41,7 @@
}
\makeatother
\ExplSyntaxOff
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
\ProvideDocumentCommand\foreign{m}{\textit{#1}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
@@ -62,8 +64,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index 1d1d08e457..047da57d55 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -26,6 +26,8 @@
%
%<*driver>
\documentclass{l3doc}
+% Additional commands needed in this source
+\ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data
\usepackage{siunitx}
@@ -47,8 +49,7 @@
% Joseph Wright^^A
% \thanks{^^A
% E-mail:
-% \href{mailto:joseph.wright@morningstar2.co.uk}
-% {joseph.wright@morningstar2.co.uk}^^A
+% \email{joseph.wright@morningstar2.co.uk}^^A
% }^^A
% }
%
@@ -121,7 +122,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2023-02-21} {3.2.1}
+\ProvidesExplPackage {siunitx} {2023-03-04} {3.2.2}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index ee58cd5ff2..aba22033ac 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx.tex b/macros/latex/contrib/siunitx/siunitx.tex
index 63e7f86861..ad9b137015 100644
--- a/macros/latex/contrib/siunitx/siunitx.tex
+++ b/macros/latex/contrib/siunitx/siunitx.tex
@@ -200,8 +200,7 @@ for those people who are interested.
Joseph Wright%
\thanks{%
E-mail:
- \href{mailto:joseph.wright@morningstar2.co.uk}
- {joseph.wright@morningstar2.co.uk}%
+ \email{joseph.wright@morningstar2.co.uk}%
}%
}