summaryrefslogtreecommitdiff
path: root/macros
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
parenta2d17a09f7ecd91acd8826216349bb14cc5602cd (diff)
CTAN sync 202303060305
Diffstat (limited to 'macros')
-rw-r--r--macros/jptex/latex/jlreq/README-ja.md2
-rw-r--r--macros/jptex/latex/jlreq/README.md2
-rw-r--r--macros/jptex/latex/jlreq/jlreq-ja.pdfbin376976 -> 377049 bytes
-rw-r--r--macros/jptex/latex/jlreq/jlreq.cls4
-rw-r--r--macros/jptex/latex/jlreq/jlreq.pdfbin120615 -> 120674 bytes
-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
-rw-r--r--macros/texinfo/latest/texinfo.tex232
-rw-r--r--macros/unicodetex/latex/bithesis/bithesis.dtx51
-rw-r--r--macros/unicodetex/latex/bithesis/bithesis.pdfbin1077517 -> 1078223 bytes
-rw-r--r--macros/xetex/latex/xduts/xduts.dtx118
-rw-r--r--macros/xetex/latex/xduts/xduts.pdfbin331677 -> 332770 bytes
50 files changed, 2160 insertions, 405 deletions
diff --git a/macros/jptex/latex/jlreq/README-ja.md b/macros/jptex/latex/jlreq/README-ja.md
index a34b2b1a96..ae11b0f912 100644
--- a/macros/jptex/latex/jlreq/README-ja.md
+++ b/macros/jptex/latex/jlreq/README-ja.md
@@ -570,6 +570,8 @@ JFMの名前は次の通りです.`[]`で囲まれている文字は設定に
- ISO C4の用紙サイズが間違っていたのを修正.
- `jlreq-complements`を追加.
- その他バグ修正やその他のパッケージとの調整など.
+* 2023-03-05
+ - 窓見出しに関するバグ修正
--------------
Noriyuki Abe
diff --git a/macros/jptex/latex/jlreq/README.md b/macros/jptex/latex/jlreq/README.md
index 27ad1eee81..b5734a233f 100644
--- a/macros/jptex/latex/jlreq/README.md
+++ b/macros/jptex/latex/jlreq/README.md
@@ -180,6 +180,8 @@ This package is distributed under the BSD 2-Clause License. See [LICENSE](LICENS
- Fixed a bug: wrong papersize for ISO C4.
- Added a package `jlreq-complements`
- Fixed some other bugs and adjust with some other packages.
+* 2023-03-05
+ - Fixed a bug on cutin headings.
--------------
Noriyuki Abe
diff --git a/macros/jptex/latex/jlreq/jlreq-ja.pdf b/macros/jptex/latex/jlreq/jlreq-ja.pdf
index a34ef0753d..ac01fa53dd 100644
--- a/macros/jptex/latex/jlreq/jlreq-ja.pdf
+++ b/macros/jptex/latex/jlreq/jlreq-ja.pdf
Binary files differ
diff --git a/macros/jptex/latex/jlreq/jlreq.cls b/macros/jptex/latex/jlreq/jlreq.cls
index d6ce3e2eb0..495c210340 100644
--- a/macros/jptex/latex/jlreq/jlreq.cls
+++ b/macros/jptex/latex/jlreq/jlreq.cls
@@ -5,7 +5,7 @@
%%
% (based on JLReq 20200811 https://www.w3.org/TR/2020/NOTE-jlreq-20200811/)
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{jlreq}[2022/11/28 jlreq]
+\ProvidesClass{jlreq}[2023/03/05 jlreq]
\RequirePackage{l3keys2e}
\RequirePackage{etoolbox}
\RequirePackage{jlreq-helpers}[2022/11/28]
@@ -3055,7 +3055,7 @@
\dim_set:Nn \l__jlreq_tmpa_dim { \l__jlreq_tmpa_dim / \l__jlreq_cutinheading_linecount_tl }
% \l_jlreq_tmpb_boxに見出し部分を,\l__jlreq_cutinheading_linecount_tlに見出し自身に何行使うかを入れる
\int_compare:nTF { \l__jlreq_cutinheading_linecount_tl = 1 }{
- \vbox_set:Nn \l_jlreq_tmpb_box {\parindent=0pt\rightskip=0pt\leftskip=0pt\hbox_unpack_drop:N \l_jlreq_tmpa_box}
+ \vbox_set:Nn \l_jlreq_tmpb_box {\parindent=0pt\rightskip=0pt\leftskip=0pt\box_use_drop:N \l_jlreq_tmpa_box}
\tl_set:Nn \l__jlreq_cutinheading_linecount_tl {2}
}{
\jlreq@inlinenote@determinelength{#6}{#1}{}{\l__jlreq_cutinheading_linecount_tl}{\l__jlreq_cutinheading_linecount_tl}{\l__jlreq_tmpa_dim}{\linewidth}%
diff --git a/macros/jptex/latex/jlreq/jlreq.pdf b/macros/jptex/latex/jlreq/jlreq.pdf
index 7bc6b4dc1a..035959fc4b 100644
--- a/macros/jptex/latex/jlreq/jlreq.pdf
+++ b/macros/jptex/latex/jlreq/jlreq.pdf
Binary files differ
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}%
}%
}
diff --git a/macros/texinfo/latest/texinfo.tex b/macros/texinfo/latest/texinfo.tex
index b4caf96e08..2f11da59fb 100644
--- a/macros/texinfo/latest/texinfo.tex
+++ b/macros/texinfo/latest/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2023-01-02.21}
+\def\texinfoversion{2023-03-04.12}
%
% Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
%
@@ -2683,25 +2683,21 @@ end
}
\setregularquotes
-% Allow an option to not use regular directed right quote/apostrophe
-% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
-% The undirected quote is ugly, so don't make it the default, but it
-% works for pasting with more pdf viewers (at least evince), the
-% lilypond developers report. xpdf does work with the regular 0x27.
+% output for ' in @code
+% in tt font hex 0D (undirected) or 27 (curly right quote)
%
\def\codequoteright{%
\ifusingtt
{\ifflagclear{txicodequoteundirected}%
{\ifflagclear{codequoteundirected}%
{'}%
- {\char'15 }}%
- {\char'15 }}%
+ {\char"0D }}%
+ {\char"0D }}%
{'}%
}
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
+% output for ` in @code
+% in tt font hex 12 (grave accent) or 60 (curly left quote)
% \relax disables Spanish ligatures ?` and !` of \tt font.
%
\def\codequoteleft{%
@@ -2709,8 +2705,8 @@ end
{\ifflagclear{txicodequotebacktick}%
{\ifflagclear{codequotebacktick}%
{\relax`}%
- {\char'22 }}%
- {\char'22 }}%
+ {\char"12 }}%
+ {\char"12 }}%
{\relax`}%
}
@@ -2729,7 +2725,7 @@ end
\errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
\fi\fi
}
-%
+
\parseargdef\codequotebacktick{%
\def\temp{#1}%
\ifx\temp\onword
@@ -2744,6 +2740,11 @@ end
\fi\fi
}
+% Turn them on by default
+\let\SETtxicodequoteundirected = t
+\let\SETtxicodequotebacktick = t
+
+
% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
\def\noligaturesquoteleft{\relax\lq}
@@ -2929,10 +2930,6 @@ end
\let-\dashnobreak
\let_\realunder
\fi
- % Given -foo (with a single dash), we do not want to allow a break
- % after the hyphen.
- \global\let\codedashprev=\codedash
- %
\codex
}
%
@@ -2942,21 +2939,30 @@ end
%
% Now, output a discretionary to allow a line break, unless
% (a) the next character is a -, or
- % (b) the preceding character is a -.
+ % (b) the preceding character is a -, or
+ % (c) we are at the start of the string.
+ % In both cases (b) and (c), \codedashnobreak should be set to \codedash.
+ %
% E.g., given --posix, we do not want to allow a break after either -.
% Given --foo-bar, we do want to allow a break between the - and the b.
\ifx\next\codedash \else
- \ifx\codedashprev\codedash
+ \ifx\codedashnobreak\codedash
\else \discretionary{}{}{}\fi
\fi
% we need the space after the = for the case when \next itself is a
% space token; it would get swallowed otherwise. As in @code{- a}.
- \global\let\codedashprev= \next
+ \global\let\codedashnobreak= \next
}
}
\def\normaldash{-}
%
-\def\codex #1{\tclose{#1}\endgroup}
+\def\codex #1{\tclose{%
+ % Given -foo (with a single dash), we do not want to allow a break
+ % after the -. \codedashnobreak is set to the first character in
+ % @code.
+ \futurelet\codedashnobreak\relax
+ #1%
+}\endgroup}
\def\codeunder{%
% this is all so @math{@code{var_name}+1} can work. In math mode, _
@@ -3950,33 +3956,23 @@ $$%
\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
-% When we turn headings on, set the page number to 1.
+% Set the page number to 1.
\def\pageone{
\global\pageno=1
\global\arabiccount = \pagecount
}
-% For double-sided printing, put current file name in lower left corner,
-% chapter name on inside top of right hand pages, document
-% title on inside top of left hand pages, and page numbers on outside top
-% edge of all pages.
-\def\HEADINGSdouble{%
-\pageone
-\HEADINGSdoublex
-}
\let\contentsalignmacro = \chappager
-% For single-sided printing, chapter title goes across top left of page,
-% page number on top right.
-\def\HEADINGSsingle{%
-\pageone
-\HEADINGSsinglex
-}
% \def\HEADINGSon{\HEADINGSdouble} % defined by \CHAPPAGon
-\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
+% For double-sided printing, put current file name in lower left corner,
+% chapter name on inside top of right hand pages, document
+% title on inside top of left hand pages, and page numbers on outside top
+% edge of all pages.
+\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdouble}
\let\HEADINGSdoubleafter=\HEADINGSafter
-\def\HEADINGSdoublex{%
+\def\HEADINGSdouble{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
@@ -3986,8 +3982,10 @@ $$%
\global\let\contentsalignmacro = \chapoddpage
}
-\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
-\def\HEADINGSsinglex{%
+% For single-sided printing, chapter title goes across top left of page,
+% page number on top right.
+\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsingle}
+\def\HEADINGSsingle{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
@@ -3999,7 +3997,6 @@ $$%
% for @setchapternewpage off
\def\HEADINGSsinglechapoff{%
-\pageone
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
@@ -4105,6 +4102,7 @@ $$%
\nobreak\kern\dimen0
\endgroup
\itemxneedsnegativevskiptrue
+ \penalty 10021 % for \indexpar
\fi
}
@@ -4221,6 +4219,7 @@ $$%
% We can be in inner vertical mode in a footnote, although an
% @itemize looks awful there.
}%
+ \penalty 10021 % for \indexpar
\flushcr
}
@@ -4725,13 +4724,11 @@ $$%
% except not \outer, so it can be used within macros and \if's.
\edef\newwrite{\makecsname{ptexnewwrite}}
-% \newindex {foo} defines an index named IX.
+% \newindex {IX} defines an index named IX.
% It automatically defines \IXindex such that
% \IXindex ...rest of line... puts an entry in the index IX.
% It also defines \IXindfile to be the number of the output channel for
% the file that accumulates this index. The file's extension is IX.
-% The name of an index should be no more than 2 characters long
-% for the sake of vms.
%
\def\newindex#1{%
\expandafter\chardef\csname#1indfile\endcsname=0
@@ -4787,11 +4784,17 @@ $$%
% and it is the two-letter name of the index.
\def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx}
-\def\doindexxxx #1{\doind{\indexname}{#1}}
+\def\doindexxxx #1{\indexpar\doind{\indexname}{#1}}
% like the previous two, but they put @code around the argument.
\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
-\def\docodeindexxxx #1{\docind{\indexname}{#1}}
+\def\docodeindexxxx #1{\indexpar\docind{\indexname}{#1}}
+
+% End any open paragraph, unless we are immediately after @item in
+% @itemize or @enumerate.
+\def\indexpar{%
+\ifnum\lastpenalty=10021 \else\endgraf\fi
+}
% \definedummyword defines \#1 as \string\#1\space, thus effectively
@@ -4989,7 +4992,7 @@ $$%
\commondummyword\ampchar {\normalamp}%
\commondummyword\atchar {\@}%
\commondummyword\arrow {->}%
- \commondummyword\backslashchar {}%
+ \commondummyword\backslashchar {\realbackslash}%
\commondummyword\bullet {bullet}%
\commondummyword\comma {,}%
\commondummyword\copyright {copyright}%
@@ -5089,9 +5092,6 @@ $$%
%
% We need to get rid of all macros, leaving only the arguments (if present).
% Of course this is not nearly correct, but it is the best we can do for now.
- % makeinfo does not expand macros in the argument to @deffn, which ends up
- % writing an index entry, and texindex isn't prepared for an index sort entry
- % that starts with \.
%
% Since macro invocations are followed by braces, we can just redefine them
% to take a single TeX argument. The case of a macro invocation that
@@ -5351,7 +5351,9 @@ $$%
% ..., ready, GO:
%
\def\safewhatsit#1{\ifhmode
+ \whatsitpenalty = \lastpenalty
#1%
+ \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
\else
% \lastskip and \lastpenalty cannot both be nonzero simultaneously.
\whatsitskip = \lastskip
@@ -7387,6 +7389,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\setupverb{%
\tt
\def\par{\leavevmode\endgraf}%
+ \parindent = 0pt
\setcodequotes
\tabeightspaces
% Respect line breaks,
@@ -7562,11 +7565,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\exdentamount=\defbodyindent
}
-\newtoks\defidx
-\newtoks\deftext
-
-\def\useindex#1{\defidx={#1}\ignorespaces}
-
% Called as \printdefunline \deffooheader{text}
%
\def\printdefunline#1#2{%
@@ -7574,10 +7572,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\plainfrenchspacing
% call \deffooheader:
#1#2 \endheader
- % create the index entry
- \defcharsdefault
- \edef\temp{\noexpand\doind{\the\defidx}{\the\deftext}}%
- \temp
% common ending:
\interlinepenalty = 10000
\advance\rightskip by 0pt plus 1fil\relax
@@ -7592,6 +7586,24 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\Edefun{\endgraf\medbreak}
+% @defblock, @defline do not automatically create index entries
+\envdef\defblock{%
+ \startdefun
+}
+\let\Edefblock\Edefun
+
+\def\defline{%
+ \doingtypefnfalse
+ \parseargusing\activeparens{\printdefunline\deflineheader}%
+}
+\def\deflineheader#1 #2 #3\endheader{%
+ \defname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
+}
+\def\deftypeline{%
+ \doingtypefntrue
+ \parseargusing\activeparens{\printdefunline\deflineheader}%
+}
+
% \makedefun{deffoo} (\deffooheader parameters) { (\deffooheader expansion) }
%
% Define \deffoo, \deffoox \Edeffoo and \deffooheader.
@@ -7643,23 +7655,18 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\fi\fi
}
-\def\defind#1#2{
- \defidx={#1}%
- \deftext={#2}%
-}
-
% Untyped functions:
% @deffn category name args
\makedefun{deffn}#1 #2 #3\endheader{%
- \defind{fn}{\code{#2}}%
+ \doind{fn}{\code{#2}}%
\defname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
}
% @defop category class name args
\makedefun{defop}#1 {\defopheaderx{#1\ \putwordon}}
\def\defopheaderx#1#2 #3 #4\endheader{%
- \defind{fn}{\code{#3}\space\putwordon\ \code{#2}}%
+ \doind{fn}{\code{#3}\space\putwordon\ \code{#2}}%
\defname{#1\ \code{#2}}{}{#3}\magicamp\defunargs{#4\unskip}%
}
@@ -7667,7 +7674,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% @deftypefn category type name args
\makedefun{deftypefn}#1 #2 #3 #4\endheader{%
- \defind{fn}{\code{#3}}%
+ \doind{fn}{\code{#3}}%
\doingtypefntrue
\defname{#1}{#2}{#3}\defunargs{#4\unskip}%
}
@@ -7675,7 +7682,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% @deftypeop category class type name args
\makedefun{deftypeop}#1 {\deftypeopheaderx{#1\ \putwordon}}
\def\deftypeopheaderx#1#2 #3 #4 #5\endheader{%
- \defind{fn}{\code{#4}\space\putwordon\ \code{#1\ \code{#2}}}%
+ \doind{fn}{\code{#4}\space\putwordon\ \code{#1\ \code{#2}}}%
\doingtypefntrue
\defname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
}
@@ -7684,14 +7691,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% @deftypevr category type var args
\makedefun{deftypevr}#1 #2 #3 #4\endheader{%
- \defind{vr}{\code{#3}}%
+ \doind{vr}{\code{#3}}%
\defname{#1}{#2}{#3}\defunargs{#4\unskip}%
}
% @deftypecv category class type var args
\makedefun{deftypecv}#1 {\deftypecvheaderx{#1\ \putwordof}}
\def\deftypecvheaderx#1#2 #3 #4 #5\endheader{%
- \defind{vr}{\code{#4}\space\putwordof\ \code{#2}}%
+ \doind{vr}{\code{#4}\space\putwordof\ \code{#2}}%
\defname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
}
@@ -7708,7 +7715,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% @deftp category name args
\makedefun{deftp}#1 #2 #3\endheader{%
- \defind{tp}{\code{#2}}%
+ \doind{tp}{\code{#2}}%
\defname{#1}{}{#2}\defunargs{#3\unskip}%
}
@@ -8580,6 +8587,87 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\fi \macnamexxx}
+% @linemacro
+
+\parseargdef\linemacro{%
+ \linegetargs#1 \linegetargs
+ \expandafter\linegetparamlist\argl;%
+ \begingroup \macrobodyctxt \usembodybackslash
+ \parselinemacrobody
+}
+
+% Parse the arguments to a @linemacro line. Set \macname to the name
+% of the macro and \argl to the list of arguments.
+\def\linegetargs#1 #2\linegetargs{%
+ \macname={#1}%
+ \def\argl{#2}%
+}
+
+% Build up \paramlist which will be used as the parameter text for the macro.
+% At the end it will be like "#1 #2 #3\endlinemacro".
+\def\linegetparamlist#1;{%
+ \paramno=0\def\paramlist{}%
+ \let\hash\relax \let\xeatspaces\relax
+ \linegetparamlistxxx#1; %
+}
+\def\linegetparamlistxxx#1 {%
+ \if#1;\let\next=\linegetparamlistxxxx
+ \else \let\next=\linegetparamlistxxx
+ \advance\paramno by 1
+ \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
+ {\noexpand\xeatspaces{\hash\the\paramno}}%
+ \edef\paramlist{\paramlist\hash\the\paramno\space}%
+ \fi\next}
+\def\linegetparamlistxxxx{%
+ \ifx\paramlist\empty
+ \def\paramlist{\hash 1\endlinemacro}%
+ \else
+ \expandafter\fixparamlist\paramlist\fixparamlist
+ \fi
+}
+% Replace final space token
+\def\fixparamlist#1 \fixparamlist{%
+ \def\paramlist{#1\endlinemacro}%
+}
+
+% Read the body of the macro, replacing backslash-surrounded variables
+%
+{\catcode`\ =\other\long\gdef\parselinemacrobody#1@end linemacro{%
+\let\xeatspaces\relax
+\xdef\macrobody{#1}%
+\endgroup
+\linemacrodef
+}}
+
+% Make the definition
+\def\linemacrodef{%
+ \let\hash=##%
+ \let\xeatspaces\relax
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup
+ \noexpand\scanctxt
+ \noexpand\parsearg
+ \expandafter\noexpand\csname\the\macname @@\endcsname
+ }
+ \expandafter\xdef\csname\the\macname @@\endcsname##1{%
+ \egroup
+ \expandafter\noexpand
+ \csname\the\macname @@@\endcsname##1 \noexpand\endlinemacro
+ % Note that we append a space to the macro line to terminate the last
+ % argument in case the final argument is empty. @xeatspaces may be needed
+ % to remove this space.
+ }
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter\csname\the\macname @@@\endcsname\paramlist{%
+ \newlinechar=13 % split \macrobody into lines
+ \let\noexpand\xeatspaces\noexpand\eatspaces
+ \noexpand\scantokens{\macrobody}%
+ }
+}
+
+
+
% @alias.
% We need some trickery to remove the optional spaces around the equal
% sign. Make them active and then expand them all to nothing.
diff --git a/macros/unicodetex/latex/bithesis/bithesis.dtx b/macros/unicodetex/latex/bithesis/bithesis.dtx
index ce6de30aec..8ce91eacd1 100644
--- a/macros/unicodetex/latex/bithesis/bithesis.dtx
+++ b/macros/unicodetex/latex/bithesis/bithesis.dtx
@@ -21,7 +21,7 @@
%<thesis>\ProvidesExplClass{bithesis}
%<report>\ProvidesExplClass{bitreport}
%<beamer>\ProvidesExplClass{bitbeamer}
-%<cls>{2023-02-20}{3.4.0}{BIT Thesis Templates}
+%<cls>{2023-03-05}{3.4.2}{BIT Thesis Templates}
%
%<oldcls>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
%<book>\ProvidesClass{bitbook}
@@ -30,7 +30,7 @@
%<oldcls> [2022/05/09 v2.1.1 BIT Thesis Templates]
%
%<*driver>
-\ProvidesFile{bithesis.dtx}[2023/02/20 3.4.0 BIT Thesis Templates]
+\ProvidesFile{bithesis.dtx}[2023/03/05 3.4.2 BIT Thesis Templates]
\documentclass[letterpaper]{l3doc}
\usepackage{dtx-style}
@@ -1190,11 +1190,11 @@
% \subsubsection{定理类环境}
% \paragraph{默认格式}
%
-% \begin{function}{algorithm,theorem,lemma,proposition,corollary,axiom,definition,conjecture,example,case,remark}
+% \begin{function}[updated=2023-03-05]{algo,them,lem,prop,cor,axi,defn,conj,exmp,case,rem}
% \begin{bitsyntax}[emph={[2]proof}]
-% \begin{theorem}[留数定理]
+% \begin{them}[留数定理]
% (*\meta{定理内容}*)
-% \end{theorem}
+% \end{them}
%
% \begin{proof}(*\oarg{小标题}*)
% (*\meta{证明过程}*)
@@ -1209,7 +1209,8 @@
% \subfloat[][plain样式]{
% \begin{tabular}{@{}ccccccc@{}}
% \toprule
-% \textbf{名称} & algorithm & theorem & lemma & proposition & corollary & axiom \\ \midrule
+% \textbf{名称} & algo & them & lem & prop & cor & axi \\ \midrule
+% \textbf{全称} & algorithm & theorem & lemma & proposition & corollary & axiom \\
% \textbf{含义} & 算法 & 定理 & 引理 & 命题 & 推论 & 公理 \\
% \textbf{样式} & \multicolumn{6}{c}{\textbf{定理2.1.} \textit{定理内容……}} \\ \bottomrule
% \end{tabular}
@@ -1218,7 +1219,8 @@
% \subfloat[][definition样式]{
% \begin{tabular}{@{}ccccc@{}}
% \toprule
-% \textbf{名称} & definition & conjecture & example & case \\ \midrule
+% \textbf{名称} & defn & conj & exmp & case \\ \midrule
+% \textbf{全称} & definition & conjecture & example & case \\
% \textbf{含义} & 定义 & 猜想 & 例 & 情形 \\
% \textbf{样式} & \multicolumn{4}{c}{\textbf{定义2.1.} 定义内容……} \\ \bottomrule
% \end{tabular}
@@ -1227,7 +1229,8 @@
% \subfloat[][remark样式]{
% \begin{tabular}{@{}cc@{}}
% \toprule
-% \textbf{名称} & remark \\ \midrule
+% \textbf{名称} & rem \\ \midrule
+% \textbf{全称} & remark \\ \midrule
% \textbf{含义} & 注 \\
% \textbf{样式} & \multicolumn{1}{c}{\textit{注1.} 内容……} \\ \bottomrule
% \end{tabular}
@@ -1237,6 +1240,7 @@
% \begin{tabular}{@{}cc@{}}
% \toprule
% \textbf{名称} & proof \\ \midrule
+% \textbf{全称} & proof \\
% \textbf{含义} & 证明 \\
% \textbf{样式} & \multicolumn{1}{c}{\textit{证明. } 内容…… 「证毕符号」} \\ \bottomrule
% \end{tabular}
@@ -2006,6 +2010,7 @@
{
{school} {学\qquad 院} {School},
{major} {专\qquad 业} {Degree},
+ {class} {班\qquad{}级} {Class},
{author} {学生姓名} {Author},
{student_id} {学\qquad 号} {Student~ID},
{supervisor} {指导教师} {Supervisor},
@@ -2130,6 +2135,8 @@
school .initial:n = {网络空间安全学院(示例)},
major .tl_set:N = \l_@@_value_major_tl,
major .initial:n = {网络空间安全(示例)},
+ class .tl_set:N = \l_@@_value_class_tl,
+ class .initial:n = {07111701},
author .tl_set:N = \l_@@_value_author_tl,
author .initial:n = {张三(示例)},
studentId .tl_set:N = \l_@@_value_student_id_tl,
@@ -2811,19 +2818,19 @@
% 预定义用户常用的证明环境。
% \begin{macrocode}
\theoremstyle{plain}
- \newtheorem{algorithm}{算法}[chapter]
- \newtheorem{theorem}{定理}[chapter]
- \newtheorem{lemma}[theorem]{引理}
- \newtheorem{proposition}[theorem]{命题}
- \newtheorem{corollary}[theorem]{推论}
- \newtheorem{axiom}[theorem]{公理}
+ \newtheorem{algo}{算法}[chapter]
+ \newtheorem{them}{定理}[chapter]
+ \newtheorem{lem}[them]{引理}
+ \newtheorem{prop}[them]{命题}
+ \newtheorem{cor}[them]{推论}
+ \newtheorem{axi}[them]{公理}
\theoremstyle{definition}
- \newtheorem{definition}{定义}[chapter]
- \newtheorem{conjecture}{猜想}[chapter]
- \newtheorem{example}{例}[chapter]
+ \newtheorem{defn}{定义}[chapter]
+ \newtheorem{conj}{猜想}[chapter]
+ \newtheorem{exmp}{例}[chapter]
\newtheorem{case}{情形}
\theoremstyle{remark}
- \newtheorem{remark}{注}
+ \newtheorem{rem}{注}
\renewcommand{\qedsymbol}{\ensuremath{\QED}}
% \end{macrocode}
%
@@ -3353,6 +3360,7 @@
\clist_set:Nn \l_@@_input_clist {
{\c_@@_label_school_tl} {\l_@@_value_school_tl},
{\c_@@_label_major_tl} {\l_@@_value_major_tl},
+ {\c_@@_label_class_tl} {\l_@@_value_class_tl},
{\c_@@_label_author_tl} {\l_@@_value_author_tl},
{\c_@@_label_student_id_tl} {\l_@@_value_student_id_tl},
{\c_@@_label_supervisor_tl} {\l_@@_value_supervisor_tl},
@@ -3386,11 +3394,11 @@
\includegraphics[width=6.87cm]{\l_bit_coverheaderimage_tl}\\
}
- \vspace{1mm}
+ \vspace{1.2mm}
\zihao{2}\textbf{\songti{本科生毕业设计(论文)外文翻译}}
- \vspace{8mm}
+ \vspace{10mm}
{
@@ -3415,7 +3423,7 @@
}
- \vspace{14mm}
+ \vspace{19mm}
\zihao{2}\textbf{\xihei:n \l_@@_value_title_tl}\par
@@ -3449,6 +3457,7 @@
\clist_set:Nn \l_@@_input_clist {
{\c_@@_label_school_tl} {\l_@@_value_school_tl},
{\c_@@_label_major_tl} {\l_@@_value_major_tl},
+ {\c_@@_label_class_tl} {\l_@@_value_class_tl},
{\c_@@_label_author_tl} {\l_@@_value_author_tl},
{\c_@@_label_student_id_tl} {\l_@@_value_student_id_tl},
{\c_@@_label_supervisor_tl} {\l_@@_value_supervisor_tl},
diff --git a/macros/unicodetex/latex/bithesis/bithesis.pdf b/macros/unicodetex/latex/bithesis/bithesis.pdf
index a900536984..67aae3d4de 100644
--- a/macros/unicodetex/latex/bithesis/bithesis.pdf
+++ b/macros/unicodetex/latex/bithesis/bithesis.pdf
Binary files differ
diff --git a/macros/xetex/latex/xduts/xduts.dtx b/macros/xetex/latex/xduts/xduts.dtx
index 3802edfdaf..2212a981cb 100644
--- a/macros/xetex/latex/xduts/xduts.dtx
+++ b/macros/xetex/latex/xduts/xduts.dtx
@@ -1,7 +1,7 @@
% \iffalse
%<*driver>
\ProvidesFile{xduts.dtx}
-[2023/03/03 v6.0.1.0 Xidian University TeX Suite]
+[2023/03/05 v6.1.0.1 Xidian University TeX Suite]
%</driver>
%<class|sty>\NeedsTeXFormat{LaTeX2e}
%<class|sty>\RequirePackage{expl3}
@@ -9,7 +9,7 @@
%<xduugtp>\ProvidesExplClass{xduugtp}
%<xdupgthesis>\ProvidesExplClass{xdupgthesis}
%<xduugthesis>\ProvidesExplClass{xduugthesis}
-%<class|sty> {2023/03/03}{6.0.1.0}
+%<class|sty> {2023/03/05}{6.1.0.1}
%<xdufont> {Xidian University Font package}
%<xduugtp> {Xidian University Undergraduate Thesis Proposal class}
%<xdupgthesis> {Xidian University Postgraduate Thesis document class}
@@ -179,7 +179,7 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \changes{v4.4.5.4}{2023/02/11}{更新许可证版本号}
% \renewcommand{\abstractname}{免责声明}
% \begin{abstract}
-% 在使用\xduts{}时,默认您同意以下内容:
+% 在使用\xduts{}时,默认你同意以下内容:
% \begin{enumerate}
% \item \xduts[]{}作者不对使用\xduts{}产生的格式审查问题负责。
% \item \xduts[]{}的发布遵守\LaTeX{} Project Public License Version 1.3c或更高版本\footurl{https://www.latex-project.org/lppl.txt}。
@@ -237,7 +237,8 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \par
% 请在最新版\LaTeX{}环境中使用最新版\xduts{}[],
% 认真阅读相应宏包/文档类使用说明章节后即可使用\xduts{}[]。
-% \subsection{\pkgx[]{xdufont}宏包}
+% \changes{v6.0.1.1}{2023/03/04}{修正文档中部分标题书签字符}
+% \subsection{\textsf{xdufont}宏包}
% \pkgx[]{xdufont}宏包基于\pkgx{xeCJK}宏包和\pkgx{unicode-math}宏包,
% 在中文字体配置方面相较于\pkgx{ctex}宏包的主要优势为默认支持宋体粗体、斜体,
% 内置多种字体配置,可任意搭配中/英/数学字体,更加符合校内各种文档的撰写要求。
@@ -256,7 +257,7 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \secrefx{编译}介绍了如何编译,\secrefx{参数设置}介绍了如何自定义配置,具体的配置选项见\secrefx{字体选项}。
% \par
% 学会以上用法后即可使用\pkgx{xdufont}宏包。
-% \subsection{\clsx[]{xduugtp}文档类}
+% \subsection{\textsf{xduugtp}文档类}
% \clsx[]{xduugtp}文档类基于\clsx{ctexart}文档类,
% 提供多种字体配置,信息录入便捷。
% 请在阅读《西安电子科技大学本科毕设设计(论文)开题报告》后再使用\clsx{xduugtp}文档类。
@@ -285,7 +286,7 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% 支持的信息录入选项见\secrefx{信息录入}。
% \par
% 学会以上用法后即可使用\clsx{xduugtp}文档类。
-% \subsection{\clsx[]{xduugthesis}文档类}
+% \subsection{\textsf{xduugthesis}文档类}
% \clsx[]{xduugthesis}文档类基于\clsx{ctexbook}文档类,
% 提供多种字体配置,部分样式可自定义,信息录入便捷。
% \changes{v1.3.1.1}{2022/04/26}{英文本科生毕业设计规范参考说明}
@@ -323,7 +324,7 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \changes{v1.4.0.0}{2022/04/26}{增加研究生学位论文}
% \changes{v1.30.0.2}{2022/06/20}{研究生学位论文文档}
% \changes{v2.2.1.1}{2022/06/23}{移除研究生学位论文中关于章节配置的文档}
-% \subsection{\clsx[]{xdupgthesis}文档类}
+% \subsection{\textsf{xdupgthesis}文档类}
% \clsx[]{xdupgthesis}文档类基于\clsx{ctexbook}文档类,
% 提供多种字体配置,部分样式可自定义,信息录入便捷。
% 请在阅读《西安电子科技大学研究生学位论文模板(2015年修订版)-2019.03修订》后再使用\clsx{xdupgthesis}文档类。
@@ -802,6 +803,19 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \item[centering-left] 只有一行时居中,多行时左对齐。
% \end{optdesc}
% \end{function}
+% \changes{v6.1.0.0}{2023/03/04}{增加图表对齐接口}
+% \begin{function}[added=2023-03-04]{style/figure-align,style/table-align}
+% \begin{syntax}
+% \opt{style/figure-align} = left|(centering)|right
+% \opt{style/table-align} = left|(centering)|right
+% \end{syntax}
+% 设置\envx{figure}和\envx{table}环境中内容对齐方式。
+% \end{function}
+% \begin{optdesc}
+% \item[left] 左对齐。
+% \item[centering] 居中。
+% \item[right] 右对齐。
+% \end{optdesc}
% \changes{v0.10.0.1}{2022/04/13}{补充表格内容字号文档说明}
% \begin{function}[added=2022-04-13,updated=2022-04-15]{style/table-small-font}
% \begin{syntax}
@@ -1748,10 +1762,9 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% 其中,在\clsx{xduugthesis}的开发过程中,^^A
% \href{https://github.com/Ke-Huo}{\ttfamily @Ke-Huo}、^^A
% \href{https://github.com/GRHun}{\ttfamily @RH}、^^A
-% \href{https://github.com/songyueran}{\ttfamily @syr-bloom}^^A
+% \href{https://github.com/songyueran}{\ttfamily @syr-bloom}
% 等人参与了内测。
-% 同时,也要感谢所有在GitHub和睿思上反馈问题和提出建议的同学、老师们。^^A
-% \xduts[]{}的持续发展,离不开你们的帮助与支持。
+% \changes{v6.1.0.1}{2023/03/04}{增加赞助致谢}
% \changes{v4.4.5.3}{2023/02/11}{增加致谢参考链接}
% \section{致谢}
% 在学习文学编程的过程中,
@@ -1761,16 +1774,21 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% 在文档的编写过程中,参考了^^A
% \filex{ctex.dtx}[]\footurl{https://github.com/CTeX-org/ctex-kit/blob/master/ctex/ctex.dtx}、^^A
% \filex[]{fduthesis.dtx}[]\footurl{https://github.com/stone-zeng/fduthesis/blob/main/source/fduthesis.dtx}、^^A
-% \filex[]{njuthesis.dtx}[]\footurl{https://github.com/nju-lug/NJUThesis/blob/master/source/njuthesis.dtx}和^^A
+% \filex[]{njuthesis.dtx}[]\footurl{https://github.com/nju-lug/NJUThesis/blob/master/source/njuthesis.dtx}\space{}和^^A
% \filex{thuthesis.dtx}[]\footurl{https://github.com/tuna/thuthesis/blob/master/thuthesis.dtx}。
+% \par
+% 同时,非常感谢赞助\xduts{}的同学们,你们的赞助让我有持续维护的动力。^^A
+% 也感谢所有在GitHub和睿思上反馈问题和提出建议的同学、老师们,^^A
+% \xduts[]{}的持续发展,离不开你们的帮助与支持。
% \changes{v4.0.1.1}{2022/12/12}{增加支付宝红包二维码}
% \changes{v3.1.1.3}{2022/12/10}{二维码增加图标}
% \changes{v3.1.1.2}{2022/12/06}{增加QQ支付二维码}
% \changes{v2.16.1.2}{2022/11/27}{修正文档中图片引用间距}
% \changes{v2.15.0.1}{2022/11/26}{增加赞助二维码}
% \section{赞助}
-% 如果\xduts{}对您有所帮助,
-% 可以扫描\figrefx{fig:zanzhu}中的二维码来赞助\xduts{}[]。
+% 如果\xduts{}对你有所帮助,
+% 可以扫描\figrefx{fig:zanzhu}中的二维码来赞助\xduts{}[],
+% 并备注\xduts{}或其他相关字样以便于确认款项来源。
% \ExplSyntaxOn
% \str_set_convert:Nnnn \l_xduts_alipay_red_packet_qr_str {%
% 68747470733A2F2F71722E616C697061792E636F6D2F31317731333035336232617236757438%
@@ -3629,6 +3647,8 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \l_@@_alg_cap_align_tl,
% \l_@@_add_alg_rule_vspace_bool,
% \l_@@_tab_small_bool,
+% \l_@@__figure_align_tl,
+% \l_@@__table_align_tl,
% \l_@@_alg_small_cap_bool,
% \l_@@_alg_small_bool,
% \l_@@_before_skip_clist,
@@ -3699,6 +3719,11 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \begin{macrocode}
\bool_new:N \l_@@_tab_small_bool
% \end{macrocode}
+% 设置图表内容对齐方式。
+% \begin{macrocode}
+\tl_new:N \l_@@_figure_align_tl
+\tl_new:N \l_@@_table_align_tl
+% \end{macrocode}
% 设置算法Caption字号是否为五号。
% \begin{macrocode}
\bool_new:N \l_@@_alg_small_cap_bool
@@ -3798,6 +3823,13 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \begin{macrocode}
table-small-font .bool_set:N = \l_@@_tab_small_bool,
% \end{macrocode}
+% 设置图表内容对齐方式。
+% \begin{macrocode}
+ figure-align .choices:nn = { left, centering, right }
+ { \tl_set_eq:NN \l_@@_figure_align_tl \l_keys_choice_tl },
+ table-align .choices:nn = { left, centering, right }
+ { \tl_set_eq:NN \l_@@_table_align_tl \l_keys_choice_tl },
+% \end{macrocode}
% 设置算法Caption字号是否为五号。
% \begin{macrocode}
alg-small-caption .bool_set:N = \l_@@_alg_small_cap_bool,
@@ -3857,6 +3889,8 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
style / alg-caption-align = left,
style / add-alg-rule-vspace = false,
style / table-small-font = true,
+ style / figure-align = centering,
+ style / table-align = centering,
style / alg-small-caption = true,
style / algorithm-small-caption = true,
style / alg-small-font = true,
@@ -5539,6 +5573,31 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \end{macrocode}
% \end{macro}
% \subsection{图片}
+% \changes{v6.1.0.0}{2023/03/04}{设置\envx{figure}环境中内容对齐方式}
+% \begin{macro}{\@floatboxreset}
+% 设置\envx{figure}环境中内容对齐方式。
+% \begin{macrocode}
+\ctex_at_end_preamble:n
+ {
+ \tl_if_eq:NnTF \l_@@_figure_align_tl { left }
+ {
+ \AtBeginEnvironment { figure }
+ { \g@addto@macro { \@floatboxreset } { \raggedright } }
+ }
+ {
+ \tl_if_eq:NnTF \l_@@_figure_align_tl { centering }
+ {
+ \AtBeginEnvironment { figure }
+ { \g@addto@macro { \@floatboxreset } { \centering } }
+ }
+ {
+ \AtBeginEnvironment { figure }
+ { \g@addto@macro { \@floatboxreset } { \raggedleft } }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\PassOptionsToPackage,\captionsetup*}
% \changes{v0.4.2.0}{2022/04/05}{设置子图标签与标题字体字号}
% 设置子图标签与标题字体字号,支持\pkgx{subfig}和\pkgx{subcaption}宏包。
@@ -5578,18 +5637,43 @@ literate = {\$}{{\textcolor{purple3}{\$}}}{1}
% \end{macrocode}
% \end{macro}
% \subsection{表格}
+% \changes{v6.1.0.0}{2023/03/04}{设置\envx{table}环境中内容对齐方式}
+% \begin{macro}{\@floatboxreset}
+% 设置\envx{table}环境中内容对齐方式。
+% \begin{macrocode}
+\ctex_at_end_preamble:n
+ {
+ \tl_if_eq:NnTF \l_@@_table_align_tl { left }
+ {
+ \AtBeginEnvironment { table }
+ { \g@addto@macro { \@floatboxreset } { \raggedright } }
+ }
+ {
+ \tl_if_eq:NnTF \l_@@_table_align_tl { centering }
+ {
+ \AtBeginEnvironment { table }
+ { \g@addto@macro { \@floatboxreset } { \centering } }
+ }
+ {
+ \AtBeginEnvironment { table }
+ { \g@addto@macro { \@floatboxreset } { \raggedleft } }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \changes{v6.1.0.0}{2023/03/04}{修改表格字号设置方法}
% \changes{v0.10.0.0}{2022/04/13}{设置表格字号是否为五号}
% \changes{v1.0.2.0}{2022/04/14}{修复表格五号字无法设定浮动位置}
-% \begin{macro}{table}
+% \begin{macro}{\@floatboxreset}
% 设置表格字号是否为五号。
% \begin{macrocode}
\ctex_at_end_preamble:n
{
\bool_if:NT \l_@@_tab_small_bool
{
- \renewenvironment { table }
- { \def\@floatboxreset { \reset@font\small\@setminipage } \@float { table } }
- { \end@float }
+ \AtBeginEnvironment { table }
+ { \g@addto@macro { \@floatboxreset } { \small } }
}
}
% \end{macrocode}
diff --git a/macros/xetex/latex/xduts/xduts.pdf b/macros/xetex/latex/xduts/xduts.pdf
index 017f108829..3aaa8cecfc 100644
--- a/macros/xetex/latex/xduts/xduts.pdf
+++ b/macros/xetex/latex/xduts/xduts.pdf
Binary files differ