summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-lncs/LICENSE415
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-lncs/README.md37
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-lncs/biblatex-lncs-test.bib107
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-lncs/biblatex-lncs-test.tex75
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-lncs/lncs.bbx423
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-lncs/lncs.cbx8
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-lncs/lncs.dbx9
-rw-r--r--macros/latex/contrib/mandi/README.md8
-rw-r--r--macros/latex/contrib/mandi/mandi.dtx10
-rw-r--r--macros/latex/contrib/mandi/mandi.pdfbin468489 -> 468495 bytes
-rw-r--r--macros/latex/contrib/mandi/mandiexp.dtx2
-rw-r--r--macros/latex/contrib/mandi/mandistudent.dtx2
-rw-r--r--macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdfbin2784308 -> 3380542 bytes
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEquationComposition2.tex37
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEquationLaurent1.tex56
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEquationPose1.tex49
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEquationSoustraction2.tex247
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEquationSymbole1.tex8
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCEquationTerme1.tex39
-rw-r--r--macros/latex/contrib/profcollege/latex/ProfCollege.sty3005
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCLabyNombre.mp211
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCMosaique.mp446
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCScratch.mp17
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp17
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md9
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin1511547 -> 1511257 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-symbol.dtx4
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin636196 -> 636202 bytes
29 files changed, 4607 insertions, 636 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-lncs/LICENSE b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/LICENSE
new file mode 100644
index 0000000000..f8b699e6eb
--- /dev/null
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/LICENSE
@@ -0,0 +1,415 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c 2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute. This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but
+it is written in such a way that you can use it even if your work is
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `Modification'
+ Any procedure that produces a Derived Work under any applicable
+ law -- for example, the production of a file containing an
+ original file associated with the Work or a significant portion of
+ such a file, either verbatim or with modifications and/or
+ translated into another language.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `Distribution'
+ Making copies of the Work available from one person to another, in
+ whole or in part. Distribution includes (but is not limited to)
+ making any electronic components of the Work accessible by
+ file transfer protocols such as FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `Compiled Work'
+ A version of the Work that has been processed into a form where it
+ is directly usable on a computer system. This processing may
+ include using installation facilities provided by the Work,
+ transformations of the Work, copying of components of the Work, or
+ other activities. Note that modification of any installation
+ facilities provided by the Work constitutes modification of the Work.
+
+ `Current Maintainer'
+ A person or persons nominated as such within the Work. If there is
+ no such explicit nomination then it is the `Copyright Holder' under
+ any applicable law.
+
+ `Base Interpreter'
+ A program or process that is normally needed for running or
+ interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these
+ are not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `LaTeX-Format' or in the case of files belonging to the
+ `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope. In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2. You may distribute a complete, unmodified copy of the Work as you
+received it. Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4. If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work. You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work. Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5. If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6. If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition. Only
+the Current Maintainer is allowed to add such statements of exemption
+to a component of the Work.
+
+ a. If a component of this Derived Work can be a direct replacement
+ for a component of the Work when that component is used with the
+ Base Interpreter, then, wherever this component of the Work
+ identifies itself to the user when used interactively with that
+ Base Interpreter, the replacement component of this Derived Work
+ clearly and unambiguously identifies itself as a modified version
+ of this component to the user when used interactively with that
+ Base Interpreter.
+
+ b. Every component of the Derived Work contains prominent notices
+ detailing the nature of the changes to that component, or a
+ prominent reference to another file that is distributed as part
+ of the Derived Work and that contains a complete and accurate log
+ of the changes.
+
+ c. No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original version
+ of the Work, provide any support, including (but not limited to)
+ the reporting and handling of errors, to recipients of the
+ Derived Work unless those persons have stated explicitly that
+ they do provide such support for the Derived Work.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. A complete, unmodified copy of the Work;
+ if your distribution of a modified component is made by
+ offering access to copy the modified component from a
+ designated place, then offering equivalent access to copy
+ the Work from the same or some similar place meets this
+ condition, even though third parties are not compelled to
+ copy the Work along with the modified component;
+
+ 2. Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+
+7. If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8. The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9. Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. If a Derived Work is distributed under a different license, that
+ Derived Work must provide sufficient documentation as part of
+ itself to allow each recipient of that Derived Work to honor the
+ restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work. Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose. The entire risk as to the quality and performance
+of the Work is with you. Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of
+ an Internet or similar search.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. If the search is unsuccessful or no action to resume active
+ maintenance is taken by the Current Maintainer, then announce
+ within the pertinent community your intention to take over
+ maintenance. (If the Work is a LaTeX work, this could be
+ done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. If the Current Maintainer is not reachable and the Copyright
+ Holder agrees that maintenance of the Work be passed to you,
+ then this takes effect immediately upon announcement.
+
+ 4. If you make an `intention announcement' as described in 2b. above
+ and after three months your intention is challenged neither by
+ the Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as
+ to name you as the (new) Current Maintainer.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer. You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license. These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license. You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component. While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community. It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one. Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified. Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2005 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.3 or later is part of all distributions of LaTeX
+ % version 2005/12/01 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+ The LPPL requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a
+ way for the licensee to determine which files constitute the Work.
+ This could, for example, be achieved by explicitly listing all the
+ files of the Work near the copyright notice of each file or by
+ using a line such as:
+
+ % This work consists of all files listed in manifest.txt.
+
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-lncs/README.md b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/README.md
new file mode 100644
index 0000000000..40cc180f56
--- /dev/null
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/README.md
@@ -0,0 +1,37 @@
+# biblatex-lncs
+[![Build](https://github.com/mgttlinger/biblatex-lncs/actions/workflows/build.yml/badge.svg)](https://github.com/mgttlinger/biblatex-lncs/actions/workflows/build.yml)
+
+BibLaTeX style for Springer Lecture Notes in Computer Science
+
+## Introduction
+
+The code works with `biblatex 2.2` and it requires `biber 1.2` as backend. It
+extends the standard `BiBTeX` model by an `acronym` entry.
+
+## Usage
+
+```latex
+\usepackage[backend=biber,
+ style=lncs
+]{biblatex}
+```
+
+## Status
+
+I intend to maintain this fork and gladly accept pull requests and issues (although not committing myself to fixing any issue as required by the LPPL license). At the time of writing [@mgttlinger](https://github.com/mgttlinger) is the current maintainer in the sense of the LPPL license.
+
+## Testing
+
+For building the included `biblatex-lncs-test.tex` the `llncs` class from the Springer author guidelines needs to be in scope. The CI can get it via the ENV variable `LLNCS_CLS`.
+
+## License
+
+Copyright (c) 2021 Merlin Göttlinger and contributors
+
+Forked from <https://github.com/neapel/biblatex-lncs.git>,
+who forked from <https://github.com/jossco/biblatex-lncs.git>, by Joseph Scott
+who forked from <https://github.com/gvdgdo/biblatex-lncs.git>, by Guido Governatori
+
+This package may be distributed under the terms of the LaTeX Project
+Public License, as described in lppl.txt in the base LaTeX distribution.
+Either version 1.3c or, at your option, any later version.
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-lncs/biblatex-lncs-test.bib b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/biblatex-lncs-test.bib
new file mode 100644
index 0000000000..e62fddbbe2
--- /dev/null
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/biblatex-lncs-test.bib
@@ -0,0 +1,107 @@
+
+% from typeinst.tex
+@article{jour,
+ author = {Smith, Temple F. AND Waterman, Michael S.},
+ title = {Identification of Common Molecular Subsequences},
+ journal = {J. Mol. Biol.},
+ volume = {147},
+ pages = {195--197},
+ date = {1981-07-14},
+ doi = {10.1016/0022-2836(81)90087-5},
+}
+
+@inproceedings{lncschap,
+ author = {May, Patrick AND Ehrlich, Hans-Christian AND Steinke, Thomas},
+ title = {ZIB Structure Prediction Pipeline: Composing a Complex Biological Workflow through Web Services},
+ editor = {Nagel, Wolfgang E. AND Walter, Wolfgang V. AND Lehner, Wolfgang},
+ eventtitle = {Euro-Par 2006},
+ series = {LNCS},
+ volume = {4128},
+ pages = {1148--1158},
+ publisher = {Springer},
+ location = {Heidelberg},
+ date = {2006},
+ doi = {10.1007/11823285_121},
+}
+
+@book{book,
+ author = {Foster, Ian AND Kesselman, Carl},
+ title = {The Grid: Blueprint for a New Computing Infrastructure},
+ publisher = {Morgan Kaufmann},
+ location = {San Francisco},
+ date = {1999},
+ isbn = {1-55860-475-8},
+}
+
+@inproceedings{proceeding1,
+ author = {Czajkowski, Karl AND Fitzgerald, Steven AND Foster, Ian AND Kesselman, Carl},
+ title = {Grid Information Services for Distributed Resource Sharing},
+ eventtitle = {10th IEEE International Symposium on High Performance Distributed Computing},
+ pages = {181--184},
+ publisher = {IEEE Press, New York},
+ date = {2001},
+ doi = {10.1109/HPDC.2001.945188},
+}
+
+@report{proceeding2,
+ author = {Foster, Ian AND Kesselman, Carl AND Nick, J. AND Tuecke, S.},
+ title = {The Physiology of the Grid: an Open Grid Services Architecture for Distributed Systems
+Integration},
+ type = {Technical report},
+ institution = {Global Grid Forum},
+ date = {2002},
+ url = {http://toolkit.globus.org/alliance/publications/papers.php#OGSA},
+}
+
+@online{url,
+ title = {National Center for Biotechnology Information},
+ url = {http://www.ncbi.nlm.nih.gov},
+}
+
+% from llncs.dem
+
+@article{clar:eke,
+ author = {Clarke, Frank AND Ekeland, I.},
+ title = {Nonlinear oscillations and boundary-value problems for Hamiltonian systems},
+ journal = {Arch. Rat. Mech. Anal.},
+ volume = {78},
+ pages = {315--333},
+ date = {1982},
+ doi = {10.1007/BF00249584},
+}
+
+@article{clar:eke:2,
+ author = {Clarke, Frank AND Ekeland, I.},
+ title = {Solutions p\'{e}riodiques, du p\'{e}riode donn\'{e}e, des \'{e}quations hamiltoniennes},
+ journal = {Note CRAS Paris},
+ volume = {287},
+ pages = {1013--1015},
+ date = {1978},
+}
+
+@article{mich:tar,
+ author = {Michalek, R. AND Tarantello, G.},
+ title = {Subharmonic solutions with prescribed minimal period for nonautonomous Hamiltonian systems},
+ journal = {J. Diff. Eq.},
+ volume = {72},
+ pages = {28--55},
+ date = {1988},
+}
+
+@article{tar,
+ author = {Tarantello, G.},
+ title = {Subharmonic solutions for Hamiltonian systems via a $\bbbz_{p}$ pseudoindex theory},
+ journal = {Annali di Matematica Pura},
+ pubstate = {to appear},
+}
+
+@article{rab,
+ author = {Rabinowitz, P.},
+ title = {On subharmonic solutions of a Hamiltonian system},
+ journal = {Comm. Pure Appl. Math.},
+ volume = {33},
+ pages = {609--633},
+ date = {1980},
+}
+
+
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-lncs/biblatex-lncs-test.tex b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/biblatex-lncs-test.tex
new file mode 100644
index 0000000000..0e8940c38e
--- /dev/null
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/biblatex-lncs-test.tex
@@ -0,0 +1,75 @@
+\documentclass{llncs}
+
+\usepackage[backend=biber, sorting=none, style=lncs]{biblatex}
+\addbibresource{biblatex-lncs-test.bib}
+
+\begin{document}
+
+\nocite{*} biblatex:
+\printbibliography
+
+\newpage
+manual:
+\begin{thebibliography}{10}
+% typeinst.tex
+\bibitem{jour}
+Smith, T.F., Waterman, M.S.:
+Identification of Common Molecular Subsequences.
+J. Mol. Biol. 147, 195--197 (1981)
+
+\bibitem{lncschap}
+May, P., Ehrlich, H.-C., Steinke, T.:
+ZIB Structure Prediction Pipeline: Composing a Complex Biological Workflow through Web Services.
+In: Nagel, W.E., Walter, W.V., Lehner, W. (eds.) Euro-Par 2006.
+LNCS, vol. 4128, pp. 1148--1158. Springer, Heidelberg (2006)
+
+\bibitem{book}
+Foster, I., Kesselman, C.:
+The Grid: Blueprint for a New Computing Infrastructure.
+Morgan Kaufmann, San Francisco (1999)
+
+\bibitem{proceeding1}
+Czajkowski, K., Fitzgerald, S., Foster, I., Kesselman, C.:
+Grid Information Services for Distributed Resource Sharing.
+In: 10th IEEE International Symposium on High Performance Distributed Computing,
+pp. 181--184. IEEE Press, New York (2001)
+
+\bibitem{proceeding2}
+Foster, I., Kesselman, C., Nick, J., Tuecke, S.:
+The Physiology of the Grid:
+an Open Grid Services Architecture for Distributed Systems Integration.
+Technical report, Global Grid Forum (2002)
+
+\bibitem{url}
+National Center for Biotechnology Information,
+\url{http://www.ncbi.nlm.nih.gov}
+
+% llncs.dem
+\bibitem{clar:eke}
+Clarke, F., Ekeland, I.:
+Nonlinear oscillations and boundary-value problems for Hamiltonian systems.
+Arch. Rat. Mech. Anal. 78, 315--333 (1982)
+
+\bibitem{clar:eke:2}
+Clarke, F., Ekeland, I.:
+Solutions p\'{e}riodiques, du p\'{e}riode donn\'{e}e, des \'{e}quations hamiltoniennes.
+Note CRAS Paris 287, 1013--1015 (1978)
+
+\bibitem{mich:tar}
+Michalek, R., Tarantello, G.:
+Subharmonic solutions with prescribed minimal period for nonautonomous Hamiltonian systems.
+J. Diff. Eq. 72, 28--55 (1988)
+
+\bibitem{tar}
+Tarantello, G.:
+Subharmonic solutions for Hamiltonian systems via a $\bbbz_{p}$ pseudoindex theory.
+Annali di Matematica Pura (to appear)
+
+\bibitem{rab}
+Rabinowitz, P.:
+On subharmonic solutions of a Hamiltonian system.
+Comm. Pure Appl. Math. 33, 609--633 (1980)
+\end{thebibliography}
+
+\end{document}
+
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-lncs/lncs.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/lncs.bbx
new file mode 100644
index 0000000000..f6f01c2118
--- /dev/null
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/lncs.bbx
@@ -0,0 +1,423 @@
+\ProvidesFile{lncs.bbx}[2021/08/17 v0.3]
+
+\RequireBibliographyStyle{numeric}
+
+\ExecuteBibliographyOptions{giveninits=true,
+ doi=true,
+ minbibnames=1,
+ mincrossrefs=99,
+ maxbibnames=999}
+
+\newtoggle{lncs:abbrev}
+\newtoggle{lncs:series}
+\newtoggle{lncs:conference}
+\newtoggle{lncs:lncs}
+\DeclareBibliographyOption{acronym}[true]{\toggletrue{lncs:abbrev}}
+\DeclareBibliographyOption{series}[no]{
+ \ifstrequal{#1}{short}{}{}
+ \ifstrequal{#1}{full}{}{}
+ \ifstrequal{#1}{no}{}{}
+}
+\DeclareBibliographyOption{conference}[long]{
+ \ifstrequal{#1}{long}{}{}
+ \ifstrequal{#1}{full}{}{}
+ \ifstrequal{#1}{acronym}{}{}
+}
+
+%%% Field Formats
+
+\DeclareFieldFormat{labelnumberwidth}{#1.}
+\DeclareFieldFormat{journaltitle}{#1}
+\DeclareFieldFormat[article,book,inproceedings,incollection, online,report,thesis]{title}{#1}
+\DeclareFieldFormat{booktitle}{#1}
+\DeclareFieldFormat[article]{pages}{#1}
+\DeclareFieldFormat{year}{(#1)}
+\DeclareFieldFormat{acronym}{#1}
+\DeclareFieldFormat{url}{\url{#1}}
+
+%%%
+
+\defbibenvironment{bibliography}
+ {\list
+ {\printfield[labelnumberwidth]{labelnumber}}
+ {\setlength{\labelwidth}{\labelnumberwidth}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\labelsep}{.5em}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemsep}{\bibitemsep}%
+ \setlength{\parsep}{\bibparsep}}%
+ \renewcommand*{\makelabel}[1]{\hss##1}}
+ {\endlist}
+ {\item}
+
+\DeclareStyleSourcemap{
+ \maps[datatype=bibtex]{
+ \map{
+ \step[fieldsource=series,
+ match=\regexp{Lecture\s+Notes\s+in\s+Computer\s+Science},
+ replace={LNCS}]
+ \step[fieldsource=series,
+ match=\regexp{Lecture\s+Notes\s+in\s+Artificial\s+Intelligence},
+ replace={LNAI}]
+ \step[fieldsource=series,
+ match=\regexp{Lecture\s+Notes\s+in\s+Business\s+Information\s+Processing},
+ replace={LNBIP}]
+ }
+ }
+}
+
+\renewbibmacro{journal}{%
+ \iffieldundef{shortjournal}
+ {\printfield{journaltitle}}
+ {\printfield[journal]{shortjournal}}%
+}
+
+\renewbibmacro*{institution+location+date}{%
+ \iflistundef{institution}
+ {\setunit*{\addcomma\space}}
+ {\setunit*{\addcolon\space}}%
+ \printlist{institution}%
+ \setunit*{\addcomma\space}
+ \printlist{location}%
+ \setunit{\addspace}
+ \printfield{year}%
+ \newunit}
+
+\newbibmacro{journal:info}{
+ \iffieldundef{volume}
+ {\iffieldundef{year}
+ {\iffieldundef{pubstate}
+ {}
+ {(\printfield{pubstate})}}
+ {\printfield{year}}}
+ {\printfield{volume}%
+ \iffieldundef{number}{}{(\printfield{number})}%
+ \iffieldundef{pages}
+ {\addspace\printfield{year}}
+ {\addcomma\addspace\printfield{pages}\addspace\printfield{year}}
+ }
+}
+
+\newbibmacro{proceedingstitle}{%
+ \iffieldundef{booktitle}
+ {\printfield{eventtitle}}
+ {\printfield{booktitle}}
+}
+
+\newbibmacro{acronym/booktitle}{%
+ \iffieldundef{acronym}
+ {\usebibmacro{proceedingstitle}}
+ {\printfield{acronym}}%
+ \addperiod\addspace
+}
+
+\newbibmacro{publisher+location}{%
+ \iftoggle{lncs:lncs}
+ {\printtext{Springer, Heidelberg}}
+ {\printlist{publisher}%
+ \iflistundef{location}
+ {}
+ {\addcomma\addspace\printlist{location}}%
+ }%
+}
+
+\renewbibmacro{finentry}{\settoggle{lncs:lncs}{false}\finentry}
+\renewcommand*{\bibinitdelim}{}
+
+\renewcommand{\labelnamepunct}{\addcolon\space}
+
+\DeclareNameFormat{author}{%
+ \nameparts{#1}%
+ \usebibmacro{name:family-given}
+ {\namepartfamily}
+ {\namepartgiveni}
+ {\namepartprefix}
+ {\namepartsuffix}
+ \ifthenelse{\value{listcount}<\value{liststop}}
+ {\addcomma\space}%
+ {}%
+}
+
+\DeclareNameFormat{editor}{%
+ \nameparts{#1}%
+ \usebibmacro{name:family-given}
+ {\namepartfamily}
+ {\namepartgiveni}
+ {\namepartprefix}
+ {\namepartsuffix}
+ \ifthenelse{\value{listcount}<\value{liststop}}
+ {\addcomma\space}%
+ {\space\ifthenelse{\value{listcount}>1}
+ {(\bibstring{editors})}
+ {(\bibstring{editor})}}%
+}
+
+\DeclareBibliographyDriver{article}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \printnames{author}%
+ \setunit*{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit\newblock
+ \usebibmacro{journal}%
+ \usebibmacro{journal:info}%
+ \newunit\newblock
+ \printfield{addendum}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \iftoggle{bbx:doi}
+ {\printfield{doi}}
+ {}%
+ \nopunct%
+ \usebibmacro{finentry}%
+}
+
+\DeclareBibliographyDriver{book}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \ifnameundef{author}
+ {\printnames{editor}}
+ {\printnames{author}}%
+ \setunit*{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit%
+ \usebibmacro{publisher+location}%
+ \setunit{\addspace}
+ \printfield{year}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \iftoggle{bbx:doi}
+ {\printfield{doi}}
+ {}%
+ \nopunct%
+ \usebibmacro{finentry}%
+}
+
+\DeclareBibliographyDriver{inproceedings}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \printnames{author}
+ \setunit*{\labelnamepunct}\newblock%
+ \usebibmacro{title}
+ \newunit\newblock
+ \usebibmacro{in:}%
+ \printnames{editor}%
+ \newunit
+ \iffieldundef{series}
+ {\iftoggle{lncs:abbrev}
+ {\usebibmacro{acronym/booktitle}}
+ {\usebibmacro{proceedingstitle}\newunit}%
+ }%
+ {\ifboolexpr{
+ test {\iffieldequalstr{series}{LNAI}}
+ or
+ test {\iffieldequalstr{series}{LNCS}}
+ or
+ test {\iffieldequalstr{series}{LNBIP}}
+ }
+ {\settoggle{lncs:lncs}{true}%
+ \usebibmacro{acronym/booktitle}%
+ \printfield{series}
+ \addcomma\newunit
+ \iffieldundef{volume}
+ {\iffieldundef{number}{}{vol.\addspace\printfield{number}\addcomma}}
+ {\printfield{volume}}%
+ }%
+ {\usebibmacro{acronym/booktitle}%
+ \printfield{series}}%
+ }
+ \iffieldundef{pages}{}{\setunit{\addcomma\space}\printfield{pages}}%
+ \newunit%
+ \usebibmacro{publisher+location}%
+ \setunit{\addspace}%
+ \printfield{year}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \iftoggle{bbx:doi}
+ {\printfield{doi}}
+ {}%
+ \nopunct%
+ \usebibmacro{finentry}%
+}
+
+\DeclareBibliographyDriver{proceedings}{PROCEEDINGS}
+
+\DeclareBibliographyDriver{incollection}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \printnames{author}
+ %\setunit*{\addcolon\space}
+ \setunit*{\labelnamepunct}\newblock%
+ \usebibmacro{title}
+ %\printfield[article]{title}
+ \newunit\newblock
+ %\printtext{In:}
+ \usebibmacro{in:}%
+ \usebibmacro{maintitle+booktitle}%
+ \newunit\newblock
+ %\printnames{editor}
+ \usebibmacro{byeditor+others}
+ \newunit
+ \iffieldundef{pages}{}{\addcomma\addspace\printfield{pages}}
+ \newunit
+ \usebibmacro{publisher+location}%
+ \setunit{\addspace}%
+ \printfield{year}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \iftoggle{bbx:doi}
+ {\printfield{doi}}
+ {}%
+ \nopunct%
+ \usebibmacro{finentry}%
+}
+
+\DeclareBibliographyDriver{unpublished}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \printnames{author}%
+ \setunit*{\addcolon\space}\newblock
+ \printfield{title}%
+ \newunit\newblock
+ \printfield{note}%
+ \usebibmacro{finentry}%
+}
+
+\DeclareBibliographyDriver{online}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \setunit*{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \addcomma\newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \printlist{organization}%
+ \newunit\newblock
+ \printfield{year}%
+ \newunit\newblock
+ \iftoggle{bbx:eprint}
+ {\usebibmacro{eprint}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{url+urldate}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \iftoggle{bbx:doi}
+ {\printfield{doi}}
+ {}%
+ \nopunct%
+ \usebibmacro{finentry}
+}
+
+\DeclareBibliographyDriver{misc}{MISC}
+
+\DeclareBibliographyDriver{thesis}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \printnames{author}%
+ \setunit*{\addcolon\space}\newblock
+ \printfield{title}%
+ \newunit\newblock
+ \printfield{type}
+ \addcomma\newunit
+ \usebibmacro{institution+location+date}%
+ \iftoggle{bbx:doi}
+ {\printfield{doi}}
+ {}%
+ \usebibmacro{finentry}%
+}
+
+
+\DeclareBibliographyDriver{report}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others/translator+others}%
+ \setunit*{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \printfield{type}%
+ \setunit*{\addspace}%
+ \printfield{number}%
+ \addcomma\newunit\newblock
+ \printfield{version}%
+ \newunit
+ \printfield{note}%
+ \newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \newunit
+ \printfield{pagetotal}%
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{isrn}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{institution+location+date}%
+ %\newunit\newblock
+ %\usebibmacro{doi+eprint+url}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \iftoggle{bbx:doi}
+ {\printfield{doi}}
+ {}%
+ \nopunct%
+ \usebibmacro{finentry}
+}
+
+% \DeclareBibliographyDriver{*}{%
+% Titolo: \printfield{title}\\
+% Autore: \printnames{author}\\
+% Prova: \printfield{acronym}%
+% }
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-lncs/lncs.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/lncs.cbx
new file mode 100644
index 0000000000..40bb60d403
--- /dev/null
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/lncs.cbx
@@ -0,0 +1,8 @@
+\ProvidesFile{lncs.cbx}[2021/08/17 v0.3]
+
+\RequireCitationStyle{numeric}
+
+\renewcommand{\bibfont}{\footnotesize}
+
+%% implement \citep, \citet,
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-lncs/lncs.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/lncs.dbx
new file mode 100644
index 0000000000..f07e452d43
--- /dev/null
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-lncs/lncs.dbx
@@ -0,0 +1,9 @@
+%\DeclareDatamodelEntrytypes{}
+\DeclareDatamodelFields[type=field, datatype=literal,skipout=false]{
+ acronym,
+ shortseries
+}
+\DeclareDatamodelEntryfields{
+ acronym,
+ shortseries
+}
diff --git a/macros/latex/contrib/mandi/README.md b/macros/latex/contrib/mandi/README.md
index 66a938f5de..55cb93e783 100644
--- a/macros/latex/contrib/mandi/README.md
+++ b/macros/latex/contrib/mandi/README.md
@@ -1,10 +1,10 @@
mandi provides commands for introductory physics. To install, open a command
line and type the following, repeating 2-4 until there are no warnings:
- 1. lualatex mandi.ins (can also use latex)
- 2. lualatex mandi.dtx (lualatex is required)
- 3. makeindex -s gind.ist -o mandi.ind mandi.idx
- 4. makeindex -s gglo.ist -o mandi.gls mandi.glo
+1. lualatex mandi.ins (can also use latex)
+2. lualatex mandi.dtx (lualatex is required)
+3. makeindex -s gind.ist -o mandi.ind mandi.idx
+4. makeindex -s gglo.ist -o mandi.gls mandi.glo
Move the *.sty files into a directory searched by TeX.
The vdemo.py file is not needed.
diff --git a/macros/latex/contrib/mandi/mandi.dtx b/macros/latex/contrib/mandi/mandi.dtx
index cff62807a8..f78128d1a4 100644
--- a/macros/latex/contrib/mandi/mandi.dtx
+++ b/macros/latex/contrib/mandi/mandi.dtx
@@ -215,9 +215,9 @@
% \listoffigures
% \restoregeometry
%
-% \changes{v3.0.0}{2021-08-21}{\mandi\ initial release}
-% \changes{v3.0.0}{2021-08-21}{\mandistudent\ initial release}
-% \changes{v3.0.0}{2021-08-21}{\mandiexp\ initial release}
+% \changes{v3.0.0}{2021-08-22}{\mandi\ initial release}
+% \changes{v3.0.0}{2021-08-22}{\mandistudent\ initial release}
+% \changes{v3.0.0}{2021-08-22}{\mandiexp\ initial release}
%
% \section{Introduction}
%
@@ -1885,9 +1885,9 @@
%
% \begin{macrocode}
\def\mandi@version{3.0.0}
-\def\mandi@date{2021-08-21}
+\def\mandi@date{2021-08-22}
\NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\DeclareRelease{v3.0.0}{2021-08-21}{mandi.sty}
+\DeclareRelease{v3.0.0}{2021-08-22}{mandi.sty}
\DeclareCurrentRelease{v\mandi@version}{\mandi@date}
\ProvidesPackage{mandi}
[\mandi@date\space v\mandi@version\space Macros for physical quantities]
diff --git a/macros/latex/contrib/mandi/mandi.pdf b/macros/latex/contrib/mandi/mandi.pdf
index f86fe84c06..edf20e95b6 100644
--- a/macros/latex/contrib/mandi/mandi.pdf
+++ b/macros/latex/contrib/mandi/mandi.pdf
Binary files differ
diff --git a/macros/latex/contrib/mandi/mandiexp.dtx b/macros/latex/contrib/mandi/mandiexp.dtx
index 47c6745833..8871fe5841 100644
--- a/macros/latex/contrib/mandi/mandiexp.dtx
+++ b/macros/latex/contrib/mandi/mandiexp.dtx
@@ -592,7 +592,7 @@
\def\mandiexp@version{\mandi@version}
\def\mandiexp@date{\mandi@date}
\NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\DeclareRelease{v3.0.0}{2021-08-21}{mandiexp.sty}
+\DeclareRelease{v3.0.0}{2021-08-22}{mandiexp.sty}
\DeclareCurrentRelease{v\mandi@version}{\mandi@date}
\ProvidesPackage{mandiexp}
[\mandiexp@date\space v\mandiexp@version\space Macros for Matter & Interactions]
diff --git a/macros/latex/contrib/mandi/mandistudent.dtx b/macros/latex/contrib/mandi/mandistudent.dtx
index 278725234c..bbeb5d974a 100644
--- a/macros/latex/contrib/mandi/mandistudent.dtx
+++ b/macros/latex/contrib/mandi/mandistudent.dtx
@@ -1108,7 +1108,7 @@ while t < 10:
\def\mandistudent@version{\mandi@version}
\def\mandistudent@date{\mandi@date}
\NeedsTeXFormat{LaTeX2e}[2020-02-02]
-\DeclareRelease{v3.0.0}{2021-08-21}{mandistudent.sty}
+\DeclareRelease{v3.0.0}{2021-08-22}{mandistudent.sty}
\DeclareCurrentRelease{v\mandi@version}{\mandi@date}
\ProvidesPackage{mandistudent}
[\mandistudent@date\space v\mandistudent@version\space Macros for introductory physics]
diff --git a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf b/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf
index 778b60dcfe..b411e0ee22 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/PfCEquationComposition2.tex b/macros/latex/contrib/profcollege/latex/PfCEquationComposition2.tex
index b26d06486a..d01fb847a5 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEquationComposition2.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEquationComposition2.tex
@@ -1,6 +1,6 @@
% Licence : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
-\newcommand{\EquaDeuxComposition}[5][]{%type ax+b=d ou b=cx+d$
+\newcommand\EquaDeuxComposition[5][]{%type ax+b=d ou b=cx+d$
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\ifx\bla#2\bla%On échange en faisant attention à ne pas boucler : c doit être non vide
@@ -14,7 +14,7 @@
}%
}{%ELSE
\xintifboolexpr{#3==0}{%ax+b=d
- \EquaBase[#1]{#2}{}{}{#5}%
+ \EquaBase[#1]{#2}{0}{0}{#5}%
}{%ax+b=d$ Ici
\ifboolKV[ClesEquation]{Decomposition}{\colorlet{Ccompo}{\useKV[ClesEquation]{CouleurCompo}}}{}
\begin{align*}
@@ -51,28 +51,27 @@
}{}
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\num{#5}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.
- }{}
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}
}
\fi
}
-\newcommand{\EquaTroisComposition}[5][]{%ax+b=cx ou ax=cx+d
+\newcommand\EquaTroisComposition[5][]{%ax+b=cx ou ax=cx+d
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\ifx\bla#3\bla%on inverse en faisant attention à la boucle #3<->#5
\ifx\bla#5\bla%
%% paramètre oublié
\else
- \EquaTroisComposition[#1]{#4}{#5}{#2}{}%
+ \EquaTroisComposition[#1]{#4}{#5}{#2}{0}%
\fi
\else
\xintifboolexpr{#2==0}{%b=cx
- \EquaBase[#1]{#4}{}{}{#3}
+ \EquaBase[#1]{#4}{0}{0}{#3}
}{%
\xintifboolexpr{#4==0}{%ax+b=0
- \EquaDeuxComposition[#1]{#2}{#3}{}{0}
+ \EquaDeuxComposition[#1]{#2}{#3}{0}{0}
}{%ax+b=cx
\xintifboolexpr{#2==#4}{%
\xintifboolexpr{#3==0}{%ax=ax
@@ -122,7 +121,7 @@
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
}{%ax+b=cx avec a<c % Autre cas délicat
\ifboolKV[ClesEquation]{Decomposition}{\colorlet{Ccompo}{\useKV[ClesEquation]{CouleurCompo}}}{}
\begin{align*}%
@@ -158,15 +157,16 @@
}
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
}%
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}%
}%
}%
\fi
}%
-\newcommand{\ResolEquationComposition}[5][]{%
+\newcommand\ResolEquationComposition[5][]{%
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\xintifboolexpr{#2==0}{%
@@ -182,19 +182,19 @@
}%
}{%
\xintifboolexpr{#4==0}{%ax+b=0x+d
- \EquaDeuxComposition[#1]{#2}{#3}{}{#5}%
+ \EquaDeuxComposition[#1]{#2}{#3}{0}{#5}%
}
{%ax+b=cx+d$
\xintifboolexpr{#3==0}{%
\xintifboolexpr{#5==0}{%ax=cx
- \EquaTroisComposition[#1]{#2}{0}{#4}{}%
+ \EquaTroisComposition[#1]{#2}{0}{#4}{0}%
}%
{%ax=cx+d
- \EquaTroisComposition[#1]{#4}{#5}{#2}{}%
+ \EquaTroisComposition[#1]{#4}{#5}{#2}{0}%
}%
}%
{\xintifboolexpr{#5==0}{%ax+b=cx
- \EquaTroisComposition[#1]{#2}{#3}{#4}{}%
+ \EquaTroisComposition[#1]{#2}{#3}{#4}{0}%
}%
{%ax+b=cx+d -- ici
\xintifboolexpr{#2==#4}{%
@@ -245,8 +245,7 @@
}
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
- }{}
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
}{%ax+b=cx+d avec a<c % Autre cas délicat
\ifboolKV[ClesEquation]{Decomposition}{\colorlet{Ccompo}{\useKV[ClesEquation]{CouleurCompo}}}{}%
\begin{align*}%
@@ -287,9 +286,9 @@
}
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
- }{}%
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
}%
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}%
}%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCEquationLaurent1.tex b/macros/latex/contrib/profcollege/latex/PfCEquationLaurent1.tex
index a4be58b450..14c3acd952 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEquationLaurent1.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEquationLaurent1.tex
@@ -1,12 +1,12 @@
% Licence : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
-\newcommand{\EquaBaseLaurent}[5][]{%type ax=d ou b=cx
+\newcommand\EquaBaseLaurent[5][]{%type ax=d ou b=cx
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\ifx\bla#2\bla%on teste si le paramètre #2 est vide:
% si oui, on est dans le cas b=cx. Eh bien on échange :)
% Mais attention si les deux paramètres a et c sont vides...
- \EquaBaseLaurent[#1]{#4}{}{}{#3}
+ \EquaBaseLaurent[#1]{#4}{0}{0}{#3}
\else
% si non, on est dans le cas ax=d
\xintifboolexpr{#2==0}{%
@@ -29,14 +29,15 @@
}{}
}{}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{\useKV[ClesEquation]{Lettre}=\num{#5}}{\num{#2}\useKV[ClesEquation]{Lettre}=\num{#5}}$ a une unique solution : $\displaystyle\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\opdiv*{#5}{#2}{numequa}{resteequa}\opcmp{resteequa}{0}\ifopeq\opexport{numequa}{\numequa}\num{\numequa}\else\ifboolKV[ClesEquation]{Simplification}{\SSimplifie{#5}{#2}}{\frac{\num{#5}}{\num{#2}}}\fi$.%
- }{}
+ \xdef\Coeffa{#2}%
+ \xdef\Coeffb{#5}%
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}
}
\fi
}
-\newcommand{\EquaDeuxLaurent}[5][]{%type ax+b=d ou b=cx+d$
+\newcommand\EquaDeuxLaurent[5][]{%type ax+b=d ou b=cx+d$
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\ifx\bla#2\bla%On échange en faisant attention à ne pas boucler : c doit être non vide
@@ -50,10 +51,10 @@
}%
}{%ELSE
\xintifboolexpr{#3==0}{%ax+b=d
- \EquaBaseLaurent[#1]{#2}{}{}{#5}%
+ \EquaBaseLaurent[#1]{#2}{0}{0}{#5}%
}{%ax+b=d$ Ici
\begin{align*}
- \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{-\num{\fpeval{0-#3}}\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}}}\stackText}&=\num{#5}\xintifboolexpr{#3>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}}}\stackText}\\
+ \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{-\num{\fpeval{0-#3}}\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}&=\num{#5}\xintifboolexpr{#3>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}\\
\xdef\Coeffa{#2}\xdef\Coeffb{\fpeval{#5-#3}}%\\
\xintifboolexpr{\Coeffa==1}{\useKV[ClesEquation]{Lettre}}{\color{Cdecomp}\frac{\cancel{\color{black}\num{\Coeffa}}\color{black}\useKV[ClesEquation]{Lettre}}{\cancel{\num{\Coeffa}}}}&=\xintifboolexpr{\Coeffa==1}{\num{\Coeffb}}{\color{Cdecomp}\frac{\color{black}\num{\Coeffb}}{\num{\Coeffa}}}%\\
\xintifboolexpr{\Coeffa==1}{}{\\}
@@ -73,27 +74,26 @@
}{}
}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\num{#5}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.
- }{}
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}
}
}
-\newcommand{\EquaTroisLaurent}[5][]{%ax+b=cx ou ax=cx+d
+\newcommand\EquaTroisLaurent[5][]{%ax+b=cx ou ax=cx+d
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\ifx\bla#3\bla%on inverse en faisant attention à la boucle #3<->#5
\ifx\bla#5\bla%
%% paramètre oublié
\else
- \EquaTroisLaurent[#1]{#4}{#5}{#2}{}%
+ \EquaTroisLaurent[#1]{#4}{#5}{#2}{0}%
\fi
\else
\xintifboolexpr{#2==0}{%b=cx
- \EquaBaseLaurent[#1]{#4}{}{}{#3}
+ \EquaBaseLaurent[#1]{#4}{0}{0}{#3}
}{%
\xintifboolexpr{#4==0}{%ax+b=0
- \EquaDeuxLaurent[#1]{#2}{#3}{}{0}
+ \EquaDeuxLaurent[#1]{#2}{#3}{0}{0}
}{%ax+b=cx
\xintifboolexpr{#2==#4}{%
\xintifboolexpr{#3==0}{%ax=ax
@@ -104,7 +104,7 @@
}{%% Cas délicat
\xintifboolexpr{#2>#4}{%ax+b=cx avec a>c
\begin{align*}
- \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3>0}{+\num{#3}\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{-\num{\fpeval{0-#3}}\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}}}\stackText}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}}}\stackText}}\\
+ \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3>0}{+\num{#3}\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{-\num{\fpeval{0-#3}}\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}}\\
\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}}\\
\xdef\Coeffa{\fpeval{#2-#4}}\xdef\Coeffb{\fpeval{0-#3}}%\\
\xintifboolexpr{\Coeffa==1}{\useKV[ClesEquation]{Lettre}}{\color{Cdecomp}\frac{\cancel{\color{black}\num{\Coeffa}}\color{black}\useKV[ClesEquation]{Lettre}}{\cancel{\num{\Coeffa}}}}&=\xintifboolexpr{\Coeffa==1}{\num{\Coeffb}}{\color{Cdecomp}\frac{\color{black}\num{\Coeffb}}{\num{\Coeffa}}}%\\
@@ -125,12 +125,12 @@
}{}
}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
}{%ax+b=cx avec a<c % Autre cas délicat
\begin{align*}%
\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}\\
\xdef\Coeffa{\fpeval{#2-#4}}\xdef\Coeffb{\fpeval{0-#3}}%\\
- \xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3>0}{+\num{#3}\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{-\num{\fpeval{0-#3}}\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}}}\stackText}}&=0\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}}}\stackText}}\\
+ \xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3>0}{+\num{#3}\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{-\num{\fpeval{0-#3}}\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}}&=0\xintifboolexpr{#3==0}{}{\xintifboolexpr{#3>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}}\\
\xintifboolexpr{\Coeffa==1}{\useKV[ClesEquation]{Lettre}}{\color{Cdecomp}\frac{\cancel{\color{black}\num{\Coeffa}}\color{black}\useKV[ClesEquation]{Lettre}}{\cancel{\num{\Coeffa}}}}&=\xintifboolexpr{\Coeffa==1}{\num{\Coeffb}}{\color{Cdecomp}\frac{\color{black}\num{\Coeffb}}{\num{\Coeffa}}}%\\
\xintifboolexpr{\Coeffa==1}{}{\\}
\xintifboolexpr{\Coeffa==1}{%
@@ -149,15 +149,16 @@
}{}
}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
}%
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}%
}%
}%
\fi
}%
-\newcommand{\ResolEquationLaurent}[5][]{%
+\newcommand\ResolEquationLaurent[5][]{%
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\xintifboolexpr{#2==0}{%
@@ -169,23 +170,23 @@
}%
}%
{%0x+b=cx+d
- \EquaDeuxLaurent[#1]{#4}{#5}{}{#3}%
+ \EquaDeuxLaurent[#1]{#4}{#5}{0}{#3}%
}%
}{%
\xintifboolexpr{#4==0}{%ax+b=0x+d
- \EquaDeuxLaurent[#1]{#2}{#3}{}{#5}%
+ \EquaDeuxLaurent[#1]{#2}{#3}{0}{#5}%
}
{%ax+b=cx+d
\xintifboolexpr{#3==0}{%
\xintifboolexpr{#5==0}{%ax=cx
- \EquaTroisLaurent[#1]{#2}{0}{#4}{}%
+ \EquaTroisLaurent[#1]{#2}{0}{#4}{0}%
}%
{%ax=cx+d
- \EquaTroisLaurent[#1]{#4}{#5}{#2}{}%
+ \EquaTroisLaurent[#1]{#4}{#5}{#2}{0}%
}%
}%
{\xintifboolexpr{#5==0}{%ax+b=cx
- \EquaTroisLaurent[#1]{#2}{#3}{#4}{}%
+ \EquaTroisLaurent[#1]{#2}{#3}{#4}{0}%
}%
{%ax+b=cx+d -- ici
\xintifboolexpr{#2==#4}{%
@@ -197,7 +198,7 @@
}{%% Cas délicat
\xintifboolexpr{#2>#4}{%ax+b=cx+d avec a>c
\begin{align*}
- \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{-\num{\fpeval{0-#3}}\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}}}\stackText}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}\xintifboolexpr{#3>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}}}\stackText}\\
+ \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{-\num{\fpeval{0-#3}}\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}\xintifboolexpr{#3>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}\\
\xdef\Coeffa{\fpeval{#2-#4}}\xdef\Coeffb{\fpeval{#5-#3}}%\\
\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#4>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#4}\useKV[ClesEquation]{Lettre} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre} {}}\stackText}\xintifboolexpr{\Coeffb>0}{+\num{\Coeffb}}{-\num{\fpeval{0-\Coeffb}}}\\
\xintifboolexpr{\Coeffa==1}{\useKV[ClesEquation]{Lettre}}{\color{Cdecomp}\frac{\cancel{\color{black}\num{\Coeffa}}\color{black}\useKV[ClesEquation]{Lettre}}{\cancel{\num{\Coeffa}}}}&=\xintifboolexpr{\Coeffa==1}{\num{\Coeffb}}{\color{Cdecomp}\frac{\color{black}\num{\Coeffb}}{\num{\Coeffa}}}%\\
@@ -218,8 +219,7 @@
}{}
}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
- }{}
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
}{%ax+b=cx+d avec a<c % Autre cas délicat
\begin{align*}%
\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}\xintifboolexpr{#3>0}{\stackMath\Longstack{$\tiny$\color{Cdecomp}-\num{#3} {}}\stackText}{\stackMath\Longstack{$\tiny$\color{Cdecomp}+\num{\fpeval{0-#3}} {}}\stackText}%
@@ -245,9 +245,9 @@
}{}
}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
- }{}%
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
}%
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}%
}%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCEquationPose1.tex b/macros/latex/contrib/profcollege/latex/PfCEquationPose1.tex
index 8bc7bb339f..735c09839d 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEquationPose1.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEquationPose1.tex
@@ -1,12 +1,12 @@
% Licence : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
-\newcommand{\EquaBaseL}[5][]{%type ax=d ou b=cx
+\newcommand\EquaBaseL[5][]{%type ax=d ou b=cx
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\ifx\bla#2\bla%on teste si le paramètre #2 est vide:
% si oui, on est dans le cas b=cx. Eh bien on échange :)
% Mais attention si les deux paramètres a et c sont vides...
- \EquaBaseL[#1]{#4}{}{}{#3}
+ \EquaBaseL[#1]{#4}{0}{0}{#3}
\else
% si non, on est dans le cas ax=d
\xintifboolexpr{#2==0}{%
@@ -30,14 +30,15 @@
}{}
}{}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{\useKV[ClesEquation]{Lettre}=\num{#5}}{\num{#2}\useKV[ClesEquation]{Lettre}=\num{#5}}$ a une unique solution : $\displaystyle\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\opdiv*{#5}{#2}{numequa}{resteequa}\opcmp{resteequa}{0}\ifopeq\opexport{numequa}{\numequa}\num{\numequa}\else\ifboolKV[ClesEquation]{Simplification}{\SSimplifie{#5}{#2}}{\frac{\num{#5}}{\num{#2}}}\fi$.%
- }{}
+ \xdef\Coeffa{#2}%
+ \xdef\Coeffb{#5}%
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}
}
\fi
}
-\newcommand{\EquaDeuxL}[5][]{%type ax+b=d ou b=cx+d$
+\newcommand\EquaDeuxL[5][]{%type ax+b=d ou b=cx+d$
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\ifx\bla#2\bla%On échange en faisant attention à ne pas boucler : c doit être non vide
@@ -51,7 +52,7 @@
}%
}{%ELSE
\xintifboolexpr{#3==0}{%ax+b=d
- \EquaBaseL[#1]{#2}{}{}{#5}%
+ \EquaBaseL[#1]{#2}{0}{0}{#5}%
}{%ax+b=d$ Ici
\begin{align*}
\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\num{#5}\\
@@ -76,28 +77,27 @@
}{}
}{}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\num{#5}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.
- }{}
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}
}
\fi
}
-\newcommand{\EquaTroisL}[5][]{%ax+b=cx ou ax=cx+d
+\newcommand\EquaTroisL[5][]{%ax+b=cx ou ax=cx+d
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\ifx\bla#3\bla%on inverse en faisant attention à la boucle #3<->#5
\ifx\bla#5\bla%
%% paramètre oublié
\else
- \EquaTroisL[#1]{#4}{#5}{#2}{}%
+ \EquaTroisL[#1]{#4}{#5}{#2}{0}%
\fi
\else
\xintifboolexpr{#2==0}{%b=cx
- \EquaBaseL[#1]{#4}{}{}{#3}
+ \EquaBaseL[#1]{#4}{0}{0}{#3}
}{%
\xintifboolexpr{#4==0}{%ax+b=0
- \EquaDeuxL[#1]{#2}{#3}{}{0}
+ \EquaDeuxL[#1]{#2}{#3}{0}{0}
}{%ax+b=cx
\xintifboolexpr{#2==#4}{%
\xintifboolexpr{#3==0}{%ax=ax
@@ -132,7 +132,7 @@
}{}
}{}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
}{%ax+b=cx+d avec a<c % Autre cas délicat
\begin{align*}%
\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\\
@@ -157,16 +157,16 @@
}{}
}{}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
}%
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}%
}%
}%
\fi
}%\\
- % \\
-\newcommand{\ResolEquationL}[5][]{%
+\newcommand\ResolEquationL[5][]{%
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\xintifboolexpr{#2==0}{%
@@ -178,23 +178,23 @@
}%
}%
{%0x+b=cx+d$
- \EquaDeuxL[#1]{#4}{#5}{}{#3}%
+ \EquaDeuxL[#1]{#4}{#5}{0}{#3}%
}%
}{%
\xintifboolexpr{#4==0}{%ax+b=0x+d
- \EquaDeuxL[#1]{#2}{#3}{}{#5}%
+ \EquaDeuxL[#1]{#2}{#3}{0}{#5}%
}
{%ax+b=cx+d$
\xintifboolexpr{#3==0}{%
\xintifboolexpr{#5==0}{%ax=cx
- \EquaTroisL[#1]{#2}{0}{#4}{}%
+ \EquaTroisL[#1]{#2}{0}{#4}{0}%
}%
{%ax=cx+d
- \EquaTroisL[#1]{#4}{#5}{#2}{}%
+ \EquaTroisL[#1]{#4}{#5}{#2}{0}%
}%
}%
{\xintifboolexpr{#5==0}{%ax+b=cx
- \EquaTroisL[#1]{#2}{#3}{#4}{}%
+ \EquaTroisL[#1]{#2}{#3}{#4}{0}%
}%
{%ax+b=cx+d -- ici
\xintifboolexpr{#2==#4}{%
@@ -230,8 +230,7 @@
}{}
}{}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
- }{}
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
}{%ax+b=cx+d avec a<c % Autre cas délicat
\begin{align*}%
\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}\\
@@ -255,9 +254,9 @@
}{}
}{}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
- }{}%
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
}%
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}%
}%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCEquationSoustraction2.tex b/macros/latex/contrib/profcollege/latex/PfCEquationSoustraction2.tex
index a03f2d7442..5e64be9cf8 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEquationSoustraction2.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEquationSoustraction2.tex
@@ -6,7 +6,7 @@
\ifx\bla#2\bla%on teste si le paramètre #2 est vide:
% si oui, on est dans le cas b=cx. Eh bien on échange :)
% Mais attention si les deux paramètres a et c sont vides...
- \EquaBase[#1]{#4}{}{}{#3}
+ \EquaBase[#1]{#4}{0}{0}{#3}
\else
% si non, on est dans le cas ax=d
\xintifboolexpr{#2==0}{%
@@ -42,8 +42,9 @@
{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}
}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{\useKV[ClesEquation]{Lettre}=\num{#5}}{\num{#2}\useKV[ClesEquation]{Lettre}=\num{#5}}$ a une unique solution : $\displaystyle\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\opdiv*{#5}{#2}{numequa}{resteequa}\opcmp{resteequa}{0}\ifopeq\opexport{numequa}{\numequa}\num{\numequa}\else\ifboolKV[ClesEquation]{Simplification}{\SSimplifie{#5}{#2}}{\frac{\num{#5}}{\num{#2}}}\fi$.%
- }{}
+ \xdef\Coeffb{#5}%
+ \xdef\Coeffa{#2}%
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}
}
\fi
@@ -63,21 +64,21 @@
}%
}{%ELSE
\xintifboolexpr{#3==0}{%ax+b=d
- \EquaBase[#1]{#2}{}{}{#5}%
- }{%ax+b=d$ Ici
+ \EquaBase[#1]{#2}{0}{0}{#5}%
+ }{%ax+b=d$
\begin{align*}
\tikzmark{A-\theNbequa}\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\num{#5}\tikzmark{E-\theNbequa}\\
\ifboolKV[ClesEquation]{Decomposition}{%
\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}\mathcolor{Cdecomp}{\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}}&=\num{#5}\mathcolor{Cdecomp}{\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}}\\
}{}%
\tikzmark{C-\theNbequa}\xdef\Coeffa{#2}\xdef\Coeffb{\fpeval{#5-#3}}\xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}&=\num{\Coeffb}\tikzmark{G-\theNbequa}
- \ifboolKV[ClesEquation]{Decomposition}{\\\xintifboolexpr{\Coeffa==1}{}{\frac{\num{\Coeffa}}{\mathcolor{Cdecomp}{\num{\Coeffa}}}\useKV[ClesEquation]{Lettre}&=\frac{\num{\Coeffb}}{\mathcolor{Cdecomp}{\num{\Coeffa}}}}}{}
+ \ifboolKV[ClesEquation]{Decomposition}{\xintifboolexpr{\Coeffa==1}{}{\\\frac{\num{\Coeffa}}{\mathcolor{Cdecomp}{\num{\Coeffa}}}\useKV[ClesEquation]{Lettre}&=\frac{\num{\Coeffb}}{\mathcolor{Cdecomp}{\num{\Coeffa}}}}}{}
\xintifboolexpr{\Coeffa==1}{}{\\}
\ifboolKV[ClesEquation]{Fleches}{%
\leftcomment{A-\theNbequa}{C-\theNbequa}{A-\theNbequa}{$\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}$}%
\rightcomment{E-\theNbequa}{G-\theNbequa}{E-\theNbequa}{$\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}$}%
}{}
- \xintifboolexpr{\Coeffa==1}{%
+ \xintifboolexpr{\Coeffa==1}{%
}{%\ifnum\cmtd>1
\tikzmark{D-\theNbequa}\useKV[ClesEquation]{Lettre}&=\frac{\num{\Coeffb}}{\num{\Coeffa}}\tikzmark{H-\theNbequa}%\\
\ifboolKV[ClesEquation]{Fleches}{%
@@ -103,133 +104,132 @@
}{}
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\num{#5}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.
- }{}
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}
}
\fi
}
-\newcommand{\EquaTroisSoustraction}[5][]{%ax+b=cx ou ax=cx+d
+\newcommand\EquaTroisSoustraction[5][]{%ax+b=cx ou ax=cx+d
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\ifx\bla#3\bla%on inverse en faisant attention à la boucle #3<->#5
\ifx\bla#5\bla%
%% paramètre oublié
\else
- \EquaTroisSoustraction[#1]{#4}{#5}{#2}{}%
+ \EquaTroisSoustraction[#1]{#4}{#5}{#2}{0}%
\fi
\else
\xintifboolexpr{#2==0}{%b=cx
- \EquaBase[#1]{#4}{}{}{#3}
+ \EquaBase[#1]{#4}{0}{0}{#3}
}{%
\xintifboolexpr{#4==0}{%ax+b=0
- \EquaDeuxSoustraction[#1]{#2}{#3}{}{0}
- }{%ax+b=cx
- \xintifboolexpr{#2==#4}{%
- \xintifboolexpr{#3==0}{%ax=ax
- L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une infinité de solutions.}%
- {%ax+b=ax
- L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ n'a aucune solution.%
- }%
- }{%% Cas délicat
- \xintifboolexpr{#2>#4}{%ax+b=cx avec a>c
- \begin{align*}
- \tikzmark{A-\theNbequa}\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\tikzmark{E-\theNbequa}\\
- \ifboolKV[ClesEquation]{Decomposition}{%
- \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\mathcolor{Cdecomp}{\xintifboolexpr{#4>0}{-\num{#4}\useKV[ClesEquation]{Lettre}}{+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre}}}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\mathcolor{Cdecomp}{\xintifboolexpr{#4>0}{-\num{#4}\useKV[ClesEquation]{Lettre}}{+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre}}}\\
- }{}
- \tikzmark{B-\theNbequa}\xdef\Coeffa{\fpeval{#2-#4}}\xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=0\tikzmark{F-\theNbequa}\\
- \ifboolKV[ClesEquation]{Decomposition}{%
- \xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}\mathcolor{Cdecomp}{\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}}&=0\mathcolor{Cdecomp}{\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}}\tikzmark{F-\theNbequa}\\
- }{}%
- \tikzmark{C-\theNbequa}\xdef\Coeffb{\fpeval{0-#3}}\xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}&=\num{\Coeffb}\tikzmark{G-\theNbequa}%\\
- %eric
- \ifboolKV[ClesEquation]{Decomposition}{\\\xintifboolexpr{\Coeffa==1}{}{\frac{\num{\Coeffa}}{\mathcolor{Cdecomp}{\num{\Coeffa}}}\useKV[ClesEquation]{Lettre}&=\frac{\num{\Coeffb}}{\mathcolor{Cdecomp}{\num{\Coeffa}}}}}{}
- % eric
- \xintifboolexpr{\Coeffa==1}{}{\\}
- \ifboolKV[ClesEquation]{Fleches}{%
- \leftcomment{A-\theNbequa}{B-\theNbequa}{A-\theNbequa}{$\xintifboolexpr{#4>0}{-\num{#4}}{+\num{\fpeval{0-#4}}}\useKV[ClesEquation]{Lettre}$}
- \rightcomment{E-\theNbequa}{F-\theNbequa}{E-\theNbequa}{$\xintifboolexpr{#4>0}{-\num{#4}}{+\num{\fpeval{0-#4}}}\useKV[ClesEquation]{Lettre}$}
- \leftcomment{B-\theNbequa}{C-\theNbequa}{A-\theNbequa}{$\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}$}%
- \rightcomment{F-\theNbequa}{G-\theNbequa}{E-\theNbequa}{$\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}$}%
- }{}
- \xintifboolexpr{\Coeffa==1}{}{%\ifnum\cmtd>1
- \tikzmark{D-\theNbequa}\useKV[ClesEquation]{Lettre}&=\frac{\num{\Coeffb}}{\num{\Coeffa}}\tikzmark{H-\theNbequa}%\\
- \ifboolKV[ClesEquation]{Fleches}{%
- \leftcomment{C-\theNbequa}{D-\theNbequa}{A-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
- \rightcomment{G-\theNbequa}{H-\theNbequa}{E-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
- }{
- \ifboolKV[ClesEquation]{FlecheDiv}{%
- \leftcomment{C-\theNbequa}{D-\theNbequa}{A-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
- \rightcomment{G-\theNbequa}{H-\theNbequa}{E-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
- }{}
- }
- %% decimal
- \ifboolKV[ClesEquation]{Decimal}{%
- \\\useKV[ClesEquation]{Lettre}&=\num{\fpeval{\Coeffb/\Coeffa}}%
- }{}%
- % %%%
- \ifboolKV[ClesEquation]{Entier}{%
- \SSimpliTest{\Coeffb}{\Coeffa}%
- \ifboolKV[ClesEquation]{Simplification}{%
- \ifthenelse{\boolean{Simplification}}{\\\useKV[ClesEquation]{Lettre}&=\SSimplifie{\Coeffb}{\Coeffa}}{}%\\
- }{}
- }{}
- }
- \ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
- \end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
- }{%ax+b=cx+d avec a<c % Autre cas délicat
- \begin{align*}%
- \tikzmark{A-\theNbequa}\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\tikzmark{E-\theNbequa}\\
- \ifboolKV[ClesEquation]{Decomposition}{%
- \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\mathcolor{Cdecomp}{\xintifboolexpr{#2>0}{-\num{#2}\useKV[ClesEquation]{Lettre}}{+\num{\fpeval{0-#2}}\useKV[ClesEquation]{Lettre}}}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\mathcolor{Cdecomp}{\xintifboolexpr{#2>0}{-\num{#2}\useKV[ClesEquation]{Lettre}}{+\num{\fpeval{0-#2}}\useKV[ClesEquation]{Lettre}}}\\
- }{}
- \tikzmark{B-\theNbequa}\xdef\Coeffb{#3}\xdef\Coeffa{\fpeval{#4-#2}}\xintifboolexpr{#3>0}{\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}\tikzmark{F-\theNbequa}
- \xintifboolexpr{\Coeffa==1}{}{\\}
- \ifboolKV[ClesEquation]{Fleches}{%
- \leftcomment{A-\theNbequa}{B-\theNbequa}{A-\theNbequa}{$\xintifboolexpr{#2>0}{-\num{#2}}{+\num{\fpeval{0-#2}}}\useKV[ClesEquation]{Lettre}$}
- \rightcomment{E-\theNbequa}{F-\theNbequa}{E-\theNbequa}{$\xintifboolexpr{#2>0}{-\num{#2}}{+\num{\fpeval{0-#2}}}\useKV[ClesEquation]{Lettre}$}
- }{}
- % eric
- \ifboolKV[ClesEquation]{Decomposition}{\\\xintifboolexpr{\Coeffa==1}{}{\frac{\num{\Coeffb}}{\mathcolor{Cdecomp}{\num{\Coeffa}}}&=\frac{\num{\Coeffa}}{\mathcolor{Cdecomp}{\num{\Coeffa}}}\useKV[ClesEquation]{Lettre}}}{}
- % eric
- \xintifboolexpr{\Coeffa==1}{}{%\ifnum\cmtd>1
- \tikzmark{D-\theNbequa}\frac{\num{\Coeffb}}{\num{\Coeffa}}&=\useKV[ClesEquation]{Lettre}\tikzmark{H-\theNbequa}%\\
- \ifboolKV[ClesEquation]{Fleches}{%
- \leftcomment{B-\theNbequa}{D-\theNbequa}{A-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
- \rightcomment{F-\theNbequa}{H-\theNbequa}{E-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
- }{
- \ifboolKV[ClesEquation]{FlecheDiv}{%
- \leftcomment{B-\theNbequa}{D-\theNbequa}{A-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
- \rightcomment{F-\theNbequa}{H-\theNbequa}{E-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
- }{}
- }
- %% decimal
- \ifboolKV[ClesEquation]{Decimal}{%
- \\\num{\fpeval{\Coeffb/\Coeffa}}&=\useKV[ClesEquation]{Lettre}%
- }{}%
- % %%%
- \ifboolKV[ClesEquation]{Entier}{%
- \SSimpliTest{\Coeffb}{\Coeffa}%
- \ifboolKV[ClesEquation]{Simplification}{%
- \ifthenelse{\boolean{Simplification}}{\\\SSimplifie{\Coeffb}{\Coeffa}&=\useKV[ClesEquation]{Lettre}}{}%\\
- }{}
- }{}
- }
- \ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
- \end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
- }%
- }%
+ \EquaDeuxSoustraction[#1]{#2}{#3}{0}{0}
+ }{%ax+b=cx
+ \xintifboolexpr{#2==#4}{%
+ \xintifboolexpr{#3==0}{%ax=ax
+ L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une infinité de solutions.}%
+ {%ax+b=ax
+ L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ n'a aucune solution.%
+ }%
+ }{%% Cas délicat
+ \xintifboolexpr{#2>#4}{%ax+b=cx avec a>c
+ \begin{align*}
+ \tikzmark{A-\theNbequa}\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\tikzmark{E-\theNbequa}\\
+ \ifboolKV[ClesEquation]{Decomposition}{%
+ \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\mathcolor{Cdecomp}{\xintifboolexpr{#4>0}{-\num{#4}\useKV[ClesEquation]{Lettre}}{+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre}}}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\mathcolor{Cdecomp}{\xintifboolexpr{#4>0}{-\num{#4}\useKV[ClesEquation]{Lettre}}{+\num{\fpeval{0-#4}}\useKV[ClesEquation]{Lettre}}}\\
+ }{}
+ \tikzmark{B-\theNbequa}\xdef\Coeffa{\fpeval{#2-#4}}\xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=0\tikzmark{F-\theNbequa}\\
+ \ifboolKV[ClesEquation]{Decomposition}{%
+ \xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}\mathcolor{Cdecomp}{\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}}&=0\mathcolor{Cdecomp}{\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}}\tikzmark{F-\theNbequa}\\
+ }{}%
+ \tikzmark{C-\theNbequa}\xdef\Coeffb{\fpeval{0-#3}}\xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}&=\num{\Coeffb}\tikzmark{G-\theNbequa}%\\
+ % eric
+ \ifboolKV[ClesEquation]{Decomposition}{\\\xintifboolexpr{\Coeffa==1}{}{\frac{\num{\Coeffa}}{\mathcolor{Cdecomp}{\num{\Coeffa}}}\useKV[ClesEquation]{Lettre}&=\frac{\num{\Coeffb}}{\mathcolor{Cdecomp}{\num{\Coeffa}}}}}{}%\\
+ % eric
+ \xintifboolexpr{\Coeffa==1}{}{\\}
+ \ifboolKV[ClesEquation]{Fleches}{%
+ \leftcomment{A-\theNbequa}{B-\theNbequa}{A-\theNbequa}{$\xintifboolexpr{#4>0}{-\num{#4}}{+\num{\fpeval{0-#4}}}\useKV[ClesEquation]{Lettre}$}
+ \rightcomment{E-\theNbequa}{F-\theNbequa}{E-\theNbequa}{$\xintifboolexpr{#4>0}{-\num{#4}}{+\num{\fpeval{0-#4}}}\useKV[ClesEquation]{Lettre}$}
+ \leftcomment{B-\theNbequa}{C-\theNbequa}{A-\theNbequa}{$\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}$}%
+ \rightcomment{F-\theNbequa}{G-\theNbequa}{E-\theNbequa}{$\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}$}%
+ }{}%
+ \xintifboolexpr{\Coeffa==1}{}{%\ifnum\cmtd>1
+ \tikzmark{D-\theNbequa}\useKV[ClesEquation]{Lettre}&=\frac{\num{\Coeffb}}{\num{\Coeffa}}\tikzmark{H-\theNbequa}%\\
+ \ifboolKV[ClesEquation]{Fleches}{%
+ \leftcomment{C-\theNbequa}{D-\theNbequa}{A-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
+ \rightcomment{G-\theNbequa}{H-\theNbequa}{E-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
+ }{%
+ \ifboolKV[ClesEquation]{FlecheDiv}{%
+ \leftcomment{C-\theNbequa}{D-\theNbequa}{A-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
+ \rightcomment{G-\theNbequa}{H-\theNbequa}{E-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
+ }{}
+ }
+ %% decimal
+ \ifboolKV[ClesEquation]{Decimal}{%
+ \\\useKV[ClesEquation]{Lettre}&=\num{\fpeval{\Coeffb/\Coeffa}}%\\
+ }{}%
+ %
+ \ifboolKV[ClesEquation]{Entier}{%
+ \SSimpliTest{\Coeffb}{\Coeffa}%
+ \ifboolKV[ClesEquation]{Simplification}{%
+ \ifthenelse{\boolean{Simplification}}{\\\useKV[ClesEquation]{Lettre}&=\SSimplifie{\Coeffb}{\Coeffa}}{}%\\
+ }{}
+ }{}
+ }
+ \ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
+ \end{align*}
+ % \ifboolKV[ClesEquation]{Solution}{L'équation \AffichageEqua{#2}{#3}{#4}{#5} a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
+ }{%ax+b=cx+d avec a<c % Autre cas délicat
+ \begin{align*}%
+ \tikzmark{A-\theNbequa}\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\tikzmark{E-\theNbequa}\\
+ \ifboolKV[ClesEquation]{Decomposition}{%
+ \xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\mathcolor{Cdecomp}{\xintifboolexpr{#2>0}{-\num{#2}\useKV[ClesEquation]{Lettre}}{+\num{\fpeval{0-#2}}\useKV[ClesEquation]{Lettre}}}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\mathcolor{Cdecomp}{\xintifboolexpr{#2>0}{-\num{#2}\useKV[ClesEquation]{Lettre}}{+\num{\fpeval{0-#2}}\useKV[ClesEquation]{Lettre}}}\\
+ }{}
+ \tikzmark{B-\theNbequa}\xdef\Coeffb{#3}\xdef\Coeffa{\fpeval{#4-#2}}\xintifboolexpr{#3>0}{\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}\tikzmark{F-\theNbequa}%\\
+ \xintifboolexpr{\Coeffa==1}{}{\\}
+ \ifboolKV[ClesEquation]{Fleches}{%
+ \leftcomment{A-\theNbequa}{B-\theNbequa}{A-\theNbequa}{$\xintifboolexpr{#2>0}{-\num{#2}}{+\num{\fpeval{0-#2}}}\useKV[ClesEquation]{Lettre}$}
+ \rightcomment{E-\theNbequa}{F-\theNbequa}{E-\theNbequa}{$\xintifboolexpr{#2>0}{-\num{#2}}{+\num{\fpeval{0-#2}}}\useKV[ClesEquation]{Lettre}$}
+ }{}%\\
+ %% eric
+ \ifboolKV[ClesEquation]{Decomposition}{\xintifboolexpr{\Coeffa==1}{}{\frac{\num{\Coeffb}}{\mathcolor{Cdecomp}{\num{\Coeffa}}}&=\frac{\num{\Coeffa}}{\mathcolor{Cdecomp}{\num{\Coeffa}}}\useKV[ClesEquation]{Lettre}}\\}{}%\\
+ % eric
+ \xintifboolexpr{\Coeffa==1}{}{%\ifnum\cmtd>1
+ \tikzmark{D-\theNbequa}\frac{\num{\Coeffb}}{\num{\Coeffa}}&=\useKV[ClesEquation]{Lettre}\tikzmark{H-\theNbequa}%\\
+ \ifboolKV[ClesEquation]{Fleches}{%
+ \leftcomment{B-\theNbequa}{D-\theNbequa}{A-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
+ \rightcomment{F-\theNbequa}{H-\theNbequa}{E-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
+ }{
+ \ifboolKV[ClesEquation]{FlecheDiv}{%
+ \leftcomment{B-\theNbequa}{D-\theNbequa}{A-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
+ \rightcomment{F-\theNbequa}{H-\theNbequa}{E-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
+ }{}
+ }
+ %% decimal
+ \ifboolKV[ClesEquation]{Decimal}{%
+ \\\num{\fpeval{\Coeffb/\Coeffa}}&=\useKV[ClesEquation]{Lettre}%\\
+ }{}%
+ %
+ \ifboolKV[ClesEquation]{Entier}{%
+ \SSimpliTest{\Coeffb}{\Coeffa}%
+ \ifboolKV[ClesEquation]{Simplification}{%
+ \ifthenelse{\boolean{Simplification}}{\\\SSimplifie{\Coeffb}{\Coeffa}&=\useKV[ClesEquation]{Lettre}}{}%\\
+ }{}
+ }{}
+ }
+ \ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
+ \end{align*}
+ % \ifboolKV[ClesEquation]{Solution}{L'équation \AffichageEqua{#2}{#3}{#4}{#5} a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
}%
}%
- \fi
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
+ }%
}%
+ \fi
+}%
-
-\newcommand{\ResolEquationSoustraction}[5][]{%
+\newcommand\ResolEquationSoustraction[5][]{%
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\xintifboolexpr{#2==0}{%
@@ -241,23 +241,23 @@
}%
}%
{%0x+b=cx+d$
- \EquaDeuxSoustraction[#1]{#4}{#5}{}{#3}%
+ \EquaDeuxSoustraction[#1]{#4}{#5}{0}{#3}%
}%
}{%
\xintifboolexpr{#4==0}{%ax+b=0x+d
- \EquaDeuxSoustraction[#1]{#2}{#3}{}{#5}%
+ \EquaDeuxSoustraction[#1]{#2}{#3}{0}{#5}%
}
{%ax+b=cx+d$
\xintifboolexpr{#3==0}{%
\xintifboolexpr{#5==0}{%ax=cx
- \EquaTroisSoustraction[#1]{#2}{0}{#4}{}%
+ \EquaTroisSoustraction[#1]{#2}{0}{#4}{0}%
}%
{%ax=cx+d
- \EquaTroisSoustraction[#1]{#4}{#5}{#2}{}%
+ \EquaTroisSoustraction[#1]{#4}{#5}{#2}{0}%
}%
}%
{\xintifboolexpr{#5==0}{%ax+b=cx
- \EquaTroisSoustraction[#1]{#2}{#3}{#4}{}%
+ \EquaTroisSoustraction[#1]{#2}{#3}{#4}{0}%
}%
{%ax+b=cx+d -- ici
\xintifboolexpr{#2==#4}{%
@@ -314,8 +314,8 @@
}
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
- }{}
+ %\ifboolKV[ClesEquation]{Solution}{L'équation \AffichageEqua{#2}{#3}{#4}{#5} une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
+ %}{}
}{%ax+b=cx+d avec a<c % Autre cas délicat
\begin{align*}%
\tikzmark{A-\theNbequa}\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}\tikzmark{E-\theNbequa}\\
@@ -362,9 +362,10 @@
}
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
- }{}%
+ %\ifboolKV[ClesEquation]{Solution}{L'équation \AffichageEqua{#2}{#3}{#4}{#5} a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
+ %}{}%
}%
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}%
}%
}%
diff --git a/macros/latex/contrib/profcollege/latex/PfCEquationSymbole1.tex b/macros/latex/contrib/profcollege/latex/PfCEquationSymbole1.tex
index f8313606e1..d52affce04 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEquationSymbole1.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEquationSymbole1.tex
@@ -1,6 +1,6 @@
% Licence : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
-\newcommand{\EquaBaseSymbole}[5][]{%type ax=d ou b=cx
+\newcommand\EquaBaseSymbole[5][]{%type ax=d ou b=cx
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\setKV[ClesEquation]{Fleches=false,FlecheDiv=false,Terme=false,Decomposition=false}
@@ -39,7 +39,7 @@
\fi
}
-\newcommand{\EquaDeuxSymbole}[5][]{%type ax+b=d ou b=cx+d$
+\newcommand\EquaDeuxSymbole[5][]{%type ax+b=d ou b=cx+d$
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\setKV[ClesEquation]{Fleches=false,FlecheDiv=false,Terme=false,Decomposition=false}
@@ -82,7 +82,7 @@
\fi
}
-\newcommand{\EquaTroisSymbole}[5][]{%ax+b=cx ou ax=cx+d
+\newcommand\EquaTroisSymbole[5][]{%ax+b=cx ou ax=cx+d
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\setKV[ClesEquation]{Fleches=false,FlecheDiv=false,Terme=false,Decomposition=false}
@@ -155,7 +155,7 @@
\fi
}%
-\newcommand{\ResolEquationSymbole}[5][]{%
+\newcommand\ResolEquationSymbole[5][]{%
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\setKV[ClesEquation]{Fleches=false,FlecheDiv=false,Terme=false,Decomposition=false}
diff --git a/macros/latex/contrib/profcollege/latex/PfCEquationTerme1.tex b/macros/latex/contrib/profcollege/latex/PfCEquationTerme1.tex
index 80399dd3f4..3f8a1759e9 100644
--- a/macros/latex/contrib/profcollege/latex/PfCEquationTerme1.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCEquationTerme1.tex
@@ -1,6 +1,6 @@
% Licence : Released under the LaTeX Project Public License v1.3c
% or later, see http://www.latex-project.org/lppl.txtf
-\newcommand{\EquaDeuxTerme}[5][]{%type ax+b=d ou b=cx+d$
+\newcommand\EquaDeuxTerme[5][]{%type ax+b=d ou b=cx+d$
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\ifx\bla#2\bla%On échange en faisant attention à ne pas boucler : c doit être non vide
@@ -14,20 +14,20 @@
}%
}{%ELSE
\xintifboolexpr{#3==0}{%ax+b=d
- \EquaBase[#1]{#2}{}{}{#5}%
+ \EquaBase[#1]{#2}{0}{0}{#5}%
}{%ax+b=d$ Ici
\ifboolKV[ClesEquation]{Decomposition}{\colorlet{Cterme}{\useKV[ClesEquation]{CouleurTerme}}}{}
\begin{align*}
\tikzmark{A-\theNbequa}\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}&=\num{#5}\tikzmark{E-\theNbequa}\\
\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}&=\num{#5}\mathcolor{Cterme}{\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}}\\
\tikzmark{C-\theNbequa}\xdef\Coeffa{#2}\xdef\Coeffb{\fpeval{#5-#3}}\xintifboolexpr{\Coeffa==1}{}{\num{\Coeffa}}\useKV[ClesEquation]{Lettre}&=\num{\Coeffb}\tikzmark{G-\theNbequa}%\\
- \xintifboolexpr{\Coeffa==1}{}{\\}
+ %\xintifboolexpr{\Coeffa==1}{}{\\}
\ifboolKV[ClesEquation]{Fleches}{%
\leftcomment{A-\theNbequa}{C-\theNbequa}{A-\theNbequa}{$\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}$}%
\rightcomment{E-\theNbequa}{G-\theNbequa}{E-\theNbequa}{$\xintifboolexpr{#3>0}{-\num{#3}}{+\num{\fpeval{0-#3}}}$}%
}{}
\xintifboolexpr{\Coeffa==1}{%
- }{%\ifnum\cmtd>1
+ }{\\
\tikzmark{D-\theNbequa}\useKV[ClesEquation]{Lettre}&=\frac{\num{\Coeffb}}{\num{\Coeffa}}\tikzmark{H-\theNbequa}%\\
\ifboolKV[ClesEquation]{Fleches}{%
\leftcomment{C-\theNbequa}{D-\theNbequa}{A-\theNbequa}{$\div\xintifboolexpr{\Coeffa<0}{(\num{\Coeffa})}{\num{\Coeffa}}$}%
@@ -52,8 +52,7 @@
}{}
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\num{#5}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.
- }{}
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}
}
\fi
@@ -66,14 +65,14 @@
\ifx\bla#5\bla%
%% paramètre oublié
\else
- \EquaTroisTerme[#1]{#4}{#5}{#2}{}%
+ \EquaTroisTerme[#1]{#4}{#5}{#2}{0}%
\fi
\else
\xintifboolexpr{#2==0}{%b=cx
- \EquaBase[#1]{#4}{}{}{#3}
+ \EquaBase[#1]{#4}{0}{0}{#3}
}{%
\xintifboolexpr{#4==0}{%ax+b=0
- \EquaDeuxTerme[#1]{#2}{#3}{}{0}
+ \EquaDeuxTerme[#1]{#2}{#3}{0}{0}
}{%ax+b=cx
\xintifboolexpr{#2==#4}{%
\xintifboolexpr{#3==0}{%ax=ax
@@ -122,7 +121,7 @@
}
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
}{%ax+b=cx+d avec a<c % Autre cas délicat
\ifboolKV[ClesEquation]{Decomposition}{\colorlet{Cterme}{\useKV[ClesEquation]{CouleurTerme}}}{}
\begin{align*}%
@@ -159,15 +158,16 @@
}
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
}%
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}%
}%
}%
\fi
}%
-\newcommand{\ResolEquationTerme}[5][]{%
+\newcommand\ResolEquationTerme[5][]{%
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\xintifboolexpr{#2==0}{%
@@ -183,19 +183,19 @@
}%
}{%
\xintifboolexpr{#4==0}{%ax+b=0x+d
- \EquaDeuxTerme[#1]{#2}{#3}{}{#5}%
+ \EquaDeuxTerme[#1]{#2}{#3}{0}{#5}%
}
{%ax+b=cx+d$
\xintifboolexpr{#3==0}{%
\xintifboolexpr{#5==0}{%ax=cx
- \EquaTroisTerme[#1]{#2}{0}{#4}{}%
+ \EquaTroisTerme[#1]{#2}{0}{#4}{0}%
}%
{%ax=cx+d
- \EquaTroisTerme[#1]{#4}{#5}{#2}{}%
+ \EquaTroisTerme[#1]{#4}{#5}{#2}{0}%
}%
}%
{\xintifboolexpr{#5==0}{%ax+b=cx
- \EquaTroisTerme[#1]{#2}{#3}{#4}{}%
+ \EquaTroisTerme[#1]{#2}{#3}{#4}{0}%
}%
{%ax+b=cx+d -- ici
\xintifboolexpr{#2==#4}{%
@@ -246,8 +246,7 @@
}
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
- }{}
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}
}{%ax+b=cx+d avec a<c % Autre cas délicat
\ifboolKV[ClesEquation]{Decomposition}{\colorlet{Cterme}{\useKV[ClesEquation]{CouleurTerme}}}{}
\begin{align*}%
@@ -288,9 +287,9 @@
}
\ifboolKV[ClesEquation]{Fleches}{\stepcounter{Nbequa}}{\ifboolKV[ClesEquation]{FlecheDiv}{\stepcounter{Nbequa}}{}}
\end{align*}
- \ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.%
- }{}%
+ %\ifboolKV[ClesEquation]{Solution}{L'équation $\xintifboolexpr{#2==1}{}{\num{#2}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#3>0}{+\num{#3}}{-\num{\fpeval{0-#3}}}=\xintifboolexpr{#4==1}{}{\num{#4}}\useKV[ClesEquation]{Lettre}\xintifboolexpr{#5>0}{+\num{#5}}{-\num{\fpeval{0-#5}}}$ a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.}{}%
}%
+ \ifboolKV[ClesEquation]{Solution}{\EcrireSolutionEquation{#2}{#3}{#4}{#5}}{}%
}%
}%
}%
diff --git a/macros/latex/contrib/profcollege/latex/ProfCollege.sty b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
index e32797a1cf..ab00d8a9b9 100644
--- a/macros/latex/contrib/profcollege/latex/ProfCollege.sty
+++ b/macros/latex/contrib/profcollege/latex/ProfCollege.sty
@@ -3,7 +3,7 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfCollege}[2021/06/04 v0.99-d Aide pour l'utilisation de LaTeX au collège]
+\ProvidesPackage{ProfCollege}[2021/08/22 v0.99-f Aide pour l'utilisation de LaTeX au collège]
\RequirePackage{verbatim}
@@ -88,7 +88,7 @@
\RequirePackage{tikz}
% https://tex.stackexchange.com/questions/349259/curved-arrow-describing-a-step-in-a-equation-derivation
%https://tex.stackexchange.com/questions/58656/best-way-to-draw-a-chevron-diagram-using-tikz
-\usetikzlibrary{calc,arrows,tikzmark,chains,positioning,shapes.symbols,babel}
+\usetikzlibrary{calc,shapes,arrows,tikzmark,chains,positioning,shapes.symbols,babel}
\RequirePackage{suffix}%pour la commande étoilée
@@ -101,6 +101,12 @@
\RequirePackage{nicematrix}%pour le tableur
+\let\myoldmulticolumn\multicolumn
+\AtBeginEnvironment{tabular}{\let\multicolumn\myoldmulticolumn}
+
+\RequirePackage{fmtcount}
+\FCloadlang{french}
+
% https://stackoverflow.com/questions/3391103/how-to-make-the-grayed-round-box-using-tiks
\RequirePackage{environ}
%
@@ -311,6 +317,507 @@
\day=\the\rappeljour\relax%
}
+%%%
+% Smiley
+%%%
+%%https://tex.stackexchange.com/questions/3695/smileys-in-latex/227226
+\tikzset{face/.style={shape=circle,minimum size=4ex,shading=radial,outer sep=0pt, inner color=white!50!yellow,outer color= yellow!70!orange}}
+
+\newcommand{\emoticon}[2][]{%
+\scalebox{.5}{\begin{tikzpicture}
+\node[face,#1,draw,thick] (emoticon) {};
+%% The eyes are fixed.
+\draw[fill=white] (-1ex,0ex) ..controls (-0.5ex,0.2ex)and(0.5ex,0.2ex)..(1ex,0.0ex) ..controls ( 1.5ex,1.5ex)and( 0.2ex,1.7ex)..(0ex,0.4ex) ..controls (-0.2ex,1.7ex)and(-1.5ex,1.5ex)..(-1ex,0ex)--cycle;
+#2%
+\end{tikzpicture}}%
+}
+
+\newcommand{\pupils}{
+%% standard pupils
+\fill[shift={(0.5ex,0.5ex)},rotate=80] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.5ex,0.5ex)},rotate=100] (0,0) ellipse (0.3ex and 0.15ex);}
+
+\def\RKsmallsmile{%
+\emoticon{%
+\pupils
+%% mouth
+\draw[thick] (-0.5ex,-1ex)..controls (-0.25ex,-1.25ex)and(0.25ex,-1.25ex)..(0.5ex,-1ex);
+}%\emoticon
+}
+
+\def\RKsmile{%
+\emoticon{%
+\pupils
+\draw[thick] (-1ex,-1ex)..controls (-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKbigsmile{%
+\emoticon{%
+\pupils
+%% mouth
+\draw[thick] (-1.5ex,-0.5ex)..controls (-0.7ex,-1.7ex)and(0.7ex,-1.7ex)..(1.5ex,-0.5ex);
+}%\emoticon
+}
+
+\def\RKsad{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-0.5ex)and(0.5ex,-0.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKneutral{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+%% mouth
+\draw[thick] (-0.5ex,-1ex)--(0.5ex,-1ex);
+}%\emoticon
+}
+
+\def\RKconfused{%
+\emoticon{%
+\pupils
+%% mouth
+\draw[thick] (-1ex,-0.75ex)--(1ex,-1.25ex);
+}%\emoticon
+}
+
+\def\RKsexy{%
+\emoticon{%
+\pupils
+%% mouth
+\draw[very thick,red,line cap=round] (-1ex,-1ex)..controls (-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+%% eyelashes
+\draw (0.60ex,1.20ex)--(0.60ex,1.60ex)
+ (0.85ex,1.25ex)--(0.95ex,1.45ex)
+ (1.00ex,1.00ex)--(1.20ex,1.10ex)
+ (0.35ex,1.15ex)--(0.25ex,1.35ex)
+ (-0.60ex,1.20ex)--(-0.60ex,1.60ex)
+ (-0.85ex,1.25ex)--(-0.95ex,1.45ex)
+ (-1.00ex,1.00ex)--(-1.20ex,1.10ex)
+ (-0.35ex,1.15ex)--(-0.25ex,1.35ex);
+}%\emoticon
+}
+
+\def\RKangry{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.5ex,0.5ex)},rotate=90] (0,0) ellipse (0.3ex and 0.15ex);
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-0.5ex)and(0.5ex,-0.5ex)..(1ex,-1ex);
+%% eyebrows
+\draw[thick] (0.2ex,1.15ex)--(0.5ex,1.6ex)(-0.2ex,1.15ex)--(-0.5ex,1.6ex);
+}%\emoticon
+}
+
+\def\RKlookup{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.5ex,1.05ex)},rotate= 80] (0,0) ellipse (0.2ex and 0.2ex);
+\fill[shift={(-0.5ex,1.05ex)},rotate=100] (0,0) ellipse (0.2ex and 0.2ex);
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKlookdown{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.5ex,0.3ex)},rotate= 80] (0,0) ellipse (0.2ex and 0.2ex);
+\fill[shift={(-0.5ex,0.3ex)},rotate=100] (0,0) ellipse (0.2ex and 0.2ex);
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKlookleft{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.25ex,0.5ex)},rotate=100] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.95ex,0.5ex)},rotate=100] (0,0) ellipse (0.3ex and 0.15ex);
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKlookright{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.95ex,0.5ex)},rotate=80] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.25ex,0.5ex)},rotate=80] (0,0) ellipse (0.3ex and 0.15ex);
+%% mouth
+\draw[thick] (-1.0ex,-1ex)..controls(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKblush{%
+\emoticon{%
+\pupils
+%% mouth
+\draw[thick] (-0.5ex,-1ex)..controls (-0.25ex,-1.25ex)and(0.25ex,-1.25ex)..(0.5ex,-1ex);
+%% blush
+\shade[shading=radial,inner color=white!50!red,outer color= yellow!80!orange] ( 1ex,-0.5ex) circle (0.4ex);
+\shade[shading=radial,inner color=white!50!red,outer color= yellow!80!orange] (-1ex,-0.5ex) circle (0.4ex);
+}%\emoticon
+}
+
+\def\RKalmostcrying{%
+\emoticon{%
+%% pupils
+\fill[shift={( 0.5ex,0.5ex)},rotate=105] (0,0) ellipse (0.3ex and 0.15ex);
+\fill[shift={(-0.5ex,0.5ex)},rotate= 75] (0,0) ellipse (0.3ex and 0.15ex);
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls
+(-0.5ex,-0.8ex)and(0.5ex,-0.8ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKmartian{%
+\emoticon[inner color=white!50!green,outer color=green!70!red]{%
+\pupils
+%% mouth
+\draw[thick] (-1ex,-1ex)..controls
+(-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+}%\emoticon
+}
+
+\def\RKdevilish{%
+\raisebox{-0.6ex}[0ex][0ex]{%
+\emoticon[inner color=white!50!red,outer color= red!70!red!90!black]{%
+\pupils
+%% mouth
+\draw[thick,line cap=round] (-1ex,-1ex)..controls (-0.5ex,-1.5ex)and(0.5ex,-1.5ex)..(1ex,-1ex);
+%% tail
+\draw[line width=0.45ex,-stealth,black] (emoticon.330)--++(330:0.01ex)..controls (3ex,-3ex)and(3.5ex,1ex)..(4.25ex,-3ex);
+\draw[line width=0.27ex,-stealth,red!90!black] (emoticon.330)--++(330:0.01ex)..controls (3ex,-3ex)and(3.5ex,1ex)..(4.22ex,-2.8ex);
+%% horns
+\draw[fill] (emoticon.80)..controls ( 0.6ex,2.4ex)..( 1ex,2.5ex)..controls ( 0.8ex,2.3ex)..(emoticon.70);
+\draw[fill] (emoticon.100)..controls (-0.6ex,2.4ex)..(-1ex,2.5ex)..controls (-0.8ex,2.3ex)..(emoticon.110);
+\draw[thick] (0,0) circle (2ex);
+}%\emoticon
+}%\raisebox
+}
+
+%%%
+% Bon de sortie
+%%%
+\newtcolorbox{Sortie}{%
+ %Titre
+ colbacktitle=white,
+ fonttitle=\color{black}\Large\bfseries,
+ toptitle=2mm,
+ bottomtitle=2mm,
+ title={Nom : \hfill Date : \hspace*{3cm}},
+ %%Cadre principal
+ enhanced,
+ nobeforeafter,
+ width=13.15cm,
+ height=8.8cm,
+ colback=white,
+ valign=top,
+ %Cadre bas
+ sidebyside,
+ righthand width=0.05\linewidth,
+}
+
+\setKVdefault[ClesSortie]{MemeEnonce=false}%
+
+\newcommand\BonSortieSmiley{%
+ \Huge
+ \begin{center}
+ \RKangry
+
+ \vspace{1em}
+
+ \RKsad
+
+ \vspace{1em}
+
+ \RKsmallsmile
+
+ \vspace{1em}
+
+ \RKbigsmile
+ \end{center}
+}
+
+\newcommand\BonSortie[5][]{%
+ \clearpage%
+ \useKVdefault[ClesSortie]%
+ \setKV[ClesSortie]{#1}%
+ \begin{tikzpicture}[remember picture, overlay]
+ \draw[dashed] (current page.north) to (current page.south);
+ \draw[dashed] (current page.west) to (current page.east);
+ \coordinate[xshift=7.425cm,yshift=-5.25cm] (A) at (current page.north west);
+ \coordinate[xshift=-7.425cm,yshift=-5.25cm] (B) at (current page.north east);
+ \coordinate[xshift=7.425cm,yshift=5.25cm] (C) at (current page.south west);
+ \coordinate[xshift=-7.425cm,yshift=5.25cm] (D) at (current page.south east);
+ \ifboolKV[ClesSortie]{MemeEnonce}{%
+ \foreach\i\in in {A,B,C,D}{%
+ \node (\i1) at (\i) {\begin{Sortie}
+ #2
+ \tcblower
+ \BonSortieSmiley
+ \end{Sortie}
+ };
+ }
+ }{%
+ \node (A1) at (A) {\begin{Sortie}
+ #2
+ \tcblower
+ \BonSortieSmiley
+ \end{Sortie}
+ };
+ \node (B1) at (B) {\begin{Sortie}
+ #3
+ \tcblower
+ \BonSortieSmiley
+ \end{Sortie}
+ };
+ \node (C1) at (C) {\begin{Sortie}
+ #4
+ \tcblower
+ \BonSortieSmiley
+ \end{Sortie}
+ };
+ \node (D1) at (D) {\begin{Sortie}
+ #5
+ \tcblower
+ \BonSortieSmiley
+ \end{Sortie}
+ };
+ }
+ \end{tikzpicture}
+}
+
+%%%
+% Ecriture des nombres en lettres
+%%%
+\setKVdefault[ClesEcriture]{Math=false,Majuscule=false,E=false,Tradition=false,Zero=false}
+
+\newcommand\EcriturePluriel[1]{%
+ \xintifboolexpr{#1 > 1}{s}{}%
+}
+
+\newcommand\EcritureDecimale{%
+ \StrLen{\ListeEcriture[2]}[\LongueurDecimale]%
+ \xintifboolexpr{\LongueurDecimale == 6}{%
+ ~millionième\EcriturePluriel{\ListeEcriture[2]}%
+ }{\xintifboolexpr{\LongueurDecimale == 5}{%
+ ~cent-millième\EcriturePluriel{\ListeEcriture[2]}
+ }{\xintifboolexpr{\LongueurDecimale == 4}{%
+ ~dix-millième\EcriturePluriel{\ListeEcriture[2]}
+ }{\xintifboolexpr{\LongueurDecimale == 3}{%
+ ~millième\EcriturePluriel{\ListeEcriture[2]}
+ }{\xintifboolexpr{\LongueurDecimale == 2}{%
+ ~centième\EcriturePluriel{\ListeEcriture[2]}
+ }{\xintifboolexpr{\LongueurDecimale == 1}{%
+ ~dixième\EcriturePluriel{\ListeEcriture[2]}
+ }{}%
+ }%
+ }%
+ }%
+ }%
+ }%
+}%
+
+\newcommand\Ecriture[2][]{%
+ \useKVdefault[ClesEcriture]%
+ \setKV[ClesEcriture]{#1}%
+ \ifboolKV[ClesEcriture]{Tradition}{%
+ \fmtcountsetoptions{french={dash or space=traditional}}%
+ }{%
+ \fmtcountsetoptions{french={dash or space=always}}%
+ }%
+ \setsepchar{.}%
+ \readlist*\ListeEcriture{#2}%
+ \xintifboolexpr{\ListeEcriturelen == 2}{%
+ \ifboolKV[ClesEcriture]{Majuscule}{%
+ \ifboolKV[ClesEcriture]{Zero}{}{\Numberstringnum{\ListeEcriture[1]}}\ifboolKV[ClesEcriture]{Math}{\ifboolKV[ClesEcriture]{Zero}{}{\ifboolKV[ClesEcriture]{E}{e}{}~unité\EcriturePluriel{\ListeEcriture[1]} et }}{\ifboolKV[ClesEcriture]{Tradition}{ virgule }{-virgule-}}\numberstringnum{\ListeEcriture[2]}\ifboolKV[ClesEcriture]{Math}{\EcritureDecimale}{}%
+ }{%
+ \ifboolKV[ClesEcriture]{Zero}{}{\numberstringnum{\ListeEcriture[1]}}\ifboolKV[ClesEcriture]{Math}{\ifboolKV[ClesEcriture]{Zero}{}{\ifboolKV[ClesEcriture]{E}{e}{}~unité\EcriturePluriel{\ListeEcriture[1]} et }}{\ifboolKV[ClesEcriture]{Tradition}{ virgule }{-virgule-}}\numberstringnum{\ListeEcriture[2]}\ifboolKV[ClesEcriture]{Math}{\EcritureDecimale}{}%
+ }}{%
+ \ifboolKV[ClesEcriture]{Majuscule}{%
+ \Numberstringnum{\ListeEcriture[1]}\ifboolKV[ClesEcriture]{Math}{\ifboolKV[ClesEcriture]{E}{e}{}~unité\EcriturePluriel{\ListeEcriture[1]}}{}%
+ }{%
+ \numberstringnum{\ListeEcriture[1]}\ifboolKV[ClesEcriture]{Math}{\ifboolKV[ClesEcriture]{E}{e}{}~unité\EcriturePluriel{\ListeEcriture[1]}}{}%
+ }
+ }%
+}%
+
+%%%
+% D\'ecomposition de fractions d\'ecimales
+%%%
+\setKVdefault[ClesFracDeci]{Complete=false,SansZero=false,Remediation=false}
+
+\newcommand\FractionDecimale[2][]{%
+ \useKVdefault[ClesFracDeci]%
+ \setKV[ClesFracDeci]{#1}%
+ \setsepchar[*]{/}%
+ \readlist*\ListeFractionDecimale{#2}%
+ \xdef\FractionDeciNum{\ListeFractionDecimale[1]}%
+ \xdef\FractionDeciDeno{\ListeFractionDecimale[2]}%
+ \xdef\PartieEntiereFractionDeci{\fpeval{floor(\FractionDeciNum/\FractionDeciDeno)}}%
+ \xdef\PartieDecimaleFractionDeci{\fpeval{\FractionDeciNum-floor(\FractionDeciNum/\FractionDeciDeno)*\FractionDeciDeno}}%
+ \StrLen{\PartieDecimaleFractionDeci}[\LongueurPartieDecimale]%
+ \StrLen{\fpeval{\FractionDeciDeno}}[\LongueurFracDeciDeno]%
+ \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}}}%
+ }{%
+ \ifboolKV[ClesFracDeci]{SansZero}{%
+ \ensuremath{%
+ \xintifboolexpr{\PartieEntiereFractionDeci == 0}{}{\ifboolKV[ClesFracDeci]{Remediation}{\dots}{\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)}}}}%
+ }%
+ }%
+ }{%
+ \ifboolKV[ClesFracDeci]{Complete}{%
+ \xintifboolexpr{\FractionDeciNum>\FractionDeciDeno}{%
+ \ensuremath{%
+ % on affiche la partie entière.
+ \xintifboolexpr{\PartieEntiereFractionDeci == 0}{}{\ifboolKV[ClesFracDeci]{Remediation}{\dots}{\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}}}%
+ }%
+ }%
+ }{%
+ \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)}}}%
+ }%
+ }%
+ }%
+ }{%
+ \ensuremath{%
+ \xintifboolexpr{\PartieEntiereFractionDeci == 0}{}{\ifboolKV[ClesFracDeci]{Remediation}{\dots}{\num{\PartieEntiereFractionDeci}}+}\frac{\ifboolKV[ClesFracDeci]{Remediation}{\dots}{\num{\PartieDecimaleFractionDeci}}}{\num{\FractionDeciDeno}}%
+ }%
+ }%
+ }%
+ }%
+}%
+
+%%%
+% Pyramide de calculs
+%%%
+\newcommand\DessinePyramideNombre[1]{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ pair A[][],B[];
+ nbetages:=\useKV[ClesPyramide]{Etages};
+ largeur:=\useKV[ClesPyramide]{Largeur};
+ hauteur:=\useKV[ClesPyramide]{Hauteur};
+ Nbeb:=0;%Pour associer les textes avec les points. Plus facile :)
+ if \useKV[ClesPyramide]{Double}:
+ for k=nbetages downto 1:
+ for l=0 upto (k-1):
+ Nbeb:=Nbeb+1;
+ A[k][l]=(0,0)+(nbetages-k)*(largeur/2,0)+(l*largeur,(nbetages-k)*hauteur);
+ B[Nbeb]=A[k][l];
+ trace ((unitsquare xscaled largeur) yscaled hauteur) shifted (A[k][l]-0.5*(largeur,hauteur));
+ endfor;
+ endfor;
+ for k=nbetages-1 downto 1:
+ for l=0 upto (k-1):
+ Nbeb:=Nbeb+1;
+ A[-k][l]=(0,0)+(nbetages-k)*(largeur/2,0)+(l*largeur,-(nbetages-k)*hauteur);
+ B[Nbeb]=A[-k][l];
+ trace ((unitsquare xscaled largeur) yscaled hauteur) shifted (A[-k][l]-0.5*(largeur,hauteur));
+ endfor;
+ endfor;
+ else:
+ if \useKV[ClesPyramide]{Inverse}:
+ change:=-1;
+ else:
+ change=1;
+ fi;
+ for k=nbetages downto 1:
+ for l=0 upto (k-1):
+ Nbeb:=Nbeb+1;
+ A[k][l]=(0,0)+(nbetages-k)*(largeur/2,0)+(l*largeur,change*(nbetages-k)*hauteur);
+ B[Nbeb]=A[k][l];
+ trace ((unitsquare xscaled largeur) yscaled hauteur) shifted (A[k][l]-0.5*(largeur,hauteur));
+ endfor;
+ endfor;
+ fi;
+ if \useKV[ClesPyramide]{Vide}:
+ else:
+ Nbeb:=0;
+ for p_=#1:
+ Nbeb:=Nbeb+1;
+ label(TEX(""&p_&""),B[Nbeb]);
+ endfor;
+ fi;
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={nbetages:=\useKV[ClesPyramide]{Etages};largeur:=\useKV[ClesPyramide]{Largeur};hauteur:=\useKV[ClesPyramide]{Hauteur};boolean Vide;Vide=\useKV[ClesPyramide]{Vide};boolean Inverse;Inverse=\useKV[ClesPyramide]{Inverse};}]
+ pair A[][],B[];
+ Nbeb:=0;
+ if Inverse:
+ change:=-1;
+ else:
+ change=1;
+ fi;
+ for k=nbetages downto 1:
+ for l=0 upto (k-1):
+ Nbeb:=Nbeb+1;
+ A[k][l]=(0,0)+(nbetages-k)*(largeur/2,0)+(l*largeur,change*(nbetages-k)*hauteur);
+ B[Nbeb]=A[k][l];
+ trace ((unitsquare xscaled largeur) yscaled hauteur) shifted (A[k][l]-0.5(largeur,hauteur));
+ endfor;
+ endfor;
+ Nbeb:=0;
+ if Vide:
+ else:
+ for p_=#1:
+ Nbeb:=Nbeb+1;
+ label(LATEX(""&p_&""),B[Nbeb]);
+ endfor;
+ fi;
+ \end{mpost}
+ \fi
+}
+
+\setKVdefault[ClesPyramide]{Etages=5,Largeur=2cm,Hauteur=1cm,Vide=false,Inverse=false,Double=false}%
+
+\newtoks\toklistecaseP%
+\def\UpdatetoksPyramide#1\nil{\addtotok\toklistecaseP{"#1",}}%
+
+\newcommand\PyramideNombre[2][]{%
+ \useKVdefault[ClesPyramide]%
+ \setKV[ClesPyramide]{#1}%
+ \ifx\bla#2\bla%
+ \setKV[ClesPyramide]{Vide=true}%
+ \DessinePyramideNombre{\the\toklistecaseP}%
+ \else%
+ \setsepchar{,}%
+ \readlist*\ListePyramide{#2}%
+ \ifboolKV[ClesPyramide]{Double}{%
+ \def\CalculNombreComposants{\fpeval{\useKV[ClesPyramide]{Etages}*\useKV[ClesPyramide]{Etages}}}%
+ }{%
+ \def\CalculNombreComposants{\fpeval{\useKV[ClesPyramide]{Etages}*(\useKV[ClesPyramide]{Etages}+1)/2}}%
+ }%
+ \xintifboolexpr{\ListePyramidelen==\CalculNombreComposants}{%
+ \toklistecaseP{}%
+ \foreachitem\compteur\in\ListePyramide{\expandafter\UpdatetoksPyramide\compteur\nil}%
+ \DessinePyramideNombre{\the\toklistecaseP}%
+ }{Le nombre d'éléments dans la liste des propositions n'est pas compatible avec le nombre d'étages choisi.}%
+ \fi%
+}%
%%%
% Tables Addition-Multiplication
@@ -421,42 +928,42 @@
%%%
\setKVdefault[ClesRgt]{Croissant,Decroissant=false,Strict,Fraction=false,Details=false}
+\dtlexpandnewvalue%
\DTLgnewdb{mtnumedb}%
-\DTLgnewdb{mtnumeretourdb}%
\newcommand\Rangement[2][]{%
\useKVdefault[ClesRgt]%
\setKV[ClesRgt]{#1}%
\ifboolKV[ClesRgt]{Fraction}{%
- \setsepchar[*]{,*/}%\ignoreemptyitems%
+ \setsepchar[*]{,*/}\ignoreemptyitems%
\readlist*\ListeRgt{#2}%
% on cherche le d\'enominateur commun
\ppcm=1\relax
\foreachitem\x\in\ListeRgt{%
\PPCM{\fpeval{\ListeRgt[\xcnt,2]}}{\fpeval{\the\ppcm}}%
- }%
+ }%ok
% On cr\'ee la liste des rangements.
\DTLcleardb{mtnumedb}%
% on les trie pour les ranger par ordre croissant
\foreachitem\x\in\ListeRgt{%
\DTLnewrow{mtnumedb}%
- \itemtomacro\ListeRgt[\xcnt,1]\y%
- \DTLnewdbentry{mtnumedb}{Numeric}{\fpeval{\y*\the\ppcm/\ListeRgt[\xcnt,2]}}%
+ \xdef\toto{\fpeval{\ListeRgt[\xcnt,1]*\the\ppcm/\ListeRgt[\xcnt,2]}}%
+ \DTLnewdbentry{mtnumedb}{numeric}{\toto}%
}%
% On trie
\ifboolKV[ClesRgt]{Decroissant}{%
% On trie la liste
- \dtlsort{Numeric=descending}{mtnumedb}{\dtlicompare}%
- \ifboolKV[ClesRgt]{Details}{\ensuremath{\DTLforeach{mtnumedb}{\numeroDonnee=Numeric}{\frac{\num{\numeroDonnee}}{\num{\the\ppcm}}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{>}{\geqslant}}}}}{%
- \ensuremath{\DTLforeach{mtnumedb}{\numeroDonnee=Numeric}{\Simplification{\numeroDonnee}{\ppcm}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{>}{\geqslant}}}}%
+ \dtlsort{numeric=descending}{mtnumedb}{\dtlicompare}%
+ \ifboolKV[ClesRgt]{Details}{\ensuremath{\DTLforeach{mtnumedb}{\numeroDonnee=numeric}{\frac{\num{\numeroDonnee}}{\num{\the\ppcm}}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{>}{\geqslant}}}}}{%
+ \ensuremath{\DTLforeach{mtnumedb}{\numeroDonnee=numeric}{\Simplification{\numeroDonnee}{\ppcm}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{>}{\geqslant}}}}%
}
}{%
% On trie la liste
- \dtlsort{Numeric}{mtnumedb}{\dtlicompare}%
+ \dtlsort{numeric}{mtnumedb}{\dtlicompare}%
\ifboolKV[ClesRgt]{Details}{%
- \ensuremath{\DTLforeach{mtnumedb}{\numeroDonnee=Numeric}{\frac{\num{\numeroDonnee}}{\num{\the\ppcm}}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{<}{\leqslant}}}}%
+ \ensuremath{\DTLforeach{mtnumedb}{\numeroDonnee=numeric}{\frac{\num{\numeroDonnee}}{\num{\the\ppcm}}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{<}{\leqslant}}}}%
}{%
- \ensuremath{\DTLforeach{mtnumedb}{\numeroDonnee=Numeric}{\Simplification{\numeroDonnee}{\ppcm}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{<}{\leqslant}}}}%
+ \ensuremath{\DTLforeach{mtnumedb}{\numeroDonnee=numeric}{\Simplification{\numeroDonnee}{\ppcm}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{<}{\leqslant}}}}%
}
}%
}{%
@@ -468,25 +975,85 @@
\foreachitem\x\in\ListeRgt{%
\DTLnewrow{mtdb}%
\itemtomacro\ListeRgt[\xcnt]\y%
- \DTLnewdbentry{mtdb}{Numeric}{\y}%
+ \DTLnewdbentry{mtdb}{numeric}{\y}%
}%
%
\ifboolKV[ClesRgt]{Decroissant}{%
% On trie la liste
- \dtlsort{Numeric=descending}{mtdb}{\dtlicompare}%
- \ensuremath{\DTLforeach{mtdb}{\numeroDonnee=Numeric}{\num{\numeroDonnee}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{>}{\geqslant}}}}%
+ \dtlsort{numeric=descending}{mtdb}{\dtlicompare}%
+ \ensuremath{\DTLforeach{mtdb}{\numeroDonnee=numeric}{\num{\numeroDonnee}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{>}{\geqslant}}}}%
}{%
% On trie la liste
- \dtlsort{Numeric}{mtdb}{\dtlicompare}%
- \ensuremath{\DTLforeach{mtdb}{\numeroDonnee=Numeric}{\num{\numeroDonnee}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{<}{\leqslant}}}}%
+ \dtlsort{numeric}{mtdb}{\dtlicompare}%
+ \ensuremath{\DTLforeach{mtdb}{\numeroDonnee=numeric}{\num{\numeroDonnee}\DTLiflastrow{}{\ifboolKV[ClesRgt]{Strict}{<}{\leqslant}}}}%
}%
- }
+ }%
+}%
+
+%%%
+% Mots Cod\'es
+%%%
+\setKVdefault[MotsCodes]{LargeurT=1cm,Colonnes=5,Largeur=3cm,Solution=false,Math=false}%
+
+\newcommand\MotsCodes[2][]{%
+ \useKVdefault[MotsCodes]%
+ \setKV[MotsCodes]{#1}%
+ \setsepchar[*]{§*/}%
+ \readlist*\ListeMotsCodes{#2}%
+ \xdef\ListeMotsCodesPas{\fpeval{\ListeMotsCodeslen/\useKV[MotsCodes]{Colonnes}}}
+ \begin{NiceTabular}{*{\fpeval{\useKV[MotsCodes]{Colonnes}}}{>{\centering\arraybackslash}m{\useKV[MotsCodes]{Largeur}}}}
+ \xintFor* ##1 in {\xintSeq {1}{\ListeMotsCodesPas}}\do{%
+ \xintFor* ##2 in {\xintSeq {1}{\fpeval{\useKV[MotsCodes]{Colonnes}}}}\do{%
+ \xintifForFirst{}{&}\Block[draw=black]{4-1}{}%
+ }\\
+ \xintFor* ##2 in {\xintSeq {1}{\fpeval{\useKV[MotsCodes]{Colonnes}}}}\do{%
+ \xintifForFirst{}{&}\ListeMotsCodes[\fpeval{(##1-1)*\useKV[MotsCodes]{Colonnes}+##2},1]
+ }\\
+ \xintFor* ##2 in {\xintSeq {1}{\fpeval{\useKV[MotsCodes]{Colonnes}}}}\do{%
+ \xintifForFirst{}{&}%
+ }\\
+ \xintFor* ##2 in {\xintSeq {1}{\fpeval{\useKV[MotsCodes]{Colonnes}}}}\do{%
+ \xintifForFirst{}{&}\textbf{\Large\ListeMotsCodes[\fpeval{(##1-1)*\useKV[MotsCodes]{Colonnes}+##2},2]}
+ }\\
+ }%
+ \end{NiceTabular}%
+}%
+
+\newcommand\MotsCodesTableau[3][]{%
+ \useKVdefault[MotsCodes]%
+ \setKV[MotsCodes]{#1}%
+ \setsepchar[*]{,*/}
+ \readlist*\ListeMotsCodesTableau{#2}%
+ \xdef\ListeMotsCodesMax{0}%
+ \setsepchar{,}%
+ \readlist*\ListeMotsCodesPhrase{#3}%
+ \foreachitem\compteur\in\ListeMotsCodesTableau{%
+ \xintifboolexpr{\ListeMotsCodesMax<\listlen\ListeMotsCodesTableau[\compteurcnt]}{\xdef\ListeMotsCodesMax{\fpeval{\listlen\ListeMotsCodesTableau[\compteurcnt]}}}{}%
+ }%
+ \begin{NiceTabular}{*{\fpeval{\ListeMotsCodesMax}}{>{\centering\arraybackslash}m{\useKV[MotsCodes]{LargeurT}}}}
+ \xintFor* ##1 in {\xintSeq {1}{\fpeval{\ListeMotsCodesTableaulen}}}\do{%
+ \xintFor* ##2 in {\xintSeq {1}{\listlen\ListeMotsCodesTableau[##1]}}\do{%
+ \xintifForFirst{}{&}\ifboolKV[MotsCodes]{Solution}{%
+ \StrMid{\ListeMotsCodesPhrase[##1]}{##2}{##2}[\MotsCodesMaLettre]%
+ \IfStrEq{\MotsCodesMaLettre}{*}{\Block[draw=black,fill=black]{3-1}{}}{\Block[draw=black]{3-1}{\StrMid{\ListeMotsCodesPhrase[##1]}{##2}{##2}}}%
+ }{%
+ \IfStrEq{\ListeMotsCodesTableau[##1,##2]}{*}{\Block[draw=black,fill=black]{3-1}{}}{\Block[draw=black]{3-1}{}}%
+ }%%
+ }\\
+ \xintFor* ##2 in {\xintSeq {1}{\listlen\ListeMotsCodesTableau[##1]}}\do{%
+ \xintifForFirst{}{&}
+ }\\
+ \xintFor* ##2 in {\xintSeq {1}{\listlen\ListeMotsCodesTableau[##1]}}\do{%
+ \xintifForFirst{}{&}\IfStrEq{\ListeMotsCodesTableau[##1,##2]}{*}{}{\footnotesize\ifboolKV[MotsCodes]{Math}{\ListeMotsCodesTableau[##1,##2]}{\num{\ListeMotsCodesTableau[##1,##2]}}}%
+ }\\
+ }%
+ \end{NiceTabular}%
}%
%%%
% Labyrinthe
%%%
-\setKVdefault[Labyrinthe]{Lignes=6,Colonnes=3,Longueur=4,Hauteur=2,Passages=false,EcartH=1,EcartV=1,CouleurF=gray!50,Texte=\color{yellow},SensImpose=false,Slop}
+\setKVdefault[Labyrinthe]{Lignes=6,Colonnes=3,Longueur=4,Hauteur=2,Passages=false,EcartH=1,EcartV=1,CouleurF=gray!50,Texte=\color{black},SensImpose=false,Slop}
\tikzset{FDirect/.style={-stealth}}
\tikzset{FIndirect/.style={stealth-}}
@@ -622,6 +1189,1086 @@
}
%%%
+% Labyrinthe Nombre
+%%%
+
+\setKVdefault[ClesLabyNombre]{Multiple=5,XDepart=0,YDepart=0,Longueur=7,Largeur=4,XArrivee=6,YArrivee=3,Solution=false,Echelle=1,Angle=0,Couleur=red,Murs=false}
+
+\newcommand\LabyNombre[1][]{%
+ \useKVdefault[ClesLabyNombre]%
+ \setKV[ClesLabyNombre]{#1}%
+ \ifboolKV[ClesLabyNombre]{Solution}{%
+ \TraceSolution{\useKV[ClesLabyNombre]{Multiple}}{\useKV[ClesLabyNombre]{Longueur}}{\useKV[ClesLabyNombre]{Largeur}}{(\useKV[ClesLabyNombre]{YDepart},\useKV[ClesLabyNombre]{XDepart})}{(\useKV[ClesLabyNombre]{YArrivee},\useKV[ClesLabyNombre]{XArrivee})}{\useKV[ClesLabyNombre]{Solution}}
+ }{%
+ \TraceLabyNombre{\useKV[ClesLabyNombre]{Multiple}}{\useKV[ClesLabyNombre]{Longueur}}{\useKV[ClesLabyNombre]{Largeur}}{(\useKV[ClesLabyNombre]{YDepart},\useKV[ClesLabyNombre]{XDepart})}{(\useKV[ClesLabyNombre]{YArrivee},\useKV[ClesLabyNombre]{XArrivee})}{\useKV[ClesLabyNombre]{Solution}}
+ }%
+}
+
+\newcommand\TraceLabyNombre[6]{%
+ \mplibforcehmode%
+ \mplibcodeinherit{enable}%\xintifboolexpr{#6==false}{\mplibcodeinherit{enable}}{}
+ \begin{mplibcode}
+ input PfCLabyNombre;
+
+ boolean Murs;
+ Murs=\useKV[ClesLabyNombre]{Murs};
+
+ numeric Multiple;
+ Multiple=#1;
+ % Initialisation du labyrinthe
+ InitialisationLabyrinthe(#2,#3);
+ % On initialise les paramètres du parcours
+ numeric choixligneD,choixligneA,choixcolonneD,choixcolonneA;
+ choixligneD=xpart(#4);
+ choixcolonneD=ypart(#4);
+ choixligneA=xpart(#5);
+ choixcolonneA=ypart(#5);%
+ pair Depart;
+ Depart=N[choixligneD][choixcolonneD];
+ pair Arrivee;
+ Arrivee=N[choixligneA][choixcolonneA];
+ pair Mobile;
+ Mobile=Depart;
+ RAZPileChemin;
+ % Exploration du labyrinthe
+ PushChemin((choixligneD,choixcolonneD));
+ CaseExploree[choixligneD][choixcolonneD]:=true;
+ VoisinDispo(choixligneD,choixcolonneD);
+ forever: exitif Mobile=Arrivee;%nb=0;
+ nb:=ceiling(uniformdeviate(nbvoisin));
+ if nb>0:
+ for k=1 upto nbvoisin:
+ CaseExploree[xpart(PileVoisin[k])][ypart(PileVoisin[k])]:=true;
+ endfor;
+ PushChemin((xpart(PileVoisin[nb]),ypart(PileVoisin[nb])));
+ Mobile:=N[xpart(PileChemin[indiceChemin])][ypart(PileChemin[indiceChemin])];
+ VoisinDispo(xpart(PileChemin[indiceChemin]),ypart(PileChemin[indiceChemin]));
+ else:
+ PopChemin;
+ fi;
+ endfor;
+ % Affichagefinal
+ % on sauvegarde les nombres aléatoires
+ numeric NbAffiche[];
+ numeric NbSol[];
+ % on écrit des nombres au hasard, mais sans être multiple du nombre choisi
+ numeric nbaffiche;
+ nbaffiche=0;
+ for k=0 upto LargeurLaby-1:
+ for l=0 upto LongueurLaby-1:
+ nbaffiche:=nbaffiche+1;
+ NbAffiche[nbaffiche]:=(50+ceiling(uniformdeviate(100)))*Multiple+ceiling(uniformdeviate(Multiple-1));
+ endfor;
+ endfor;
+ % On crée des multiples du nombre choisi
+ for k=2 upto indiceChemin-1:
+ NbSol[k]=(50+ceiling(uniformdeviate(100)))*Multiple;
+ endfor;
+ % On affiche
+ picture Corps;
+ Corps=image(
+ nbaffiche:=0;
+ for k=0 upto LargeurLaby-1:
+ for l=0 upto LongueurLaby-1:
+ nbaffiche:=nbaffiche+1;
+ label(TEX("\num{"&decimal(NbAffiche[nbaffiche])&"}"),M[k][l]);
+ endfor;
+ endfor;
+ remplis ((unitsquare scaled 10mm) shifted N[choixligneD][choixcolonneD]) withcolor \useKV[ClesLabyNombre]{Couleur};
+ remplis ((unitsquare scaled 10mm) shifted Arrivee) withcolor \useKV[ClesLabyNombre]{Couleur};
+ for k=2 upto indiceChemin-1:
+ remplis ((unitsquare scaled 10mm) shifted N[xpart(PileChemin[k])][ypart(PileChemin[k])]) withcolor white;
+ label(TEX("\num{"&decimal(NbSol[k])&"}"),M[xpart(PileChemin[k])][ypart(PileChemin[k])]);
+ endfor;
+ trace TraceLabyrinthe;
+ );
+ Corps:=(Corps scaled \useKV[ClesLabyNombre]{Echelle}) rotated \useKV[ClesLabyNombre]{Angle};
+ trace Corps;
+ \end{mplibcode}
+}
+
+\newcommand\TraceSolution[6]{%
+ \mplibforcehmode%
+ \begin{mplibcode}
+ picture CorpsSolution;
+ CorpsSolution=image(
+ nbaffiche:=0;
+ for k=0 upto #3-1:
+ for l=0 upto #2-1:
+ nbaffiche:=nbaffiche+1;
+ label(TEX("\num{"&decimal(NbAffiche[nbaffiche])&"}"),M[k][l]);
+ endfor;
+ endfor;
+ remplis ((unitsquare scaled 10mm) shifted N[choixligneD][choixcolonneD]) withcolor \useKV[ClesLabyNombre]{Couleur};
+ remplis ((unitsquare scaled 10mm) shifted Arrivee) withcolor \useKV[ClesLabyNombre]{Couleur};
+ for k=2 upto indiceChemin-1:
+ remplis ((unitsquare scaled 10mm) shifted N[xpart(PileChemin[k])][ypart(PileChemin[k])]) withcolor 0.5white;
+ label(TEX("\num{"&decimal(NbSol[k])&"}"),M[xpart(PileChemin[k])][ypart(PileChemin[k])]);
+ endfor;
+ trace TraceLabyrinthe;
+ );
+ CorpsSolution:=(CorpsSolution scaled \useKV[ClesLabyNombre]{Echelle}) rotated \useKV[ClesLabyNombre]{Angle};
+ trace CorpsSolution;
+ \end{mplibcode}
+ \mplibcodeinherit{disable}
+}%
+
+%%%
+% Mots empilés
+%%%
+\setKVdefault[ClesMotEmpile]{Colonne=4,Solution=false,Couleur=black}
+
+\newcounter{CompteurMotEmpile}
+
+\newcommand\MotsEmpiles[2][]{%
+ \useKVdefault[ClesMotEmpile]%
+ \setKV[ClesMotEmpile]{#1}%
+ \setcounter{CompteurMotEmpile}{0}%
+ \setsepchar[*]{,*/}%
+ \readlist*\ListeMotsEmpiles{#2}
+ \xdef\ListeMotsEmpilesMax{0}%
+ \colorlet{MotEmpileCouleur}{\useKV[ClesMotEmpile]{Couleur}}%
+ \foreachitem\compteur\in\ListeMotsEmpiles{%
+ \StrLen{\ListeMotsEmpiles[\compteurcnt,2]}[\LongueurMot]%
+ \xintifboolexpr{\ListeMotsEmpilesMax<\fpeval{\ListeMotsEmpiles[\compteurcnt,1]+\LongueurMot}}{\xdef\ListeMotsEmpilesMax{\fpeval{\ListeMotsEmpiles[\compteurcnt,1]+\LongueurMot}}}{}%
+ }%
+ \begin{NiceTabular}{c|*{\fpeval{\ListeMotsEmpilesMax}}{m{0.5em}}}
+ \Block{1-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}}{}\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesMotEmpile]{Colonne}}}}\do{&}&$\downarrow$\xintFor* ##1 in {\xintSeq {1}{\fpeval{\ListeMotsEmpilesMax-\useKV[ClesMotEmpile]{Colonne}-1}}}\do{&}\\
+ \xintFor* ##1 in {\xintSeq {1}{\fpeval{\ListeMotsEmpileslen}}}\do{%
+ \rule[-1.2ex]{0pt}{3.8ex}\stepcounter{CompteurMotEmpile}\Alph{CompteurMotEmpile}&\Block{1-\fpeval{\ListeMotsEmpiles[##1,1]}}{}\xintFor* ##2 in {\xintSeq {1}{\fpeval{\ListeMotsEmpiles[##1,1]}}}\do{%
+ &
+ }%
+ \StrLen{\ListeMotsEmpiles[##1,2]}[\LongueurMot]%
+ \xintFor* ##3 in {\xintSeq {1}{\fpeval{\LongueurMot}}}\do{%
+ \xintifForFirst{}{&}\Block[draw=black]{1-1}{\ifboolKV[ClesMotEmpile]{Solution}{\centering\arraybackslash\StrMid{\ListeMotsEmpiles[##1,2]}{##3}{##3}}{}}%%
+ }
+ \\
+ }%
+ \CodeAfter\tikz\draw[line width=1.5pt,MotEmpileCouleur](row-2-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+2}) rectangle (row-\fpeval{\ListeMotsEmpileslen+2}-|col-\fpeval{\useKV[ClesMotEmpile]{Colonne}+3});
+ \end{NiceTabular}
+}%
+
+%%%
+% Colorilude
+%%%
+\setKVdefault[Colorilude]{Largeur=10,Lignes=10,Legende=false,Coef=0.6,Solution=false}
+
+\newcommand{\dispogpfc}[3][]{%
+ \setbox1=\hbox{#2}%
+ \setbox2=\hbox{#3}%
+ \begin{minipage}{\wd2}%
+ #3%
+ \end{minipage}%
+ \quad%
+ \begin{minipage}{\wd1}%
+ #2%
+ \end{minipage}%
+}%
+
+\newcommand\TraceEchiquierColorilude{%
+ \ifluatex
+ \begin{mplibcode}
+ pair A,B,C,D;%pour la grille
+ A=(0,0);
+ B-A=u*\useKV[Colorilude]{Coef}*(\useKV[Colorilude]{Largeur},0);
+ C-B=u*\useKV[Colorilude]{Coef}*(0,-\useKV[Colorilude]{Lignes});
+ D-C=A-B;
+ nblargeur=\useKV[Colorilude]{Largeur};
+ nblignes=\useKV[Colorilude]{Lignes};
+ for k=1 upto nblargeur-1:
+ draw (k/nblargeur)[A,B]--(k/nblargeur)[D,C];
+ endfor;
+ for k=1 upto nblignes-1:
+ draw (k/nblignes)[A,D]--(k/nblignes)[B,C];
+ endfor;
+ draw polygone(A,B,C,D) withpen pensquare scaled 1.5;
+ if \useKV[Colorilude]{Legende}:
+ label.lrt(btex \tiny d'après APMEP etex rotated 90,B);
+ fi;
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={boolean Legende;
+ Legende=\useKV[Colorilude]{Legende};
+ nblargeur:=\useKV[Colorilude]{Largeur};
+ nblignes:=\useKV[Colorilude]{Lignes};
+ coef:=\useKV[Colorilude]{Coef};}]
+ pair A,B,C,D;%pour la grille
+ A=(0,0);
+ B-A=u*coef*(nblargeur,0);
+ C-B=u*coef*(0,-nblignes);
+ D-C=A-B;
+ for k=1 upto nblargeur-1:
+ draw (k/nblargeur)[A,B]--(k/nblargeur)[D,C];
+ endfor;
+ for k=1 upto nblignes-1:
+ draw (k/nblignes)[A,D]--(k/nblignes)[B,C];
+ endfor;
+ draw polygone(A,B,C,D) withpen pensquare scaled 1.5;
+ if Legende:
+ label.lrt(\btex \tiny d'après APMEP etex rotated 90,B);
+ fi;
+ \end{mpost}
+ \fi
+}%
+
+\newcommand\TraceEchiquierColoreColorilude{%
+ \ifluatex%
+ \mplibforcehmode%
+ \begin{mplibcode}
+ pair A,B,C,D;%pour la grille
+ A=(0,0);
+ B-A=u*\useKV[Colorilude]{Coef}*(\useKV[Colorilude]{Largeur},0);
+ C-B=u*\useKV[Colorilude]{Coef}*(0,-\useKV[Colorilude]{Lignes});
+ D-C=A-B;
+ numeric nblargeur,nblignes;
+ nblargeur:=\useKV[Colorilude]{Largeur};
+ nblignes:=\useKV[Colorilude]{Lignes};
+ % on récupère les données de coloriage
+ numeric n;
+ n:=0;
+ numeric nbCases[];
+ color ColorSucc[];
+ for p_=\the\toklisteremplissage:
+ n:=n+1;
+ if (n mod 2)=0:
+ nbCases[n div 2]:=p_;
+ else:
+ ColorSucc[n div 2]:=p_;
+ fi;
+ endfor;
+ % on colorie :)
+ numeric NBCASES;
+ NBCASES:=0;
+ for l=1 upto (n div 2):
+ fill ((unitsquare xscaled (\useKV[Colorilude]{Coef}*u*nbCases[l]) yscaled (\useKV[Colorilude]{Coef}*u)) shifted(\useKV[Colorilude]{Coef}*u*(NBCASES mod nblargeur,-1-(NBCASES div nblargeur)))) withcolor ColorSucc[l-1];
+ NBCASES:=NBCASES+nbCases[l];
+ endfor;
+ % on trace le quadrillage
+ for k=1 upto nblargeur-1:
+ draw (k/nblargeur)[A,B]--(k/nblargeur)[D,C];
+ endfor;
+ for k=1 upto nblignes-1:
+ draw (k/nblignes)[A,D]--(k/nblignes)[B,C];
+ endfor;
+ draw polygone(A,B,C,D) withpen pensquare scaled 1.5;
+ if \useKV[Colorilude]{Legende}:
+ label.lrt(btex \tiny d'après APMEP etex rotated 90,B);
+ fi;
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={boolean Legende;
+ Legende=\useKV[Colorilude]{Legende};
+ nblargeur:=\useKV[Colorilude]{Largeur};
+ nblignes:=\useKV[Colorilude]{Lignes};
+ coef:=\useKV[Colorilude]{Coef};
+ numeric n;
+ n:=0;
+ numeric nbCases[];
+ color ColorSucc[];
+ for p_=\the\toklisteremplissage:
+ n:=n+1;
+ if (n mod 2)=0:
+ nbCases[n div 2]:=p_;
+ else:
+ ColorSucc[n div 2]:=p_;
+ fi;
+ endfor;
+ }]
+ pair A,B,C,D;%pour la grille
+ A=(0,0);
+ B-A=u*coef*(nblargeur,0);
+ C-B=u*coef*(0,-nblignes);
+ D-C=A-B;
+ % on colorie :)
+ numeric NBCASES;
+ NBCASES:=0;
+ for l=1 upto (n div 2):
+ fill ((unitsquare xscaled (coef*u*nbCases[l]) yscaled (coef*u)) shifted(coef*u*(NBCASES mod nblargeur,-1-(NBCASES div nblargeur)))) withcolor ColorSucc[l-1];
+ NBCASES:=NBCASES+nbCases[l];
+ endfor;
+ % on trace le quadrillage
+ for k=1 upto nblargeur-1:
+ draw (k/nblargeur)[A,B]--(k/nblargeur)[D,C];
+ endfor;
+ for k=1 upto nblignes-1:
+ draw (k/nblignes)[A,D]--(k/nblignes)[B,C];
+ endfor;
+ draw polygone(A,B,C,D) withpen pensquare scaled 1.5;
+ if Legende:
+ label.lrt(\btex \tiny d'après APMEP etex rotated 90,B);
+ fi;
+ \end{mpost}
+ \fi
+}%
+
+\newtoks\toklisteremplissage%
+\toklisteremplissage{}%
+\def\UpdateRemplissage#1\nil{\addtotok\toklisteremplissage{#1,}}%
+
+\newcommand\ColoriludeEnonce{%
+Pour chaque ligne de la grille, colorie de gauche à droite, de la
+couleur indiquée, le nombre de cases donné par le résultat du calcul.
+}%
+
+\newcommand\ColoriludeListeCouleur[1]{%
+ \setsepchar{ }%
+ \readlist\ListeColoriludeCouleurs{#1}%
+ \foreachitem\compteur\in\ListeColoriludeCouleurs{%
+ \ifodd\compteurcnt\fbox{\begin{minipage}{1em}\centering\text{\ttfamily\bfseries\compteur}\end{minipage}}~\else\compteur\quad\fi%
+ }%
+}%
+
+\newcommand\Colorilude[2][]{%
+ \useKVdefault[Colorilude]%
+ \setKV[Colorilude]{#1}%
+ \setsepchar{\\/ }%
+ \readlist\ListeColorilude{#2}%
+ \ifboolKV[Colorilude]{Solution}{%
+ \toklisteremplissage{}%
+ \foreachitem\compteur\in\ListeColorilude{%
+ \foreachitem\couleur\in\ListeColorilude[\compteurcnt]{%
+ \expandafter\UpdateRemplissage\couleur\nil}%
+ }%
+ \TraceEchiquierColoreColorilude%
+ }{%
+ \dispogpfc{%
+ \TraceEchiquierColorilude%
+ }{%
+ % On cherche le nombre max de colonnes
+ \xdef\ListeColoriludeMax{0}%
+ \xintFor* ##1 in {\xintSeq {1}{\ListeColoriludelen}}\do{%
+ \xintifboolexpr{\listlen\ListeColorilude[##1]>\ListeColoriludeMax}{%
+ \xdef\ListeColoriludeMax{\listlen\ListeColorilude[##1]}%
+ }{}%
+ }%
+ %
+ % On affiche le tableau
+ \setlength{\tabcolsep}{0.2\tabcolsep}%
+ \begin{NiceTabular}{*{\fpeval{\ListeColoriludeMax/2}}{rl}}%
+ \xintFor* ##1 in {\xintSeq {1}{\ListeColoriludelen}}\do{%
+ \xintifboolexpr{\listlen\ListeColorilude[##1]==\ListeColoriludeMax}{%
+ \xintFor* ##2 in {\xintSeq {1}{\listlen\ListeColorilude[##1]}}\do{%
+ \xintifForFirst{}{&~}\ifodd##2\fbox{\begin{minipage}{1em}\centering\text{\ttfamily\bfseries\ListeColorilude[##1,##2]}\end{minipage}}~\else$\ListeColorilude[##1,##2]$\fi%
+ }%
+ }{%
+ \xintFor* ##2 in {\xintSeq {1}{\listlen\ListeColorilude[##1]}}\do{%
+ \xintifForFirst{}{&~}\ifodd##2\fbox{\begin{minipage}{1em}\centering\text{\ttfamily\bfseries\ListeColorilude[##1,##2]}\end{minipage}}~\else$\ListeColorilude[##1,##2]$\fi%
+ }%
+ &\hbox to1em{~}&\Cdots%
+ }%
+ \\[0.5em]%
+ }%
+ \end{NiceTabular}%
+ }%
+ }%
+}%
+
+%%%
+% Mosaique
+%%%
+\setKVdefault[ClesMosaique]{Largeur=2,Hauteur=2,Solution=false,Type=1,Label,Echelle=1cm}
+
+\newcommand\DessineMosaique[2][]{%
+ \useKVdefault[ClesMosaique]%
+ \setKV[ClesMosaique]{#1}%
+ \ifluatex%
+ \mplibforcehmode%
+ \begin{mplibcode}
+ u:=\useKV[ClesMosaique]{Echelle};
+ Type:=\useKV[ClesMosaique]{Type};
+ input PfCMosaique;
+ trace if Type=1:MosaiqueUn[#2] elseif Type=2: MosaiqueDeux[#2] fi;
+ \end{mplibcode}%
+ \else%
+ \begin{mpost}[mpsettings={u:=\useKV[ClesMosaique]{Echelle};Type:=\useKV[ClesMosaique]{Type};}]%
+ input PfCMosaique;
+ trace if Type=1:MosaiqueUn[#2] elseif Type=2: MosaiqueDeux[#2] fi;
+ \end{mpost}%
+ \fi%
+}%
+
+\newcommand\DessineMosaiqueComplet[1]{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ input PfCMosaique;
+ Largeur=\useKV[ClesMosaique]{Largeur};
+ Hauteur=\useKV[ClesMosaique]{Hauteur};
+ Type=\useKV[ClesMosaique]{Type};
+ boolean Solution,Label;
+ Solution=\useKV[ClesMosaique]{Solution};
+ Label=\useKV[ClesMosaique]{Label};
+ pair A,B,C,D;
+ A=u*(0,1);
+ B-A=u*(Largeur,0);
+ C-B=u*(0,-Hauteur);
+ D-C=A-B;
+ picture mosaique;
+ path case;
+ case=unitsquare scaled 1cm;
+ if Type=1:
+ mosaique=image(
+ trace case withcolor 0.5white;
+ trace (point(0) of case)--(point(2) of case) withcolor 0.75white;
+ trace (point(1) of case)--(point(3) of case) withcolor 0.75white;
+ trace (point(0.5) of case)--(point(2.5) of case) withcolor 0.75white;
+ trace (point(1.5) of case)--(point(3.5) of case) withcolor 0.75white;
+ );
+ else:
+ mosaique=image(
+ trace case withcolor 0.5white;
+ trace (point(0.5) of case)--(point(2.5) of case) withcolor 0.75white;
+ trace (point(1.5) of case)--(point(3.5) of case) withcolor 0.75white;
+ trace (point(0.5) of case)--(point(1.5) of case)--(point(2.5) of case)--(point(3.5) of case)--cycle withcolor 0.75white;
+ );
+ fi;
+ if Solution:
+ nbmos:=0;
+ for p_=#1:
+ trace if Type=1:MosaiqueUn[xpart(p_)] else: MosaiqueDeux[xpart(p_)] fi shifted(u*(nbmos mod Largeur,-(nbmos div Largeur)));
+ nbmos:=nbmos+1;
+ endfor;
+ else:
+ nbmos:=0;
+ for p_=#1:
+ trace mosaique shifted(u*(nbmos mod Largeur,-(nbmos div Largeur)));
+ if Label:
+ label(TEX("\num{"&decimal(ypart(p_))&"}"),center (mosaique shifted(u*(nbmos mod Largeur,-(nbmos div Largeur)))));
+ fi;
+ nbmos:=nbmos+1;
+ endfor;
+ fi;
+ trace polygone(A,B,C,D);
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={Largeur=\useKV[ClesMosaique]{Largeur};Hauteur=\useKV[ClesMosaique]{Hauteur};Type=\useKV[ClesMosaique]{Type};boolean Solution,Label;Solution=\useKV[ClesMosaique]{Solution};}]
+ Label=\useKV[ClesMosaique]{Label};
+ input PfCMosaique;
+ pair A,B,C,D;
+ A=u*(0,1);
+ B-A=u*(Largeur,0);
+ C-B=u*(0,-Hauteur);
+ D-C=A-B;
+ picture mosaique;
+ path case;
+ case=unitsquare scaled 1cm;
+ if Type=1:
+ mosaique=image(
+ trace case withcolor 0.5white;
+ trace (point(0) of case)--(point(2) of case) withcolor 0.75white;
+ trace (point(1) of case)--(point(3) of case) withcolor 0.75white;
+ trace (point(0.5) of case)--(point(2.5) of case) withcolor 0.75white;
+ trace (point(1.5) of case)--(point(3.5) of case) withcolor 0.75white;
+ );
+ else:
+ mosaique=image(
+ trace case withcolor 0.5white;
+ trace (point(0.5) of case)--(point(2.5) of case) withcolor 0.75white;
+ trace (point(1.5) of case)--(point(3.5) of case) withcolor 0.75white;
+ trace (point(0.5) of case)--(point(1.5) of case)--(point(2.5) of case)--(point(3.5) of case)--cycle withcolor 0.75white;
+ );
+ fi;
+ if Solution:
+ nbmos:=0;
+ for p_=#1:
+ trace if Type=1:MosaiqueUn[xpart(p_)] else: MosaiqueDeux[xpart(p_)] fi shifted(u*(nbmos mod Largeur,-(nbmos div Largeur)));
+ nbmos:=nbmos+1;
+ endfor;
+ else:
+ nbmos:=0;
+ for p_=#1:
+ trace mosaique shifted(u*(nbmos mod Largeur,-(nbmos div Largeur)));
+ if Label:
+ label(LATEX("\num{"&decimal(ypart(p_))&"}"),center (mosaique shifted(u*(nbmos mod Largeur,-(nbmos div Largeur)))));
+ fi;
+ nbmos:=nbmos+1;
+ endfor;
+ fi;
+ trace polygone(A,B,C,D);
+ \end{mpost}
+ \fi
+}%
+
+\newtoks\toklistecaseM%
+\def\UpdatetoksMosaique#1/#2\nil{\addtotok\toklistecaseM{(#1,#2),}}%
+
+\newcommand\Mosaique[2][]{%
+ \useKVdefault[ClesMosaique]%
+ \setKV[ClesMosaique]{#1}%
+ \setsepchar[*]{,*/}%
+ \readlist*\ListeMosaique{#2}%
+ \toklistecaseM{}%
+ \foreachitem\compteur\in\ListeMosaique{\expandafter\UpdatetoksMosaique\compteur\nil}%
+ \DessineMosaiqueComplet{\the\toklistecaseM}%
+}%
+
+%%%
+% Qui suis-je
+%%%
+\setKVdefault[Quisuisje]{Solution=false,Largeur=5mm,Colonnes=5,CodePerso=false}%
+
+\newcommand\QuisuisjeEnonce{%
+ Chaque lettre du mot à découvrir porte un numéro qui correspond à un
+ calcul à effectuer. Pour trouver les lettres de ce mot, tu dois donc
+ effectuer les calculs proposés. Les résultats que tu auras trouvés
+ te donneront, à l'aide du tableau de correspondance ci-dessous, les
+ lettres du mot.
+}%
+
+\newcommand\QuisuisjeTableau[2][]{%
+ \setKV[Quisuisje]{#1}%
+ \setsepchar[*]{§*/}\ignoreemptyitems%
+ \readlist*\ListeQuisuisje{#2}%
+ \begin{NiceTabular}{|l|*{\ListeQuisuisjelen}{m{\useKV[Quisuisje]{Largeur}}|}}%
+ \hline
+ Lettre\xintFor* ##1 in {\xintSeq {1}{\ListeQuisuisjelen}}\do{%
+ &\centering\arraybackslash\ListeQuisuisje[##1,1]
+ }\\
+ \hline
+ R\'esultat du calcul\xintFor* ##1 in {\xintSeq {1}{\ListeQuisuisjelen}}\do{%
+ &\centering\arraybackslash\ListeQuisuisje[##1,2]
+ }\\
+ \hline
+ \end{NiceTabular}%
+}%
+
+\newcommand\QuisuisjeCodePerso[3][]{%
+ \setKV[Quisuisje]{#1}%
+ \setsepchar{ }%
+ \readlist*\ListeQuisuisjeCode{#2}%
+ \readlist*\ListeQuisuisjeLettres{#3}%
+ \par\hfill%
+ \begin{NiceTabular}{|*{\ListeQuisuisjeLettreslen}{m{7mm}|}}
+ \hline
+ \xintFor* ##1 in {\xintSeq {1}{\ListeQuisuisjeLettreslen}}\do{%
+ \xintifForFirst{}{&}\ifboolKV[Quisuisje]{Solution}{\hfill\ListeQuisuisjeLettres[##1]}{\phantom{1}}
+ }\\
+ \xintFor* ##1 in {\xintSeq {1}{\ListeQuisuisjeLettreslen}}\do{%
+ \xintifForFirst{}{&}\tiny\ListeQuisuisjeCode[##1]%
+ }\\
+ \hline
+ \end{NiceTabular}%
+}%
+
+\newcommand\Quisuisje[3][]{%
+ \useKVdefault[Quisuisje]%
+ \setKV[Quisuisje]{#1}%
+ \ifboolKV[Quisuisje]{CodePerso}{}{%
+ \setsepchar{ }%
+ \readlist\ListeLettres{#3}%
+ }%
+ \setsepchar{§}%
+ \readlist\ListeCalculs{#2}%
+ \ifboolKV[Quisuisje]{CodePerso}{}{%
+ \par\hfill%
+ \begin{NiceTabular}{|*{\ListeLettreslen}{m{7mm}|}}
+ \hline
+ \xintFor* ##1 in {\xintSeq {1}{\ListeLettreslen}}\do{%
+ \xintifForFirst{}{&} \ifboolKV[Quisuisje]{Solution}{\hfill\ListeLettres[##1]}{\phantom{1}}
+ }\\
+ \xintFor* ##1 in {\xintSeq {1}{\ListeLettreslen}}\do{%
+ \xintifForFirst{}{&}\tiny\num{##1}%
+ }\\
+ \hline
+ \end{NiceTabular}%
+ }%
+ \par\bigskip\par
+ \ifboolKV[Quisuisje]{Solution}{}{%
+ \begin{multicols}{\useKV[Quisuisje]{Colonnes}}%
+ \begin{enumerate}
+ \xintFor* ##1 in {\xintSeq {1}{\ListeCalculslen}}\do{%
+ \item\ListeCalculs[##1]
+ }
+ \end{enumerate}%
+ \end{multicols}%
+ }%
+}%
+
+%%%
+% Dessin Gradue
+%%%
+\setKVdefault[DessinGradue]{Lignes=10,Debut=-5,Fin=5,Pas=10,Solution=false,EcartVertical=1.5,LignesIdentiques,Longueur=10,Echelle=1}
+
+\def\TraceDessinGradue#1#2#3#4{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ pair La,Lb,Lab[];
+ La=(0,0);
+ Lb-La=u*(\useKV[DessinGradue]{Longueur},0);
+ for k=0 upto #4:
+ Lab[k]=(k/#4)[La,Lb];
+ endfor;
+ picture EnsembleLignes,Lignes;
+ Lignes=image(
+ trace segment(La,Lb);
+ for k=0 upto #4:
+ trace (Lab[k]+u*(0,-0.1))--(Lab[k]+u*(0,0.1));
+ endfor;
+ labeloffset:=labeloffset*1.5;
+ label.top(TEX("\num{"&decimal(#2)&"}"),La);
+ label.top(TEX("\num{"&decimal(#3)&"}"),Lb);
+ labeloffset:=labeloffset/1.5;
+ );
+ EnsembleLignes=image(
+ for k=0 upto #1-1:
+ trace Lignes shifted(k*u*(0,-\useKV[DessinGradue]{EcartVertical}));
+ label(TEX("(\num{"&decimal(k+1)&"})"),La+u*(-1.5,-k*\useKV[DessinGradue]{EcartVertical}));
+ endfor;
+ );
+ trace EnsembleLignes scaled \useKV[DessinGradue]{Echelle};
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={numeric LongueurLigne; LongueurLigne=\useKV[DessinGradue]{Longueur};numeric EcartVertical; EcartVertical=\useKV[DessinGradue]{EcartVertical}; numeric Echelle; Echelle=\useKV[DessinGradue]{Echelle};}]
+ pair La,Lb,Lab[];
+ La=(0,0);
+ Lb-La=u*(LongueurLigne,0);
+ for k=0 upto #4:
+ Lab[k]=(k/#4)[La,Lb];
+ endfor;
+ picture EnsembleLignes,Lignes;
+ Lignes=image(
+ trace segment(La,Lb);
+ for k=0 upto #4:
+ trace (Lab[k]+u*(0,-0.1))--(Lab[k]+u*(0,0.1));
+ endfor;
+ labeloffset:=labeloffset*1.5;
+ label.top(LATEX("\num{"&decimal(#2)&"}"),La);
+ label.top(LATEX("\num{"&decimal(#3)&"}"),Lb);
+ labeloffset:=labeloffset/1.5;
+ );
+ EnsembleLignes=image(
+ for k=0 upto #1-1:
+ trace Lignes shifted(k*u*(0,-EcartVertical));
+ label(LATEX("(\num{"&decimal(k+1)&"})"),La+u*(-1.5,-k*EcartVertical));
+ endfor;
+ );
+ trace EnsembleLignes scaled Echelle;
+ \end{mpost}
+ \fi
+}
+
+\def\TraceDessinGradueSolution#1#2#3#4#5#6{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ pair La,Lb,Lab[];
+ pair A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,A',B',C',D',E',F',G',H',I',J',K',L',M',N',O',P',Q',R',S',T',U',V',W',X',Y',Z',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'';
+ La=(0,0);
+ Lb-La=u*(\useKV[DessinGradue]{Longueur},0);
+ for k=0 upto #4:
+ Lab[k]=(k/#4)[La,Lb];
+ endfor;
+ picture EnsembleLignes,Lignes;
+ Lignes=image(
+ trace segment(La,Lb);
+ for k=0 upto #4:
+ trace (Lab[k]+u*(0,-0.1))--(Lab[k]+u*(0,0.1));
+ endfor;
+ labeloffset:=labeloffset*1.5;
+ label.top(TEX("\num{"&decimal(#2)&"}"),La);
+ label.top(TEX("\num{"&decimal(#3)&"}"),Lb);
+ labeloffset:=labeloffset/1.5;
+ );
+ EnsembleLignes=image(%
+ drawoptions(withcolor 0.5white);
+ for k=0 upto #1-1:
+ trace Lignes shifted(k*u*(0,-\useKV[DessinGradue]{EcartVertical}));
+ label(TEX("(\num{"&decimal(k+1)&"})"),La+u*(-1.5,k*(-\useKV[DessinGradue]{EcartVertical})));
+ endfor;
+ drawoptions();
+ n:=0;
+ numeric nblignes,nbpas;
+ for p_=#5:
+ n:=n+1;
+ if (n mod 3)=1:
+ nblignes:=p_;
+ elseif (n mod 3)=2:
+ nbpas:=p_;
+ elseif (n mod 3)=0:
+ p_=(nbpas/#4)[La,Lb] shifted(u*(0,(nblignes-1)*(-\useKV[DessinGradue]{EcartVertical})));
+ fi;
+ endfor;
+ for p_=#6:
+ trace p_ withpen pencircle scaled 1.5;
+ endfor;
+ );
+ trace EnsembleLignes scaled \useKV[DessinGradue]{Echelle};
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={numeric LongueurLigne; LongueurLigne=\useKV[DessinGradue]{Longueur};numeric EcartVertical; EcartVertical=\useKV[DessinGradue]{EcartVertical}; numeric Echelle; Echelle=\useKV[DessinGradue]{Echelle};}]
+ pair La,Lb,Lab[];
+ pair A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,A',B',C',D',E',F',G',H',I',J',K',L',M',N',O',P',Q',R',S',T',U',V',W',X',Y',Z',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'';
+ La=(0,0);
+ Lb-La=u*(LongueurLigne,0);
+ for k=0 upto #4:
+ Lab[k]=(k/#4)[La,Lb];
+ endfor;
+ picture EnsembleLignes,Lignes;
+ Lignes=image(
+ trace segment(La,Lb);
+ for k=0 upto #4:
+ trace (Lab[k]+u*(0,-0.1))--(Lab[k]+u*(0,0.1));
+ endfor;
+ labeloffset:=labeloffset*1.5;
+ label.top(LATEX("\num{"&decimal(#2)&"}"),La);
+ label.top(LATEX("\num{"&decimal(#3)&"}"),Lb);
+ labeloffset:=labeloffset/1.5;
+ );
+ EnsembleLignes=image(
+ drawoptions(withcolor 0.5white);
+ for k=0 upto #1-1:
+ trace Lignes shifted(k*u*(0,-EcartVertical));
+ label(LATEX("(\num{"&decimal(k+1)&"})"),La+u*(-1.5,k*(-EcartVertical)));
+ endfor;
+ drawoptions();
+ n:=0;
+ numeric nblignes,nbpas;
+ for p_=#5:
+ n:=n+1;
+ if (n mod 3)=1:
+ nblignes:=p_;
+ elseif (n mod 3)=2:
+ nbpas:=p_;
+ elseif (n mod 3)=0:
+ p_=(nbpas/#4)[La,Lb] shifted(u*(0,(nblignes-1)*(-EcartVertical)));
+ fi;
+ endfor;
+ for p_=#6:
+ trace p_ withpen pencircle scaled 1.5;
+ endfor;
+ );
+ trace EnsembleLignes scaled Echelle;
+ \end{mpost}
+ \fi
+}
+
+\def\TraceDessinGradueMul#1{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ pair La,Lb,Lab[];
+ La=(0,0);
+ Lb-La=u*(\useKV[DessinGradue]{Longueur},0);
+ picture EnsembleLignes,Lignes;
+ EnsembleLignes=image(
+ n:=0;
+ m:=0;
+ for p_=#1:
+ n:=n+1;
+ trace segment(La,Lb) shifted((n-1)*u*(0,-\useKV[DessinGradue]{EcartVertical}));
+ label(TEX("(\num{"&decimal(n)&"})"),La+u*(-1.5,-(n-1)*\useKV[DessinGradue]{EcartVertical}));
+ for k=0 upto bluepart(p_):
+ m:=bluepart(p_);
+ Lab[k]:=(k/m)[La,Lb];
+ trace ((Lab[k]+u*(0,-0.1))--(Lab[k]+u*(0,0.1))) shifted((n-1)*u*(0,-\useKV[DessinGradue]{EcartVertical}));
+ endfor;
+ labeloffset:=labeloffset*1.5;
+ label.top(TEX("\num{"&decimal(redpart(p_))&"}"),La shifted((n-1)*u*(0,-\useKV[DessinGradue]{EcartVertical})));
+ label.top(TEX("\num{"&decimal(greenpart(p_))&"}"),Lb shifted((n-1)*u*(0,-\useKV[DessinGradue]{EcartVertical})));
+ labeloffset:=labeloffset/1.5;
+ endfor;
+ );
+ trace EnsembleLignes scaled \useKV[DessinGradue]{Echelle};
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={numeric LongueurLigne; LongueurLigne=\useKV[DessinGradue]{Longueur};numeric EcartVertical; EcartVertical=\useKV[DessinGradue]{EcartVertical}; numeric Echelle; Echelle=\useKV[DessinGradue]{Echelle};}]
+ pair La,Lb,Lab[];
+ La=(0,0);
+ Lb-La=u*(LongueurLigne,0);
+ picture EnsembleLignes,Lignes;
+ EnsembleLignes=image(
+ n:=0;
+ m:=0;
+ for p_=#1:
+ n:=n+1;
+ trace segment(La,Lb) shifted((n-1)*u*(0,-EcartVertical));
+ for k=0 upto bluepart(p_):
+ m:=bluepart(p_);
+ Lab[k]:=(k/m)[La,Lb];
+ trace ((Lab[k]+u*(0,-0.1))--(Lab[k]+u*(0,0.1))) shifted((n-1)*u*(0,-EcartVertical));
+ label(LATEX("(\num{"&decimal(n)&"})"),La+u*(-1.5,-(n-1)*\useKV[DessinGradue]{EcartVertical}));
+ endfor;
+ labeloffset:=labeloffset*1.5;
+ label.top(LATEX("\num{"&decimal(redpart(p_))&"}"),La shifted((n-1)*u*(0,-EcartVertical)));
+ label.top(LATEX("\num{"&decimal(greenpart(p_))&"}"),Lb shifted((n-1)*u*(0,-EcartVertical)));
+ labeloffset:=labeloffset/1.5;
+ endfor;
+ );
+ trace EnsembleLignes scaled Echelle;
+ \end{mpost}
+ \fi
+}
+
+\def\TraceDessinGradueMulSolution#1#2#3{%
+ \ifluatex
+ \mplibforcehmode
+ \begin{mplibcode}
+ pair La,Lb,Lab[];
+ pair A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,A',B',C',D',E',F',G',H',I',J',K',L',M',N',O',P',Q',R',S',T',U',V',W',X',Y',Z',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'';
+ La=(0,0);
+ Lb-La=u*(\useKV[DessinGradue]{Longueur},0);
+ picture EnsembleLignes,Lignes;
+ EnsembleLignes=image(%
+ drawoptions(withcolor 0.5white);
+ n:=0;
+ m:=0;
+ numeric retienspas[];
+ for p_=#1:
+ n:=n+1;
+ trace segment(La,Lb) shifted((n-1)*u*(0,-\useKV[DessinGradue]{EcartVertical}));
+ label(TEX("(\num{"&decimal(n)&"})"),La+u*(-1.5,-(n-1)*\useKV[DessinGradue]{EcartVertical}));
+ for k=0 upto bluepart(p_):
+ m:=bluepart(p_);
+ retienspas[n]:=bluepart(p_);
+ Lab[k]:=(k/m)[La,Lb];
+ trace ((Lab[k]+u*(0,-0.1))--(Lab[k]+u*(0,0.1))) shifted((n-1)*u*(0,-\useKV[DessinGradue]{EcartVertical}));
+ endfor;
+ labeloffset:=labeloffset*1.5;
+ label.top(TEX("\num{"&decimal(redpart(p_))&"}"),La shifted((n-1)*u*(0,-\useKV[DessinGradue]{EcartVertical})));
+ label.top(TEX("\num{"&decimal(greenpart(p_))&"}"),Lb shifted((n-1)*u*(0,-\useKV[DessinGradue]{EcartVertical})));
+ labeloffset:=labeloffset/1.5;
+ endfor;
+ drawoptions();
+ n:=0;
+ numeric nblignes,nbpas;
+ for p_=#2:
+ n:=n+1;
+ if (n mod 3)=1:
+ nblignes:=p_;
+ elseif (n mod 3)=2:
+ nbpas:=p_;
+ elseif (n mod 3)=0:
+ p_=(nbpas/retienspas[nblignes])[La,Lb] shifted(u*(0,(nblignes-1)*(-\useKV[DessinGradue]{EcartVertical})));
+ fi;
+ endfor;
+ %Differents traces
+ for p_=#3:
+ trace p_ withpen pencircle scaled 1.5;
+ endfor;
+ );
+ trace EnsembleLignes scaled \useKV[DessinGradue]{Echelle};
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={numeric LongueurLigne; LongueurLigne=\useKV[DessinGradue]{Longueur};numeric EcartVertical; EcartVertical=\useKV[DessinGradue]{EcartVertical}; numeric Echelle; Echelle=\useKV[DessinGradue]{Echelle};}]
+ pair La,Lb,Lab[];
+ pair A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,A',B',C',D',E',F',G',H',I',J',K',L',M',N',O',P',Q',R',S',T',U',V',W',X',Y',Z',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'';
+ La=(0,0);
+ Lb-La=u*(LongueurLigne,0);
+ picture EnsembleLignes,Lignes;
+ EnsembleLignes=image(
+ n:=0;
+ m:=0;
+ numeric retienspas[];
+ drawoptions(withcolor 0.5white);
+ for p_=#1:
+ n:=n+1;
+ trace segment(La,Lb) shifted((n-1)*u*(0,-EcartVertical));
+ label(LATEX("(\num{"&decimal(n)&"})"),La+u*(-1.5,-(n-1)*\useKV[DessinGradue]{EcartVertical}));
+ for k=0 upto bluepart(p_):
+ m:=bluepart(p_);
+ retienspas[n]:=bluepart(p_);
+ Lab[k]:=(k/m)[La,Lb];
+ trace ((Lab[k]+u*(0,-0.1))--(Lab[k]+u*(0,0.1))) shifted((n-1)*u*(0,-EcartVertical));
+ endfor;
+ labeloffset:=labeloffset*1.5;
+ label.top(TEX("\num{"&decimal(redpart(p_))&"}"),La shifted((n-1)*u*(0,-EcartVertical)));
+ label.top(TEX("\num{"&decimal(greenpart(p_))&"}"),Lb shifted((n-1)*u*(0,-EcartVertical)));
+ labeloffset:=labeloffset/1.5;
+ endfor;
+ drawoptions();
+ n:=0;
+ numeric nblignes,nbpas;
+ for p_=#2:
+ n:=n+1;
+ if (n mod 3)=1:
+ nblignes:=p_;
+ elseif (n mod 3)=2:
+ nbpas:=p_;
+ elseif (n mod 3)=0:
+ p_=(nbpas/retienspas[nblignes])[La,Lb] shifted(u*(0,(nblignes-1)*(-EcartVertical)));
+ fi;
+ endfor;
+ %Differents traces
+ for p_=#3:
+ trace p_ withpen pencircle scaled 1.5;
+ endfor;
+ );
+ trace EnsembleLignes scaled Echelle;
+ \end{mpost}
+ \fi
+}
+
+\def\UpdateLignes#1/#2/#3\nil{\addtotok\toklisteptsgrad{#1,#3,#2,}}
+\def\UpdateTraces#1\nil{\addtotok\toklistetracesgrad{#1,}}
+\def\UpdateDefLignes#1/#2/#3\nil{\addtotok\toklistedefligne{(#1,#2,#3),}}
+
+\newcommand\DessinGradue[4][]{%
+ \useKVdefault[DessinGradue]%
+ \setKV[DessinGradue]{#1}%
+ \ifboolKV[DessinGradue]{LignesIdentiques}{%
+ \ifboolKV[DessinGradue]{Solution}{%
+ \setsepchar[*]{,*/}%
+ \readlist\ListePG{#3}%
+ \setsepchar[*]{§*/}%
+ \readlist\ListeTraces{#4}%
+ \newtoks\toklisteptsgrad%
+ \foreachitem\compteur\in\ListePG{\expandafter\UpdateLignes\compteur\nil}%
+ \newtoks\toklistetracesgrad%
+ \foreachitem\compteur\in\ListeTraces{\expandafter\UpdateTraces\compteur\nil}%
+ \TraceDessinGradueSolution{\useKV[DessinGradue]{Lignes}}{\useKV[DessinGradue]{Debut}}{\useKV[DessinGradue]{Fin}}{\useKV[DessinGradue]{Pas}}{\the\toklisteptsgrad}{\the\toklistetracesgrad}%
+ }{%
+ \TraceDessinGradue{\useKV[DessinGradue]{Lignes}}{\useKV[DessinGradue]{Debut}}{\useKV[DessinGradue]{Fin}}{\useKV[DessinGradue]{Pas}}%
+ }
+ }{%
+ \setsepchar[*]{,*/}%
+ \readlist\ListeDefLigne{#2}%
+ \newtoks\toklistedefligne%
+ \foreachitem\compteur\in\ListeDefLigne{\expandafter\UpdateDefLignes\compteur\nil}%
+ \ifboolKV[DessinGradue]{Solution}{%
+ %
+ \setsepchar[*]{,*/}%
+ \readlist\ListePG{#3}%
+ \setsepchar[*]{§*/}%
+ \readlist\ListeTraces{#4}%
+ \newtoks\toklisteptsgrad%
+ \foreachitem\compteur\in\ListePG{\expandafter\UpdateLignes\compteur\nil}%
+ \newtoks\toklistetracesgrad%
+ \foreachitem\compteur\in\ListeTraces{\expandafter\UpdateTraces\compteur\nil}%
+ \TraceDessinGradueMulSolution{\the\toklistedefligne}{\the\toklisteptsgrad}{\the\toklistetracesgrad}%
+ }{%
+ \TraceDessinGradueMul{\the\toklistedefligne}%
+ }%
+ }%
+}%
+
+%%%
+% Autonomie
+%%%
+\setKVdefault[Autonomie]{AfficheMarge=false,TitreEnigme=Enigme,TitreAtoi=\`A toi,Enigme=false,TexteCorrection=\bfseries Correction}%
+
+\newcommand\Autonomie[3][]{%
+ \useKVdefault[Autonomie]%
+ \setKV[Autonomie]{#1}%
+ \setsepchar[*]{§*/}
+ \readlist*\ListeAutoQ{#2}%
+ % \setsepchar{§}
+ % \readlist*\ListeAutoR{#3}%
+ \setsepchar[*]{§*/}
+ \readlist*\ListeAutoEn{#3}%
+ \clearpage
+ \begin{tikzpicture}[remember picture,overlay]%
+ \ifboolKV[Autonomie]{AfficheMarge}{%
+ \node[xshift=5mm,yshift=-5mm,circle] (A) at (current page.north west) {};
+ \node[xshift=-5mm,yshift=5mm] (B) at (current page.south east) {};
+ \draw[blue,dashed] (A) rectangle (B);
+ }{}%
+ \foreach \i in {1,...,3}{
+ \coordinate[xshift=\i*0.25*\paperwidth] (A\i) at (current page.north west);%
+ \coordinate[xshift=\i*0.25*\paperwidth] (B\i) at (current page.south west);%
+ }
+ \foreach \i in{1,...,4}{%
+ \coordinate[yshift=-\i*0.25*\paperheight] (C\i) at (current page.north west);%
+ \coordinate[yshift=-\i*0.25*\paperheight] (F\i) at (current page.north east);%
+ \coordinate[yshift=-\i*0.25*\paperheight] (D\i) at (A1);%
+ \coordinate[yshift=-\i*0.25*\paperheight] (E\i) at (A3);%
+ \draw (C\i) to (D\i);
+ \draw (E\i) to (F\i);
+ }
+ \coordinate (Q1) at ($(F1)!0.5!(A3)$);
+ \coordinate (Q2) at ($(F2)!0.5!(E1)$);
+ \coordinate (Q3) at ($(F3)!0.5!(E2)$);
+ \coordinate (Q4) at ($(F4)!0.5!(E3)$);
+ \coordinate (Q5) at ($(C1)!0.5!(A1)$);
+ \coordinate (Q6) at ($(C2)!0.5!(D1)$);
+ \coordinate (Q7) at ($(C3)!0.5!(D2)$);
+ \coordinate (Q8) at ($(C4)!0.5!(D3)$);
+ \draw[dashed] (A1) to (B1);%
+ \draw[dashed] (A3) to (B3);%
+ \foreach \i in {1,...,4}{%
+ \node[xshift=-5mm,align=justify,anchor=center,text width=0.8*0.25\textwidth] (Test\i) at (Q\i) {\ding{\fpeval{171+\i}}~\ListeAutoQ[\i,1]};
+ }
+ \foreach \i in {5,...,8}{%
+ \node[align=justify,anchor=center,text width=0.8*0.25\textwidth] (Test\i) at (Q\i) {\ding{\fpeval{171+\i}}~\ListeAutoQ[\i,1]};
+ }
+ \end{tikzpicture}
+ \clearpage
+ \begin{tikzpicture}[remember picture,overlay]%
+ \ifboolKV[Autonomie]{AfficheMarge}{%
+ \node[xshift=5mm,yshift=-5mm,circle] (A) at (current page.north west) {};
+ \node[xshift=-5mm,yshift=5mm] (B) at (current page.south east) {};
+ \draw[blue,dashed] (A) rectangle (B);
+ }{}%
+ \foreach \i in {1,...,3}{%
+ \coordinate[xshift=\i*0.25*\paperwidth] (A\i) at (current page.north west);%
+ \coordinate[xshift=\i*0.25*\paperwidth] (B\i) at (current page.south west);%
+ }
+ \foreach \i in{1,...,4}{%
+ \coordinate[yshift=-\i*0.25*\paperheight] (C\i) at (current page.north west);%
+ \coordinate[yshift=-\i*0.25*\paperheight] (F\i) at (current page.north east);%
+ \coordinate[yshift=-\i*0.25*\paperheight] (D\i) at (A1);%
+ \coordinate[yshift=-\i*0.25*\paperheight] (G\i) at (A2);%
+ \coordinate[yshift=-\i*0.25*\paperheight] (E\i) at (A3);%
+ \draw (C\i) to (F\i);
+ }
+ \coordinate (T1) at ($(current page.north west)!0.5!(A1)$);
+ \coordinate (T2) at ($(C1)!0.5!(D1)$);
+ \coordinate (T3) at ($(C2)!0.5!(D2)$);
+ \coordinate (T4) at ($(C3)!0.5!(D3)$);
+ \coordinate (T5) at ($(current page.north east)!0.5!(A3)$);
+ \coordinate (T6) at ($(E1)!0.5!(F1)$);
+ \coordinate (T7) at ($(E2)!0.5!(F2)$);
+ \coordinate (T8) at ($(E3)!0.5!(F3)$);
+ \coordinate (U1) at ($(C1)!0.5!(D1)$);
+ \coordinate (U2) at ($(C2)!0.5!(D2)$);
+ \coordinate (U3) at ($(C3)!0.5!(D3)$);
+ \coordinate (U4) at ($(current page.south west)!0.5!(B1)$);
+ \coordinate (U5) at ($(E1)!0.5!(F1)$);
+ \coordinate (U6) at ($(E2)!0.5!(F2)$);
+ \coordinate (U7) at ($(E3)!0.5!(F3)$);
+ \coordinate (U8) at ($(B3)!0.5!(current page.south east)$);
+ \coordinate (R1) at ($(D1)!0.5!(A2)$);
+ \coordinate (R2) at ($(D2)!0.5!(G1)$);
+ \coordinate (R3) at ($(D3)!0.5!(G2)$);
+ \coordinate (R4) at ($(D4)!0.5!(G3)$);
+ \coordinate (R5) at ($(E1)!0.5!(A2)$);
+ \coordinate (R6) at ($(E2)!0.5!(G1)$);
+ \coordinate (R7) at ($(E3)!0.5!(G2)$);
+ \coordinate (R8) at ($(E4)!0.5!(G3)$);
+ \coordinate (S1) at ($(A1)!0.5!(D1)$);
+ \coordinate (S2) at ($(D1)!0.5!(D2)$);
+ \coordinate (S3) at ($(D2)!0.5!(D3)$);
+ \coordinate (S4) at ($(D3)!0.5!(B1)$);
+ \coordinate (S5) at ($(R1)!0.5!(R5)$);
+ \coordinate (S6) at ($(R2)!0.5!(R6)$);
+ \coordinate (S7) at ($(R3)!0.5!(R7)$);
+ \coordinate (S8) at ($(R4)!0.5!(R8)$);
+ \draw[dashed] (A1) to (B1);%
+ \draw[dashed] (A2) to (B2);
+ \draw[dashed] (A3) to (B3);%
+ \foreach \i in {1,...,8}{%
+ \node[rotate=90,anchor=north] (Cor\i) at (S\i) {\useKV[Autonomie]{TexteCorrection}};
+ \node[anchor=west,xshift=2em,text width=0.8*0.25\paperwidth] (Test\i)
+ at (S\i) {\ListeAutoQ[\i,2]};
+ \node[anchor=north,yshift=-1em,text width=0.85*0.25\paperwidth] (TestEn\i)
+ at (T\i) {\textbf{\useKV[Autonomie]{TitreAtoi} :} \ListeAutoEn[\i,1]};
+ \ifboolKV[Autonomie]{Enigme}{%
+ \node[anchor=south,yshift=1em,text width=0.85*0.25\paperwidth] (TestREn\i)
+ at (U\i) {%
+ \ListeAutoEn[\i,2] : \pointilles\\
+ Lettre \ding{\fpeval{171+\i}} : \pointilles
+ };%
+ }{%
+ \node[anchor=south,yshift=1em,text width=0.85*0.25\paperwidth] (TestREn\i)
+ at (U\i) {%
+ \ListeAutoEn[\i,2]%
+ };%
+ }%
+ }
+ \end{tikzpicture}
+}
+
+%%%
% Calculatrice
%%%
%https://tex.stackexchange.com/questions/290321/mimicking-a-calculator-inputs-and-screen
@@ -2562,12 +4209,13 @@
\end{tabular}%
}%
}%
+ \renewcommand{\arraystretch}{1}%
}
%%%
% Somme des angles
%%%
-\setKVdefault[ClesSommeAngle]{Detail=true,Isocele=false,Figure=false,FigureSeule=false,Angle=0,Perso=false}%
+\setKVdefault[ClesSommeAngle]{Detail=true,Isocele=false,Figure=false,FigureSeule=false,Angle=0,Perso=false,Echelle=1cm}%
\def\MPFigureSommeAngle#1#2#3#4#5#6#7{
% #1 Premier sommet
@@ -2581,6 +4229,7 @@
\mplibforcehmode
\begin{mplibcode}
pair A,B,C,O,I;%
+ u:=\useKV[ClesSommeAngle]{Echelle};
% On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
A=u*(1,1);
B-A=u*(4,0);
@@ -2640,9 +4289,7 @@
\end{mplibcode}
\mplibcodeinherit{disable}
\else
- \begin{mpost}
- input PfCGeometrie;
- u:=1cm;
+ \begin{mpost}[mpsettings={u:=\useKV[ClesSommeAngle]{Echelle};}]
pair A,B,C,O,I;%
% On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
A=u*(1,1);
@@ -2807,7 +4454,7 @@
%%%
% Le th\'eor\`eme de Pythagore
%%%
-\setKVdefault[ClesPythagore]{Exact=false,AvantRacine=false,Racine=false,Entier=false,Egalite=false,Precision=2,Soustraction=false,Figure=false,FigureSeule=false,Angle=0,Reciproque=false,ReciColonnes=false,Faible=false,Unite=cm,EnchaineA=false,EnchaineB=false,EnchaineC=false,ValeurA=0,ValeurB=0,ValeurC=0,Perso=false}
+\setKVdefault[ClesPythagore]{Exact=false,AvantRacine=false,Racine=false,Entier=false,Egalite=false,Precision=2,Soustraction=false,Figure=false,FigureSeule=false,Angle=0,Echelle=1cm,Reciproque=false,ReciColonnes=false,Faible=false,Unite=cm,EnchaineA=false,EnchaineB=false,EnchaineC=false,ValeurA=0,ValeurB=0,ValeurC=0,Perso=false}
% On d\'efinit les figures \`a utiliser
\def\MPFigurePytha#1#2#3#4#5#6{%
@@ -2820,7 +4467,7 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
- u:=1cm;
+ u:=\useKV[ClesPythagore]{Echelle};
pair A,B,C,O,D,E,F;%B est le sommet de l'angle droit
O=u*(2.5,2.5);
path cc;
@@ -2841,6 +4488,7 @@
draw B{dir(angle(C-B)+5)}..C{dir(angle(C-B)+5)};
draw C{dir(angle(A-C)+5)}..A{dir(angle(A-C)+5)};
draw D--E--F;
+ numeric decalage;
decalage=3mm;
if #4<#5 :
if ypart(B)>ypart(O) :
@@ -2865,8 +4513,7 @@
label(btex #1 etex,1.2[O,C]);
\end{mplibcode}
\else
- \begin{mpost}
- u:=1cm;
+ \begin{mpost}[mpsettings={u:=\useKV[ClesPythagore]{Echelle};}]
pair A,B,C,O,D,E,F;%B est le sommet de l'angle droit
O=u*(2.5,2.5);
path cc;
@@ -2924,7 +4571,7 @@
\ifluatex
\mplibforcehmode
\begin{mplibcode}
- u:=1cm;
+ u:=\useKV[ClesPythagore]{Echelle};
pair A,B,C,O,D,E,F;%B est le sommet de l'angle droit
O=u*(2.5,2.5);
path cc;
@@ -2955,8 +4602,7 @@
label(btex #3 etex,1.2[O,C]);
\end{mplibcode}
\else
- \begin{mpost}
- u:=1cm;
+ \begin{mpost}[mpsettings={u:=\useKV[ClesPythagore]{Echelle};}]
pair A,B,C,O,D,E,F;%B est le sommet de l'angle droit
O=u*(2.5,2.5);
path cc;
@@ -3095,6 +4741,11 @@
\xdef\NomSommetC{\NomC}%
% On trace une figure ou pas ?
\ifboolKV[ClesPythagore]{FigureSeule}{%
+ \xintifboolexpr{#3<#4 || #3==#4}{%\ifnum#3<#4%
+ \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
+ }{%
+ \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2-#4^2),\useKV[ClesPythagore]{Precision})}}%
+ }%
\MPFigurePytha{\NomA}{\NomB}{\NomC}{#3}{#4}{\useKV[ClesPythagore]{Angle}}
}{%
\ifboolKV[ClesPythagore]{Figure}{%Utilisation obligatoire de l'option --shell-escape de la compilation
@@ -3108,7 +4759,7 @@
}%
\xintifboolexpr{#3<#4 || #3==#4}{%\ifnum#3<#4%
\xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
- \xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
+ %\xdef\ResultatPytha{\fpeval{round(sqrt(#3^2+#4^2),\useKV[ClesPythagore]{Precision})}}%
\begin{align*}
\NomA\NomC^2&=\NomA\NomB^2+\NomB\NomC^2\\
\NomA\NomC^2&=\ifboolKV[ClesPythagore]{EnchaineA}{\opcopy{\useKV[ClesPythagore]{ValeurA}}{a1}\opexport{a1}{\Aun}\num{\Aun}}{\opexport{A1}{\Aun}\num{\Aun}^2}+\ifboolKV[ClesPythagore]{EnchaineB}{\opcopy{\useKV[ClesPythagore]{ValeurB}}{a2}\opexport{a2}{\Adeux}\num{\Adeux}}{\opexport{A2}{\Adeux}\num{\Adeux}^2}\\
@@ -3222,14 +4873,15 @@
% y a dans un "seul calcul".
\setcounter{NbCalculDistri}{0}
-\setKVdefault[ClesDistributivite]{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}%,AideAdd=false:inutile ?
+\setKVdefault[ClesDistributivite]{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}%,AideAdd=false:inutile ?
\newcommand\Tuile[4]{%
\ifluatex
\mplibforcehmode
\begin{mplibcode}
- boolean Vide;
+ boolean Vide,Print;
Vide=\useKV[ClesDistributivite]{Vide};
+ Print=\useKV[ClesDistributivite]{Impression};
pair _CoinTuilev;
_CoinTuilev=(0,0);
numeric largeur,longueur,ecart;
@@ -3244,7 +4896,9 @@
TT=image(
path cc;
cc=polygone((0,0),u*(LL,0),u*(LL,-ll),u*(0,-ll));
+ if Print=false:
fill cc withcolor col;
+ fi;
trace cc;
label(TEX(t),iso((0,0),u*(LL,0),u*(LL,-ll),u*(0,-ll)));
);
@@ -3262,7 +4916,9 @@
TT=image(
path cc;
cc=polygone((0,0),u*(LL,0),u*(LL,ll),u*(0,ll));
+ if Print=false:
fill cc withcolor col;
+ fi;
trace cc;
label(TEX(t),iso((0,0),u*(LL,0),u*(LL,ll),u*(0,ll)));
);
@@ -3324,7 +4980,9 @@
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)));
+ if Print=false:
fill titi withcolor if #1*#3>0:ColorCarrePos else: ColorCarreNeg fi;
+ fi;
trace titi;
if #1*#3>0:
label(TEX("$x^2$"),iso((0,0),u*(longueur,0),u*(longueur,-longueur),u*(0,-longueur)) shifted (u*(largeur+ecart,0)+(u*(k*longueur,-l*longueur))));
@@ -3340,7 +4998,9 @@
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)));
+ if Print=false:
fill titi withcolor if #1*#4>0:ColorLetterPos else: ColorLetterNeg fi;
+ fi;
trace titi;
if #1*#4>0:
label(TEX("$x$"),iso((0,0),u*(largeur,0),u*(largeur,-longueur),u*(0,-longueur)) shifted (u*(largeur+ecart+abs(#3)*longueur,0)+(u*(k*largeur,-l*longueur))));
@@ -3356,7 +5016,9 @@
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)));
+ if Print=false:
fill titi withcolor if #2*#3>0:ColorLetterPos else: ColorLetterNeg fi;
+ fi;
trace titi;
if #2*#3>0:
label(TEX("$x$"),iso((0,0),u*(longueur,0),u*(longueur,-largeur),u*(0,-largeur)) shifted (u*(largeur+ecart,-abs(#1)*longueur)+(u*(k*longueur,-l*largeur))));
@@ -3372,7 +5034,9 @@
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)));
+ if Print=false:
fill titi withcolor if #2*#4>0:ColorNumPos else: ColorNumNeg fi;
+ fi;
trace titi;
if #2*#4>0:
label(TEX("$1$"),iso((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))));
@@ -3385,7 +5049,7 @@
fi;
\end{mplibcode}
\else
- \begin{mpost}[mpsettings={boolean Vide; Vide=\useKV[ClesDistributivite]{Vide};}]
+ \begin{mpost}[mpsettings={boolean Vide,Print; Vide=\useKV[ClesDistributivite]{Vide}; Print=\useKV[ClesDistributivite]{Impression};}]
pair _CoinTuilev;
_CoinTuilev=(0,0);
numeric largeur,longueur,ecart;
@@ -3400,7 +5064,9 @@
TT=image(
path cc;
cc=polygone((0,0),u*(LL,0),u*(LL,-ll),u*(0,-ll));
+ if Print=false:
fill cc withcolor col;
+ fi;
trace cc;
label(LATEX(t),iso((0,0),u*(LL,0),u*(LL,-ll),u*(0,-ll)));
);
@@ -3418,7 +5084,9 @@
TT=image(
path cc;
cc=polygone((0,0),u*(LL,0),u*(LL,ll),u*(0,ll));
+ if Print=false:
fill cc withcolor col;
+ fi;
trace cc;
label(LATEX(t),iso((0,0),u*(LL,0),u*(LL,ll),u*(0,ll)));
);
@@ -3480,7 +5148,9 @@
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)));
+ if Print=false:
fill titi withcolor if #1*#3>0:ColorCarrePos else: ColorCarreNeg fi;
+ fi;
trace titi;
if #1*#3>0:
label(LATEX("$x^2$"),iso((0,0),u*(longueur,0),u*(longueur,-longueur),u*(0,-longueur)) shifted (u*(largeur+ecart,0)+(u*(k*longueur,-l*longueur))));
@@ -3496,7 +5166,9 @@
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)));
+ if Print=false:
fill titi withcolor if #1*#4>0:ColorLetterPos else: ColorLetterNeg fi;
+ fi;
trace titi;
if #1*#4>0:
label(LATEX("$x$"),iso((0,0),u*(largeur,0),u*(largeur,-longueur),u*(0,-longueur)) shifted (u*(largeur+ecart+abs(#3)*longueur,0)+(u*(k*largeur,-l*longueur))));
@@ -3512,7 +5184,9 @@
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)));
+ if Print=false:
fill titi withcolor if #2*#3>0:ColorLetterPos else: ColorLetterNeg fi;
+ fi;
trace titi;
if #2*#3>0:
label(LATEX("$x$"),iso((0,0),u*(longueur,0),u*(longueur,-largeur),u*(0,-largeur)) shifted (u*(largeur+ecart,-abs(#1)*longueur)+(u*(k*longueur,-l*largeur))));
@@ -3528,7 +5202,9 @@
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)));
+ if Print=false:
fill titi withcolor if #2*#4>0:ColorNumPos else: ColorNumNeg fi;
+ fi;
trace titi;
if #2*#4>0:
label(LATEX("$1$"),iso((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))));
@@ -4100,11 +5776,15 @@
%%%
% Nombre Premier
%%%
-\setKVdefault[ClesNombrePremier]{Tableau=false,TableauVertical=false,TableauVerticalVide=false,Exposant=false,Longue=false,All=false,Arbre=false,ArbreVide=false,ArbreComplet=false,Diviseurs=false,DiviseursT=false,Dot=\dotfill}
+\setKVdefault[ClesNombrePremier]{Tableau=false,TableauVertical=false,TableauVerticalVide=false,Exposant=false,Longue=false,All=false,Arbre=false,ArbreVide=false,ArbreComplet=false,Diviseurs=false,DiviseursT=false,Dot=\dotfill,Impose=false,ImposeAll=false}
+\defKV[ClesNombrePremier]{Nombre=\setKV[ClesNombrePremier]{Impose}}
+\defKV[ClesNombrePremier]{AllNombre=\setKV[ClesNombrePremier]{ImposeAll}}
\newcommand\Decomposition[2][]{%
\useKVdefault[ClesNombrePremier]%
\setKV[ClesNombrePremier]{#1}%
+ \ifboolKV[ClesNombrePremier]{Impose}{\NombrePremierImpose{#2}{\useKV[ClesNombrePremier]{Nombre}}{\fpeval{#2/\useKV[ClesNombrePremier]{Nombre}}}}{}%
+ \ifboolKV[ClesNombrePremier]{ImposeAll}{\NombrePremierImposeAll{#2}{\useKV[ClesNombrePremier]{AllNombre}}{\fpeval{#2/\useKV[ClesNombrePremier]{AllNombre}}}}{}%
\ifboolKV[ClesNombrePremier]{Tableau}{\NombrePremier{#2}}{}%
\ifboolKV[ClesNombrePremier]{TableauVertical}{\NombrePremierVertical{#2}}{}%
\ifboolKV[ClesNombrePremier]{TableauVerticalVide}{\NombrePremierVerticalVide{#2}}{}%
@@ -4116,7 +5796,7 @@
\ifboolKV[ClesNombrePremier]{Diviseurs}{\ListeDiviseur{#2}}{}%
\ifboolKV[ClesNombrePremier]{DiviseursT}{\ListeDiviseurT{#2}}{}%
\ifboolKV[ClesNombrePremier]{ArbreVide}{\MPArbreVide{#2}}{}%
-}
+}%
\def\MPArbre#1{%
\ifluatex
@@ -4546,6 +6226,131 @@ vardef Positions(expr Step)=
\fi
}
+\newcount\premierun
+\newcount\premierdeux
+
+\newcommand\NombrePremierImpose[3]{%\'ecrire la d\'ecomposition compl\`ete
+ % #1 le nombre premier \`a tester
+ % #2 est le premier facteur imposé
+ % #3 est le deuxième facteur imposé
+ \newcount\anp\newcount\bnp\newcount\cnp%\newcount\e\newcount\f%
+ % Pour d\'eterminer le nombre d'\'etapes pour #1
+ \anp=#1\relax
+ \bnp=2\relax
+ \premier=-1\relax
+ \whiledo{\anp > 1}{%
+ \modulo{\the\anp}{\the\bnp}
+ \ifnum\remainder=0\relax
+ \global\premier=\numexpr\premier+1\relax
+ \cnp=\numexpr\anp/\bnp\relax
+ \anp=\cnp\relax
+ \else%
+ \bnp=\numexpr\bnp+1\relax%
+ \fi%
+ }%
+ % Pour d\'eterminer le nombre d'\'etapes pour #2
+ \anp=#2\relax
+ \bnp=2\relax
+ \premierun=-1\relax
+ \whiledo{\anp > 1}{%
+ \modulo{\the\anp}{\the\bnp}
+ \ifnum\remainder=0\relax
+ \global\premierun=\numexpr\premierun+1\relax
+ \cnp=\numexpr\anp/\bnp\relax
+ \anp=\cnp\relax
+ \else%
+ \bnp=\numexpr\bnp+1\relax%
+ \fi%
+ }%
+ % Pour d\'eterminer le nombre d'\'etapes pour #3
+ \anp=#3\relax
+ \bnp=2\relax
+ \premierdeux=-1\relax
+ \whiledo{\anp > 1}{%
+ \modulo{\the\anp}{\the\bnp}
+ \ifnum\remainder=0\relax
+ \global\premierdeux=\numexpr\premierdeux+1\relax
+ \cnp=\numexpr\anp/\bnp\relax
+ \anp=\cnp\relax
+ \else%
+ \bnp=\numexpr\bnp+1\relax%
+ \fi%
+ }%
+ \ifnum\premier=0
+ Le nombre \num{#1} est un nombre premier.
+ \else
+ \xintifboolexpr{\premierun>\premierdeux}{\premier=\premierun}{\premier=\premierdeux}
+ \begin{align*}
+ \num{#1}&=\num{#2}\times\num{#3}%\\
+ \xintifboolexpr{\premier>0}{\\%
+ \xintFor* ##1 in {\xintSeq {1}{\premier}}\do {\num{#1}&=\xintifboolexpr{##1<\premierun}{\PremierEtape{#2}{##1}}{\Decomposition[Longue]{#2}}\mathrel{\times}\xintifboolexpr{##1<\premierdeux}{\PremierEtape{#3}{##1}}{\Decomposition[Longue]{#3}}\xintifboolexpr{##1<\premier}{\\}{}}%
+ }{}%
+ \end{align*}
+ \fi
+}%
+
+\newcommand\NombrePremierImposeAll[3]{%\'ecrire la d\'ecomposition compl\`ete
+ % #1 le nombre premier \`a tester
+ % #2 est le premier facteur imposé
+ % #3 est le deuxième facteur imposé
+ \newcount\anp\newcount\bnp\newcount\cnp%\newcount\e\newcount\f%
+ % Pour d\'eterminer le nombre d'\'etapes pour #1
+ \anp=#1\relax
+ \bnp=2\relax
+ \premier=-1\relax
+ \whiledo{\anp > 1}{%
+ \modulo{\the\anp}{\the\bnp}
+ \ifnum\remainder=0\relax
+ \global\premier=\numexpr\premier+1\relax
+ \cnp=\numexpr\anp/\bnp\relax
+ \anp=\cnp\relax
+ \else%
+ \bnp=\numexpr\bnp+1\relax%
+ \fi%
+ }
+ % Pour d\'eterminer le nombre d'\'etapes pour #2
+ \anp=#2\relax
+ \bnp=2\relax
+ \premierun=-1\relax
+ \whiledo{\anp > 1}{%
+ \modulo{\the\anp}{\the\bnp}
+ \ifnum\remainder=0\relax
+ \global\premierun=\numexpr\premierun+1\relax
+ \cnp=\numexpr\anp/\bnp\relax
+ \anp=\cnp\relax
+ \else%
+ \bnp=\numexpr\bnp+1\relax%
+ \fi%
+ }
+ % Pour d\'eterminer le nombre d'\'etapes pour #3
+ \anp=#3\relax
+ \bnp=2\relax
+ \premierdeux=-1\relax
+ \whiledo{\anp > 1}{%
+ \modulo{\the\anp}{\the\bnp}
+ \ifnum\remainder=0\relax
+ \global\premierdeux=\numexpr\premierdeux+1\relax
+ \cnp=\numexpr\anp/\bnp\relax
+ \anp=\cnp\relax
+ \else%
+ \bnp=\numexpr\bnp+1\relax%
+ \fi%
+ }%
+ \ifnum\premier=0
+ Le nombre \num{#1} est un nombre premier.
+ \else%
+ \xintifboolexpr{\premierun>\premierdeux}{\premier=\premierun}{\premier=\premierdeux}%
+ \begin{align*}
+ \num{#1}&=\num{#2}\times\num{#3}%\\
+ \xintifboolexpr{\premier>0}{\\%
+ \xintFor* ##1 in {\xintSeq {1}{\premier}}\do {\num{#1}&=\xintifboolexpr{##1<\premierun}{\PremierEtape{#2}{##1}}{\Decomposition[Longue]{#2}}\mathrel{\times}\xintifboolexpr{##1<\premierdeux}{\PremierEtape{#3}{##1}}{\Decomposition[Longue]{#3}}\\
+ }%
+ \num{#1}&=\PremierExposant{#1}%
+ }{}
+ \end{align*}
+ \fi%
+}%
+
\newcommand{\NombrePremierVertical}[1]{%\'ecrire la d\'ecomposition compl\`ete
% #1 le nombre premier \`a tester
\newcount\anpv\newcount\bnpv\newcount\cnpv%\newcount\e\newcount\f%
@@ -5048,7 +6853,7 @@ vardef Positions(expr Step)=
\ppcm=\numexpr#1*#2/\pgcd\relax
}
-\setKVdefault[ClesThales]{Calcul=true,Droites=false,Propor=false,Segment=false,Figure=false,FigureSeule=false,Figurecroisee=false,FigurecroiseeSeule=false,Angle=0,Precision=2,Entier=false,Unite=cm,Reciproque=false,Produit=false,ChoixCalcul=0,Simplification,Redaction=false,Remediation=false}
+\setKVdefault[ClesThales]{Calcul=true,Droites=false,Propor=false,Segment=false,Figure=false,FigureSeule=false,Figurecroisee=false,FigurecroiseeSeule=false,Angle=0,Precision=2,Entier=false,Unite=cm,Reciproque=false,Produit=false,ChoixCalcul=0,Simplification,Redaction=false,Remediation=false,Echelle=1cm}
%On d\'efinit la figure \`a utiliser
\def\MPFigThales#1#2#3#4#5#6{
@@ -5061,7 +6866,7 @@ vardef Positions(expr Step)=
\mplibcodeinherit{enable}
\mplibforcehmode
\begin{mplibcode}
- u:=1cm;
+ u:=\useKV[ClesThales]{Echelle};
pair A,B,C,M,N,O;%
%On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
A=u*(1,1);
@@ -5109,8 +6914,7 @@ vardef Positions(expr Step)=
\end{mplibcode}
\mplibcodeinherit{disable}
\else
- \begin{mpost}
- u:=1cm;
+ \begin{mpost}[mpsettings={u:=\useKV[ClesThales]{Echelle};}]
pair A,B,C,M,N,O;%
%On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
A=u*(1,1);
@@ -5170,7 +6974,7 @@ vardef Positions(expr Step)=
\mplibcodeinherit{enable}
\mplibforcehmode
\begin{mplibcode}
- u:=1cm;
+ u:=\useKV[ClesThales]{Echelle};
pair A,B,C,M,N,O;%
%On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
A=u*(1,1);
@@ -5206,8 +7010,7 @@ vardef Positions(expr Step)=
\end{mplibcode}
\mplibcodeinherit{disable}
\else
- \begin{mpost}
- u:=1cm;
+ \begin{mpost}[mpsettings={u:=\useKV[ClesThales]{Echelle};}]
pair A,B,C,M,N,O;%
%On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
A=u*(1,1);
@@ -5255,7 +7058,7 @@ vardef Positions(expr Step)=
\mplibforcehmode
\mplibcodeinherit{enable}
\begin{mplibcode}
- u:=1cm;
+ u:=\useKV[ClesThales]{Echelle};
pair A,B,C,M,N,O;%
O=(2.5u,2.5u);
path cc;
@@ -5308,8 +7111,7 @@ vardef Positions(expr Step)=
\end{mplibcode}
\mplibcodeinherit{disable}
\else
- \begin{mpost}
- u:=1cm;
+ \begin{mpost}[mpsettings={u:=\useKV[ClesThales]{Echelle};}]
pair A,B,C,M,N,O;%
O=(2.5u,2.5u);
path cc;
@@ -5374,7 +7176,7 @@ vardef Positions(expr Step)=
\mplibforcehmode
\mplibcodeinherit{enable}
\begin{mplibcode}
- u:=1cm;
+ u:=\useKV[ClesThales]{Echelle};
pair A,B,C,M,N,O;%
O=(2.5u,2.5u);
path cc;
@@ -5417,8 +7219,7 @@ vardef Positions(expr Step)=
\end{mplibcode}
\mplibcodeinherit{disable}
\else
- \begin{mpost}
- u:=1cm;
+ \begin{mpost}[mpsettings={u:=\useKV[ClesThales]{Echelle};}]
pair A,B,C,M,N,O;%
O=(2.5u,2.5u);
path cc;
@@ -6350,8 +8151,7 @@ vardef Positions(expr Step)=
\end{mplibcode}
\mplibcodeinherit{disable}
\else
- \begin{mpost}
- u:=1cm;
+ \begin{mpost}[mpsettings={u:=\useKV[ClesTrigo]{Echelle};}]
pair A,B,C,O,I,D,E,F;%
% On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
A=u*(1,1);
@@ -6528,7 +8328,7 @@ vardef Positions(expr Step)=
\end{mplibcode}
\mplibcodeinherit{disable}
\else
- \begin{mpost}
+ \begin{mpost}[mpsettings={u:=\useKV[ClesTrigo]{Echelle};}]
u:=1cm;
pair A,B,C,O,I,D,E,F;%
%On place les points A,B,C sur le cercle de mani\`ere \`a faciliter la rotation de la figure
@@ -6925,115 +8725,90 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
% La construction du tableau
\def\addtotok#1#2{#1\expandafter{\the#1#2}}
\newtoks\tabtoksa\newtoks\tabtoksb\newtoks\tabtoksc
-\def\updatetoks#1/#2\nil{\addtotok\tabtoksa{\ifboolKV[ClesStat]{Qualitatif}{&#1}{&\num{#1}}}\addtotok\tabtoksb{&\num{#2}}}
+\def\updatetoks#1/#2\nil{\addtotok\tabtoksa{\ifboolKV[ClesStat]{Qualitatif}{&\cellcolor{\useKV[ClesStat]{CouleurTab}}#1}{&\cellcolor{\useKV[ClesStat]{CouleurTab}}\num{#1}}}\addtotok\tabtoksb{&\num{#2}}}
\def\buildtab{% %%Tableau sans total
\tabtoksa{\useKV[ClesStat]{Donnee}}\tabtoksb{\useKV[ClesStat]{Effectif}}%
\foreachitem\compteur\in\ListeComplete{\expandafter\updatetoks\compteur\nil}%
\[%
- %\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{\ListeComplete[##1,2]}%
\renewcommand{\arraystretch}{\useKV[ClesStat]{Stretch}}%
- \begin{tabular}{|>{\columncolor{\useKV[ClesStat]{CouleurTab}}}c|*{\number\numexpr\ListeCompletelen}{>{\centering\arraybackslash}p{\useKV[ClesStat]{Largeur}}|}}%
- \hline%
- \rowcolor{\useKV[ClesStat]{CouleurTab}}\the\tabtoksa\\\hline%
- \ifnum\number\numexpr\useKV[ClesStat]{ColVide}<1%
- \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\the\tabtoksb}\\\hline%
- \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}\\\hline}{}%
- \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}\\\hline}{}%
- \ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}\\\hline}{}%
- \ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}\\\hline}{}%
- \end{tabular}
- \else%
- \ifnum\number\numexpr\useKV[ClesStat]{ColVide}>\ListeCompletelen%
- \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\the\tabtoksb}\\\hline%
- \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}\\\hline}{}%
- \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}\\\hline}{}%
- \ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}\\\hline}{}%
- \ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}\\\hline}{}%
- \end{tabular}
- \else%
- \ifnum\number\numexpr\useKV[ClesStat]{ColVide}=1%
- \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\useKV[ClesStat]{Effectif}&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ListeComplete[##1,2]}}\\\hline%
- \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}\\\hline}{}%
- \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}\\\hline}{}%
- \ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}\\\hline}{}%
- \ifboolKV[ClesStat]{ECC}{E.C.C.&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}\\\hline}{}%
- \end{tabular}
- \else%
- \ifnum\number\numexpr\useKV[ClesStat]{ColVide}=\ListeCompletelen%
- \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ListeComplete[##1,2]}}&\\\hline%
- \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\\\hline}{}%
- \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&\\\hline}{}%
- \ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}&\\\hline}{}%
- \ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}&\\\hline}{}%
- \end{tabular}
- \else%
- \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\number\numexpr\useKV[ClesStat]{ColVide}-1}}\do{&\ListeComplete[##1,2]}&\xintFor* ##1 in {\xintSeq {\number\numexpr\useKV[ClesStat]{ColVide}+1}{\ListeCompletelen}}\do{&\ListeComplete[##1,2]}}\\\hline%
- \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\number\numexpr\useKV[ClesStat]{ColVide}-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\xintFor* ##1 in {\xintSeq {\number\numexpr\useKV[ClesStat]{ColVide}+1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}\\\hline}{}%
- \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\number\numexpr\useKV[ClesStat]{ColVide}-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&\xintFor* ##1 in {\xintSeq {\number\numexpr\useKV[ClesStat]{ColVide}+1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculAngle{##1}}}}\\\hline}{}%
- \ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\number\numexpr\useKV[ClesStat]{ColVide}-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}&\xintFor* ##1 in {\xintSeq {\number\numexpr\useKV[ClesStat]{ColVide}+1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculSemiAngle{##1}}}}\\\hline}{}%
- \ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\number\numexpr\useKV[ClesStat]{ColVide}-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}&\xintFor* ##1 in {\xintSeq {\number\numexpr\useKV[ClesStat]{ColVide}+1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}\\\hline}{}%
- \end{tabular}
- \fi%
- \fi%
- \fi%
- \fi%
+ \begin{tabular}{|>{\columncolor{\useKV[ClesStat]{CouleurTab}}}c|*{\fpeval{\ListeCompletelen}}{>{\centering\arraybackslash}p{\useKV[ClesStat]{Largeur}}|}}%
+ \hline%
+ \the\tabtoksa\\\hline%
+ \xintifboolexpr{\useKV[ClesStat]{ColVide}<1 || \useKV[ClesStat]{ColVide}>\ListeCompletelen}{%
+ \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\the\tabtoksb}\\\hline%
+ \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}\\\hline}{}%
+ }{%
+ \xintifboolexpr{\useKV[ClesStat]{ColVide}==1}{%
+ \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\useKV[ClesStat]{Effectif}&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ListeComplete[##1,2]}}\\\hline%
+ \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{ECC}{E.C.C.&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}\\\hline}{}%
+ }{%
+ \xintifboolexpr{\useKV[ClesStat]{ColVide}==\ListeCompletelen}{%
+ \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ListeComplete[##1,2]}}&\\\hline%
+ \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\\\hline}{}%
+ \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&\\\hline}{}%
+ \ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}&\\\hline}{}%
+ \ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}&\\\hline}{}%
+ }{%
+ \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesStat]{ColVide}-1}}}\do{&\ListeComplete[##1,2]}&\xintFor* ##1 in {\xintSeq {\fpeval{\useKV[ClesStat]{ColVide}+1}}{\ListeCompletelen}}\do{&\ListeComplete[##1,2]}}\\\hline%
+ \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesStat]{ColVide}-1}}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\xintFor* ##1 in {\xintSeq {\fpeval{\useKV[ClesStat]{ColVide}+1}}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesStat]{ColVide}-1}}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&\xintFor* ##1 in {\xintSeq {\fpeval{\useKV[ClesStat]{ColVide}+1}}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculAngle{##1}}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesStat]{ColVide}-1}}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}&\xintFor* ##1 in {\xintSeq {\fpeval{\useKV[ClesStat]{ColVide}+1}}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculSemiAngle{##1}}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesStat]{ColVide}-1}}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}&\xintFor* ##1 in {\xintSeq {\fpeval{\useKV[ClesStat]{ColVide}+1}}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}\\\hline}{}%
+ }%
+ }%
+ }%
+ \end{tabular}
\renewcommand{\arraystretch}{1}%
- \]
-}
+ \]%
+}%
\def\buildtabt{% %%Tableau avec total
\tabtoksa{\useKV[ClesStat]{Donnee}}\tabtoksb{\useKV[ClesStat]{Effectif}}%
\foreachitem\compteur\in\ListeComplete{\expandafter\updatetoks\compteur\nil}%
- \[%
+ \[%
\renewcommand{\arraystretch}{\useKV[ClesStat]{Stretch}}%
- \begin{tabular}{|>{\columncolor{\useKV[ClesStat]{CouleurTab}}}c|*{\number\numexpr\ListeCompletelen+1}{>{\centering\arraybackslash}p{\useKV[ClesStat]{Largeur}}|}}%
- \hline%
- \rowcolor{\useKV[ClesStat]{CouleurTab}}\the\tabtoksa&Total\\\hline%
- \ifnum\number\numexpr\useKV[ClesStat]{ColVide}<1%
- \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen+1}}\do{&}}{\the\tabtoksb&\ifboolKV[ClesStat]{TotalVide}{}{\num{\EffectifTotal}}}\\\hline%
- \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{100}}}\\\hline}{}%
- \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{360}}}\\\hline}{}%
- \ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{180}}}\\\hline}{}%
- \ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\num{\EffectifTotal}}}}\\\hline}{}%
- \end{tabular}
- \else%
- \ifnum\number\numexpr\useKV[ClesStat]{ColVide}>\ListeCompletelen%
- \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen+1}}\do{&}}{\the\tabtoksb&\ifboolKV[ClesStat]{TotalVide}{}{\num{\EffectifTotal}}}\\\hline%
- \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{100}}}\\\hline}{}%
- \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{360}}}\\\hline}{}%
+ \begin{tabular}{|>{\columncolor{\useKV[ClesStat]{CouleurTab}}}c|*{\fpeval{\ListeCompletelen+1}}{>{\centering\arraybackslash}p{\useKV[ClesStat]{Largeur}}|}}%
+ \hline%
+ \the\tabtoksa&\cellcolor{\useKV[ClesStat]{CouleurTab}}Total\\\hline%
+ \xintifboolexpr{\useKV[ClesStat]{ColVide}<1 || \useKV[ClesStat]{ColVide}>\ListeCompletelen}{%
+ \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\the\tabtoksb&\ifboolKV[ClesStat]{TotalVide}{}{\num{\EffectifTotal}}}\\\hline%
+ \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{100}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{360}}}\\\hline}{}%
\ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{180}}}\\\hline}{}%
- \ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\num{\EffectifTotal}}}}\\\hline}{}%
- \end{tabular}
- \else%
- \ifnum\number\numexpr\useKV[ClesStat]{ColVide}=1%
- \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen+1}}\do{&}}{\useKV[ClesStat]{Effectif}&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ListeComplete[##1,2]}&\ifboolKV[ClesStat]{TotalVide}{}{\num{\EffectifTotal}}}\\\hline%
- \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{100}}}\\\hline}{}%
- \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{360}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\num{\EffectifTotal}}}}\\\hline}{}%
+ }{%
+ \xintifboolexpr{\useKV[ClesStat]{ColVide}==1}{%
+ \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\useKV[ClesStat]{Effectif}&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ListeComplete[##1,2]}&\ifboolKV[ClesStat]{TotalVide}{}{\num{\EffectifTotal}}}\\\hline%
+ \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{100}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{360}}}\\\hline}{}%
\ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{180}}}\\\hline}{}%
\ifboolKV[ClesStat]{ECC}{E.C.C.&\xintFor* ##1 in {\xintSeq {2}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\num{\EffectifTotal}}}}\\\hline}{}%
- \end{tabular}
- \else%
- \ifnum\number\numexpr\useKV[ClesStat]{ColVide}=\ListeCompletelen%
- \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen+1}}\do{&}}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ListeComplete[##1,2]}&&\ifboolKV[ClesStat]{TotalVide}{}{\num{\EffectifTotal}}}\\\hline%
- \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{100}}}\\\hline}{}%
- \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{360}}}\\\hline}{}%
+ }{%
+ \xintifboolexpr{\useKV[ClesStat]{ColVide}==\ListeCompletelen}{%
+ \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ListeComplete[##1,2]}&&\ifboolKV[ClesStat]{TotalVide}{}{\num{\EffectifTotal}}}\\\hline%
+ \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{100}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{360}}}\\\hline}{}%
\ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}&&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{180}}}\\\hline}{}%
\ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}&&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\num{\EffectifTotal}}}}\\\hline}{}%
+ }{%
+ \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen}}\do{&}}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesStat]{ColVide}-1}}}\do{&\ListeComplete[##1,2]}&\xintFor* ##1 in {\xintSeq {\fpeval{\useKV[ClesStat]{ColVide}+1}}{\ListeCompletelen}}\do{&\ListeComplete[##1,2]}&\ifboolKV[ClesStat]{TotalVide}{}{\num{\EffectifTotal}}}\\\hline%
+ \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesStat]{ColVide}-1}}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\xintFor* ##1 in {\xintSeq {\fpeval{\useKV[ClesStat]{ColVide}+1}}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{100}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesStat]{ColVide}-1}}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&\xintFor* ##1 in {\xintSeq {\fpeval{\useKV[ClesStat]{ColVide}+1}}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculAngle{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{360}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesStat]{ColVide}-1}}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}&\xintFor* ##1 in {\xintSeq {\fpeval{\useKV[ClesStat]{ColVide}+1}}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculSemiAngle{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{180}}}\\\hline}{}%
+ \ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\fpeval{\useKV[ClesStat]{ColVide}-1}}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}&\xintFor* ##1 in {\xintSeq {\fpeval{\useKV[ClesStat]{ColVide}+1}}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\num{\EffectifTotal}}}}\\\hline}{}%
+ }%
+ }%
+ }%
\end{tabular}
- \else%
- \ifboolKV[ClesStat]{EffVide}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\ListeCompletelen+1}}\do{&}}{\useKV[ClesStat]{Effectif}\xintFor* ##1 in {\xintSeq {1}{\number\numexpr\useKV[ClesStat]{ColVide}-1}}\do{&\ListeComplete[##1,2]}&\xintFor* ##1 in {\xintSeq {\number\numexpr\useKV[ClesStat]{ColVide}+1}{\ListeCompletelen}}\do{&\ListeComplete[##1,2]}&\ifboolKV[ClesStat]{TotalVide}{}{\num{\EffectifTotal}}}\\\hline%
- \ifboolKV[ClesStat]{Frequence}{Fr\'equence (\%)\xintFor* ##1 in {\xintSeq {1}{\number\numexpr\useKV[ClesStat]{ColVide}-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\xintFor* ##1 in {\xintSeq {\number\numexpr\useKV[ClesStat]{ColVide}+1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{\CalculFrequence{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{FreqVide}{}{100}}}\\\hline}{}%
- \ifboolKV[ClesStat]{Angle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\number\numexpr\useKV[ClesStat]{ColVide}-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&\xintFor* ##1 in {\xintSeq {\number\numexpr\useKV[ClesStat]{ColVide}+1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculAngle{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{360}}}\\\hline}{}%
- \ifboolKV[ClesStat]{SemiAngle}{Angle (\si{\degree})\xintFor* ##1 in {\xintSeq {1}{\number\numexpr\useKV[ClesStat]{ColVide}-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}&\xintFor* ##1 in {\xintSeq {\number\numexpr\useKV[ClesStat]{ColVide}+1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{\CalculSemiAngle{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{AngVide}{}{180}}}\\\hline}{}%
- \ifboolKV[ClesStat]{ECC}{E.C.C.\xintFor* ##1 in {\xintSeq {1}{\number\numexpr\useKV[ClesStat]{ColVide}-1}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}&\xintFor* ##1 in {\xintSeq {\number\numexpr\useKV[ClesStat]{ColVide}+1}{\ListeCompletelen}}\do{&\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\CalculECC{##1}}}}&\ifboolKV[ClesStat]{TotalVide}{}{\ifboolKV[ClesStat]{TableauVide}{}{\ifboolKV[ClesStat]{ECCVide}{}{\num{\EffectifTotal}}}}\\\hline}{}%
- \end{tabular}
- \fi%
- \fi%
- \fi%
- \fi%
\renewcommand{\arraystretch}{1}%
- \]
-}
+ \]%
+}%
% Pour construire le diagramme en bâtons
\def\Updatetoks#1/#2\nil{\addtotok\toklistepoint{(#1,#2),}}
@@ -7117,7 +8892,7 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
\xdef\TotalECC{0}%
\CompteurECC=1%
\CompteurECCTotal=\numexpr#1+1%
- \whiledo{\CompteurECC < \CompteurECCTotal}{
+ \whiledo{\CompteurECC < \CompteurECCTotal}{%
\xdef\TotalECC{\fpeval{\TotalECC+\ListeComplete[\the\CompteurECC,2]}}%
\CompteurECC=\numexpr\CompteurECC+1%
}%
@@ -7406,9 +9181,9 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
if #4=1:
if round(p_*(#3/total[N]))>15:
if (n mod 2)=0:
- marque_a:=3.1*20
+ marque_a:=20*0.75*#1/cm;
else:
- marque_a:=3.1*20/0.9
+ marque_a:=20*0.5*#1/cm;
fi;
if #6=1:
if #7=0:
@@ -7531,9 +9306,9 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
if #4=1:
if round(p_*(#3/total[N]))>15:
if (n mod 2)=0:
- marque_a:=3.1*20
+ marque_a:=20*0.75*#1/cm;
else:
- marque_a:=3.1*20/0.9
+ marque_a:=20*0.5*#1/cm;
fi;
if #6=1:
if #7=0:
@@ -7938,14 +9713,17 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
}%
}{}%
% Construction de tableau
- \ifboolKV[ClesStat]{Tableau}{\ifboolKV[ClesStat]{Total}{\buildtabt}{\buildtab}}{}%
+ \ifboolKV[ClesStat]{Tableau}{\ifboolKV[ClesStat]{Total}{\buildtabt}{%
+ \buildtab%
+ }
+ }{}%
% Construction du graphique ??
\ifboolKV[ClesStat]{Graphique}{%
\ifboolKV[ClesStat]{Angle}{\buildgraphcq{360}}{\ifboolKV[ClesStat]{SemiAngle}{\buildgraphcq{180}}{\buildgraph[#1]}}
}{}%
}%
}%
-}
+}%
%%%
% Radar
@@ -8290,6 +10068,30 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
\definecolor{Cfleches}{RGB}{100,100,100}%
+\newcommand\AffichageEqua[4]{%
+ \def\LETTRE{\useKV[ClesEquation]{Lettre}}%
+ \ensuremath{%
+ % partie du x
+ \xintifboolexpr{#1==0}{}{\xintifboolexpr{#1==1}{}{\xintifboolexpr{#1==-1}{-}{\num{#1}}}\LETTRE}%
+ % partie du nombre
+ \xintifboolexpr{#2==0}{\xintifboolexpr{#1==0}{0}{}}{\xintifboolexpr{#2>0}{\xintifboolexpr{#1==0}{}{+}\num{#2}}{\num{#2}}}%
+ % egal
+ =
+ % partie du x
+ \xintifboolexpr{#3==0}{}{\xintifboolexpr{#3==1}{}{\xintifboolexpr{#3==-1}{-}{\num{#3}}}\LETTRE}%
+ % partie du nombre
+ \xintifboolexpr{#4==0}{%
+ \xintifboolexpr{#3==0}{0}{}
+ }{%
+ \xintifboolexpr{#4>0}{\xintifboolexpr{#3==0}{}{+}\num{#4}}{\num{#4}}%
+ }
+ }%
+}%
+
+\newcommand\EcrireSolutionEquation[4]{%
+ L'équation \AffichageEqua{#1}{#2}{#3}{#4} a une unique solution : \opdiv*{\Coeffb}{\Coeffa}{solution}{resteequa}\opcmp{resteequa}{0}$\ifboolKV[ClesEquation]{LettreSol}{\useKV[ClesEquation]{Lettre}=}{}\displaystyle\ifopeq\opexport{solution}{\solution}\num{\solution}\else\ifboolKV[ClesEquation]{Entier}{\SSimplifie{\Coeffb}{\Coeffa}}{\frac{\num{\Coeffb}}{\num{\Coeffa}}}\fi$.
+}%
+
\input{PfCEquationSoustraction2}%
\input{PfCEquationTerme1}%
\input{PfCEquationComposition2}%
@@ -8297,7 +10099,7 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
\input{PfCEquationSymbole1}%
\input{PfCEquationLaurent1}
-\newcommand{\ResolEquation}[5][]{%
+\newcommand\ResolEquation[5][]{%
\useKVdefault[ClesEquation]%
\setKV[ClesEquation]{#1}%
\colorlet{Cterme}{\useKV[ClesEquation]{CouleurTerme}}%
@@ -8457,6 +10259,7 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
\hhline{*{\number\numexpr\ListeValeurlen+1}{-}}%
\multicolumn{1}{c}{\TikzPBD\setcounter{NbPropor}{1}}\xintFor* ##1 in {\xintSeq {1}{\ListeValeurlen}}\do{&\multicolumn{1}{c}{\TikzPB}}\\%
\end{tabular}%
+ \renewcommand{\arraystretch}{1}%
}%
\newcounter{NbPropor}
@@ -8526,7 +10329,7 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
\useKVdefault[ClesPropor]%
\setKV[ClesPropor]{#1}%
\xdef\colorfill{\useKV[ClesPropor]{ColorFill}}%
- \xdef\EcartLargeur{\useKV[ClesPropor]{Largeur}}
+ \xdef\EcartLargeur{\useKV[ClesPropor]{Largeur}}%
% %on lit la liste \'ecrite sous la forme valeur/effectif
\setsepchar[*]{,*/}\ignoreemptyitems%
\readlist*\ListeValeur{#2}%
@@ -11845,7 +13648,7 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
%%%
% Reperage
%%%
-\setKVdefault[ClesReperage]{Unitex=1,Pasx=1,Unitey=1,Pasy=1,Unitez=1,Pasz=1,DemiDroite=false,Droite=false,Plan=false,Trace=false,ListeSegment={},Espace=false,Sphere=false,AffichageNom=false,AffichageGrad=false,AffichageAbs=0,AffichageCoord=false,LectureCoord=false,ValeurUnitex=1,ValeurUnitey=1,ValeurOrigine=0,NomOrigine=O,EchelleEspace=50,CouleurCoord=black}
+\setKVdefault[ClesReperage]{Unitex=1,Pasx=1,Unitey=1,Pasy=1,Unitez=1,Pasz=1,DemiDroite=false,Droite=false,Plan=false,Trace=false,ListeSegment={},Espace=false,Sphere=false,AnglePhi=30,CouleurLa=white,CouleurLon=Tomato,AffichageNom=false,AffichageGrad=false,AffichageAbs=0,AffichageCoord=false,LectureCoord=false,ValeurUnitex=1,ValeurUnitey=1,ValeurOrigine=0,NomOrigine=O,EchelleEspace=50,CouleurCoord=black}
% ValeurOrigine permet de faire des morceaux de demi-droite gradu\'ee en passant par droite :)
\def\Updatetoksdroite#1/#2\nil{\addtotok\toklistepointdroite{#1,"#2",}}
@@ -11861,24 +13664,214 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
\toklistepointespace{}%
\ifboolKV[ClesReperage]{Sphere}{%
\foreachitem\compteur\in\ListePointEspace{\expandafter\Updatetoksrepere\compteur\nil}%
+ \[\MPEspaceSphere{\the\toklistepointrepere}{\useKV[ClesReperage]{EchelleEspace}}\]
}{%
\foreachitem\compteur\in\ListePointEspace{\expandafter\Updatetoksespace\compteur\nil}%
- }
- \ifboolKV[ClesReperage]{AffichageNom}{%
- \ifboolKV[ClesReperage]{AffichageCoord}{%
- \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{3}{\useKV[ClesReperage]{EchelleEspace}}\]%
- }{%
- \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{2}{\useKV[ClesReperage]{EchelleEspace}}\]%
- }
- }{%
- \ifboolKV[ClesReperage]{AffichageCoord}{%
- \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{1}{\useKV[ClesReperage]{EchelleEspace}}\]%
+ \ifboolKV[ClesReperage]{AffichageNom}{%
+ \ifboolKV[ClesReperage]{AffichageCoord}{%
+ \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{3}{\useKV[ClesReperage]{EchelleEspace}}\]%
+ }{%
+ \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{2}{\useKV[ClesReperage]{EchelleEspace}}\]%
+ }%
}{%
- \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{0}{\useKV[ClesReperage]{EchelleEspace}}\]%
- }
+ \ifboolKV[ClesReperage]{AffichageCoord}{%
+ \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{1}{\useKV[ClesReperage]{EchelleEspace}}\]%
+ }{%
+ \[\MPEspacePave{\useKV[ClesReperage]{Unitex}}{\useKV[ClesReperage]{Pasx}}{\useKV[ClesReperage]{Unitey}}{\useKV[ClesReperage]{Pasy}}{\useKV[ClesReperage]{Unitez}}{\useKV[ClesReperage]{Pasz}}{\the\toklistepointespace}{0}{\useKV[ClesReperage]{EchelleEspace}}\]%
+ }%
+ }%
}%
}%
+\def\MPEspaceSphere#1#2{%
+ \ifluatex
+ \begin{mplibcode}
+ typetrace:="3D";
+ typerepre:="persp";
+ anglephi:=\useKV[ClesReperage]{AnglePhi};
+ Initialisation(1500,anglephi,10,#2);
+ color O,A,B,C,D,Z,M[];
+ O=(0,0,0);
+ A=(cosd(anglephi+90),sind(anglephi+90),0);
+ B=(cosd(anglephi+180),sind(anglephi+180),0);
+ C=(1,0,0);
+ D=(0,1,0);
+ Z=(0,0,1);
+ trace cercles(O,A,O,A,Z) withcolor 0.7white;
+ path Equateur;
+ Equateur=cercles(O,C,O,C,D);
+ trace (subpath((0.25+anglephi/360)*length Equateur,(0.75+anglephi/360)*length Equateur) of Equateur) dashed evenly withcolor 0.7white;
+ trace (subpath((0.75+anglephi/360)*length Equateur,(1.25+anglephi/360)*length Equateur) of Equateur) withcolor 0.7white;
+ path greenwich;
+ greenwich=cercles(O,C,O,C,Z);
+ trace subpath(3*length greenwich/4,5*length greenwich/4) of greenwich withcolor 0.7white;
+ clip currentpicture to cercles(O,A,O,A,Z);
+ trace chemin(C,O,Z) dashed evenly withcolor 0.85white;
+ trace chemin(O,2[Z,O]) dashed evenly withcolor 0.85white;
+
+ vardef toto(text t)=
+ n:=1;
+ for p_=t:
+ if (n mod 3)=1:
+ k:=p_;
+ fi;
+ if (n mod 3)=2:
+ l:=p_;
+ fi;
+ if (n mod 3)=0:
+ M[n]=(cosd(k)*cosd(l),sind(k)*cosd(l),sind(l));
+ path Codageun,Codagedeux;
+ if k>0:
+ Codageun=cercles(O,1[O,C],O,1[O,C],D) cutafter chemin(O,(cosd(k),sind(k),0));
+ else:
+ Codageun=cercles(O,1[O,C],O,1[O,C],D) cutbefore chemin(O,(cosd(k),sind(k),0));
+ fi;
+ if l>0:
+ Codagedeux=cercles(O,(cosd(k),sind(k),0),O,(cosd(k),sind(k),0),Z) cutafter chemin(O,M[n]);
+ else:
+ Codagedeux=cercles(O,(cosd(k),sind(k),0),O,(cosd(k),sind(k),0),Z) cutbefore chemin(O,M[n]);
+ fi;
+ %%%% if l>0:
+ %%%fill Projette(O)--Projette((cosd(k),sind(k),0))--Codagedeux--cycle withcolor \useKV[ClesReperage]{CouleurLa};
+ %%%fill Projette(O)--Projette(C)--Codageun--cycle withcolor \useKV[ClesReperage]{CouleurLon};
+ %%%else:
+ %%%fill Projette(O)--Codagedeux--Projette((cosd(k),sind(k),0))--cycle withcolor \useKV[ClesReperage]{CouleurLa};
+ %%%fill Projette(O)--Codageun--Projette(C)--cycle withcolor \useKV[ClesReperage]{CouleurLon};
+ %%%fi;
+ trace Codageun;
+ trace Codagedeux;
+ if \useKV[ClesReperage]{AffichageCoord}:
+ picture CodageUn,CodageDeux;
+ CodageUn=image(
+ if k>0:
+ label.bot(TEX("\scriptsize\ang{"&decimal(k)&"} E"),(0,0));
+ else:
+ label.bot(TEX("\scriptsize\ang{"&decimal(abs(k))&"} O"),(0,0));
+ fi;
+ );
+ CodageDeux=image(
+ if k>0:
+ label.rt(TEX("\scriptsize\ang{"&decimal(l)&"} N"),(0,0));
+ else:
+ label.lft(TEX("\scriptsize\ang{"&decimal(abs(l))&"} S"),(0,0));
+ fi;
+ );
+ fill (polygone(llcorner CodageUn,lrcorner CodageUn,urcorner CodageUn,ulcorner CodageUn) shifted(point(0.5*length Codageun) of Codageun)) withcolor blanc;
+ trace CodageUn shifted (point(0.5*length Codageun) of Codageun);
+ fill (polygone(llcorner CodageDeux,lrcorner CodageDeux,urcorner CodageDeux,ulcorner CodageDeux) shifted(point(0.5*length Codagedeux) of Codagedeux)) withcolor blanc;
+ trace CodageDeux shifted (point(0.5*length Codagedeux) of Codagedeux);
+ fi;
+ trace chemin(O,(cosd(k),sind(k),0)) dashed withdots scaled 0.5;
+ trace chemin(O,M[n]) dashed withdots scaled 0.5;
+ trace chemin(O,C) dashed withdots scaled 0.5;
+ if \useKV[ClesReperage]{AffichageNom}:
+ if l>0:dotlabel.top(p_,Projette(M[n]));
+ else:
+ dotlabel.bot(p_,Projette(M[n]));
+ fi;
+ fi;
+ fi;
+ n:=n+1;
+ endfor;
+ enddef;
+ toto(#1);
+ label.llft(btex \tiny \ang{0} etex,Projette(C));
+ \end{mplibcode}
+ \else
+ \begin{mpost}[mpsettings={boolean AffichageCoord; AffichageCoord=\useKV[ClesReperage]{AffichageCoord}; boolean AffichageNom; AffichageNom=\useKV[ClesReperage]{AffichageNom};anglephi:=\useKV[ClesReperage]{AnglePhi};}]
+ typetrace:="3D";
+ typerepre:="persp";
+ Initialisation(1500,anglephi,10,#2);
+ color O,A,B,C,D,Z,M[];
+ O=(0,0,0);
+ A=(cosd(anglephi+90),sind(anglephi+90),0);
+ B=(cosd(anglephi+180),sind(anglephi+180),0);
+ C=(1,0,0);
+ D=(0,1,0);
+ Z=(0,0,1);
+ trace cercles(O,A,O,A,Z) withcolor 0.7white;
+ path Equateur;
+ Equateur=cercles(O,C,O,C,D);
+ trace (subpath((0.25+anglephi/360)*length Equateur,(0.75+anglephi/360)*length Equateur) of Equateur) dashed evenly withcolor 0.7white;
+ trace (subpath((0.75+anglephi/360)*length Equateur,(1.25+anglephi/360)*length Equateur) of Equateur) withcolor 0.7white;
+ path greenwich;
+ greenwich=cercles(O,C,O,C,Z);
+ trace subpath(3*length greenwich/4,5*length greenwich/4) of greenwich withcolor 0.7white;
+ clip currentpicture to cercles(O,A,O,A,Z);
+ trace chemin(C,O,Z) dashed evenly withcolor 0.85white;
+ trace chemin(O,2[Z,O]) dashed evenly withcolor 0.85white;
+
+ vardef toto(text t)=
+ n:=1;
+ for p_=t:
+ if (n mod 3)=1:
+ k:=p_;
+ fi;
+ if (n mod 3)=2:
+ l:=p_;
+ fi;
+ if (n mod 3)=0:
+ M[n]=(cosd(k)*cosd(l),sind(k)*cosd(l),sind(l));
+ path Codageun,Codagedeux;
+ if k>0:
+ Codageun=cercles(O,1[O,C],O,1[O,C],D) cutafter chemin(O,(cosd(k),sind(k),0));
+ else:
+ Codageun=cercles(O,1[O,C],O,1[O,C],D) cutbefore chemin(O,(cosd(k),sind(k),0));
+ fi;
+ if l>0:
+ Codagedeux=cercles(O,(cosd(k),sind(k),0),O,(cosd(k),sind(k),0),Z) cutafter chemin(O,M[n]);
+ else:
+ Codagedeux=cercles(O,(cosd(k),sind(k),0),O,(cosd(k),sind(k),0),Z) cutbefore chemin(O,M[n]);
+ fi;
+ %if l>0:
+ %fill Projette(O)--Projette((cosd(k),sind(k),0))--Codagedeux--cycle withcolor \useKV[ClesReperage]{CouleurLa};
+ %fill Projette(O)--Projette(C)--Codageun--cycle withcolor \useKV[ClesReperage]{CouleurLon};
+ %else:
+ %fill Projette(O)--Codagedeux--Projette((cosd(k),sind(k),0))--cycle withcolor \useKV[ClesReperage]{CouleurLa};
+ %fill Projette(O)--Codageun--Projette(C)--cycle withcolor \useKV[ClesReperage]{CouleurLon};
+ %fi;
+ trace Codageun;
+ trace Codagedeux;
+ if AffichageCoord:
+ picture CodageUn,CodageDeux;
+ CodageUn=image(
+ if k>0:
+ label.bot(LATEX("\noexpand\scriptsize\ang{"&decimal(k)&"} E"),(0,0));
+ else:
+ label.bot(LATEX("\noexpand\scriptsize\ang{"&decimal(abs(k))&"} O"),(0,0));
+ fi;
+ );
+ CodageDeux=image(
+ if k>0:
+ label.rt(LATEX("\noexpand\scriptsize\ang{"&decimal(l)&"} N"),(0,0));
+ else:
+ label.lft(LATEX("\noexpand\scriptsize\ang{"&decimal(abs(l))&"} S"),(0,0));
+ fi;
+ );
+ fill (polygone(llcorner CodageUn,lrcorner CodageUn,urcorner CodageUn,ulcorner CodageUn) shifted(point(0.5*length Codageun) of Codageun)) withcolor blanc;
+ trace CodageUn shifted (point(0.5*length Codageun) of Codageun);
+ fill (polygone(llcorner CodageDeux,lrcorner CodageDeux,urcorner CodageDeux,ulcorner CodageDeux) shifted(point(0.5*length Codagedeux) of Codagedeux)) withcolor blanc;
+ trace CodageDeux shifted (point(0.5*length Codagedeux) of Codagedeux);
+ fi;
+ trace chemin(O,(cosd(k),sind(k),0)) dashed withdots scaled 0.5;
+ trace chemin(O,M[n]) dashed withdots scaled 0.5;
+ trace chemin(O,C) dashed withdots scaled 0.5;
+ if AffichageNom:
+ if l>0:dotlabel.top(p_,Projette(M[n]));
+ else:
+ dotlabel.bot(p_,Projette(M[n]));
+ fi;
+ fi;
+ fi;
+ n:=n+1;
+ endfor;
+ enddef;
+ toto(#1);
+ label.llft(btex \noexpand\tiny \ang{0} etex,Projette(C));
+ \end{mpost}
+ \fi
+}
+
\def\MPEspacePave#1#2#3#4#5#6#7#8#9{%
\ifluatex
\begin{mplibcode}
@@ -12938,7 +14931,20 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
fi;
endfor;
fi;
- if #7=2:
+ if #7=3:
+ for p_=t:
+ if numeric p_:
+ k:=p_;
+ fi;
+ if string p_:
+ if p_<>"":
+ drawarrow (unitp*(k,-1))--(unitp*(k,-0.3));
+ label.bot(btex \hbox to2em{\dotfill} etex,(unitp*(k,-1)));
+ pointe(unitp*(k-#6,0));
+ fi;
+ fi;
+ endfor;
+ elseif #7=2:
for p_=t:
if numeric p_:
k:=p_;
@@ -13031,7 +15037,20 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
fi;
endfor;
fi;
- if #7=2:
+ if #7=3:
+ for p_=t:
+ if numeric p_:
+ k:=p_;
+ fi;
+ if string p_:
+ if p_<>"":
+ drawarrow (unitp*(k,-1))--(unitp*(k,-0.3));
+ label.bot(btex \hbox to2em{\dotfill} etex,(unitp*(k,-1)));
+ pointe(unitp*(k-#6,0));
+ fi;
+ fi;
+ endfor;
+ elseif #7=2:
for p_=t:
if numeric p_:
k:=p_;
@@ -13355,6 +15374,7 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
\setKV[ClesReperage]{#1}%
\ifboolKV[ClesReperage]{Espace}{%
\setKV[ClesReperage]{Unitex=2,Unitey=2.5,Unitez=1.5}%
+ \ifboolKV[ClesReperage]{Sphere}{\setKV[ClesReperage]{EchelleEspace=75}}{}%
\setKV[ClesReperage]{#1}%
\setsepchar[*]{,*/}\ignoreemptyitems%
\readlist*\ListePointEspace{#2}%
@@ -13460,8 +15480,8 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
\SI{#2}{\kWh}%
}
-\newcommand\Prix[2][]{%
- \SI[round-mode=places,round-precision=2]{#2}{\EuRo}%
+\newcommand\Prix[2][2]{%
+ \SI[round-mode=places,round-precision=#1]{#2}{\EuRo}%
}
\newcommand\Octet[2][]{%
@@ -14347,53 +16367,83 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
colbacktitle=TrameCouleur,
}
-\usetikzlibrary{backgrounds}
-
-\makeatletter
-%https://tex.stackexchange.com/questions/347434/clip-background-image-inside-tcolorbox
-\newtcolorbox{MyboxSimpleAv}[1]{%
+\newtcolorbox{MyboxJQ}[2]{%
enhanced,
nobeforeafter,
- left=0pt,right=0pt,top=\hauteurtitre,bottom=0pt,
+ left=0pt,right=0pt,top=0pt,
text fill,
width=\largeurcarte,
height=\hauteurcarte,
arc=5pt,
+ overlay unbroken and first={%
+ \coordinate[yshift=-0.5\hauteurtitre] (A1) at (frame.north west);
+ \coordinate[yshift=0\hauteurtitre] (S3) at (frame.center);
+ \coordinate[yshift=3mm] (C3) at (frame.south);
+ \coordinate[xshift=\largeurcarte/2] (A3) at (A1);
+ \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurcarte-6mm,fill=TrameCouleur] (T1) at (A3){};
+ \node[TexteCouleur] (T1a) at (T1){\Large J'ai};
+ \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurcarte-6mm,fill=TrameCouleur] (T2) at (S3){};
+ \node[TexteCouleur] (T2a) at (T2){\Large Qui a ?};
+ \node[minimum height=1cm,text width=\largeurcarte-6mm] (PointTexte1) at ($(A3)!0.5!(S3)$) {\begin{minipage}{\largeurcarte-6mm}%
+ \begin{center}%
+ #1%
+ \end{center}%
+ \end{minipage}};
+ \node[minimum height=1cm,text width=\largeurcarte-6mm] (PointTexte2) at ($(C3)!0.5!(S3)$) {\begin{minipage}{\largeurcarte-6mm}%
+ \begin{center}%
+ #2%
+ \end{center}%
+ \end{minipage}};
+ },
colback=white,
+}
+
+\usetikzlibrary{backgrounds}
+
+\makeatletter
+%https://tex.stackexchange.com/questions/347434/clip-background-image-inside-tcolorbox
+\newtcolorbox{MyboxSimpleAv}[1]{%
+ enhanced,%
+ nobeforeafter,%
+ left=0pt,right=0pt,top=\hauteurtitre,bottom=0pt,%
+ text fill,%
+ width=\largeurcarte,%
+ height=\hauteurcarte,%
+ arc=5pt,%
+ colback=white,%
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},
- }{}
- },
+ \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] (A) at (frame.north);
- \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurcarte-6mm,fill=TrameCouleur] (T1) at
- (A){\begin{minipage}{\largeurcarte-6mm}
- \begin{center}
- #1
- \end{center}
- \end{minipage}};
- \node[yshift=-0.5em-0.5\hauteurtitre] (B) at (A){};
- \ifboolKV[Cards]{Titre}{\node[fill=white] at (B) {\useKV[Cards]{NomTitre}};}{},
- }
-}
+ \coordinate[yshift=-0.5\hauteurtitre] (A) at (frame.north);%
+ \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurcarte-6mm,fill=TrameCouleur] (T1) at (A){\begin{minipage}{\largeurcarte-6mm}%
+ \begin{center}%
+ #1%
+ \end{center}%
+ \end{minipage}};%
+ \node[yshift=-0.5em-0.5\hauteurtitre] (B) at (A){};%
+ \ifboolKV[Cards]{Titre}{\node[fill=white] at (B) {\useKV[Cards]{NomTitre}};}{},%
+ }%
+}%
\newtcolorbox{MyboxSimpleAr}[1]{%
- enhanced,
- nobeforeafter,
- left=0pt,right=0pt,top=\hauteurtitre,bottom=0pt,
- text fill,
- width=\largeurcarte,
- height=\hauteurcarte,
- arc=5pt,
- colback=white,
+ enhanced,%
+ nobeforeafter,%
+ left=0pt,right=0pt,top=\hauteurtitre,bottom=0pt,%
+ text fill,%
+ width=\largeurcarte,%
+ height=\hauteurcarte,%
+ arc=5pt,%
+ colback=white,%
underlay={%
\ifboolKV[Cards]{BackgroundAr}{%
\begin{tcbclipinterior}
@@ -14403,79 +16453,78 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
height=\tcb@height,
width=\tcb@width,
]{\useKV[Cards]{ImageAr}}};
- \end{tcbclipinterior},
+ \end{tcbclipinterior},%
}{}
- },
+ },%
overlay unbroken and first={%
- \coordinate[yshift=-0.5\hauteurtitre] (A) at (frame.north);
- \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurcarte-6mm,fill=TrameCouleur] (T1) at
- (A){\begin{minipage}{\largeurcarte-6mm}
- \begin{center}
- #1
- \end{center}
- \end{minipage}};
- %\node[yshift=-1em] (B) at (A){};
- %\ifboolKV[Cards]{Titre}{\node[fill=white] at (B) {\useKV[Cards]{NomTitre}};}{},
- }
-}
+ \coordinate[yshift=-0.5\hauteurtitre] (A) at (frame.north);%
+ \node[rounded corners, draw=black, rectangle,minimum height=1cm,text width=\largeurcarte-6mm,fill=TrameCouleur] (T1) at (A){\begin{minipage}{\largeurcarte-6mm}%
+ \begin{center}%
+ #1%
+ \end{center}%
+ \end{minipage}};%
+ % \node[yshift=-1em] (B) at (A){};
+ % \ifboolKV[Cards]{Titre}{\node[fill=white] at (B) {\useKV[Cards]{NomTitre}};}{},
+ }%
+}%
\makeatother
-\newlength{\largeurcards}
-\newlength{\hauteurcards}
-\newlength{\largeurcarte}
-\newlength{\hauteurcarte}
-\newlength{\hauteurtitre}
-\newlength{\largeurtitre}
+\newlength{\largeurcards}%
+\newlength{\hauteurcards}%
+\newlength{\largeurcarte}%
+\newlength{\hauteurcarte}%
+\newlength{\hauteurtitre}%
+\newlength{\largeurtitre}%
-\newlength{\margeh}
-\newlength{\margev}
+\newlength{\margeh}%
+\newlength{\margev}%
\NewEnviron{Trame}{%
\begin{tikzpicture}[remember picture,overlay]
% quadrillages horizontal et vertical
- \coordinate[yshift=-\margev] (A) at (current page.north west);
- \coordinate[yshift=-\margev] (B) at (current page.north east);
- \coordinate[yshift=-\hauteurcards] (A1) at (A);
- \coordinate[yshift=-\hauteurcards] (B1) at (B);
- \coordinate[yshift=-\hauteurcards] (A2) at (A1);
- \coordinate[yshift=-\hauteurcards] (B2) at (B1);
- \coordinate[yshift=-\hauteurcards] (A3) at (A2);
- \coordinate[yshift=-\hauteurcards] (B3) at (B2);
- \coordinate[yshift=-\hauteurcards] (A4) at (A3);
- \coordinate[yshift=-\hauteurcards] (B4) at (B3);
- \coordinate[xshift=\margeh] (C) at (current page.north west);
- \coordinate[xshift=\margeh] (D) at (current page.south west);
- \coordinate[xshift=\largeurcards] (C1) at (C);
- \coordinate[xshift=\largeurcards] (D1) at (D);
- \coordinate[xshift=\largeurcards] (C2) at (C1);
- \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 (C)--(D);
- \draw (C1)--(D1);
- \draw (C2)--(D2);
- \draw (C3)--(D3);
+ \coordinate[yshift=-\margev] (A) at (current page.north west);%
+ \coordinate[yshift=-\margev] (B) at (current page.north east);%
+ \coordinate[yshift=-\hauteurcards] (A1) at (A);%
+ \coordinate[yshift=-\hauteurcards] (B1) at (B);%
+ \coordinate[yshift=-\hauteurcards] (A2) at (A1);%
+ \coordinate[yshift=-\hauteurcards] (B2) at (B1);%
+ \coordinate[yshift=-\hauteurcards] (A3) at (A2);%
+ \coordinate[yshift=-\hauteurcards] (B3) at (B2);%
+ \coordinate[yshift=-\hauteurcards] (A4) at (A3);%
+ \coordinate[yshift=-\hauteurcards] (B4) at (B3);%
+ \coordinate[xshift=\margeh] (C) at (current page.north west);%
+ \coordinate[xshift=\margeh] (D) at (current page.south west);%
+ \coordinate[xshift=\largeurcards] (C1) at (C);%
+ \coordinate[xshift=\largeurcards] (D1) at (D);%
+ \coordinate[xshift=\largeurcards] (C2) at (C1);%
+ \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 (C)--(D);%
+ \draw (C1)--(D1);%
+ \draw (C2)--(D2);%
+ \draw (C3)--(D3);%
% point pour placer les cartes
- \coordinate[xshift=\margeh+0.5\largeurcards,yshift=-0.5\hauteurcards] (Carte1) at (A);
- \coordinate[xshift=\largeurcards,yshift=0mm] (Carte2) at (Carte1);
- \coordinate[xshift=2\largeurcards,yshift=0mm] (Carte3) at (Carte1);
- \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte4) at (Carte1);
- \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte5) at (Carte2);
- \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte6) at (Carte3);
- \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
- \end{tikzpicture}
-}
+ \coordinate[xshift=\margeh+0.5\largeurcards,yshift=-0.5\hauteurcards] (Carte1) at (A);%
+ \coordinate[xshift=\largeurcards,yshift=0mm] (Carte2) at (Carte1);%
+ \coordinate[xshift=2\largeurcards,yshift=0mm] (Carte3) at (Carte1);%
+ \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte4) at (Carte1);%
+ \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte5) at (Carte2);%
+ \coordinate[xshift=0mm,yshift=-\hauteurcards] (Carte6) at (Carte3);%
+ \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%
+ \end{tikzpicture}%
+}%
\setKVdefault[Cards]{Largeur=59,Hauteur=89,HauteurTheme=15,Marge=4,Landscape=false,Couleur=Cornsilk,Theme=Th\'eor\`eme\\de
- Pythagore,ThemeSol=Solution,Trame=false,Titre=false,NomTitre=Jeu 1,Loop,BackgroundAv=false,BackgroundAr=false,ImageAv=4813762.jpg,ImageAr=4813762.jpg,AffichageSolution=true}
+ Pythagore,ThemeSol=Solution,Trame=false,Titre=false,NomTitre=Jeu 1,Loop,JaiQuia=false,BackgroundAv=false,BackgroundAr=false,ImageAv=4813762.jpg,ImageAr=4813762.jpg,AffichageSolution=true}%
\newcommand\Cartes[2][]{%
\useKVdefault[Cards]%
@@ -14489,88 +16538,111 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
\setlength{\hauteurcards}{65mm}%
\setlength{\margeh}{(297mm-3\largeurcards)/2}%
\setlength{\margev}{(210mm-3\hauteurcards)/2}%
- }{
+ }{%
\setlength{\hauteurcarte}{\fpeval{\useKV[Cards]{Hauteur}-\useKV[Cards]{Marge}}mm}%
\setlength{\largeurcarte}{\fpeval{\useKV[Cards]{Largeur}-\useKV[Cards]{Marge}}mm}%
- \setlength{\largeurcards}{65mm}
- \setlength{\hauteurcards}{95mm}
- \setlength{\margeh}{(210mm-3\largeurcards)/2}
- \setlength{\margev}{(297mm-3\hauteurcards)/2}
- }
+ \setlength{\largeurcards}{65mm}%
+ \setlength{\hauteurcards}{95mm}%
+ \setlength{\margeh}{(210mm-3\largeurcards)/2}%
+ \setlength{\margev}{(297mm-3\hauteurcards)/2}%
+ }%
\setlength{\hauteurtitre}{\fpeval{\useKV[Cards]{HauteurTheme}}mm}%
\setlength{\largeurtitre}{\fpeval{(\useKV[Cards]{Largeur}-\useKV[Cards]{Marge}-9)/2}mm}%
- \colorlet{TexteCouleur}{black}
- \colorlet{TrameCouleur}{\useKV[Cards]{Couleur}}
- \ifboolKV[Cards]{Loop}{%
+ \colorlet{TexteCouleur}{black}%
+ \colorlet{TrameCouleur}{\useKV[Cards]{Couleur}}%
+ \ifboolKV[Cards]{JaiQuia}{%
\ifboolKV[Cards]{Trame}{%
\clearpage%
\thispagestyle{empty}%
\begin{Trame}
\multido{\i=1+1}{9}{%
\node at (Carte\i) {%
- \begin{Mybox}{\ListeCards[\i,1]}{\useKV[Cards]{Theme}}{\ListeCards[\i,2]}%
- \ListeCards[\i,3]%
- \end{Mybox}%
+ \begin{MyboxJQ}{\ListeCards[\i,1]}{\ListeCards[\i,2]}%
+ %%
+ \end{MyboxJQ}%
};%
}%
\end{Trame}%
\clearpage%
}{%
- \begin{Mybox}{\ListeCards[1,1]}{\useKV[Cards]{Theme}}{\ListeCards[1,2]}%
- \ListeCards[1,3]%
- \end{Mybox}%
+ \begin{MyboxJQ}{\ListeCards[1,1]}{\ListeCards[1,2]}%
+ %%
+ \end{MyboxJQ}%
}%
}{%
- \ifboolKV[Cards]{Trame}{%
- \clearpage%
- \thispagestyle{empty}%
- \begin{Trame}
- \multido{\i=1+1}{9}{%
- \node[] at (Carte\i) {%
- \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}%
- \ListeCards[\i,1]%
- \end{MyboxSimpleAv}%
- };%
- }%
- \end{Trame}%
- \clearpage%
- \thispagestyle{empty}%
- \begin{Trame}
- \multido{\i=1+1}{3}{%
- \node at (Carte\i) {%
- \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
- \ListeCards[\fpeval{4-\i},2]%
- \end{MyboxSimpleAr}%
- };%
- }%
- \multido{\i=4+1}{3}{%
- \node at (Carte\i) {%
- \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
- \ListeCards[\fpeval{10-\i},2]%
- \end{MyboxSimpleAr}%
- };%
- }%
- \multido{\i=7+1}{3}{%
- \node at (Carte\i) {%
- \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
- \ListeCards[\fpeval{16-\i},2]%
- \end{MyboxSimpleAr}%
- };%
- }%
- \end{Trame}%
- \clearpage%
+ \ifboolKV[Cards]{Loop}{%
+ \ifboolKV[Cards]{Trame}{%
+ \clearpage%
+ \thispagestyle{empty}%
+ \begin{Trame}
+ \multido{\i=1+1}{9}{%
+ \node at (Carte\i) {%
+ \begin{Mybox}{\ListeCards[\i,1]}{\useKV[Cards]{Theme}}{\ListeCards[\i,2]}%
+ \ListeCards[\i,3]%
+ \end{Mybox}%
+ };%
+ }%
+ \end{Trame}%
+ \clearpage%
+ }{%
+ \begin{Mybox}{\ListeCards[1,1]}{\useKV[Cards]{Theme}}{\ListeCards[1,2]}%
+ \ListeCards[1,3]%
+ \end{Mybox}%
+ }%
}{%
- \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}%
- \ListeCards[1,1]%
- \end{MyboxSimpleAv}
- \ifboolKV[Cards]{AffichageSolution}{%
- \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
- \ListeCards[1,2]%
- \end{MyboxSimpleAr}
- }{}%
+ \ifboolKV[Cards]{Trame}{%
+ \clearpage%
+ \thispagestyle{empty}%
+ \begin{Trame}
+ \multido{\i=1+1}{9}{%
+ \node[] at (Carte\i) {%
+ \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}%
+ \ListeCards[\i,1]%
+ \end{MyboxSimpleAv}%
+ };%
+ }%
+ \end{Trame}%
+ \ifboolKV[Cards]{AffichageSolution}{%
+ \clearpage%
+ \thispagestyle{empty}%
+ \begin{Trame}
+ \multido{\i=1+1}{3}{%
+ \node at (Carte\i) {%
+ \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
+ \ListeCards[\fpeval{4-\i},2]%
+ \end{MyboxSimpleAr}%
+ };%
+ }%
+ \multido{\i=4+1}{3}{%
+ \node at (Carte\i) {%
+ \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
+ \ListeCards[\fpeval{10-\i},2]%
+ \end{MyboxSimpleAr}%
+ };%
+ }%
+ \multido{\i=7+1}{3}{%
+ \node at (Carte\i) {%
+ \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
+ \ListeCards[\fpeval{16-\i},2]%
+ \end{MyboxSimpleAr}%
+ };%
+ }%
+ \end{Trame}%
+ \clearpage%
+ }{}%
+ }{%
+ \begin{MyboxSimpleAv}{\useKV[Cards]{Theme}}%
+ \ListeCards[1,1]%
+ \end{MyboxSimpleAv}%
+ \ifboolKV[Cards]{AffichageSolution}{%
+ \begin{MyboxSimpleAr}{\useKV[Cards]{ThemeSol}}%
+ \ListeCards[1,2]%
+ \end{MyboxSimpleAr}%
+ }{}%
+ }%
}%
}%
-}
+}%
\newcommand\SolutionCarte[2]{%
\begin{center}
@@ -14769,76 +16841,201 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
%%%%
% Prog de calculs "simples"
%%%%
-\setKVdefault[ClesProg]{Ecart=2em,SansCalcul=false,Direct=true}
+\setKVdefault[ClesProg]{%
+ Ecart=2em,%
+ Direct,%
+ SansCalcul=false,%
+ Application=false,
+ Details=false,
+ Enonce=false,
+ Nom={},
+ CouleurCadre=black,%
+ CouleurFond=gray!10,%
+ Largeur={.95\linewidth},%
+ Epaisseur=.75pt,%
+ Pointilles=0,
+ ThemePerso=false,
+}
-\newcounter{nbprog}
-\setcounter{nbprog}{0}%
+\newcounter{NBprog}%
+\setcounter{NBprog}{0}%
+
+\newlength{\PointillesClesProg}%
\newcommand\ProgCalcul[2][]{%
% #1 : cl\'es
% #2 : \'etapes
\useKVdefault[ClesProg]%
\setKV[ClesProg]{#1}%
- \setsepchar[*]{,* }\ignoreemptyitems%
- \readlist*\ListeProg{#2}%
- \stepcounter{nbprog}%
- \xdef\NbDepart{\ListeProg[1]}%
- \ifboolKV[ClesProg]{SansCalcul}{%
- $\NbDepart$\foreachitem\compteur\in\ListeProg[2]{%
- \hspace{0.2em}\tikzmark{A-\thenbprog-\compteurcnt}\hspace{\useKV[ClesProg]{Ecart}}\tikzmark{B-\thenbprog-\compteurcnt}\hspace{0.2em}$\ListeProg[3,\compteurcnt]$%
- }%
- \begin{tikzpicture}[remember picture, overlay]
- \foreachitem\compteur\in\ListeProg[2]{%
- \edef\Test{\ListeProg[2,\compteurcnt]}
- \expandarg%
- \StrSubstitute{\Test}{^}{\empty\dots{}^}[\tempa]
- \StrSubstitute{\tempa}{**}{^}[\tempab]
- \StrSubstitute{\tempab}{*}{\times}[\tempac]
- \StrSubstitute{\tempac}{/}{\div}[\tempad]
- \draw[-stealth,transform canvas={yshift=0.25em}] (pic cs:A-\thenbprog-\compteurcnt) --
- node[above]{\scriptsize$\tempad$}(pic cs:B-\thenbprog-\compteurcnt);
- }
- \end{tikzpicture}
- }{%
- \num{\NbDepart}\foreachitem\compteur\in\ListeProg[2]{%
- \hspace{0.2em}\tikzmark{A-\thenbprog-\compteurcnt}\hspace{\useKV[ClesProg]{Ecart}}\tikzmark{B-\thenbprog-\compteurcnt}\xdef\NbDepart{\fpeval{(\NbDepart)\ListeProg[2,\compteurcnt]}}\hspace{0.2em}\num{\NbDepart}%
+ \ifboolKV[ClesProg]{ThemePerso}{}{%
+ \tcbset{ProgCalcul/.style={%
+ boxsep=1mm,
+ bottom=.75mm,
+ middle=2mm,
+ boxrule={\useKV[ClesProg]{Epaisseur}},
+ text width={\useKV[ClesProg]{Largeur}},
+ colframe={\useKV[ClesProg]{CouleurCadre}},
+ colback={\useKV[ClesProg]{CouleurFond}},
+ halign upper=center
+ }%
}%
- \ifboolKV[ClesProg]{Direct}{%
- \begin{tikzpicture}[remember picture, overlay]
- \foreachitem\compteur\in\ListeProg[2]{%
- \edef\Test{\ListeProg[2,\compteurcnt]}
- \expandarg%
- \StrSubstitute{\Test}{^}{\empty\dots{}^}[\tempa]
- \StrSubstitute{\tempa}{**}{^}[\tempab]
- \StrSubstitute{\tempab}{*}{\times}[\tempac]
- \StrSubstitute{\tempac}{/}{\div}[\tempad]
- \draw[-stealth,transform canvas={yshift=0.25em}] (pic cs:A-\thenbprog-\compteurcnt) --
- node[above]{\scriptsize$\tempad$}(pic
- cs:B-\thenbprog-\compteurcnt);
+ }%
+ \ifboolKV[ClesProg]{Application}{%
+ % % by Thomas Dehon and cp
+ \setsepchar[*]{§*,}
+ % \setsepchar[*]{,* }%
+ \ignoreemptyitems%
+ \readlist*\ListeTotale{#2}%
+ \xdef\foo{\ListeTotale[1]}%
+ \xdef\faa{\ListeTotale[2]}%
+ %%
+ \setsepchar{,}% \ignoreemptyitems%
+ \readlist*\ListeEtapes{\foo}%
+ \setsepchar[*]{,* }\ignoreemptyitems%
+ \readlist*\ListeProg{\faa}%
+ \begin{tcolorbox}[%
+ ProgCalcul,%
+ ]
+ \ifthenelse{\equal{\useKV[ClesProg]{Nom}}{}}%
+ {}%
+ {%
+ {\color{\useKV[ClesProg]{CouleurCadre}}{\bfseries\useKV[ClesProg]{Nom}}}%
+ \tcblower
+ }%
+ \ifboolKV[ClesProg]{SansCalcul}{%
+ \begin{enumerate}
+ \item Choisir un nombre~\pointilles[]~$\ListeProg[1]$%
+ \foreachitem\etape\in\ListeEtapes{%
+ \item \etape~\pointilles[]~$\ListeProg[3,\etapecnt]$
+ }%
+ \end{enumerate}
+ }{\begin{enumerate}
+ \item Choisir un nombre~\pointilles[]~\xdef\NbDepart{\ListeProg[1]}\num{\NbDepart}
+ \foreachitem\etape\in\ListeEtapes{%
+ \item \etape~\pointilles[]~\edef\Test{\ListeProg[2,\etapecnt]}%
+ \expandarg%
+ \StrSubstitute{\Test}{^}{\empty\dots{}^}[\tempa]%
+ \StrSubstitute{\tempa}{**}{^}[\tempab]%
+ \StrSubstitute{\tempab}{*}{\times}[\tempac]%
+ \StrSubstitute{\tempac}{/}{\div}[\tempad]%
+ $\ifboolKV[ClesProg]{Details}{\num{\NbDepart}\tempad=}{}\xdef\NbDepart{\fpeval{(\NbDepart)\ListeProg[2,\etapecnt]}}\num{\NbDepart}$%
+ }%
+ \end{enumerate}
}
- \end{tikzpicture}
+ \end{tcolorbox}
+ }{%
+ \ifboolKV[ClesProg]{Enonce}{%
+ % by Thomas Dehon
+ \setsepchar[*]{,* }%
+ \ignoreemptyitems%
+ \readlist*\ListeEtapes{#2}%
+ \begin{tcolorbox}[%
+ ProgCalcul,%
+ ]
+ \ifthenelse{\equal{\useKV[ClesProg]{Nom}}{}}%
+ {}%
+ {%
+ {\color{\useKV[ClesProg]{CouleurCadre}}{\bfseries\useKV[ClesProg]{Nom}}}%
+ \tcblower
+ }%
+ \begin{enumerate}
+ \foreachitem\etape\in\ListeEtapes{%
+ \item \etape
+ \ifthenelse{\equal{\useKV[ClesProg]{Pointilles}}{0}}%
+ {}%
+ {%
+ \setlength{\PointillesClesProg}{\useKV[ClesProg]{Pointilles}}
+ \hfill \pointilles[\PointillesClesProg]%
+ }%
+ }
+ \end{enumerate}
+ \end{tcolorbox}
}{%
- \begin{tikzpicture}[remember picture, overlay]
- \foreachitem\compteur\in\ListeProg[2]{%
- \edef\Test{\ListeProg[2,\compteurcnt]}
- \expandarg%
- \StrSubstitute{\Test}{^2}{\empty\sqrt{\dots{}}}[\tempa]
- \StrSubstitute{\tempa}{**}{^}[\tempab]
- \StrSubstitute{\tempab}{*}{\div}[\tempac]
- \StrSubstitute{\tempac}{/}{\times}[\tempad]
- \StrSubstitute{\tempad}{-}{+}[\tempae]
- \StrSubstitute{\tempae}{++}{-}[\tempaf]
- \draw[-stealth,transform canvas={yshift=0.25em}] (pic cs:B-\thenbprog-\compteurcnt) -- node[above]{\scriptsize$\tempaf$}(pic cs:A-\thenbprog-\compteurcnt);
- }
- \end{tikzpicture}
+ \setsepchar[*]{,* }\ignoreemptyitems%
+ \readlist*\ListeProg{#2}%
+ \stepcounter{NBprog}%
+ \xdef\NbDepart{\ListeProg[1]}%
+ \ifboolKV[ClesProg]{SansCalcul}{%
+ $\NbDepart$\foreachitem\compteur\in\ListeProg[2]{%
+ \hspace{0.2em}\tikzmark{A-\theNBprog-\compteurcnt}\hspace{\useKV[ClesProg]{Ecart}}\tikzmark{B-\theNBprog-\compteurcnt}\hspace{0.2em}$\ListeProg[3,\compteurcnt]$%
+ }%
+ \begin{tikzpicture}[remember picture, overlay]
+ \foreachitem\compteur\in\ListeProg[2]{%
+ \edef\Test{\ListeProg[2,\compteurcnt]}
+ \expandarg%
+ \StrSubstitute{\Test}{^}{\empty\dots{}^}[\tempa]%
+ \StrSubstitute{\tempa}{**}{^}[\tempab]%
+ \StrSubstitute{\tempab}{*}{\times}[\tempac]%
+ \StrSubstitute{\tempac}{/}{\div}[\tempad]%
+ \draw[-stealth,transform canvas={yshift=0.25em}] (pic cs:A-\theNBprog-\compteurcnt) --
+ node[above]{\scriptsize$\tempad$}(pic cs:B-\theNBprog-\compteurcnt);
+ }
+ \end{tikzpicture}
+ }{%
+ \num{\NbDepart}\foreachitem\compteur\in\ListeProg[2]{%
+ \hspace{0.2em}\tikzmark{A-\theNBprog-\compteurcnt}\hspace{\useKV[ClesProg]{Ecart}}\tikzmark{B-\theNBprog-\compteurcnt}\xdef\NbDepart{\fpeval{(\NbDepart)\ListeProg[2,\compteurcnt]}}\hspace{0.2em}\num{\NbDepart}%
+ }%
+ \ifboolKV[ClesProg]{Direct}{%
+ \begin{tikzpicture}[remember picture, overlay]
+ \foreachitem\compteur\in\ListeProg[2]{%
+ \edef\Test{\ListeProg[2,\compteurcnt]}
+ \expandarg%
+ \StrSubstitute{\Test}{^}{\empty\dots{}^}[\tempa]%
+ \StrSubstitute{\tempa}{**}{^}[\tempab]%
+ \StrSubstitute{\tempab}{*}{\times}[\tempac]%
+ \StrSubstitute{\tempac}{/}{\div}[\tempad]%
+ \draw[-stealth,transform canvas={yshift=0.25em}] (pic cs:A-\theNBprog-\compteurcnt) --
+ node[above]{\scriptsize$\tempad$}(pic
+ cs:B-\theNBprog-\compteurcnt);
+ }
+ \end{tikzpicture}
+ }{%
+ \begin{tikzpicture}[remember picture, overlay]
+ \foreachitem\compteur\in\ListeProg[2]{%
+ \edef\Test{\ListeProg[2,\compteurcnt]}
+ \expandarg%
+ \StrSubstitute{\Test}{^2}{\empty\sqrt{\dots{}}}[\tempa]%
+ \StrSubstitute{\tempa}{**}{^}[\tempab]%
+ \StrSubstitute{\tempab}{*}{\div}[\tempac]%
+ \StrSubstitute{\tempac}{/}{\times}[\tempad]%
+ \StrSubstitute{\tempad}{-}{+}[\tempae]%
+ \StrSubstitute{\tempae}{++}{-}[\tempaf]%
+ \draw[-stealth,transform canvas={yshift=0.25em}] (pic cs:B-\theNBprog-\compteurcnt) -- node[above]{\scriptsize$\tempaf$}(pic cs:A-\theNBprog-\compteurcnt);
+ }
+ \end{tikzpicture}
+ }%
+ }%
}%
}%
-}
+}%
%%%
% Papiers
%%%
-\setKVdefault[Papiers]{Cinq=true,Seyes=false,Isometrique=false,Millimetre=false,Triangle=false,Largeur=5,Hauteur=4,Couleur=black,Grille=-1,PageEntiere=false,ZoneTexte=false}%
+\setKVdefault[Papiers]{Cinq=true,Seyes=false,Isometrique=false,Millimetre=false,Triangle=false,Largeur=5,Hauteur=4,Couleur=black,Grille=-1,PageEntiere=false,ZoneTexte=false,Baseline=false}%
+
+%\def\MPBaseLineSkip#1#2#3{%à retravailler : ne fonctionne pas :(
+% %
+% \ifluatex
+% \mplibforcehmode
+% \begin{mplibcode}
+% path horizon,verticon;
+% horizon=(0,0)--(#1*cm,0);
+% %verticon=(0,0)--(0,#2*cm);
+% drawoptions(withcolor #3);
+% %for k=0 step 0.5 until #1:
+% %draw verticon shifted((k*cm,0));
+% %endfor;
+% for k=(#2-(\mpdim{1.6ex}/1cm)) step (-\mpdim{\baselineskip}/1cm) until 0:
+% draw horizon shifted((0,k*cm));
+% endfor;
+% drawoptions(withcolor blue);
+% for k=#2 step (-\mpdim{\baselineskip}/1cm) until 0:
+% draw horizon shifted((0,k*cm));
+% endfor;
+% \end{mplibcode}
+% \fi
+%}
\def\MPGrille#1#2#3#4{%
\ifluatex%
@@ -15123,15 +17320,19 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
\node[anchor=south west,inner sep=0pt,transform canvas={xshift=\PapierLeft,yshift=\PapierBottom}] at (current page.south west) {%
\xintifboolexpr{\useKV[Papiers]{Grille}>0}{%
\MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}%
- }{\ifboolKV[Papiers]{Triangle}{%
- \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Millimetre}{%
- \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Isometrique}{%
- \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Seyes}{%
- \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Baseline}{%
+ \MPBaseLineSkip{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{%
+ \ifboolKV[Papiers]{Triangle}{%
+ \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Millimetre}{%
+ \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Isometrique}{%
+ \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Seyes}{%
+ \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }%
}%
}%
}%
@@ -15166,15 +17367,19 @@ Unite={},Largeur=1cm,Precision=2,Donnee=Valeurs,Effectif=Effectif,Grille=false,O
}{%
\xintifboolexpr{\useKV[Papiers]{Grille}>0}{%
\MPGrille{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}{\PapierGrille}%
- }{\ifboolKV[Papiers]{Triangle}{%
- \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Millimetre}{%
- \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Isometrique}{%
- \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\ifboolKV[Papiers]{Seyes}{%
- \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
- }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Baseline}{%
+ \MPBaseLineSkip{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{%
+ \ifboolKV[Papiers]{Triangle}{%
+ \MPTriangulaire{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Millimetre}{%
+ \MPMillimetre{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Isometrique}{%
+ \MPIsometrique{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\ifboolKV[Papiers]{Seyes}{%
+ \MPSeyes{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }{\MPCinq{\PapierLargeur}{\PapierHauteur}{\PapierCouleur}%
+ }%
}%
}%
}%
diff --git a/macros/latex/contrib/profcollege/metapost/PfCLabyNombre.mp b/macros/latex/contrib/profcollege/metapost/PfCLabyNombre.mp
new file mode 100644
index 0000000000..e6877ef34e
--- /dev/null
+++ b/macros/latex/contrib/profcollege/metapost/PfCLabyNombre.mp
@@ -0,0 +1,211 @@
+%Pile des cases du chemin
+pair PileChemin[];
+numeric indiceChemin;
+indiceChemin=0;
+
+vardef RAZPileChemin=
+ pair PileChemin[];
+ indiceChemin:=0;
+enddef;
+
+def PushChemin(expr tt)=
+ if indiceChemin<1:
+ PileChemin[1]:=tt;
+ indiceChemin:=1;
+ else:
+ PileChemin[indiceChemin+1]:=tt;
+ indiceChemin:=indiceChemin+1;
+ fi;
+enddef;
+
+def PopChemin=
+ if indiceChemin<1:
+ RAZPileChemin;
+ for k=-1 upto LargeurLaby:
+ for l=-1 upto LongueurLaby:
+ if (k=-1) or (k=LargeurLaby) or (l=-1) or (l=LongueurLaby):
+ CaseExploree[k][l]:=true;
+ else:
+ CaseExploree[k][l]:=false;
+ fi;
+ endfor;
+ endfor;
+ Mobile:=Depart;
+ PushChemin((choixligneD,choixcolonneD));
+ CaseExploree[choixligneD][choixcolonneD]:=true;
+ VoisinDispo(choixligneD,choixcolonneD);
+ else:
+ if indiceChemin>0:
+ CaseExploree[xpart(PileChemin[indiceChemin])][ypart(PileChemin[indiceChemin])]:=true;
+ fi;
+ indiceChemin:=indiceChemin-1;
+ fi;
+enddef;
+
+%Pile des cases voisines de la case parcourue
+pair PileVoisin[];
+numeric indiceVoisin;
+indiceVoisin=0;
+
+vardef RAZPileVoisin=
+ indiceVoisin:=0;
+enddef;
+
+def PushVoisin(expr tt)=
+ if indiceVoisin<1:
+ PileVoisin[1]:=tt;
+ indiceVoisin:=1;
+ else:
+ PileVoisin[indiceVoisin+1]:=tt;
+ indiceVoisin:=indiceVoisin+1;
+ fi;
+enddef;
+
+def PopVoisin=
+ if indiceVoisin<0:
+ %message("La pile n'existe pas");
+ else:
+ indiceVoisin:=indiceVoisin-1;
+ fi;
+enddef;
+
+vardef VoisinDispo(expr la,lo)=
+ RAZPileVoisin;
+ numeric nbvoisin;
+ nbvoisin=0;
+ if (la>-1) and (la<LargeurLaby) and (lo>-1) and (lo<LongueurLaby):
+ if CaseExploree[la+1][lo]=false:
+ nbvoisin:=nbvoisin+1;
+ PushVoisin((la+1,lo));
+ fi;
+ if CaseExploree[la-1][lo]=false:
+ nbvoisin:=nbvoisin+1;
+ PushVoisin((la-1,lo));
+ fi;
+ if CaseExploree[la][lo+1]=false:
+ nbvoisin:=nbvoisin+1;
+ PushVoisin((la,lo+1));
+ fi;
+ if CaseExploree[la][lo-1]=false:
+ nbvoisin:=nbvoisin+1;
+ PushVoisin((la,lo-1));
+ fi;
+ fi;
+enddef;
+
+vardef InitialisationLabyrinthe(expr long,larg)=
+ LargeurLaby:=larg;
+ LongueurLaby:=long;
+ pair M[][],N[][];%centre de la case, coinbg de la case
+ boolean CaseExploree[][];%Case Exploree ou pas
+ %on initialise les cases comme non explorées pour celles qui sont à l'intérieur du labyrinthe
+ %n=0;
+ for k=-1 upto larg:
+ for l=-1 upto long:
+ M[k][l]:=u*(0.5,-0.5)+u*(l,-k);
+ N[k][l]:=u*(l,-k-1);
+ if (k=-1) or (k=larg) or (l=-1) or (l=long):
+ CaseExploree[k][l]:=true;
+ else:
+ CaseExploree[k][l]:=false;
+ fi;
+ endfor;
+ endfor;
+enddef;
+
+vardef TraceLabyrinthe=
+ save $;
+ picture $;
+ $=image(
+ if Murs:
+ for k=1 upto LargeurLaby:
+ trace murgauche shifted(u*(0,-k));
+ endfor;
+ for k=0 upto LongueurLaby-1:
+ trace murhaut shifted(u*(k,-1));
+ endfor;
+ for k=1 upto LargeurLaby:
+ trace murdroit shifted(u*(LongueurLaby-1,-k));
+ endfor;
+ for k=0 upto LongueurLaby-1:
+ trace murbas shifted(u*(k,-LargeurLaby));
+ endfor;
+ for k=1 upto LargeurLaby-1:
+ for l=1 upto LongueurLaby-1:
+ trace Separation shifted(u*(l,-k));
+ endfor;
+ endfor;
+ else:
+ for k=0 upto LargeurLaby:
+ trace u*(0,0-k)--u*(LongueurLaby,0-k);
+ endfor;
+ for k=0 upto LongueurLaby:
+ trace u*(0+k,0)--u*(0+k,-LargeurLaby);
+ endfor;
+ fi;
+ );
+ $
+enddef;
+
+vardef murgauche=
+ save $;
+ picture $;
+ path pl[];
+ $=image(
+ %pl1=(0,0)--u*(0.15,0)--u*(0.15,0.2){dir180}..u*(0.08+uniformdeviate(0.05),0.2+uniformdeviate(0.1))..u*(0.09+uniformdeviate(0.015),0.3+uniformdeviate(0.2))..u*(0.08+uniformdeviate(0.04),0.5+uniformdeviate(0.2))..{dir0}u*(0.15,0.8)--u*(0.15,1)--u*(0,1)--cycle;
+ pl1=(0,0)--u*(0.1,0)..u*(0.02+uniformdeviate(0.05),0.25)..u*(0.1-uniformdeviate(0.03),0.5)..u*(0.02+uniformdeviate(0.05),0.75)..u*(0.1,1)--u*(0,1)--cycle;
+ remplis pl[1];
+ trace pl[1];
+ );
+ $
+enddef;%ok
+
+vardef murhaut=
+ save $;
+ picture $;
+ path pl[];
+ $=image(
+ pl1=u*(0,0.8)--u*(0,1)--u*(1,1)--u*(1,0.8)..u*(0.8+uniformdeviate(0.1),0.8+uniformdeviate(0.1))..u*(0.4+uniformdeviate(0.2),0.8-uniformdeviate(0.1))..u*(0.2+uniformdeviate(0.2),0.8+uniformdeviate(0.1))--cycle;
+ remplis pl[1];
+ trace pl[1];
+ );
+ $
+enddef;
+
+vardef murdroit=
+ save $;
+ picture $;
+ path pl[];
+ $=image(
+ pl1=u*(1,0)--u*(1-0.15,0)--u*(1-0.15,0.2){dir180}..u*(1-0.08+uniformdeviate(0.05),0.2+uniformdeviate(0.1))..u*(1-0.09+uniformdeviate(0.015),0.3+uniformdeviate(0.2))..u*(1-0.08+uniformdeviate(0.04),0.5+uniformdeviate(0.2))..{dir0}u*(1-0.15,0.8)--u*(1-0.15,1)--u*(1-0,1)--cycle;
+ remplis pl[1];
+ trace pl[1];
+ );
+ $
+enddef;%ok
+
+vardef murbas=
+ save $;
+ picture $;
+ path pl[];
+ $=image(
+ pl1=u*(0,0.2)--u*(0,0)--u*(1,0)--u*(1,0.2)..u*(0.8+uniformdeviate(0.1),0.2+uniformdeviate(0.1))..u*(0.4+uniformdeviate(0.2),0.2-uniformdeviate(0.1))..u*(0.2+uniformdeviate(0.2),0.2+uniformdeviate(0.1))--cycle;
+ remplis pl[1];
+ trace pl[1];
+ );
+ $
+enddef;
+
+vardef Separation=
+ save $;
+ picture $;
+ path pl[];
+ $=image(
+ pl1=u*(0.2,0)..u*(0.05+uniformdeviate(0.05),0.05+uniformdeviate(0.05))..u*(0,0.2)..u*(-0.1+uniformdeviate(0.05),0.05+uniformdeviate(0.05))..u*(-0.2,0)..u*(-0.1+uniformdeviate(0.05),-0.05-uniformdeviate(0.05))..u*(0,-0.2)..u*(0.05+uniformdeviate(0.05),-0.05-uniformdeviate(0.05))..cycle;
+ remplis pl[1];
+ trace pl[1];
+ );
+ $
+enddef;
+
+endinput
diff --git a/macros/latex/contrib/profcollege/metapost/PfCMosaique.mp b/macros/latex/contrib/profcollege/metapost/PfCMosaique.mp
new file mode 100644
index 0000000000..a776732aa6
--- /dev/null
+++ b/macros/latex/contrib/profcollege/metapost/PfCMosaique.mp
@@ -0,0 +1,446 @@
+%Premier ensemble de mosaique
+pair A[],O;
+path Bc[];
+picture MosaiqueUn[];
+
+for k=1 upto 8:
+ A1=u*(0,0);
+ A3-A1=u*(1,0);
+ A2=iso(A1,A3);
+ A5=rotation(A1,A3,-90);
+ A4=iso(A3,A5);
+ A7-A5=A1-A3;
+ A6=iso(A5,A7);
+ A8=iso(A7,A1);
+ O=iso(A1,A5);
+endfor;
+
+A9=A1;
+
+for k=1 upto 8:
+ Bc[k]=polygone(A[k],A[k+1],O);
+endfor;
+
+MosaiqueUn[0]=image(
+ drawoptions(withcolor gris);
+ for j=1 upto 4:
+ trace segment(A[j],A[j+4]);
+ endfor;
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+
+for l=1 upto 8:
+ MosaiqueUn[l]=image(
+ remplis Bc[l];
+ drawoptions(withcolor gris);
+ for j=1 upto 4:
+ trace segment(A[j],A[j+4]);
+ endfor;
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+endfor;
+
+p:=8;
+
+for l=1 upto 7:
+ for k=l+1 upto 8:
+ p:=p+1;
+ MosaiqueUn[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ drawoptions(withcolor gris);
+ for j=1 upto 4:
+ trace segment(A[j],A[j+4]);
+ endfor;
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+endfor;
+
+for l=1 upto 6:
+ for k=l+1 upto 7:
+ for m=k+1 upto 8:
+ p:=p+1;
+ MosaiqueUn[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ remplis Bc[m] withcolor noir;
+ drawoptions(withcolor gris);
+ for j=1 upto 4:
+ trace segment(A[j],A[j+4]);
+ endfor;
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+ endfor;
+endfor;
+
+for l=1 upto 5:
+ for k=l+1 upto 6:
+ for m=k+1 upto 7:
+ for n=m+1 upto 8:
+ p:=p+1;
+ MosaiqueUn[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ remplis Bc[m] withcolor noir;
+ remplis Bc[n] withcolor noir;
+ drawoptions(withcolor gris);
+ for j=1 upto 4:
+ trace segment(A[j],A[j+4]);
+ endfor;
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+ endfor;
+ endfor;
+endfor;
+
+for l=1 upto 4:
+ for k=l+1 upto 5:
+ for m=k+1 upto 6:
+ for n=m+1 upto 7:
+ for o=n+1 upto 8:
+ p:=p+1;
+ MosaiqueUn[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ remplis Bc[m] withcolor noir;
+ remplis Bc[n] withcolor noir;
+ remplis Bc[o] withcolor noir;
+ drawoptions(withcolor gris);
+ for j=1 upto 4:
+ trace segment(A[j],A[j+4]);
+ endfor;
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+endfor;
+
+for l=1 upto 3:
+ for k=l+1 upto 4:
+ for m=k+1 upto 5:
+ for n=m+1 upto 6:
+ for o=n+1 upto 7:
+ for r=o+1 upto 8:
+ p:=p+1;
+ MosaiqueUn[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ remplis Bc[m] withcolor noir;
+ remplis Bc[n] withcolor noir;
+ remplis Bc[o] withcolor noir;
+ remplis Bc[r] withcolor noir;
+ drawoptions(withcolor gris);
+ for j=1 upto 4:
+ trace segment(A[j],A[j+4]);
+ endfor;
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+endfor;
+
+for l=1 upto 2:
+ for k=l+1 upto 3:
+ for m=k+1 upto 4:
+ for n=m+1 upto 5:
+ for o=n+1 upto 6:
+ for r=o+1 upto 7:
+ for s=r+1 upto 8:
+ p:=p+1;
+ MosaiqueUn[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ remplis Bc[m] withcolor noir;
+ remplis Bc[n] withcolor noir;
+ remplis Bc[o] withcolor noir;
+ remplis Bc[r] withcolor noir;
+ remplis Bc[s] withcolor noir;
+ drawoptions(withcolor gris);
+ for j=1 upto 4:
+ trace segment(A[j],A[j+4]);
+ endfor;
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+endfor;
+
+for l=1 upto 1:
+ for k=l+1 upto 2:
+ for m=k+1 upto 3:
+ for n=m+1 upto 4:
+ for o=n+1 upto 5:
+ for r=o+1 upto 6:
+ for s=r+1 upto 7:
+ for t=s+1 upto 8:
+ p:=p+1;
+ MosaiqueUn[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ remplis Bc[m] withcolor noir;
+ remplis Bc[n] withcolor noir;
+ remplis Bc[o] withcolor noir;
+ remplis Bc[r] withcolor noir;
+ remplis Bc[s] withcolor noir;
+ remplis Bc[t] withcolor noir;
+ drawoptions(withcolor gris);
+ for j=1 upto 4:
+ trace segment(A[j],A[j+4]);
+ endfor;
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+endfor;
+
+% Deuxième jeu de mosaique
+pair A[],O;
+path Bc[];
+picture MosaiqueDeux[];
+
+for k=1 upto 8:
+ A1=u*(0,0);
+ A3-A1=u*(1,0);
+ A2=iso(A1,A3);
+ A5=rotation(A1,A3,-90);
+ A4=iso(A3,A5);
+ A7-A5=A1-A3;
+ A6=iso(A5,A7);
+ A8=iso(A7,A1);
+ O=iso(A1,A5);
+endfor;
+
+A9=A1;
+
+Bc[1]=polygone(A[1],A[2],A[8]);
+Bc[2]=polygone(A[8],A[2],O);
+Bc[3]=polygone(A[4],A[2],O);
+Bc[4]=polygone(A[3],A[2],A[4]);
+Bc[5]=polygone(A[5],A[4],A[6]);
+Bc[6]=polygone(A[4],A[6],O);
+Bc[7]=polygone(A[6],A[8],O);
+Bc[8]=polygone(A[6],A[7],A[8]);
+
+MosaiqueDeux[0]=image(
+ drawoptions(withcolor gris);
+ trace polygone(A2,A4,A6,A8);
+ trace segment(A8,A4);
+ trace segment(A6,A2);
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+
+for l=1 upto 8:
+ MosaiqueDeux[l]=image(
+ remplis Bc[l];
+ drawoptions(withcolor gris);
+ trace polygone(A2,A4,A6,A8);
+ trace segment(A8,A4);
+ trace segment(A6,A2);
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+endfor;
+
+p:=8;
+
+for l=1 upto 7:
+ for k=l+1 upto 8:
+ p:=p+1;
+ MosaiqueDeux[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ drawoptions(withcolor gris);
+ trace polygone(A2,A4,A6,A8);
+ trace segment(A8,A4);
+ trace segment(A6,A2);
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+endfor;
+
+for l=1 upto 6:
+ for k=l+1 upto 7:
+ for m=k+1 upto 8:
+ p:=p+1;
+ MosaiqueDeux[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ remplis Bc[m] withcolor noir;
+ drawoptions(withcolor gris);
+ trace polygone(A2,A4,A6,A8);
+ trace segment(A8,A4);
+ trace segment(A6,A2);
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+ endfor;
+endfor;
+
+for l=1 upto 5:
+ for k=l+1 upto 6:
+ for m=k+1 upto 7:
+ for n=m+1 upto 8:
+ p:=p+1;
+ MosaiqueDeux[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ remplis Bc[m] withcolor noir;
+ remplis Bc[n] withcolor noir;
+ drawoptions(withcolor gris);
+trace polygone(A2,A4,A6,A8);
+ trace segment(A8,A4);
+ trace segment(A6,A2);
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+ endfor;
+ endfor;
+endfor;
+
+for l=1 upto 4:
+ for k=l+1 upto 5:
+ for m=k+1 upto 6:
+ for n=m+1 upto 7:
+ for o=n+1 upto 8:
+ p:=p+1;
+ MosaiqueDeux[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ remplis Bc[m] withcolor noir;
+ remplis Bc[n] withcolor noir;
+ remplis Bc[o] withcolor noir;
+ drawoptions(withcolor gris);
+trace polygone(A2,A4,A6,A8);
+ trace segment(A8,A4);
+ trace segment(A6,A2);
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+endfor;
+
+for l=1 upto 3:
+ for k=l+1 upto 4:
+ for m=k+1 upto 5:
+ for n=m+1 upto 6:
+ for o=n+1 upto 7:
+ for r=o+1 upto 8:
+ p:=p+1;
+ MosaiqueDeux[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ remplis Bc[m] withcolor noir;
+ remplis Bc[n] withcolor noir;
+ remplis Bc[o] withcolor noir;
+ remplis Bc[r] withcolor noir;
+ drawoptions(withcolor gris);
+trace polygone(A2,A4,A6,A8);
+ trace segment(A8,A4);
+ trace segment(A6,A2);
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+endfor;
+
+for l=1 upto 2:
+ for k=l+1 upto 3:
+ for m=k+1 upto 4:
+ for n=m+1 upto 5:
+ for o=n+1 upto 6:
+ for r=o+1 upto 7:
+ for s=r+1 upto 8:
+ p:=p+1;
+ MosaiqueDeux[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ remplis Bc[m] withcolor noir;
+ remplis Bc[n] withcolor noir;
+ remplis Bc[o] withcolor noir;
+ remplis Bc[r] withcolor noir;
+ remplis Bc[s] withcolor noir;
+ drawoptions(withcolor gris);
+trace polygone(A2,A4,A6,A8);
+ trace segment(A8,A4);
+ trace segment(A6,A2);
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+endfor;
+
+for l=1 upto 1:
+ for k=l+1 upto 2:
+ for m=k+1 upto 3:
+ for n=m+1 upto 4:
+ for o=n+1 upto 5:
+ for r=o+1 upto 6:
+ for s=r+1 upto 7:
+ for t=s+1 upto 8:
+ p:=p+1;
+ MosaiqueDeux[p]=image(
+ remplis Bc[l] withcolor noir;
+ remplis Bc[k] withcolor noir;
+ remplis Bc[m] withcolor noir;
+ remplis Bc[n] withcolor noir;
+ remplis Bc[o] withcolor noir;
+ remplis Bc[r] withcolor noir;
+ remplis Bc[s] withcolor noir;
+ remplis Bc[t] withcolor noir;
+ drawoptions(withcolor gris);
+ trace polygone(A2,A4,A6,A8);
+ trace segment(A8,A4);
+ trace segment(A6,A2);
+ drawoptions();
+ trace polygone(A1,A3,A5,A7) withcolor 0.5white;
+ );
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+ endfor;
+endfor;
diff --git a/macros/latex/contrib/profcollege/metapost/PfCScratch.mp b/macros/latex/contrib/profcollege/metapost/PfCScratch.mp
index 75a0e0edcc..c3a41e3eb4 100644
--- a/macros/latex/contrib/profcollege/metapost/PfCScratch.mp
+++ b/macros/latex/contrib/profcollege/metapost/PfCScratch.mp
@@ -2939,6 +2939,21 @@ vardef OpDiv(expr pasun,pasdeux)=
Oop
enddef;
+vardef OpModulo(expr pasun,pasdeux)=
+ save Oop; picture Oop;
+ save TAao; path TAao;
+ save LOPop; picture LOPop;
+ LOPop=ColleBoxNew(if string pasun : OvalNb(pasun) else: pasun fi,"modulo",if string pasdeux : OvalNb(pasdeux) else: pasdeux fi);
+ TAao=OvalBox(LOPop);
+ Oop=image(
+ fill TAao if print=false : withcolor FondOvalOp else : withcolor coefprint*white fi;
+ draw LOPop;
+ draw TAao if print=false : withcolor coefprint*white fi;
+ );
+ Oop:=Oop shifted(-center Oop);
+ Oop
+enddef;
+
vardef OpAlea(expr pasun,pasdeux)=
save Oop; picture Oop;
save TAao; path TAao;
@@ -3243,7 +3258,7 @@ vardef TestCapCouleurs(expr pasun,pasdeux)=
save $; picture $;
save TAa; path TAa;
save LTa; picture LTa;
- LTa=ColleBoxNew("couleur",OvalCouleur(redpart(pasun),greenpart(pasun),bluepart(pasun)),"touché",OvalCouleur(redpart(pasdeux),greenpart(pasdeux),bluepart(pasdeux)),"?");
+ LTa=ColleBoxNew("couleur",OvalCouleur(redpart(pasun),greenpart(pasun),bluepart(pasun)),"touche",OvalCouleur(redpart(pasdeux),greenpart(pasdeux),bluepart(pasdeux)),"?");
TAa=DiamondBox(LTa);
$=image(
fill TAa if print=false : withcolor CapteurTrois else : withcolor coefprint*white fi;
diff --git a/macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp b/macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp
index f3800b3d99..b9edf3873f 100644
--- a/macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp
+++ b/macros/latex/contrib/profcollege/metapost/PfCScratchpdf.mp
@@ -2971,6 +2971,21 @@ vardef OpDiv(expr pasun,pasdeux)=
Oop
enddef;
+vardef OpModulo(expr pasun,pasdeux)=
+ save Oop; picture Oop;
+ save TAao; path TAao;
+ save LOPop; picture LOPop;
+ LOPop=ColleBoxNew(if string pasun : OvalNb(pasun) else: pasun fi,"modulo",if string pasdeux : OvalNb(pasdeux) else: pasdeux fi);
+ TAao=OvalBox(LOPop);
+ Oop=image(
+ fill TAao if print=false : withcolor FondOvalOp else : withcolor coefprint*white fi;
+ draw LOPop;
+ draw TAao if print=false : withcolor coefprint*white fi;
+ );
+ Oop:=Oop shifted(-center Oop);
+ Oop
+enddef;
+
vardef OpAlea(expr pasun,pasdeux)=
save Oop; picture Oop;
save TAao; path TAao;
@@ -3275,7 +3290,7 @@ vardef TestCapCouleurs(expr pasun,pasdeux)=
save $; picture $;
save TAa; path TAa;
save LTa; picture LTa;
- LTa=ColleBoxNew("couleur",OvalCouleur(redpart(pasun),greenpart(pasun),bluepart(pasun)),"touché",OvalCouleur(redpart(pasdeux),greenpart(pasdeux),bluepart(pasdeux)),"?");
+ LTa=ColleBoxNew("couleur",OvalCouleur(redpart(pasun),greenpart(pasun),bluepart(pasun)),"touche",OvalCouleur(redpart(pasdeux),greenpart(pasdeux),bluepart(pasdeux)),"?");
TAa=DiamondBox(LTa);
$=image(
fill TAa if print=false : withcolor CapteurTrois else : withcolor coefprint*white fi;
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 5be9f750f6..121df71248 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,12 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.0.27]
+
+### Fixed
+- Detection of unchanged symbols when font is sanserif (issue
+ [#535](https://github.com/josephwright/siunitx/issues/535))
+
## [v3.0.26]
### Fixed
@@ -1545,7 +1551,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.0.26...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.27...HEAD
+[v3.0.27]: https://github.com/josephwright/siunitx/compare/v3.0.26...v3.0.27
[v3.0.26]: https://github.com/josephwright/siunitx/compare/v3.0.25...v3.0.26
[v3.0.25]: https://github.com/josephwright/siunitx/compare/v3.0.24...v3.0.25
[v3.0.24]: https://github.com/josephwright/siunitx/compare/v3.0.23...v3.0.24
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index 779c0c26b6..b98335bb63 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-symbol.dtx b/macros/latex/contrib/siunitx/siunitx-symbol.dtx
index a0c9368b21..1501f334b3 100644
--- a/macros/latex/contrib/siunitx/siunitx-symbol.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-symbol.dtx
@@ -137,7 +137,7 @@
{
\group_begin:
\protected@edef \l_@@_tmpa_tl
- { \exp_not:N \mathrm { \@@_non_latin:n {#2} } }
+ { \exp_not:V \l_siunitx_unit_font_tl { \@@_non_latin:n {#2} } }
\int_step_inline:nnn { "80 } { "FF }
{ \char_set_active_eq:nN {##1} \scan_stop: }
\keys_set:nn { siunitx } { parse-units = false }
@@ -195,7 +195,7 @@
\group_begin:
\tl_set:Nx \l_@@_tmpa_tl { \@@_non_latin:n { "00B0 } C }
\protected@edef \l_@@_tmpa_tl
- { \exp_not:N \mathrm { \l_@@_tmpa_tl } }
+ { \exp_not:V \l_siunitx_unit_font_tl { \l_@@_tmpa_tl } }
\keys_set:nn { siunitx } { parse-units = false }
\siunitx_unit_format:nN { \degreeCelsius } \l_@@_tmpb_tl
\str_if_eq:VVTF \l_@@_tmpa_tl \l_@@_tmpb_tl
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index 0acd9a6c46..594ad909da 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -121,7 +121,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-08-21} {3.0.26}
+\ProvidesExplPackage {siunitx} {2021-08-22} {3.0.27}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index fe5b448e15..e09324e6ff 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ