summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-09-04 03:04:17 +0000
committerNorbert Preining <norbert@preining.info>2023-09-04 03:04:17 +0000
commit6cc1e9947e6e547a181fd0510d399af947c7bbc9 (patch)
treef10ff1c91dcd60c85ba8e881b24b09911827a28a /macros/latex/contrib
parent59b528f442538943e1d34291a905464d987035ee (diff)
CTAN sync 202309040304
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/highlightx/README.md1
-rw-r--r--macros/latex/contrib/highlightx/doc/highlightx-doc.pdfbin119988 -> 180449 bytes
-rw-r--r--macros/latex/contrib/highlightx/doc/highlightx-doc.tex649
-rw-r--r--macros/latex/contrib/highlightx/tex/highlightx.sty225
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdfbin1074202 -> 1113193 bytes
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex376
-rw-r--r--macros/latex/contrib/proflycee/tex/ProfLycee.sty8
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex264
-rw-r--r--macros/latex/contrib/updatemarks/README.md13
-rw-r--r--macros/latex/contrib/updatemarks/doc/updatemarks.pdfbin0 -> 459124 bytes
-rw-r--r--macros/latex/contrib/updatemarks/doc/updatemarks.tex322
-rw-r--r--macros/latex/contrib/updatemarks/tex/updatemarks.sty503
-rw-r--r--macros/latex/contrib/wrapfig2/README.txt9
-rw-r--r--macros/latex/contrib/wrapfig2/wrapfig2.dtx29
-rw-r--r--macros/latex/contrib/wrapfig2/wrapfig2.pdfbin705915 -> 706124 bytes
15 files changed, 1817 insertions, 582 deletions
diff --git a/macros/latex/contrib/highlightx/README.md b/macros/latex/contrib/highlightx/README.md
index 22ee36999e..c8fb146310 100644
--- a/macros/latex/contrib/highlightx/README.md
+++ b/macros/latex/contrib/highlightx/README.md
@@ -3,5 +3,6 @@ highlightx is a package to highlight paragraphs or formulas.
highlightx est un package pour surligner des paragraphes ou des formules.
-------------------------------------------------------------------------
Author : Cédric Pierquet
+Code : Antal Spector-Zabusky (for hightlighting paragraphs)
email : cpierquet@outlook.fr
Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt \ No newline at end of file
diff --git a/macros/latex/contrib/highlightx/doc/highlightx-doc.pdf b/macros/latex/contrib/highlightx/doc/highlightx-doc.pdf
index 674abe53dd..7409fe0f35 100644
--- a/macros/latex/contrib/highlightx/doc/highlightx-doc.pdf
+++ b/macros/latex/contrib/highlightx/doc/highlightx-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/highlightx/doc/highlightx-doc.tex b/macros/latex/contrib/highlightx/doc/highlightx-doc.tex
index bb1dbf1fbe..45115b309a 100644
--- a/macros/latex/contrib/highlightx/doc/highlightx-doc.tex
+++ b/macros/latex/contrib/highlightx/doc/highlightx-doc.tex
@@ -33,8 +33,8 @@
\hypersetup{pdfborder=0 0 0}
\usepackage[margin=1.5cm]{geometry}
\setlength{\parindent}{0pt}
-\def\TPversion{0.1.1}
-\def\TPdate{1\up*{er} septembre 2023}
+\def\TPversion{0.1.2}
+\def\TPdate{3 septembre 2023}
\usepackage{tcolorbox}
\tcbuselibrary{skins,hooks}
\sethlcolor{lightgray!25}
@@ -56,12 +56,9 @@
\begin{tabular}{c}
{\Huge \texttt{highlightx}}\\
\\
- {\LARGE Commandes pour surligner de formules (avec un} \\
- \\
- {\LARGE effet main levée), ou des paragraphes, à l'aide} \\
- \\
- {\LARGE des packages \MontreCode{soul} et/ou \MontreCode{tikz}.} \\
- \\
+ {\LARGE Commandes pour surligner de formules ou} \\
+ {\LARGE des paragraphes (avec un effet main levée),} \\
+ {\LARGE à l'aide des packages \MontreCode{soul} et/ou \MontreCode{tikz}.} \\
{\LARGE $\rhd$ Commandes [fr] ou [en] $\lhd$} \\
\\
{\small \texttt{Version \TPversion{} -- \TPdate}}
@@ -75,7 +72,9 @@
\begin{tabular}{c}
\texttt{Cédric Pierquet}\\
{\ttfamily c pierquet -- at -- outlook . fr}\\
- \texttt{\url{https://github.com/cpierquet/highlightx}}
+ \texttt{\url{https://github.com/cpierquet/highlightx}} \\
+ \\
+ \texttt{Merci à Antal Spector-Zabusky pour le code dédié aux paragraphes !}
\end{tabular}
\end{center}
@@ -102,7 +101,13 @@ Et en mode hors ligne :
\vspace*{5mm}
\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
-Et on peut même mettre en forme un paragraphe (dans une \MontreCode{tcbox}), généré aléatoirement grâce au site \url{https://ipsum.one/} par exemple : \og \genhighlightpar{Enfin, comme le dernier coup de dix heures retentissait encore, il étendit la main et prit celle de Mme Rênal, qui la retira aussitôt. Julien, sans trop savoir ce qu’il faisait, la saisit de nouveau. Quoique bien ému lui-même, il fut frappé de la froideur glaciale de la main qu’il prenait ; il la serrait avec une force convulsive ; on fit un dernier effort pour la lui ôter, mais enfin cette main lui resta.} \fg
+Et on peut même mettre en forme un paragraphe généré aléatoirement grâce au site \textsf{\url{https://ipsum.one/}} par exemple : \og \SurlignerTexte{Enfin, comme le dernier coup de dix heures retentissait encore, il étendit la main et prit celle de Mme Rênal, qui la retira aussitôt. Julien, sans trop savoir ce qu’il faisait, la saisit de nouveau. Quoique bien ému lui-même, il fut frappé de la froideur glaciale de la main qu’il prenait ; il la serrait avec une force convulsive ; on fit un dernier effort pour la lui ôter, mais enfin cette main lui resta.} \fg
+\end{tcolorbox}
+
+\vspace*{5mm}
+
+\begin{tcolorbox}[colframe=lightgray,colback=lightgray!5]
+Un deuxième, avec un peu de couleurs, généré aléatoirement grâce au site \textsf{\url{https://ipsum.one/}} par exemple : \og \SurlignerTexte*[Fond=orange,Bord=teal]{De là le succès du petit paysan Julien. Elle trouva des jouissances douces, et toutes brillantes du charme de la nouveauté, dans la sympathie de cette âme noble et fière. Mme de Rênal lui eut bientôt pardonné son ignorance extrême qui était une grâce de plus, et la rudesse de ses façons qu’elle parvint à corriger. Elle trouva qu’il valait la peine de l’écouter, même quand on parlait des choses les plus communes, même quand il s’agissait d’un pauvre chien écrasé, comme il traversait la rue, par la charrette d’un paysan allant au trot.} \fg
\end{tcolorbox}
%\vspace*{5mm}
@@ -129,7 +134,7 @@ Et on peut même mettre en forme un paragraphe (dans une \MontreCode{tcbox}), gÃ
\subsection{Solutions existantes}
-Le package \MontreCode{soul} permet de surligner du texte, de manière efficace, mais avec des formules mathématiques le surlignage n'est pas forcément optimal.
+Le package \MontreCode{soul} permet de surligner du texte, de manière très efficace, mais avec des formules mathématiques le surlignage n'est pas forcément optimal.
Il est également possible d'utiliser \MontreCode{fcolorbox} pour des formules mathématiques.
@@ -144,6 +149,12 @@ une pièce de bois.} \fg.\\\\
Et maintenant avec \texttt{fcolorbox} : \colorbox{lightgray!25}{$\int_0^4 x^2\,\text{d}x$}.
\end{demohigh}
+\subsection{Remerciements}
+
+Je remercie Antal Spector-Zabusky qui m'a autorisé à utiliser son code pour le surlignage de paragraphes avec un effet \textit{main levée}, et qui m'a autorisé à le distribuer sous licence \textsf{LPPL 1.3c} !
+
+Le code est adapté d'une réponse issue de cette \href{https://tex.stackexchange.com/questions/5959/cool-text-highlighting-in-latex}{\fbox{discussion}} sur \textsf{tex.stackexchange.com}.
+
\pagebreak
\subsection{Possibilités et limitations}
@@ -151,12 +162,13 @@ Et maintenant avec \texttt{fcolorbox} : \colorbox{lightgray!25}{$\int_0^4 x^2\,\
L'idée du package \MontreCode{highlightx} est de proposer des commandes basiques, pour \textit{surligner} :
\begin{itemize}
- \item du texte simple ou multi-lignes (paragraphes) ;
+ \item du texte simple ou multi-lignes (paragraphes) avec un effet de bordure à \textit{main levée} ;
\item des formules en mode math en ligne ou hors-ligne (grâce à \TikZ) avec un effet de bordure à \textit{main levée}.
- %\item avec un effet de bordure à \textit{main levée} (sauf pour un paragraphe dans une \MontreCode{tcbox}).
\end{itemize}
-{\small\faBomb}~En ce qui concerne les paragraphes, le package \MontreCode{soul} est performant dans le cas où la police courante est en \MontreCode{\textbackslash normalsize}, dans le cas contraire, il se peut que le rendu ne soit pas optimal. Il se peut également que le surlignage ne donne pas un résultat optimal avec certains caractères, comme par exemple \MontreCode{;}.
+{\small\faBomb}~Compte tenu du code utilisé pour le surlignage des paragraphes, il se peut que des dysfonctionnements apparaissent, notamment liés à \MontreCode{babel} et à l'utilisation de caractères \textit{actifs}.
+
+%{\small\faBomb}~En ce qui concerne les paragraphes, le package \MontreCode{soul} est performant dans le cas où la police courante est en \MontreCode{\textbackslash normalsize}, dans le cas contraire, il se peut que le rendu ne soit pas optimal. Il se peut également que le surlignage ne donne pas un résultat optimal avec certains caractères, comme par exemple \MontreCode{;}.
%{\small\faBomb}~Pour le moment le surlignement avec effet en mode paragraphe n'est pas compatible avec des environnements (comme \MontreCode{tcolorbox}), donc dans ce cas il n'y aura pas d'effet possible.
%
@@ -176,32 +188,39 @@ Les seuls packages chargés sont :
\begin{itemize}
\item \MontreCode{soul}, \MontreCode{xstring} et \MontreCode{simplekv}.
- \item \MontreCode{tikz} avec les librairies \MontreCode{tikzmark,calc,decorations.pathmorphing}.
+ \item \MontreCode{tikz} avec les librairies \MontreCode{tikzmark,calc,decorations.pathmorphing,nbabel}.
%\item \MontreCode{soul}, \MontreCode{atbegshi}, \MontreCode{etoolbox} ;
%\item \MontreCode{tikz} avec les librairies \MontreCode{tikzmark,calc,decorations.pathmorphing} ;
%\item \MontreCode{xstring} et \MontreCode{simplekv}.
\end{itemize}
+Si l'utilisateur ne souhaite pas charger la librairie \MontreCode{babel} de \TikZ, il suffit de charger le package avec l'option \MontreCode{[nobabel]}.
+
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%chargement classique, avec la librairie babel de tikz
\usepackage{highlightx}
\end{codehigh}
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%chargement sans la librairie babel de tikz
+\usepackage[nobabel]{highlightx}
+\end{codehigh}
+
{\small\faAngleDoubleRight}~\MontreCode{highlightx} est compatible avec les compilations usuelles en \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} ou \textsf{xelatex}.
-%\medskip
-%
-%{\small\faBomb}~Des erreurs peuvent apparaître lors de la compilation, dans ce cas une nouvelle compilation sera nécessaire afin de placer correctement les effets de surlignage !
+\medskip
+
+{\small\faBomb}~Une double compilation est nécessaire afin de placer correctement les effets de surlignage !
\subsection{Commandes disponibles}
Les commandes proposées par le package \MontreCode{highlightx} sont :
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%Commande pour surligner une formule (mode math)
+%Commande pour surligner une formule (mode math), avec ou sans effet
\SurlignerFormule
-
-%Commande pour surligner du texte de manière basique, sans effet
-\genhighlightpar
+%Commande pour surligner du texte, avec ou sans effet
+\SurlignerTexte
\end{codehigh}
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
@@ -213,7 +232,7 @@ Ou bien encore une formule en mode hors-ligne comme :
\end{demohigh}
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-Et : \og \genhighlightpar{Une scie à eau se compose d’un
+Et : \og \SurlignerTexte{Une scie à eau se compose d’un
hangar au bord d’un ruisseau. Le toit est soutenu par une charpente qui porte sur quatre
gros piliers en bois. À huit ou dix pieds d’élévation, au milieu du hangar, on voit une
scie qui monte et descend, tandis qu’un mécanisme fort simple pousse contre cette scie
@@ -234,7 +253,7 @@ une pièce de bois.} \fg.
\section{Les commandes}
-\subsection{Surligner une formule}
+\subsection{Surligner une formule, avec ou sans effet}
La commande dédiée à la mise en évidence d'une formule mathématique est \MontreCode{\textbackslash SurlignerFormule} :
@@ -302,91 +321,114 @@ $\SurlignerFormule{f(x)=\displaystyle\frac{1}{1+x}}$
\tikzstyle{encadreformule}=[decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}]
-%\subsection{Surligner du texte, y compris multilignes}
-%
-%La commande dédiée à la mise en évidence d'une formule mathématique est \MontreCode{\textbackslash SurlignerTexte} :
-%
-%\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%%Commande pour surligner du texte
-%\SurlignerTexte[options tikz]{texte}
-%\end{codehigh}
-%
-%Concernant cette commande, pour laquelle le fonctionnement (interne) est très différent du mode \textit{math} :
-%
-%\begin{itemize}
-% \item les options tikz permettent de spécifier la couleur de fond et l'éventuelle couleur de bordure, grâce à \MontreCode{[couleurfond,draw=couleurbord]}.
-%\end{itemize}
-%
-%\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%%Paragraphes venant du site https://ipsum.one/
-%
-%Un premier paragraphe : \og \SurlignerTexte{Quand Julien aperçut les ruines pittoresques
-%de l’ancienne église de Vergy, il remarqua que depuis l’avant-veille il n’avait pas pensé
-%une seule fois à Mme de Rênal. L’autre jour en partant, cette femme m’a rappelé la distance
-%infinie qui nous sépare, elle m’a traité comme le fils d’un ouvrier. Sans doute elle a voulu
-%me marquer son repentir de m’avoir laissé sa main la veille... Elle est pourtant bien jolie,
-%cette main ! quel charme ! quelle noblesse dans les regards de cette femme !} \fg.
-%
-%Un deuxième paragraphe : \og \SurlignerTexte[teal!35,draw=red]{Ce ne fut que dans la nuit
-%du samedi au dimanche, après trois jours de pourparlers, que l’orgueil de l’abbé Maslon plia
-%devant la peur du maire qui se changeait en courage. Il fallut écrire une lettre mielleuse à
-%l’abbé Chélan, pour le prier d’assister à la cérémonie de la relique de Bray-le-Haut, si
-%toutefois son grand âge et ses infirmités le lui permettaient. M. Chélan demanda et obtint
-%une lettre d’invitation pour Julien qui devait l’accompagner en qualité de sous-diacre.} \fg.
-%\end{codehigh}
-%
-%Un premier paragraphe : \og \SurlignerTexte{Quand Julien aperçut les ruines pittoresques
-%de l’ancienne église de Vergy, il remarqua que depuis l’avant-veille il n’avait pas pensé
-%une seule fois à Mme de Rênal. L’autre jour en partant, cette femme m’a rappelé la distance
-%infinie qui nous sépare, elle m’a traité comme le fils d’un ouvrier. Sans doute elle a voulu
-%me marquer son repentir de m’avoir laissé sa main la veille... Elle est pourtant bien jolie,
-%cette main ! quel charme ! quelle noblesse dans les regards de cette femme !} \fg.
-%
-%\medskip
-%
-%Un deuxième paragraphe : \og \SurlignerTexte[teal!35,draw=red]{Ce ne fut que dans la nuit
-%du samedi au dimanche, après trois jours de pourparlers, que l’orgueil de l’abbé Maslon plia
-%devant la peur du maire qui se changeait en courage. Il fallut écrire une lettre mielleuse à
-%l’abbé Chélan, pour le prier d’assister à la cérémonie de la relique de Bray-le-Haut, si
-%toutefois son grand âge et ses infirmités le lui permettaient. M. Chélan demanda et obtint
-%une lettre d’invitation pour Julien qui devait l’accompagner en qualité de sous-diacre.} \fg.
-
\pagebreak
-\subsection{Surlignement \og classique \fg, d'un texte ou d'un paragraphe}
+\subsection{Surligner un texte, y compris multilignes, avec ou sans effet}
-Pour du surlignement multilignes, il est possible d'utiliser une commande \textit{générique}, qui utilise uniquement le package \MontreCode{soul} (donc pas d'effet !), qui est \MontreCode{\textbackslash genhighlightpar} (qui est basée \textit{basiquement} sur la commande \MontreCode{\textbackslash hl} du package \MontreCode{soul}).
+La commande dédiée à la mise en évidence d'une formule mathématique est \MontreCode{\textbackslash SurlignerTexte} :
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%Commande générique pour surligner du texte
-\genhighlightpar[couleur]{texte}
+%Commande pour surligner du texte
+\SurlignerTexte(*)[clés]<options tikz>{texte}
\end{codehigh}
-Concernant cette commande, le premier argument (optionnel) est la couleur de fond, et le second argument (obligatoire) est le texte à mettre en évidence.
+Concernant cette commande, le fonctionnement est similaire à celui dédié aux formules :
+
+\begin{itemize}
+ \item la version étoilée désactive l'effet \textit{main levée} ;
+ \item les clés disponibles sont :
+ \begin{itemize}
+ \item \MontreCode{Fond} pour la couleur de fond (\MontreCode{yellow} par défaut) ;
+ \item \MontreCode{Bord} pour une éventuelle bordure, \MontreCode{none} ou \MontreCode{couleur} (\MontreCode{none} par défaut) ;
+ \item \MontreCode{Opacite} pour régler l'opacité du surlignage (\MontreCode{0.25} par défaut) ;
+ \item \MontreCode{Offset} pour \textit{élargir} le surlignage, sous la forme \MontreCode{Offset} ou \MontreCode{OffsetH/OffsetV} (\MontreCode{1pt} par défaut) ;
+ \end{itemize}
+ \item les \textit{options tikz} sont optionnelles.
+\end{itemize}
+
+\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%Paragraphes venant du site https://ipsum.one/
+Un premier paragraphe : \og \SurlignerTexte{Quand Julien aperçut les ruines pittoresques de
+l’ancienne église de Vergy, il remarqua que depuis l’avant-veille il n’avait pas pensé
+une seule fois à Mme de Rênal. L’autre jour en partant, cette femme m’a rappelé la
+distance infinie qui nous sépare, elle m’a traité comme le fils d’un ouvrier. Sans
+doute elle a voulu me marquer son repentir de m’avoir laissé sa main la veille...
+Elle est pourtant bien jolie, cette main ! quel charme ! quelle noblesse dans
+les regards de cette femme !} \fg \\
+
+Un deuxième paragraphe : \og \SurlignerTexte[Fond=teal!35,Bord=red]{Ce ne fut que
+dans la nuit du samedi au dimanche, après trois jours de pourparlers, que l’orgueil
+de l’abbé Maslon plia devant la peur du maire qui se changeait en courage. Il fallut
+écrire une lettre mielleuse à l’abbé Chélan, pour le prier d’assister à la cérémonie
+de la relique de Bray-le-Haut, si toutefois son grand âge et ses infirmités le lui
+permettaient. M. Chélan demanda et obtint une lettre d’invitation pour Julien qui
+devait l’accompagner en qualité de sous-diacre.} \fg
+\end{demohigh}
+
+\pagebreak
+
+Le surlignage s'adapte également à la taille de la police courante :
+
+\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+Un troisième : \og {\LARGE\SurlignerTexte*[Fond=orange,Bord=violet]<thick>{%
+Quelle pitié notre provincial ne va-t-il pas inspirer aux jeunes lycéens de Paris qui, à
+quinze ans, savent déjà entrer dans un café d’un air si distingué ? Mais ces enfants,
+si bien stylés à quinze ans, à dix-huit tournent au commun. La timidité passionnée que
+l’on rencontre en province se surmonte quelquefois et alors elle enseigne à vouloir.
+En s’approchant de cette jeune fille si belle ; qui daignait lui adresser la parole,
+il faut que je lui dise la vérité, pensa Julien, qui devenait courageux à force de
+timidité vaincue.}} \fg
+\end{demohigh}
+
+Le surlignage s'adapte aussi à la police courante :
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-Un \genhighlightpar{paragraphe} : \og \genhighlightpar[orange!35]{Pour arriver à la
-considération publique à Verrières, l’essentiel est de ne pas adopter, tout en bâtissant
-beaucoup de murs, quelque plan apporté d’Italie par ces maçons, qui au printemps
-traversent les gorges du Jura pour gagner Paris. Une telle innovation vaudrait à
-l’imprudent bâtisseur une éternelle réputation de mauvaise tête, et il serait à jamais
-perdu auprès des gens sages et modérés qui distribuent la considération en Franche-Comté.} \fg.
+Un quatrième : \og {\sffamily\SurlignerTexte[Fond=green,Bord=green,Offset=2pt]{%
+Cette magnificence mélancolique, dégradée par la vue des briques nues et du plâtre encore
+tout blanc, toucha Julien. Il s’arrêta en silence. À l’autre extrémité de la salle,
+près de l’unique fenêtre par laquelle le jour pénétrait, il vit un miroir mobile en
+acajou. Un jeune homme, en robe violette et en surplis de dentelle, mais la tête nue,
+était arrêté à trois pas de la glace. Ce meuble semblait étrange en un tel lieu, et,
+sans doute, y avait été apporté de la ville. Julien trouva que le jeune homme avait
+l’air irrité ; de la main droite il donnait gravement des bénédictions du côté du
+miroir.}} \fg
\end{demohigh}
+\bigskip
+
+Le style \textit{main levée} est fixé par défaut, mais peut être modifié en adaptant le style \TikZ{} :
+
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%Style main levée
+\tikzstyle{encadreformule}=[%
+ decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}]
+\end{codehigh}
+
+\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\tikzstyle{encadreformule}=[%
+ decorate,decoration={random steps,amplitude=2mm,segment length=10mm}]
+
+Un paragraphe : \og \SurlignerTexte{Quand Julien aperçut les ruines pittoresques de
+l’ancienne église de Vergy, il remarqua que depuis l’avant-veille il n’avait pas pensé
+une seule fois à Mme de Rênal. L’autre jour en partant, cette femme m’a rappelé la
+distance infinie qui nous sépare, elle m’a traité comme le fils d’un ouvrier.} \fg
+\end{demohigh}
+
+\tikzstyle{encadreformule}=[decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}]
+
\pagebreak
\section{English commands}
\subsection{Introduction}
-There's also english versions of the commands :
+There's also english versions of the commands and keys :
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%Hightlight formula (math mode)
+%Hightlight formula (math mode), with or without effect
\HighlightFormula
-
-%Basic highlight text, without effect
-\genhighlightpar
+%Basic highlight text, with or without effect
+\TextHighlight
\end{codehigh}
\subsection{Highlight formula}
@@ -436,412 +478,43 @@ $\HighlightFormula{f(x)=\displaystyle\frac{1}{1+x}}$
\tikzstyle{borderformula}=[decorate,decoration={random steps,amplitude=0.5pt,segment length=1em}]
-%\subsection{Highlight text}
-%
-%\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%%Highlight text, with effect
-%\HighlightText[tikz options]{text}
-%\end{codehigh}
-%
-%\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%%Paragraphs from https://ipsum.one/
-%
-%A first one : \HighlightText{In order to modify it, he has only to press his hand lightly
-%on a small wheel, measuring hardly a foot in diameter, and placed within his reach. Immediately
-%the valves open, the steam from the boilers rushes along the conducting tubes into the two
-%cylinders of the small engine, the pistons move rapidly, and the rudder instantly obeys.
-%If this plan succeeds, a man will be able to direct the gigantic body of the 'Great Eastern'
-%with one finge}.
-%
-%A second one : \HighlightText[teal!35,draw=red]{On Wednesday night the weather was very bad,
-%my balance was strangely variable, and I was obliged to lean with my knees and elbows against
-%the sideboard, to prevent myself from falling. Portmanteaus and bags came in and out of my cabin;
-%an unusual hubbub reigned in the adjoining saloon, in which two or three hundred packages were
-%making expeditions from one end to the other, knocking the tables and chairs with loud crashes;
-%doors slammed, the boards creaked, the partitions made that groaning noise peculiar to pine wood;
-%bottles and glasses jingled together in their racks, and a cataract of plates and dishes rolled
-%about on the pantry floors}.
-%\end{codehigh}
-%
-%A first one : \HighlightText{In order to modify it, he has only to press his hand lightly
-%on a small wheel, measuring hardly a foot in diameter, and placed within his reach. Immediately
-%the valves open, the steam from the boilers rushes along the conducting tubes into the two
-%cylinders of the small engine, the pistons move rapidly, and the rudder instantly obeys.
-%If this plan succeeds, a man will be able to direct the gigantic body of the 'Great Eastern'
-%with one finge}.
-%
-%\medskip
-%
-%A second one : \HighlightText[teal!35,draw=red]{On Wednesday night the weather was very bad,
-%my balance was strangely variable, and I was obliged to lean with my knees and elbows against
-%the sideboard, to prevent myself from falling. Portmanteaus and bags came in and out of my cabin ;
-%an unusual hubbub reigned in the adjoining saloon, in which two or three hundred packages were
-%making expeditions from one end to the other, knocking the tables and chairs with loud crashes ;
-%doors slammed, the boards creaked, the partitions made that groaning noise peculiar to pine wood ;
-%bottles and glasses jingled together in their racks, and a cataract of plates and dishes rolled
-%about on the pantry floors}.
-
-\subsection{Generic highlight, without effect}
+\subsection{Highlight text or paragraphs, with or without effect}
\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%generic command, without effect
-\genhighlightpar[color]{text}
+%Highlight text, with effect
+\HighlightText(*)<keys>[tikz options]{text}
\end{codehigh}
\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-A paragraph : \genhighlightpar[violet!35]{This steam-ship is indeed a masterpiece of naval
-construction ; more than a vessel, it is a floating city, part of the country, detached from
-English soil, which after having crossed the sea, unites itself to the American Continent.
-I pictured to myself this enormous bulk borne on the waves, her defiant struggle with the wind,
-her boldness before the powerless sea, her indifference to the billows, her stability in the
-midst of that element which tosses 'Warriors' and 'Solferinos' like ship's boats.}.
+%Paragraphs from https://ipsum.one/
+A first one : \HighlightText{In order to modify it, he has only to press his hand lightly
+on a small wheel, measuring hardly a foot in diameter, and placed within his reach.
+Immediately the valves open, the steam from the boilers rushes along the conducting
+tubes into the two cylinders of the small engine, the pistons move rapidly, and the
+rudder instantly obeys. If this plan succeeds, a man will be able to direct the gigantic
+body of the 'Great Eastern' with one finge}.
\end{demohigh}
+\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%Paragraphs from https://ipsum.one/
+A second one : \HighlightText[bg=teal!35,border=red]{On Wednesday night the weather was
+very bad, my balance was strangely variable, and I was obliged to lean with my knees
+and elbows against the sideboard, to prevent myself from falling. Portmanteaus and
+bags came in and out of my cabin ; an unusual hubbub reigned in the adjoining saloon,
+in which two or three hundred packages were making expeditions from one end to the other,
+knocking the tables and chairs with loud crashes ; doors slammed, the boards creaked,
+the partitions made that groaning noise peculiar to pine wood ; bottles and glasses
+jingled together in their racks, and a cataract of plates and dishes rolled about on
+the pantry floors}.
+\end{demohigh}
-%Le style global des boîtes est défini par :
-%
-%\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\tcbset{baseboite/.style={
-% enhanced,sharp corners=uphill,boxrule=\eptraitboite,%
-% before skip=0.5em,after skip=0.5em,%
-% colback=white,top=4mm,%
-% left={\margeboite-\margeinttitreboite-\eptraitboite},%
-% right={\margeboite-\margeinttitreboite-\eptraitboite}
-%}%
-%}
-%\end{codehigh}
-%
-%À noter que le \MontreCode{\textbackslash margeboite-\textbackslash margeinttitreboite-\textbackslash eptraitboite} vient :
-%
-%\begin{itemize}
-% \item des \MontreCode{\textbackslash margeinttitreboite} du paramètre \MontreCode{inner sep} du nœud Ti\textit{k}Z ;
-% \item des \MontreCode{\textbackslash eptraitboite} du paramètre \MontreCode{boxrule} de la boîte \textit{titre}.
-%\end{itemize}
-%
-%\subsection{Paramétrage simple de la boîte}
-%
-%Il est possible de rajouter ou modifier quelques éléments de chaque boîte (les clés suivantes sont cumulables) :
-%
-%\begin{itemize}
-% \item un \textsf{sous-titre} (couleur \textsf{rouge foncé}) peut être ajouté (en haut à droite de la boîte), via la clé \MontreCode{[SousTitre=...]} ;
-% \item le label peut être modifié :
-% \begin{itemize}
-% \item le compteur peut être désactivé, grâce à la clé \MontreCode{[Compteur=false]} ;
-% \item la clé \MontreCode{[Pluriel]} force le pluriel du label ;
-% \item un complément peut être rajouté entre le label et le compteur grâce à la clé \MontreCode{[ModifLabel=...]} ;
-% \item un complément peut être rajouté après le compteur grâce à la clé \MontreCode{[ComplementTitre=...]} ;
-% \end{itemize}
-% \item une petite image (type \textit{filigrane}) peut être rajoutée (de hauteur 24pt et pivotée de 45° dans le sens horaire par défaut), dans le coin \textit{bas-droite} de la boîte :
-% \begin{itemize}
-% \item en spécifiant l'image grâce à la clé \MontreCode{[Logo=...]} ;
-% \item en spécifiant hauteur/rotation/opacité grâce aux clés \MontreCode{[HauteurLogo=...]} , \MontreCode{[RotationLogo=...]} et \MontreCode{[OpaciteLogo=...]}.
-% \end{itemize}
-%\end{itemize}
-%
-%Des options spécifiques \MontreCode{tcolorbox} peuvent être passées en option à l'environnement, elles sont à mettre entre \MontreCode{<...>} avant le corps de l'environnement.
-%
-%\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\setcounter{CompteurBoiteDemo}{0}
-%\begin{BoiteDeDemo}[Compteur=false]
-%\lipsum[1][1-2]
-%\end{BoiteDeDemo}
-%\end{demohigh}
-%
-%\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\begin{BoiteDeDemo}[Pluriel]<width=0.5\linewidth>
-%\lipsum[1][1-2]
-%\end{BoiteDeDemo}
-%\end{demohigh}
-%
-%\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\begin{BoiteDeDemo}[SousTitre={Un petit sous-titre}]
-%\lipsum[1][1-2]
-%\end{BoiteDeDemo}
-%\end{demohigh}
-%
-%\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\begin{BoiteDeDemo}[ComplementTitre={ - Un complément de titre}]%noter l'espace ;-)
-%\lipsum[1][1-2]
-%\end{BoiteDeDemo}
-%\end{demohigh}
-%
-%\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\begin{BoiteDeDemo}[ModifLabel={ super important}]%noter l'espace ;-)
-%\lipsum[1][1-2]
-%\end{BoiteDeDemo}
-%\end{demohigh}
-%
-%\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\begin{BoiteDeDemo}[Logo={example-image}]
-%\lipsum[1][3-4]
-%\end{BoiteDeDemo}
-%\end{demohigh}
-%
-%\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\begin{BoiteDeDemo}[Logo={example-image},HauteurLogo=5mm,RotationLogo=10]
-%\lipsum[1][3-4]
-%\end{BoiteDeDemo}
-%\end{demohigh}
-%
-%\pagebreak
-%
-%Et en \textit{cumulant} des clés de personnalisation on peut obtenir :
-%
-%\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\begin{BoiteDeDemo}[%
-% ModifLabel={s super importants},ComplementTitre={ (vraiment super importants)},%
-% SousTitre={- Source -},Compteur=false,Logo={example-image-a},%
-% HauteurLogo=1cm,RotationLogo=15,OpaciteLogo=1
-% ]
-%\lipsum[2][1-4]
-%\end{BoiteDeDemo}
-%\end{demohigh}
-%
-%\subsection{Personnalisation \textit{intermédiaire}}
-%
-%Il est possible de paramétrer \textit{facilement} certaines options, via la commande \MontreCode{\textbackslash ParamBoites[...]} :
-%
-%\begin{itemize}
-% \item la police du label grâce à la clé \MontreCode{[PoliceTitre=...]} (\verb*|\bfseries\sffamily| par défaut) ;
-% \item la police du sous-titre grâce à la clé \MontreCode{[PoliceSousTitre=...]} (\verb*|\small\bfseries\sffamily| par défaut) ;
-% \item la couleur de base du sous-titre grâce à la clé \MontreCode{[CouleurSousTitre=...]} (\verb*|red| par défaut) ;
-% \item les marges gauche et droite grâce à la clé \MontreCode{[Marge=...]} (\verb*|4mm| par défaut) ;
-% \item l'épaisseur des bordures grâce à la clé \MontreCode{[EpaisseurBordure=...]} (\verb*|1.25pt| par défaut) ;
-% \item la marge spécifique pour la boîte \textit{titre} grâce à clé \MontreCode{[MargeTitre=...]} (\verb*|3pt| par défaut).
-%\end{itemize}
-%
-%\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\ParamBoites[%
-% Marge=2cm,MargeTitre=2mm,%
-% PoliceTitre=\large\bfseries\ttfamily,%
-% PoliceSousTitre=\scriptsize\bfseries\sffamily,%
-% CouleurSousTitre=orange]
-%\end{codehigh}
-%
-%\ParamBoites[Marge=2cm,MargeTitre=2mm,PoliceTitre=\large\bfseries\ttfamily,PoliceSousTitre=\scriptsize\bfseries\sffamily,CouleurSousTitre=orange]
-%
-%\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\begin{BoiteDeDemo}[SousTitre={- Un petit sous-titre -}]
-%\lipsum[1][1-2]
-%\end{BoiteDeDemo}
-%\end{demohigh}
-%
-%On peut revenir aux paramètres par défaut grâce à la commande \MontreCode{\textbackslash ParamBoites} (sans argument).
-%
-%\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\ParamBoites
-%\begin{BoiteDeDemo}[SousTitre={- Un petit sous-titre -}]
-%\lipsum[1][1-2]
-%\end{BoiteDeDemo}
-%\end{demohigh}
-%
-%\pagebreak
-%
-%\section{Utilisation avancée}
-%
-%\subsection{Styles spécifiques}
-%
-%Il est possible quand même de modifier \textit{en profondeur} les boîtes créées, en redéfinissant les commandes suivantes via \verb*|\RenewDocumentCommand| :
-%
-%\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\NewDocumentCommand\TitreBoite{ m m m m }{%
-% %1=couleur
-% %2=icone
-% %3=nom
-% %4=compteur
-% % \BoxModifLabel = texte entre label et compteur
-% % \BoxCpltTitle = Texte après le compteur
-% \node[inner sep=\margeinttitreboite,rounded corners=3pt,draw=#1,line width=\eptraitboite,%
-% rectangle,fill=#1!5!white,anchor=west,xshift=\margeboite,text=black,%
-% font=\policetitreboite]%
-% at (frame.north west)
-% {%
-% \,\IfStrEq{#2}{}{}{{\small#2}~}\vphantom{Ppé}%
-% \ifboolKV[Boites]{Pluriel}{\StrBehind{#3}{/}}{\StrBefore{#3}{/}}%
-% \IfStrEq{\BoxModifLabel}{}{}{\BoxModifLabel}\ifboolKV[Boites]{Compteur}{~#4}{}%
-% \IfStrEq{\BoxCpltTitle}{}{}{\BoxCpltTitle}\,%
-% } ;
-%}
-%\end{codehigh}
-%
-%\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\NewDocumentCommand\SousTitreBoite{ }{%\BoxSubTitle = Sous-titre
-% \node[fill=white,anchor=east,xshift=-\margeboite,text=red!75!black,%
-% font=\policesoustitreboite] at (frame.north east) %
-% {\vphantom{Ppé}\BoxSubTitle} ;
-%}
-%\end{codehigh}
-%
-%\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\NewDocumentCommand\LogoCoinDroit{ }{%
-% \begin{tcbclipinterior}%
-% \node[opacity=\BoxOpaciteLogo,rotate=-\BoxRotationLogo]%
-% at ($(interior.south east)+(-10pt,10pt)$) %
-% {\includegraphics[height=\BoxHauteurLogo]{\BoxLogo}};%
-% \end{tcbclipinterior}%
-%}
-%\end{codehigh}
-%
-%\pagebreak
-%
-%\subsection{Exemple de personnalisations avancées}
-%
-%Par exemple, on peut modifier globalement le comportement de la boîte :
-%
-%\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\tcbset{baseboite/.style={
-% enhanced,boxrule=0.75pt,%
-% center,width=0.75\linewidth,%
-% before skip=1em,after skip=1em,%
-% colback=white,top=4mm,left=1mm,right=1mm
-% }%
-%}
-%\RenewDocumentCommand\TitreBoite{ m m m m }{%
-% \node[inner sep=2pt,draw=#1,line width=0.75pt,rounded corners,%
-% rectangle,fill=white,anchor=center,xshift=-1cm,text=black,%
-% font=\policetitreboite]%
-% at (frame.north)
-% {%
-% ~#2 #3\ifboolKV[Boites]{Compteur}{~#4}{}\IfStrEq{\BoxCpltTitle}{}{}{\BoxCpltTitle}~
-% } ;
-%}
-%\RenewDocumentCommand\SousTitreBoite{ }{%
-% \node[fill=white,anchor=center,%
-% font=\policesoustitreboite] at (frame.south) {\vphantom{pP}\BoxSubTitle} ;
-%}
-%\ParamBoites[PoliceTitre=\bfseries,PoliceSousTitre=\small\sffamily]
-%\CreationBoite{BoxDef}{CompteurDefi}{\faAddressBook}{Définition}
-%\CreationBoite[lime]{BoxProp}{CompteurProp}{\faAmbulance}{Propriété}
-%\end{codehigh}
-%
-%\tcbset{baseboite/.style={
-%enhanced,boxrule=0.75pt,%
-%center,width=0.75\linewidth,%
-%before skip=1em,after skip=1em,%
-%colback=white,top=4mm,left=1mm,right=1mm
-%}%
-%}
-%
-%\RenewDocumentCommand\TitreBoite{ m m m m }{%
-%\node[inner sep=2pt,draw=#1,line width=0.75pt,rounded corners,%
-%rectangle,fill=white,anchor=center,text=black,%
-%font=\policetitreboite]%
-%at (frame.north)
-%{%
-%~#2 #3\ifboolKV[Boites]{Compteur}{~#4}{}\IfStrEq{\BoxCpltTitle}{}{}{\BoxCpltTitle}~
-%} ;
-%}
-%
-%\RenewDocumentCommand\SousTitreBoite{ }{%
-%\node[fill=white,anchor=center,%
-%font=\policesoustitreboite] at (frame.south) %
-%{\vphantom{pP}\BoxSubTitle} ;
-%}
-%
-%\ParamBoites[PoliceTitre=\bfseries,PoliceSousTitre=\small\sffamily]
-%
-%\CreationBoite{BoxDef}{CompteurDefi}{\faAddressBook}{Définition}
-%\CreationBoite[lime]{BoxProp}{CompteurProp}{\faAmbulance}{Propriété}
-%
-%\begin{demohigh}
-%On va montrer en situation :
-%
-%\begin{BoxDef}[ComplementTitre={ (importante)},SousTitre={- Fin -}]
-%\lipsum[1][1-2]
-%\end{BoxDef}
-%
-%\begin{BoxProp}[ComplementTitre={ (très importante)},Compteur=false]
-%\lipsum[1][3-4]
-%\end{BoxProp}
-%
-%Voili voilà !
-%\end{demohigh}
-%
-%\pagebreak
-%
-%\subsection{Galerie pour des boîtes à destination de cours}
-%
-%Pour les exemples suivants, les paramètres et styles ont été remis par défaut.
-%
-%Toute couleur (\MontreCode{xcolor} n'est pas chargé avec des options spécifiques) peut être utilisée pour créer une boîte.
-%
-%\tcbset{baseboite/.style={
-% enhanced,sharp corners=uphill,boxrule=1.25pt,%
-% before skip=0.5em,after skip=0.5em,%
-% colback=white,top=4mm,left={\margeboite-4.25pt},right={\margeboite-4.25pt}
-%}%
-%}
-%
-%\RenewDocumentCommand\TitreBoite{ m m m m }{%
-% %1=couleur
-% %2=icone
-% %3=nom
-% %4=compteur
-% % \BoxModifLabel = texte entre label et compteur
-% % \BoxCpltTitle = Texte après le compteur
-% \node[inner sep=3pt,rounded corners=3pt,draw=#1,line width=1.25pt,%
-% rectangle,fill=#1!5!white,anchor=west,xshift=\margeboite,text=black,%
-% font=\policetitreboite]%
-% at (frame.north west)
-% {%
-% \,\IfStrEq{#2}{}{}{{\small#2}~}\vphantom{Ppé}%
-% \ifboolKV[Boites]{Pluriel}{\StrBehind{#3}{/}}{\StrBefore{#3}{/}}%
-% \IfStrEq{\BoxModifLabel}{}{}{\BoxModifLabel}\ifboolKV[Boites]{Compteur}{~#4}{}%
-% \IfStrEq{\BoxCpltTitle}{}{}{\BoxCpltTitle}\,%
-% } ;
-%}
-%
-%\RenewDocumentCommand\SousTitreBoite{ }{%\BoxSubTitle = Sous-titre
-% \node[fill=white,anchor=east,xshift=-\margeboite,text=red!75!black,%
-% font=\policesoustitreboite] at (frame.north east) %
-% {\vphantom{Ppé}\BoxSubTitle} ;
-%}
-%
-%\RenewDocumentCommand\LogoCoinDroit{ }{%
-% \begin{tcbclipinterior}%
-% \node[opacity=\BoxOpaciteLogo,rotate=-\BoxRotationLogo]%
-% at ($(interior.south east)+(-10pt,10pt)$) %
-% {\includegraphics[height=\BoxHauteurLogo]{\BoxLogo}};%
-% \end{tcbclipinterior}%
-%}
-%
-%\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-%\ParamBoites %on remet à 0 les paramètres
-%\CreationBoite[teal]{EnvDefi}{CptDefi}{\faIcon[regular]{comment-dots}}{Définition/Définitions}
-%\CreationBoite[yellow]{EnvHumour}{CptHumour}{\faIcon[regular]{laugh-wink}}{Humour/Humours}
-%\CreationBoite[violet]{EnvProp}{CptProp}{\faCog}{Propriété/Propriétés}
-%\CreationBoite[red]{EnvThm}{CptThm}{\faBullhorn}{Théorème/Théorèmes}
-%\CreationBoite[blue]{EnvRmq}{CptRmq}{\faHandPointRight[regular]}{Remarque/Remarques}
-%
-%\begin{EnvDefi}
-%\lipsum[1][3-4]
-%\end{EnvDefi}
-%
-%\begin{EnvHumour}
-%\lipsum[2][3-4]
-%\end{EnvHumour}
-%
-%\begin{EnvProp}
-%\lipsum[2][3-4]
-%\end{EnvProp}
-%
-%\begin{EnvThm}
-%\lipsum[2][3-4]
-%\end{EnvThm}
-%
-%\begin{EnvRmq}[Pluriel,Logo={example-image-1x1},SousTitre={ - Fondamentales -}]
-%\lipsum[3][1-7]
-%\end{EnvRmq}
-%\end{demohigh}
-%
-%\pagebreak
-%
-%\section{Historique}
-%
-%\verb|v0.1.0|~:~~~~Version initiale
-%
-%\vspace*{15mm}
-%
-%\pagebreak
+\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+%Paragraphs from https://ipsum.one/
+A third one : \HighlightText*[bg=green,border=green]{A profound silence reigned among
+the congregation ; the officers occupied the apsis of the church, and, in the midst of
+them, stood Captain Anderson, as pastor. My friend Dean Pitferge was near him, his quick
+little eyes running over the whole assembly. I will venture to say he was there more out
+of curiosity than anything else.}
+\end{demohigh}
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/highlightx/tex/highlightx.sty b/macros/latex/contrib/highlightx/tex/highlightx.sty
index 1fbcb64591..caef0c0c56 100644
--- a/macros/latex/contrib/highlightx/tex/highlightx.sty
+++ b/macros/latex/contrib/highlightx/tex/highlightx.sty
@@ -1,19 +1,30 @@
% Author : C. Pierquet
+% Source : Antal Spector-Zabusky
% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{highlightx}[2023/09/01 0.1.1 Macros pour surligner du texte, meme en mode paragraphe]
+\ProvidesPackage{highlightx}[2023/09/03 0.1.2 Macros pour surligner du texte, meme en mode paragraphe]
%====HISTORIQUE
+% v 0.1.2 Version étoilée pour \genhighlightpar afin d'activer \NoAutoSpacing + retour du code paragraphe main levée
% v 0.1.1 Suppression code paragraphe avec effet
% v 0.1.0 Version initiale [fr] et [en]
+%====OPTION babel
+\newif\if@babel\@babeltrue
+\DeclareOption{nobabel}{\@babelfalse}
+\DeclareOption*{}
+\ProcessOptions\relax
+
%====BASE
\RequirePackage{soul}
\RequirePackage{tikz}
\RequirePackage{xstring}
\RequirePackage{simplekv}
\usetikzlibrary{tikzmark,calc,decorations.pathmorphing}
+\if@babel
+ \usetikzlibrary{babel}
+\fi
\colorlet{hlcolback}{yellow!35}
%====COMMANDES POUR FORMULES
@@ -91,8 +102,216 @@
}
%====COMMANDES POUR PARAGRAPHES SIMPLES (sans effet, pour du tcbox par exemple)
-\NewDocumentCommand\genhighlightpar{ O{hlcolback} m }{%
- {\sethlcolor{#1}\hl{#2}}%
+\NewDocumentCommand\genhighlightpar{ s O{hlcolback} m }{%
+ \IfBooleanTF{#1}%
+ {\sethlcolor{#2}\NoAutoSpacing\hl{#3}}%
+ {\sethlcolor{#2}\hl{#3}}%
+}
+
+%====COMMANDES POUR PARAGRAPHES avec effet, code de base de Antal Spector-Zabusky :-)
+\def\surlignparbg{yellow}
+\def\surlignparopac{0.25}
+\newlength{\tmp@hauteur@char}
+\newlength{\tmp@profondeur@char}
+\newdimen\highlight@previous
+\newdimen\highlight@current
+
+\defKV[surligpar]{%
+ Fond=\def\surlignparbg{#1},%
+ Bord=\def\surlignparborder{#1},%
+ Offset=\def\surlignparoffset{#1},%
+ Opacite=\def\surlignparopac{#1}
+}
+
+\setKVdefault[surligpar]{%
+ Fond=yellow,%
+ Bord=none,%
+ Offset=1pt,%
+ Opacite=0.25
+}
+
+\defKV[hlightpar]{%
+ bg=\def\surlignparbg{#1},%
+ border=\def\surlignparborder{#1},%
+ offset=\def\surlignparoffset{#1},%
+ opacity=\def\surlignparopac{#1}
+}
+
+\setKVdefault[hlightpar]{%
+ bg=yellow,%
+ border=none,%
+ offset=1pt,%
+ opacity=0.25
+}
+
+\newcommand{\highlight@DoHighlight}{
+ \fill[hlparhw] ($(begin highlight)+(-\surlignparoffsetH,1.05*\tmp@hauteur@char+\surlignparoffsetV)$) rectangle ($(end highlight)+(\surlignparoffsetH,-1.05*\tmp@profondeur@char-\surlignparoffsetV)$) ;
+}
+
+\newcommand{\highlight@BeginHighlight}{
+ \coordinate (begin highlight) at (0,0) ;
+}
+
+\newcommand{\highlight@EndHighlight}{
+ \coordinate (end highlight) at (0,0) ;
+}
+
+\NewDocumentCommand\SurlignerTexte{ s O{} D<>{} }{%
+ %étoilée = supprimer effet bordure
+ %1 = clés simplekv
+ %2 = options tikz
+ \useKVdefault[surligpar]%
+ \setKV[surligpar]{#2}%
+ \IfBooleanTF{#1}%
+ {%
+ \tikzset{hlparhw/.style={outer sep=-15pt, inner sep=0pt,every highlighter,this highlighter}}%
+ }%
+ {%
+ \tikzset{hlparhw/.style={encadreformule,outer sep=-15pt,inner sep=0pt,every highlighter,this highlighter}}%
+ }%
+ \IfSubStr{\surlignparoffset}{/}%
+ {%
+ \StrCut{\surlignparoffset}{/}{\surlignparoffsetH}{\surlignparoffsetV}%
+ }%
+ {%
+ \def\surlignparoffsetH{\surlignparoffset}\def\surlignparoffsetV{\surlignparoffset}%
+ }%
+ \tikzset{every highlighter/.style={color=\surlignparbg,fill opacity=\surlignparopac,draw=\surlignparborder,#3}}%
+ \settoheight{\tmp@hauteur@char}{\hbox{B}}%
+ \settodepth{\tmp@profondeur@char}{\hbox{q}}%
+ \tikzset{this highlighter/.style={#3}}%
+ \SOUL@setup
+ %
+ \def\SOUL@preamble{%
+ \begin{tikzpicture}[overlay, remember picture]
+ \highlight@BeginHighlight
+ \highlight@EndHighlight
+ \end{tikzpicture}%
+ }%
+ %
+ \def\SOUL@postamble{%
+ \begin{tikzpicture}[overlay, remember picture]
+ \highlight@EndHighlight
+ \highlight@DoHighlight
+ \end{tikzpicture}%
+ }%
+ %
+ \def\SOUL@everyhyphen{%
+ \discretionary{%
+ \SOUL@setkern\SOUL@hyphkern
+ \SOUL@sethyphenchar
+ \tikz[overlay, remember picture] \highlight@EndHighlight ;%
+ }{%
+ }{%
+ \SOUL@setkern\SOUL@charkern
+ }%
+ }%
+ %
+ \def\SOUL@everyexhyphen##1{%
+ \SOUL@setkern\SOUL@hyphkern
+ \hbox{##1}%
+ \discretionary{%
+ \tikz[overlay, remember picture] \highlight@EndHighlight ;%
+ }{%
+ }{%
+ \SOUL@setkern\SOUL@charkern
+ }%
+ }%
+ %
+ \def\SOUL@everysyllable{%
+ \begin{tikzpicture}[overlay, remember picture]
+ \path let \p0 = (begin highlight), \p1 = (0,0) in \pgfextra
+ \global\highlight@previous=\y0
+ \global\highlight@current =\y1
+ \endpgfextra (0,0) ;
+ \ifdim\highlight@current < \highlight@previous
+ \highlight@DoHighlight
+ \highlight@BeginHighlight
+ \fi
+ \end{tikzpicture}%
+ \the\SOUL@syllable
+ \tikz[overlay, remember picture] \highlight@EndHighlight ;%
+ }%
+ \SOUL@
+}
+
+\NewDocumentCommand\HighlightText{ s O{} D<>{} }{%
+ %étoilée = supprimer effet bordure
+ %1 = clés simplekv
+ %2 = options tikz
+ \useKVdefault[hlightpar]%
+ \setKV[hlightpar]{#2}%
+ \IfBooleanTF{#1}%
+ {%
+ \tikzset{hlparhw/.style={outer sep=-15pt, inner sep=0pt,every highlighter,this highlighter}}%
+ }%
+ {%
+ \tikzset{hlparhw/.style={borderformula,outer sep=-15pt,inner sep=0pt,every highlighter,this highlighter}}%
+ }%
+ \IfSubStr{\surlignparoffset}{/}%
+ {%
+ \StrCut{\surlignparoffset}{/}{\surlignparoffsetH}{\surlignparoffsetV}%
+ }%
+ {%
+ \def\surlignparoffsetH{\surlignparoffset}\def\surlignparoffsetV{\surlignparoffset}%
+ }%
+ \tikzset{every highlighter/.style={color=\surlignparbg,fill opacity=\surlignparopac,draw=\surlignparborder,#3}}%
+ \settoheight{\tmp@hauteur@char}{\hbox{B}}%
+ \settodepth{\tmp@profondeur@char}{\hbox{q}}%
+ \tikzset{this highlighter/.style={#3}}%
+ \SOUL@setup
+ %
+ \def\SOUL@preamble{%
+ \begin{tikzpicture}[overlay, remember picture]
+ \highlight@BeginHighlight
+ \highlight@EndHighlight
+ \end{tikzpicture}%
+ }%
+ %
+ \def\SOUL@postamble{%
+ \begin{tikzpicture}[overlay, remember picture]
+ \highlight@EndHighlight
+ \highlight@DoHighlight
+ \end{tikzpicture}%
+ }%
+ %
+ \def\SOUL@everyhyphen{%
+ \discretionary{%
+ \SOUL@setkern\SOUL@hyphkern
+ \SOUL@sethyphenchar
+ \tikz[overlay, remember picture] \highlight@EndHighlight ;%
+ }{%
+ }{%
+ \SOUL@setkern\SOUL@charkern
+ }%
+ }%
+ %
+ \def\SOUL@everyexhyphen##1{%
+ \SOUL@setkern\SOUL@hyphkern
+ \hbox{##1}%
+ \discretionary{%
+ \tikz[overlay, remember picture] \highlight@EndHighlight ;%
+ }{%
+ }{%
+ \SOUL@setkern\SOUL@charkern
+ }%
+ }%
+ %
+ \def\SOUL@everysyllable{%
+ \begin{tikzpicture}[overlay, remember picture]
+ \path let \p0 = (begin highlight), \p1 = (0,0) in \pgfextra
+ \global\highlight@previous=\y0
+ \global\highlight@current =\y1
+ \endpgfextra (0,0) ;
+ \ifdim\highlight@current < \highlight@previous
+ \highlight@DoHighlight
+ \highlight@BeginHighlight
+ \fi
+ \end{tikzpicture}%
+ \the\SOUL@syllable
+ \tikz[overlay, remember picture] \highlight@EndHighlight ;%
+ }%
+ \SOUL@
}
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
index 5913867ba9..75451e0be5 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
index 87fdf3cd19..e81ed1e676 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
@@ -5,12 +5,13 @@
% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
\documentclass[a4paper,french,11pt]{article}
-\def\PLversion{2.7.3}
-\def\PLdate{27 août 2023}
+\def\PLversion{2.7.4}
+\def\PLdate{3 septembre 2023}
\usepackage{amsfonts}
\usepackage{ProfLycee}
-\useproflyclib{piton,minted,pythontex}
+\useproflyclib{piton,minted,pythontex,ecritures}
\usepackage[math-style=french]{fourier-otf}
+\usepackage{mathrsfs}%pour mathscr
\usepackage{awesomebox}
\usepackage[lua]{tkz-euclide}
\usepackage{tkz-tab}
@@ -23,6 +24,7 @@
\usepackage{fancyhdr}
\usepackage{tabularray}
\usepackage{multicol}
+\DeclareMathSymbol{;}\mathbin{operators}{'73} %espacement avec ;
%fancy
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
@@ -133,7 +135,7 @@
commentstyle={\itshape\color{gray}},
keywordstyle={\color{blue}},%
classoffset=0,%
- keywords={useproflyclib,includegraphics},%
+ keywords={dfrac,useproflyclib,includegraphics},%
alsoletter={-},%
keywordstyle={\color{blue}},%
classoffset=1,%
@@ -142,7 +144,7 @@
keywordstyle={\color{violet}},%
classoffset=2,%
alsoletter={-},%
- morekeywords={\ResolutionApprochee,\SolutionTVI,\CalculTermeRecurrence,\ToileRecurrence,\SolutionSeuil,\IntegraleApprochee,\GrilleTikz,\AxesTikz,\AxexTikz,\AxeyTikz,\FenetreTikz,\FenetreSimpleTikz,\DeclareFonctionTikz,\CourbeTikz,\OrigineTikz,\SplineTikz,\TangenteTikz,\MiniSchemaSignes,\MiniSchemaSignesTkzTab,\IntegraleApprocheeTikz,\CartoucheCapytale,\PaveTikz,\TetraedreTikz,\CercleTrigo,\AffPoint,\AffVecteur,\TrouveEqCartPlan,\TrouveEqParamDroite,\TrouveEqCartDroite,\TrouveNorme,\TrouveDistancePtPlan,\EquationReduite,\CalculsRegLin,\PointsRegLin,\NuagePointsTikz,\PointMoyenTikz,\BoiteMoustaches,\BoiteMoustachesAxe,\Histogramme,\CalcBinomP,\CalcBinomC,\BinomP,\BinomC,\CalcPoissP,\CalcPoissC,\PoissonP,\PoissonC,\CalcGeomP,\CalcGeomC,\GeomP,\GeomC,\CalcHypergeomP,\CalcHypergeomP,\HypergeomP,\HypergeomC,\CalcNormC,\NormaleC,\CalcExpoC,\ExpoC,\ArbreProbasTikz,\LoiNormaleGraphe,\LoiExpoGraphe,\NbAlea,\VarNbAlea,\TirageAleatoireEntiers,\Arrangement,\Combinaison,\ConversionDecBin,\ConversionBinHex,\ConversionVersDec,\ConversionBaseDix,\ConversionDepuisBaseDix,\PresentationPGCD,\EquationDiophantienne,\ConversionFraction,\SimplificationRacine,\EcritureEnsemble,\EcritureTrinome,\MesurePrincipale,\LigneTrigo,\SudoMaths,\FonctionRepartTikz
+ morekeywords={\ResolutionApprochee,\SolutionTVI,\CalculTermeRecurrence,\ToileRecurrence,\SolutionSeuil,\IntegraleApprochee,\GrilleTikz,\AxesTikz,\AxexTikz,\AxeyTikz,\FenetreTikz,\FenetreSimpleTikz,\DeclareFonctionTikz,\CourbeTikz,\OrigineTikz,\SplineTikz,\TangenteTikz,\MiniSchemaSignes,\MiniSchemaSignesTkzTab,\IntegraleApprocheeTikz,\CartoucheCapytale,\PaveTikz,\TetraedreTikz,\CercleTrigo,\AffPoint,\AffVecteur,\TrouveEqCartPlan,\TrouveEqParamDroite,\TrouveEqCartDroite,\TrouveNorme,\TrouveDistancePtPlan,\EquationReduite,\CalculsRegLin,\PointsRegLin,\NuagePointsTikz,\PointMoyenTikz,\BoiteMoustaches,\BoiteMoustachesAxe,\Histogramme,\CalcBinomP,\CalcBinomC,\BinomP,\BinomC,\CalcPoissP,\CalcPoissC,\PoissonP,\PoissonC,\CalcGeomP,\CalcGeomC,\GeomP,\GeomC,\CalcHypergeomP,\CalcHypergeomP,\HypergeomP,\HypergeomC,\CalcNormC,\NormaleC,\CalcExpoC,\ExpoC,\ArbreProbasTikz,\LoiNormaleGraphe,\LoiExpoGraphe,\NbAlea,\VarNbAlea,\TirageAleatoireEntiers,\Arrangement,\Combinaison,\ConversionDecBin,\ConversionBinHex,\ConversionVersDec,\ConversionBaseDix,\ConversionDepuisBaseDix,\PresentationPGCD,\EquationDiophantienne,\ConversionFraction,\SimplificationRacine,\EcritureEnsemble,\EcritureTrinome,\MesurePrincipale,\LigneTrigo,\SudoMaths,\FonctionRepartTikz,\IntervalleFF,\IntervalleFO,\IntervalleOF,\IntervalleOO,\RepereOij,\RepereOuv,\RepereOijk,\ReperePlan,\RepereEspace,\jfalg,\jfexp,\LoiNormale,\LoiBinomiale,\LoiPoisson,\LoiExpo,\LoiUnif,\Courbe,\Suite,\CoordPtPl,\CoordPtEsp,\CoordVecPl,\CoordVecEsp,\MatDeux,\Vecteur,\Esper,\Varianc,\EcType,\dx,\Integrale,\Modulo,\Arrondi
},%
keywordstyle={\color{CouleurVertForet}},%
classoffset=3,%
@@ -367,7 +369,7 @@
{\deblst} déterminer la mesure principale d'un angle, calculer les lignes trigonométriques d'angles \og classiques \fg{} \\
{\deblst} résoudre une équation diophantienne \og classique \fg{} \\
{\deblst} travailler avec un peu de géométrie analytique \\
-{\deblst} \ldots}
+{\deblst} composer des mathématiques}
~
@@ -442,7 +444,7 @@ Il est cependant possible, grâce à l'option \Cle{[xcolor]} à passer au charge
Le {package} \ctex{ProfLycee} charge et utilise les {packages} :
\begin{itemize}
- \item \ctex{mathtools}, \ctex{amssymb} ;
+ \item \ctex{mathtools}, \ctex{amssymb}, \ctex{xspace}, \ctex{esvect}, \ctex{interval} ;
% \item \ctex{xcolor} avec l' option \textsf{[table,svgnames]} ;
\item \ctex{tikz}, \ctex{pgf}, \ctex{pgffor}, \ctex{nicefrac}, \ctex{nicematrix} ;
\item \ctex{tcolorbox} avec les librairies \ctex{breakable,fitting,skins,listings,listingsutf8,hooks} ;
@@ -495,7 +497,8 @@ Les librairies disponibles seront indiquées dans les sections spécifiques. Pou
\begin{itemize}
\item \clib{piton} (page \pageref{pythonpiton}) ;
\item \clib{minted} (page \pageref{pytminted}) ;
- \item \clib{pythontex} (page \pageref{pythontex}).
+ \item \clib{pythontex} (page \pageref{pythontex}) ;
+ \item \clib{ecritures} (page \pageref{ecrituresmath}).
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
\end{noteblock}
@@ -902,6 +905,294 @@ Elles sont présentées de manière \textit{succincte}, mais elles sont présent
\phantom{t}\par\vfill\par
\begin{PART}
\begin{center}
+ \Huge\MakeUppercase{Écritures mathématiques}
+ \end{center}
+\end{PART}
+\par\vfill\par\phantom{t}
+
+\newpage
+
+\part{Écritures d'objets mathématiques}\label{ecrituresmath}
+
+\section{Introduction}
+
+\begin{tipblock}
+Les commandes de cette section sont disponibles en chargeant la librairie \clib{ecritures}, car elles peuvent redéfinir des commandes personnelles déjà existantes !
+\end{tipblock}
+
+\section{Commandes}
+
+\subsection{Arrondi}
+
+\begin{tipblock}
+Il est possible de calculer/arrondir/formater un calcul mathématique, grâce aux package \ctex{siunitx} et \ctex{xinteval}.
+
+\begin{itemize}
+ \item la version étoilée force l'affichage du \og + \fg{} pour les nombres positifs ;
+ \item l'argument optionnel est la précision demandée (3 par défaut)
+ \item l'argument obligatoire est le calcul, au langage \ctex{xinteval}.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{PresCodeTexPL}{}
+$1+\dfrac{7}{11} \approx \Arrondi{1+7/11} \approx \Arrondi[5]{1+7/11} \approx \Arrondi*[2]{1+7/11}$
+
+$\ln\big(1+\e^{4}\big) \approx \Arrondi[6]{log(1+exp(4))}$
+\end{PresCodeTexPL}
+
+\subsection{Ensembles et intervalles}
+
+\begin{tipblock}
+Les commandes suivantes permettent de composer les ensembles traditionnels, en mode \textit{tableau noir}.
+
+Elles sont dans un bloc \textsf{ensuremath}, donc les \textsf{\$...\$} ne sont pas nécessaires.
+
+\smallskip
+
+À noter la macro particulière pour l'ensemble des quaternions, pour éviter des erreurs éventuelles de \textit{re}définition.
+\end{tipblock}
+
+\begin{PresCodeTexPL}{}
+\N, \Z, \D, \Q, \R, \C, \ensH, \N*, \Z*, \D*, \Q*, \R*, \C*, \ensH*
+\end{PresCodeTexPL}
+
+\begin{tipblock}
+Des intervalles peuvent être composés, grâce à la commande \ctex{\textbackslash IntervalleXX}, dont la base est le package \ctex{interval} :
+
+\begin{itemize}
+ \item la commande est insérée dans un bloc \textsf{ensuremath} ;
+ \item le séparateur est le point-virgule ;
+ \item l'espacement autour du point-virgule est laissé aux réglages du document (\ctex{babel}, \ctex{frenchmath}, etc).
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{PresCodeTexPL}{}
+\IntervalleFO{0}{+\infty} ou \IntervalleOO{0}{+\infty} ou \IntervalleOO{-\infty}{0} ou \IntervalleOF{-\infty}{0}
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+\IntervalleFF{\frac12}{\sqrt{26}} ou \IntervalleOO{\frac12}{\sqrt{26}} ou
+\IntervalleFO{\dfrac12}{\sqrt{26}} ou \IntervalleFO{\dfrac12}{\sqrt{26}}
+\end{PresCodeTexPL}
+
+\subsection{Repères et coordonnées}
+
+\begin{tipblock}
+Des vecteurs/repères/coordonnées peuvent être composées :
+
+\begin{itemize}
+ \item les vecteurs sont mis en forme par le package \ctex{esvect} (y compris en version étoilée pour les indices) ;
+ \item des coordonnées de point/vecteur dans le plan ou l'espace ;
+ \item des repères génériques, avec choix du séparateur entre le point et les vecteurs ;
+ \item les versions étoilées des repères n'alignent pas les flèches.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{PresCodeTexPL}{}
+%vecteurs
+\Vecteur{\imath} et \Vecteur{u} et \Vecteur{AB}
+
+$\Vecteur{AB}+\Vecteur{BC} = \Vecteur{AC}$
+
+$\Vecteur*{u}[1]+\Vecteur*{v}[2] = \Vecteur*{w}[3]$
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+%coordonnées points
+\CoordPtPl{4}{-2} ou \CoordPtPl{\frac12}{\frac47}
+
+\CoordPtEsp{4}{-2}{7} ou \CoordPtEsp{-2}{\frac12}{\frac47}
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+%coordonnées vecteurs
+\CoordVecPl{4}{-2} ou \CoordVecPl{\frac12}{\frac47}
+
+\CoordVecEsp{4}{-2}{7} ou \CoordVecEsp{-2}{\frac12}{\frac47}
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+%matrices 2x2
+\MatDeux{4}{-2}{1}{-5}
+
+\MatDeux{\frac47}{-1}{0}{-\frac17}
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+%repères classiques
+\RepereOij ou \RepereOij* ou \RepereOij[Sep={,}] ou \RepereOij*[Sep={,}]
+
+\RepereOijk ou \RepereOijk* ou \RepereOijk[Sep={,}] ou \RepereOijk*[Sep={,}]
+
+\RepereOuv ou \RepereOuv* ou \RepereOuv[Sep={,}] ou \RepereOuv*[Sep={,}]
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+%repères personnalisés
+\ReperePlan{A}{AB}{AC} ou \ReperePlan*{A}{AB}{AC} ou \ReperePlan*{O}{OI}{OJ} ou \ReperePlan[Sep={,}]{O}{OI}{OK}
+
+\RepereEspace{A}{AB}{AC}{AD} ou \RepereEspace*{A}{AB}{AC}{k} ou \RepereEspace{D}{i}{j}{k}
+\end{PresCodeTexPL}
+
+\subsection{Divers}
+
+\begin{tipblock}
+La librairie \clib{ecritures} permet également de définir des commandes pour :
+
+\begin{itemize}
+ \item composer le nom d'une courbe ;
+ \item composer le \og i \fg{} et le \og e \fg{} en romain ;
+ \item composer le complexe $\j$ en mode algébrique ou exponentielle ;
+ \item composer un modulo avec choix de la congruence ;
+ \item composer une suite numérique ;
+ \item composer une intégrale (mode \textsf{displaystyle}).
+\end{itemize}
+
+À noter que les commandes sont dans un bloc \textsf{ensuremath}.
+\end{tipblock}
+
+\begin{PresCodeTexPL}{}
+%version normale := mathcal
+%version étoilée := mathscr (si chargé)
+
+\Courbe et \Courbe[f] et \Courbe[g^{-1}]
+
+\Courbe* et \Courbe*[f] et \Courbe*[g^{-1}]
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+$\e^{\i \pi} = -1$
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+On a $\j = \jfalg = \jfexp$
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+%La version étoilée augmente l'espacement, l'argument optionnel change la présentation
+$21 \equiv 1 \Modulo{5} \equiv 1 \Modulo[Par]{5} \equiv 1 \Modulo[Txt]{5}$
+
+$21 \equiv 1 \Modulo*{5} \equiv 1 \Modulo*[Par]{5} \equiv 1 \Modulo*[Txt]{5}$
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+Soient les suites \Suite{u} et \Suite[p]{v} et \Suite[q]{\Omega}.
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+$I = \Integrale f(x) \dx = \Integrale f(t) \dx[t]$
+\end{PresCodeTexPL}
+
+\subsection{Probabilités}
+
+\begin{tipblock}
+La librairie \clib{ecritures} permet également de définir des commandes pour :
+
+\begin{itemize}
+ \item composer une loi classique (binomiale, exponentielle, etc) avec \textsf{mathcal} ou \textsf{mathscr} ;
+ \item composer espérance, variance et écart-type.
+\end{itemize}
+
+À noter que les commandes sont dans un bloc \textsf{ensuremath}.
+\end{tipblock}
+
+\begin{PresCodeTexPL}{}
+%version normale := mathcal
+%version étoilée := mathscr (si chargé)
+
+\LoiNormale{150}{25} ou \LoiNormale*{150}{25}
+
+\LoiBinomiale{150}{\num{0.45}} ou \LoiBinomiale*{150}{\num{0.45}}
+
+\LoiPoisson{5} ou \LoiPoisson*{5}
+
+\LoiExpo{\num{0.001}} ou \LoiExpo*{\num{0.001}}
+
+\LoiUnif{\IntervalleFF{5}{60}} ou \LoiUnif*{\IntervalleFF{5}{60}}
+\end{PresCodeTexPL}
+
+\begin{PresCodeTexPL}{}
+%par défaut E et V en \mathbb
+\Esper{X} ou \Esper[E]{X} \\
+\Varianc{X^2} ou \Varianc[V]{X^2} \\
+\EcType{X^2}
+\end{PresCodeTexPL}
+
+\pagebreak
+
+\section{Collection d'objets}\label{ensembles}
+
+\subsection{Idée}
+
+\begin{tipblock}
+L'idée est d'obtenir une commande pour simplifier l'écriture d'un ensemble d'éléments, en laissant gérer les espaces.
+
+Les délimiteurs de l'ensemble créé sont toujours \textsf{\{~~\}}.
+\end{tipblock}
+
+\begin{PresCodeTexPL}{listing only}
+\EcritureEnsemble[clés]{liste}
+\end{PresCodeTexPL}
+
+\subsection{Commande et options}
+
+\begin{cautionblock}
+Peu d'options pour ces commandes :
+
+\begin{itemize}
+ \item le premier argument, \textit{optionnel}, permet de spécifier les \Cle{Clés} :
+ \begin{itemize}
+ \item clé \Cle{Sep} qui correspond au délimiteur des éléments de l'ensemble ; \hfill{}défaut \Cle{;}
+ \item clé \Cle{Option} qui est un code (par exemple \textsf{strut}\dots) inséré avant les éléments ;\hfill{}défaut \Cle{vide}
+ \item un booléen \Cle{Mathpunct} qui permet de préciser si on utilise l'espacement mathématique \textsf{mathpunct}.
+
+ \hfill{}défaut \Cle{true}
+ \end{itemize}
+ \item le second, \textit{obligatoire}, est la \textsf{liste} des éléments, séparés par \textsf{/}.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{cautionblock}
+
+\begin{PresCodeTexPL}{listing only}
+$\EcritureEnsemble{a/b/c/d/e}$
+$\EcritureEnsemble[Mathpunct=false]{a/b/c/d/e}$
+$\EcritureEnsemble[Sep={,}]{a/b/c/d/e}$
+$\EcritureEnsemble[Option={\strut}]{a/b/c/d/e}$ % \strut pour "augmenter" un peu la hauteur des {}
+$\EcritureEnsemble{ \frac{1}{1+\frac{1}{3}} / b / c / d / \frac{1}{2} }$
+\end{PresCodeTexPL}
+
+\begin{PresCodeSortiePL}{text only}
+$\EcritureEnsemble{a/b/c/d/e}$
+
+\smallskip
+
+$\EcritureEnsemble[Mathpunct=false]{a/b/c/d/e}$
+
+\smallskip
+
+$\EcritureEnsemble[Sep={,}]{a/b/c/d/e}$
+
+\smallskip
+
+$\EcritureEnsemble[Option={\strut}]{a/b/c/d/e}$
+
+\smallskip
+
+$\EcritureEnsemble{ \displaystyle\frac{1}{1+\frac{1}{3}} / b / c / d / \displaystyle\frac{1}{2} }$
+\end{PresCodeSortiePL}
+
+\begin{noteblock}
+Attention cependant au comportement de la commande avec des éléments en mode \textsf{mathématique}, ceux-ci peuvent générer une erreur si \textsf{displaystyle} n'est pas utilisé\ldots
+\end{noteblock}
+
+\newpage
+
+\phantom{t}\par\vfill\par
+\begin{PART}
+ \begin{center}
\Huge\MakeUppercase{Outils pour l'analyse}
\end{center}
\end{PART}
@@ -6887,73 +7178,6 @@ $\ConversionFraction{0.1/0.7+30/80}$
A priori le package \ctex{xint} permet de s'en sortir pour des calculs \og simples \fg, je ne garantis pas que tout calcul ou toute division donne un résultat \textit{satisfaisant} !
\end{noteblock}
-\pagebreak
-
-\section{Ensembles}\label{ensembles}
-
-\subsection{Idée}
-
-\begin{tipblock}
-L'idée est d'obtenir une commande pour simplifier l'écriture d'un ensemble d'éléments, en laissant gérer les espaces.
-
-Les délimiteurs de l'ensemble créé sont toujours \textsf{\{~~\}}.
-\end{tipblock}
-
-\begin{PresCodeTexPL}{listing only}
-\EcritureEnsemble[clés]{liste}
-\end{PresCodeTexPL}
-
-\subsection{Commande et options}
-
-\begin{cautionblock}
-Peu d'options pour ces commandes :
-
-\begin{itemize}
-\item le premier argument, \textit{optionnel}, permet de spécifier les \Cle{Clés} :
-\begin{itemize}
- \item clé \Cle{Sep} qui correspond au délimiteur des éléments de l'ensemble ; \hfill{}défaut \Cle{;}
- \item clé \Cle{Option} qui est un code (par exemple \textsf{strut}\dots) inséré avant les éléments ;\hfill{}défaut \Cle{vide}
- \item un booléen \Cle{Mathpunct} qui permet de préciser si on utilise l'espacement mathématique \textsf{mathpunct}.
-
- \hfill{}défaut \Cle{true}
-\end{itemize}
-\item le second, \textit{obligatoire}, est la \textsf{liste} des éléments, séparés par \textsf{/}.
-\end{itemize}
-\vspace*{-\baselineskip}\leavevmode
-\end{cautionblock}
-
-\begin{PresCodeTexPL}{listing only}
-$\EcritureEnsemble{a/b/c/d/e}$
-$\EcritureEnsemble[Mathpunct=false]{a/b/c/d/e}$
-$\EcritureEnsemble[Sep={,}]{a/b/c/d/e}$
-$\EcritureEnsemble[Option={\strut}]{a/b/c/d/e}$ % \strut pour "augmenter" un peu la hauteur des {}
-$\EcritureEnsemble{ \frac{1}{1+\frac{1}{3}} / b / c / d / \frac{1}{2} }$
-\end{PresCodeTexPL}
-
-\begin{PresCodeSortiePL}{text only}
-$\EcritureEnsemble{a/b/c/d/e}$
-
-\smallskip
-
-$\EcritureEnsemble[Mathpunct=false]{a/b/c/d/e}$
-
-\smallskip
-
-$\EcritureEnsemble[Sep={,}]{a/b/c/d/e}$
-
-\smallskip
-
-$\EcritureEnsemble[Option={\strut}]{a/b/c/d/e}$
-
-\smallskip
-
-$\EcritureEnsemble{ \displaystyle\frac{1}{1+\frac{1}{3}} / b / c / d / \displaystyle\frac{1}{2} }$
-\end{PresCodeSortiePL}
-
-\begin{noteblock}
-Attention cependant au comportement de la commande avec des éléments en mode \textsf{mathématique}, ceux-ci peuvent générer une erreur si \textsf{displaystyle} n'est pas utilisé\ldots
-\end{noteblock}
-
\newpage
\section{Écriture d'un trinôme, trinôme aléatoire}\label{trinome}
@@ -7455,6 +7679,8 @@ La grille, créée en \TikZ, est portée par le rectangle de \og coins \fg{} $(0
\part{Historique}
+{\small \bverb|v 2.7.4|~:~~~~Ajout de macros pour des écritures mathématiques classiques (\pageref{ecrituresmath})}
+
{\small \bverb|v 2.7.3|~:~~~~Correction de la couleur de bordures vertes pour les codes python}
{\small \bverb|v 2.7.2|~:~~~~\textsf{xcolor} n'est plus chargé par défaut (option \textsf{[xcolor]} pour le charger)
diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
index 98f042395a..f3bd0c6e22 100644
--- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty
+++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
@@ -3,7 +3,8 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2023/08/27 2.7.3 Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2023/09/03 2.7.4 Aide pour l'utilisation de LaTeX en lycee]
+% 2.7.4 Ajout de commandes pour des écritures mathématiques (avec librairie ?)
% 2.7.3 Correction de la couleur de bordures vertes pour les codes python
% 2.7.2 Modification du chargement de xcolor pour éviter les clash errors (couleurs adaptées du coup), passage en option (test)
% 2.7.1 Modification du chargement de tcolorbox
@@ -147,6 +148,11 @@
\input{proflycee-tools-pythontex.tex}
}%
{}%
+ \IfSubStr{#1}{ecritures}%
+ {%
+ \input{proflycee-tools-ecritures.tex}
+ }%
+ {}%
}
%%------Codes listings
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex
new file mode 100644
index 0000000000..2db6379ed6
--- /dev/null
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex
@@ -0,0 +1,264 @@
+% proflycee-tools-ecritures.tex
+% Copyright 2023 Cédric Pierquet
+% 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.
+
+%===PACKAGE
+\RequirePackage{interval}
+\RequirePackage{esvect}
+\RequirePackage{ifthen}
+\RequirePackage{xspace}
+%\RequirePackage{mathrsfs}%pour \mathscr (à voir...)
+
+%===ENSEMBLES CLASSIQUES
+\ifthenelse{\isundefined{\N}}%
+ {%
+ \NewDocumentCommand\N{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{N}^{*}}\xspace}{\ensuremath{\mathbb{N}}\xspace}}%
+ }%
+ {%
+ \RenewDocumentCommand\N{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{N}^{*}}\xspace}{\ensuremath{\mathbb{N}}\xspace}}%
+ }%
+\ifthenelse{\isundefined{\Z}}%
+ {%
+ \NewDocumentCommand\Z{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{Z}^{*}}\xspace}{\ensuremath{\mathbb{Z}}\xspace}}%
+ }%
+ {%
+ \RenewDocumentCommand\Z{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{Z}^{*}}\xspace}{\ensuremath{\mathbb{Z}}\xspace}}%
+ }%
+\ifthenelse{\isundefined{\D}}%
+ {%
+ \NewDocumentCommand\D{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{D}^{*}}\xspace}{\ensuremath{\mathbb{D}}\xspace}}%
+ }%
+ {%
+ \RenewDocumentCommand\D{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{D}^{*}}\xspace}{\ensuremath{\mathbb{D}}\xspace}}%
+ }%
+\ifthenelse{\isundefined{\Q}}%
+ {%
+ \NewDocumentCommand\Q{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{Q}^{*}}\xspace}{\ensuremath{\mathbb{Q}}\xspace}}%
+ }%
+ {%
+ \RenewDocumentCommand\Q{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{Q}^{*}}\xspace}{\ensuremath{\mathbb{Q}}\xspace}}%
+ }%
+\ifthenelse{\isundefined{\R}}%
+ {%
+ \NewDocumentCommand\R{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{R}^{*}}\xspace}{\ensuremath{\mathbb{R}}\xspace}}%
+ }%
+ {%
+ \RenewDocumentCommand\R{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{R}^{*}}\xspace}{\ensuremath{\mathbb{R}}\xspace}}%
+ }%
+\ifthenelse{\isundefined{\C}}%
+ {%
+ \NewDocumentCommand\C{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{C}^{*}}\xspace}{\ensuremath{\mathbb{C}}\xspace}}%
+ }%
+ {%
+ \RenewDocumentCommand\C{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{C}^{*}}\xspace}{\ensuremath{\mathbb{C}}\xspace}}%
+ }%
+\ifthenelse{\isundefined{\ensH}}%
+ {%
+ \NewDocumentCommand\ensH{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{H}^{*}}\xspace}{\ensuremath{\mathbb{H}}\xspace}}%
+ }%
+ {%
+ \RenewDocumentCommand\ensH{ s }{\IfBooleanTF{#1}{\ensuremath{\mathbb{H}^{*}}\xspace}{\ensuremath{\mathbb{H}}\xspace}}%
+ }%
+
+%====INTERVALLES
+\intervalconfig{separator symbol=;}
+\NewDocumentCommand\IntervalleFF{ O{scaled} m m }{\ensuremath{\interval[#1]{#2}{#3}}}
+\NewDocumentCommand\IntervalleOF{ O{scaled} m m }{\ensuremath{\interval[#1,open left]{#2}{#3}}}
+\NewDocumentCommand\IntervalleFO{ O{scaled} m m }{\ensuremath{\interval[#1,open right]{#2}{#3}}}
+\NewDocumentCommand\IntervalleOO{ O{scaled} m m }{\ensuremath{\interval[#1,open]{#2}{#3}}}
+
+%====ARRONDI
+\DeclareDocumentCommand\Arrondi{ s O{3} m }{% * pour afficher signe / opt = précision / argument = nb
+ \IfBooleanTF{#1}{\num[print-implicit-plus]{\xinteval{round(#3,#2)}}}{\num{\xinteval{round(#3,#2)}}}%
+}
+
+%====MODULO
+\NewDocumentCommand\Modulo{ s O{Cro} m }{%
+ \IfStrEq{#2}{Cro}%
+ {\IfBooleanTF{#1}{\quad}{\:\:}[#3]}{}%
+ \IfStrEq{#2}{Par}%
+ {\IfBooleanTF{#1}{\quad}{\:\:}(#3)}{}%
+ \IfStrEq{#2}{Txt}%
+ {\IfBooleanTF{#1}{\:\:}{\:}\text{modulo }#3}{}%
+}
+
+%====COURBE
+\NewDocumentCommand\Courbe{ s O{} }{%
+ \IfBooleanTF{#1}%
+ {%
+ \IfNoValueTF{#2}%
+ {\ensuremath{{\mathscr{C}}}\xspace}%
+ {\ensuremath{{\mathscr{C}}_{#2}}\xspace}%
+ }%
+ {%
+ \IfNoValueTF{#2}%
+ {\ensuremath{{\mathcal{C}}}\xspace}%
+ {\ensuremath{{\mathcal{C}}_{#2}}\xspace}%
+ }%
+}
+
+%====SUITE
+\NewDocumentCommand\Suite{ O{n} m }{%
+ \ensuremath{\left( #2_{#1} \right)}%
+}
+
+%===DIVERS
+\AtBeginDocument{%voir hyperref...
+ \ifthenelse{\isundefined{\i}}{\newcommand\i{{\rm i}}}{\renewcommand\i{{\rm i}}}%
+ \ifthenelse{\isundefined{\e}}{\newcommand\e{{\rm e}}}{\renewcommand\e{{\rm e}}}%
+ \ifthenelse{\isundefined{\j}}{\newcommand\j{{\rm j}}}{\renewcommand\j{{\rm j}}}%
+}
+
+\ifthenelse{\isundefined{\jfexp}}%
+ {\newcommand\jfexp{\ensuremath{\e^{\i\frac{\pi}{3}}}}}%
+ {\renewcommand\jfexp{\ensuremath{\e^{\i\frac{\pi}{3}}}}}%
+
+\ifthenelse{\isundefined{\jfalg}}%
+ {\newcommand\jfalg{\ensuremath{\frac{1}{2}+\i\frac{\sqrt{3}}{2}}}}%
+ {\renewcommand\jfalg{\ensuremath{\frac{1}{2}+\i\frac{\sqrt{3}}{2}}}}%
+
+\ifthenelse{\isundefined{\Esper}}%
+ {\newcommand\Esper[2][\mathbb{E}]{\ensuremath{{#1}{\left({#2}\right)}}}}%
+ {\renewcommand\Esper[2][\mathbb{E}]{\ensuremath{{#1}{\left({#2}\right)}}}}%
+
+\ifthenelse{\isundefined{\Varianc}}%
+ {\newcommand\Varianc[2][\mathbb{V}]{\ensuremath{{#1}{\left({#2}\right)}}}}%
+ {\renewcommand\Varianc[2][\mathbb{V}]{\ensuremath{{#1}{\left({#2}\right)}}}}%
+
+\ifthenelse{\isundefined{\EcType}}%
+ {\newcommand\EcType[1]{\ensuremath{\sigma{\left({#1}\right)}}}}%
+ {\renewcommand\EcType[1]{\ensuremath{\sigma{\left({#1}\right)}}}}%
+
+\ifthenelse{\isundefined{\dx}}%
+ {\newcommand\dx[1][x]{\ensuremath{~\text{d}#1}}}%
+ {\renewcommand\dx[1][x]{\ensuremath{~\text{d}#1}}}%
+
+\ifthenelse{\isundefined{\Integrale}}%
+ {\newcommand\Integrale{\displaystyle\int}}%
+ {\renewcommand\Integrale{\displaystyle\int}}%
+
+
+%====PROBAS
+\NewDocumentCommand\LoiNormale{ s m m }{%
+ \IfBooleanTF{#1}{\ensuremath{\mathscr{N}{\left(#2;#3\right)}}}{\ensuremath{\mathcal{N}{\left(#2;#3\right)}}}%
+}
+\NewDocumentCommand\LoiBinomiale{ s m m }{%
+ \IfBooleanTF{#1}{\ensuremath{\mathscr{B}{\left(#2;#3\right)}}}{\ensuremath{\mathcal{B}{\left(#2;#3\right)}}}%
+}
+\NewDocumentCommand\LoiPoisson{ s m }{%
+ \IfBooleanTF{#1}{\ensuremath{\mathscr{P}_{#2}}}{\ensuremath{\mathcal{P}_{#2}}}%
+}
+\NewDocumentCommand\LoiUnif{ s m }{%
+ \IfBooleanTF{#1}{\ensuremath{\mathscr{U}_{#2}}}{\ensuremath{\mathcal{U}_{#2}}}%
+}
+\NewDocumentCommand\LoiExpo{ s m }{%
+ \IfBooleanTF{#1}{\ensuremath{\mathscr{E}_{#2}}}{\ensuremath{\mathcal{E}_{#2}}}%
+}
+
+%====COORDONNEES, VECTEURS
+\NewDocumentCommand\CoordPtPl{ m m }{\ensuremath{\left(#1;#2\right)}}
+\NewDocumentCommand\CoordPtEsp{ m m m }{\ensuremath{\left(#1;#2;#3\right)}}
+\NewDocumentCommand\CoordVecPl{ m m }{\ensuremath{\begin{pmatrix} #1 \\ #2 \end{pmatrix}}}
+\NewDocumentCommand\CoordVecEsp{ m m m }{\ensuremath{\begin{pmatrix} #1 \\ #2 \\ #3 \end{pmatrix}}}
+\NewDocumentCommand\MatDeux{ m m m m }{\ensuremath{\begin{pmatrix} #1 & #2 \\ #3 & #4 \end{pmatrix}}}
+\NewDocumentCommand\Vecteur{ s m O{} }{%
+ \IfBooleanTF{#1}{\ensuremath{\vv*{#2}{#3}}}{\ensuremath{\vv{#2}}}%
+}
+
+%====REPÈRES
+\setKVdefault[ecrituresreperes]{%
+ Sep={;}
+}
+
+\NewDocumentCommand\RepereOij{ s O{} }{%
+ \useKVdefault[ecrituresreperes]%
+ \setKV[ecrituresreperes]{#2}%
+ \IfBooleanTF{#1}%si étoilé := on n'aligne pas les flèches + nosmash
+ {%
+ \ensuremath{\left(O\useKV[ecrituresreperes]{Sep}\Vecteur{\imath},\Vecteur{\jmath}\right)}\xspace%
+ }%
+ {%
+ \ensuremath{\left(O\useKV[ecrituresreperes]{Sep}\Vecteur{\vphantom{t}\imath},\Vecteur{\vphantom{t}\jmath}\right)}\xspace%
+ }%
+}
+
+\NewDocumentCommand\RepereOuv{ s O{} }{%
+ \useKVdefault[ecrituresreperes]%
+ \setKV[ecrituresreperes]{#2}%
+ \IfBooleanTF{#1}%si étoilé := on n'aligne pas les flèches + nosmash
+ {%
+ \ensuremath{\left(O\useKV[ecrituresreperes]{Sep}\Vecteur{u},\Vecteur{v}\right)}\xspace%
+ }%
+ {%
+ \ensuremath{\left(O\useKV[ecrituresreperes]{Sep}\Vecteur{\vphantom{t}u},\Vecteur{\vphantom{t}v}\right)}\xspace%
+ }%
+}
+
+\NewDocumentCommand\RepereOijk{ s O{} }{%
+ \useKVdefault[ecrituresreperes]%
+ \setKV[ecrituresreperes]{#2}%
+ \IfBooleanTF{#1}%si étoilé := on n'aligne pas les flèches + nosmash
+ {%
+ \ensuremath{\left(O\useKV[ecrituresreperes]{Sep}\Vecteur{\imath},\Vecteur{\jmath},\Vecteur{k}\right)}\xspace%
+ }%
+ {%
+ \ensuremath{\left(O\useKV[ecrituresreperes]{Sep}\Vecteur{\vphantom{t}\imath},\Vecteur{\vphantom{t}\jmath},\Vecteur{\vphantom{t}\smash{k}}\right)}\xspace%
+ }%
+}
+
+\NewDocumentCommand\ReperePlan{ s O{} m m m }{%
+ \useKVdefault[ecrituresreperes]%
+ \setKV[ecrituresreperes]{#2}%
+ \IfBooleanTF{#1}%si étoilé := on n'aligne pas les flèches + nosmash
+ {%
+ \def\vecteurun{#4}\def\vecteurdeux{#5}%
+ }%
+ {%
+ \def\vecteurun{\smash{#4}}\def\vecteurdeux{\smash{#5}}%
+ }%
+ \IfStrEq{#4}{i}{\def\vecteurun{\imath}}{}%
+ \IfStrEq{#4}{j}{\def\vecteurun{\jmath}}{}%
+ \IfStrEq{#5}{i}{\def\vecteurdeux{\imath}}{}%
+ \IfStrEq{#5}{j}{\def\vecteurdeux{\jmath}}{}%
+ \IfBooleanTF{#1}%si étoilé := on n'aligne pas les flèches + nosmash
+ {%
+ \ensuremath{\left(#3\useKV[ecrituresreperes]{Sep}\Vecteur{\vecteurun},\Vecteur{\vecteurdeux}\right)}%
+ }%
+ {%
+ \ensuremath{\left(#3\useKV[ecrituresreperes]{Sep}\Vecteur{\vphantom{t}\vecteurun},\Vecteur{\vphantom{t}\vecteurdeux}\right)}%
+ }%
+}
+
+\NewDocumentCommand\RepereEspace{ s O{} m m m m }{%
+ \useKVdefault[ecrituresreperes]%
+ \setKV[ecrituresreperes]{#2}%
+ \IfBooleanTF{#1}%si étoilé := on n'aligne pas les flèches + nosmash
+ {%
+ \def\vecteurun{#4}\def\vecteurdeux{#5}\def\vecteurtrois{#6}%
+ }%
+ {%
+ \def\vecteurun{\smash{#4}}\def\vecteurdeux{\smash{#5}}\def\vecteurtrois{\smash{#6}}%
+ }%
+ \IfStrEq{#4}{i}{\def\vecteurun{\imath}}{}%
+ \IfStrEq{#4}{j}{\def\vecteurun{\jmath}}{}%
+ \IfStrEq{#5}{i}{\def\vecteurdeux{\imath}}{}%
+ \IfStrEq{#5}{j}{\def\vecteurdeux{\jmath}}{}%
+ \IfStrEq{#6}{i}{\def\vecteurtrois{\imath}}{}%
+ \IfStrEq{#6}{j}{\def\vecteurtrois{\jmath}}{}%
+ \IfBooleanTF{#1}%si étoilé := on n'aligne pas les flèches + nosmash
+ {%
+ \ensuremath{\left(#3\useKV[ecrituresreperes]{Sep}\Vecteur{\vecteurun},\Vecteur{\vecteurdeux},\Vecteur{\vecteurtrois}\right)}%
+ }%
+ {%
+ \ensuremath{\left(#3\useKV[ecrituresreperes]{Sep}\Vecteur{\vphantom{t}\vecteurun},\Vecteur{\vphantom{t}\vecteurdeux},\Vecteur{\vphantom{t}\vecteurtrois}\right)}%
+ }%
+}
+
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/updatemarks/README.md b/macros/latex/contrib/updatemarks/README.md
new file mode 100644
index 0000000000..eb3a99d23c
--- /dev/null
+++ b/macros/latex/contrib/updatemarks/README.md
@@ -0,0 +1,13 @@
+# updatemarks
+A LaTeX package is used to update marks in boxes.
+
+You can use `\usepackage[minipage,multicol,tcolorbox]{updatemarks}` in the preamble
+of your document so that marks in these environments can be found by LaTeX.
+You are able to use `\ExtractMarks` or `\ExtractSplitMarks` to save marks and
+use `\UpdateMarks` to reinsert marks. Read the documentation for more details.
+
+# Copyright and License
+
+Copyright 2023 Wenjian Chern
+
+LICENSE: [LPPL 1.3c](http://www.latex-project.org/lppl.txt)
diff --git a/macros/latex/contrib/updatemarks/doc/updatemarks.pdf b/macros/latex/contrib/updatemarks/doc/updatemarks.pdf
new file mode 100644
index 0000000000..f6e4581896
--- /dev/null
+++ b/macros/latex/contrib/updatemarks/doc/updatemarks.pdf
Binary files differ
diff --git a/macros/latex/contrib/updatemarks/doc/updatemarks.tex b/macros/latex/contrib/updatemarks/doc/updatemarks.tex
new file mode 100644
index 0000000000..2de3b6bded
--- /dev/null
+++ b/macros/latex/contrib/updatemarks/doc/updatemarks.tex
@@ -0,0 +1,322 @@
+\documentclass{l3doc}
+\usepackage{updatemarks}
+\usepackage[a4paper,top=2cm,bottom=2.5cm,left=5cm,right=2cm]{geometry}
+
+\title{Update marks in box\thanks{Issues: \url{https://github.com/Sophanatprime/updatemarks/issues}}}
+\author{WenJian Chern\thanks{Email: longaster@163.com}}
+\date{\today\qquad v0.2b}
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+There are some cases where one may put title in box and still want its
+\cs{markboth} working. This brings the \pkg{updatemarks} package.
+The \pkg{updatemarks} package provides interface to extract marks where are in a
+inner box and then can put the first and last marks back to outer.
+It can automatically update marks where are in \env{minipage},
+\textit{boxed multicols} and \env{tcolorbox} environments.
+\end{abstract}
+
+
+\tableofcontents
+
+
+\section{Usage of the package}
+
+You simply insert \verb|\usepackage{updatemarks}| or
+\verb|\usepackage|\oarg{options}\verb|{updatemarks}| in the preamble of your document.
+
+There are three package options \texttt{minipage},
+\texttt{multicol}(an optional \texttt s) and
+\texttt{tcolorbox}, which are used to enable the function of automatical updating marks
+in \env{minipage}, \env{multicols} and
+\env{tcolorbox} (both \env{tcolorbox} environment and \tn{tcbox} command), respectively.
+
+No automatical updatings are enable, by default.
+
+If your {\LaTeX} version is 2022-06-01 or newer, you can use
+\cs{SetKeys}\texttt{[updatemarks]}\marg{options} to enable or disable
+automatical updating locally.
+
+Such as,
+\begin{verbatim}
+ \SetKeys[updatemarks]{minipage=false, tcolorbox=true, multicol}
+\end{verbatim}
+so marks in \env{minipage} would not update,
+whereas \env{tcolorbox} and \env{multicols} do.
+
+The total empty mark will not be extracted and updated.
+But \verb|\markboth{}{}| and \verb|\InsertMark{}| do will be extracted and updated,
+because they are not total empty internally.
+
+However, the updating is not once for all.
+For example, if you are using \env{minipage} in \tn{makebox}, even if you enable
+the automatical updating, the marks still can not be found by \LaTeX.
+But, if you put \env{minipage} in \env{tcolorbox} or the other way round,
+\LaTeX\ still can get correct marks.
+
+The point is, updating marks is done inner to outer and level by level,
+if any level is not updated, you will lost all marks in inner boxes.
+Furthermore, whether marks are updated or not {\TeX} is only influenced by box level
+instead of group level, so if you try to limit marks in a certain position, you should
+use a box.
+
+The extracting and updating would not remove these marks, they still be there, you
+can find them by your own method as well.
+
+
+\section{\env{minipage}}
+
+You can enable automatically extracting and updating marks where are in \env{minipage}
+to its nearest outer box level,
+by using \texttt{minipage} package option or set \texttt{minipage} key to true.
+
+\pkg{updatemarks} patches the \tn{endminipage}, if you enable the function,
+marks in any other environments that use \env{minipage} will be updated,
+including \env{varwidth} of \pkg{varwidth} package, etc.
+
+
+\section{\pkg{multicol} and \pkg{adjmulticol}}
+
+If \env{multicols} or \env{adjmulticols} or their starred versions are put in a box
+--- so called \emph{boxed multicols}, you are able to eanble automatically extracting
+and updating marks into the box (not outer of the box, because it only ).
+If you need to update marks in this box, you have to do it manually.
+Of cause, if the box is \env{minipage} or \env{tcolorbox} or another \env{multicols}
+or any other supported environments or commands, then no more things to do.
+
+All \env{multicols} and \env{adjmulticols} and their starred versions share the
+same option \texttt{multicol}(an optional \texttt s).
+
+For \emph{non boxed multicols}, i.e, not in any other box except
+the main vertical list, the \tn{topmark} (and \tn{topmarks}) at first and last page
+are not correct. Multiple contiguous forced break or \tn{clearpage} may cause the
+wrong marks.
+
+If your {\LaTeX} version is 2022-06-01 or newer,
+you can get more accurate mark values by using \cs{TopMark}, \cs{FirstMark}
+and \cs{LastMark} in head and foot, but only the
+\texttt{previous-page} region and \texttt{page} region are supported for now.
+Still, Multiple contiguous forced break or \tn{clearpage} may cause the wrong marks.
+
+
+\section{\pkg{tcolorbox}}
+
+The \pkg{updatemarks} package can also update marks in \env{tcolorbox} environments
+(both breakable and unbreakable) and \tn{tcbox} commands.
+
+You are allowed to use \verb|updatemarks=true| or \verb|updatemarks| in \tn{tcbset}
+or as environment and command option to enable the function, and
+\verb|updatemarks=false| to disable.
+
+
+\section{Set automatical updating list}
+
+\pkg{updatemarks} can automatically detect mark classes allocated by \tn{newmarks}
+and \cs{NewMarkClass} in preamble. But if you allocate mark class after preamble
+(which I strongly recommend you do not),
+\pkg{updatemarks} also provides interfaces to enable you add these mark class to
+automatical updating list. If you are not using these two commands, then nothing need
+to be done.
+
+
+\enlargethispage{20pt}
+
+\begin{function}{\AddToUpdateMarksList,\SetUpdateMarksList,\RemoveFromUpdateMarksList}
+ \begin{syntax}
+ \verb|\AddToUpdateMarksList| \marg{number list}
+ \verb|\SetUpdateMarksList| \marg{number list}
+ \verb|\RemoveFromUpdateMarksList| \marg{number list}
+ \end{syntax}
+You can use these functions to globally add items to, set items, and remove items from
+the list of mark classes which need to be automatically updated.
+
+The \meta{number} is the first argument of \tn{newmarks}, or literally, a number.
+Specially, for those mark classes declared by \cs{NewMarkClass}, you are able to use
+\oarg{class} or \cs{MarkClass}\marg{class}. Such as
+\begin{verbatim}
+ \RemoveFromUpdateMarksList { [2e-right], 4, \MarkClass{my-class} }
+\end{verbatim}
+\end{function}
+
+
+\begin{function}{\AddAllocatedToUpdateMarksList}
+ \begin{syntax}
+ \verb|\AddAllocatedToUpdateMarksList|
+ \end{syntax}
+The function add all mark classes allocated by \tn{newmarks} and \cs{NewMarkClass}
+to automatical updating list.
+\end{function}
+
+
+\section{Generic interfaces of extracting and updating}
+
+If you need to extract and update marks manually, \cs{ExtractMarks},
+\cs{ExtractSplitMarks} and \cs{UpdateMarks} will help you.
+
+\begin{function}{\ExtractMarks}
+ \begin{syntax}
+ \verb|\ExtractMarks| \marg{box number}
+ \verb|\ExtractMarks| \oarg{number list} \marg{box number}
+ \verb|\ExtractMarks| * \marg{text}
+ \verb|\ExtractMarks| * \oarg{number list} \marg{text}
+ \end{syntax}
+Save first marks and last marks of specified mark classes
+which are directly presented in \meta{box number} or \meta{text}
+if these marks is not total empty.
+Marks in deeper boxes will not be detected, unless they are moved out.
+
+If \meta{number list} is presented, the mark classes are these numbers, otherwise
+they are the automatical updating list.
+
+The \meta{box number} is the first argument of \tn{newbox} or \tn{newsavebox}, etc.,
+and have saved contents by using \env{lrbox} or \tn{sbox} or similar.
+
+The \meta{text} is typeset material and \emph{will be executed}.
+
+If the \meta{box number} is a vbox and contains forced page break, then all marks after
+the first forced page break will not be detected.
+\end{function}
+
+\begin{function}{\ExtractSplitMarks}
+ \begin{syntax}
+ \verb|\ExtractSplitMarks|
+ \verb|\ExtractSplitMarks| \oarg{number list}
+ \end{syntax}
+This command is used after a \tn{vsplit}, and save
+first marks and last marks of specified mark classes which are directly
+presented in being split part if these marks is not total empty.
+Marks in deeper boxes will not be detected, unless they are moved out.
+
+If \meta{number list} is presented, the mark classes are these numbers, otherwise
+they are the automatical updating list.
+\end{function}
+
+\begin{function}{\UpdateMarks}
+ \begin{syntax}
+ \verb|\UpdateMarks|
+ \verb|\UpdateMarks| \oarg{number list}
+ \end{syntax}
+Reinserting saved first marks and last marks of specified mark classes
+(if have been saved) into the current box,
+or if not in a box then the main vertical list.
+
+If \meta{number list} is presented, the mark classes are these numbers, otherwise
+they are the automatical updating list.
+\end{function}
+
+
+\section{Disable patches or write your own patches}
+
+By default, \pkg{updatemarks} use its own patches to support \env{minipage},
+\env{multicols} and \env{tcolorbox}, however, you can write your own patches and
+remove the patches will be done by \pkg{updatemarks}.
+
+To the patches for \env{minipage}, you can define \tn{updatemarks@minipage@patch}
+before \pkg{updatemarks} is loaded, then \pkg{updatemarks} will use your patches.
+Specially, if you set \tn{updatemarks@minipage@patch} to empty, then no patches will
+be done for \cs{endminipage}.
+
+The patches for \pkg{multicol}, \pkg{adjmulticol} and \pkg{tcolorbox},
+are \tn{updatemarks@multicol@patch}, \tn{updatemarks@adjmulticol@patch},
+\tn{updatemarks@tcolorbox@patch} and \linebreak\tn{updatemarks@multicolnewmark@patch},
+\tn{updatemarks@adjmulticolnewmark@patch} for new mark mechanism,
+you are able set them in preamble before or after \pkg{updatemarks} is loaded.
+
+
+\section{Programming interfaces}
+
+This section describes the interfaces of \LaTeX3.
+
+\begin{function}{\updatemarks_extract:nN,\updatemarks_extract_split:N}
+ \begin{syntax}
+ \verb|\updatemarks_extract:nN| \marg{box material} \meta{seq var}
+ \verb|\updatemarks_extract_split:N| \meta{seq var}
+ \end{syntax}
+These two functions have the same functions of
+\cs{ExtractMarks} and \cs{ExtractSplitMarks}.
+
+\meta{box material} is content to build a box.
+Such as unpacked box using \cs{hbox_unpack:N} or \cs{vbox_unpack:N} or text.
+
+\meta{seq var} is the number sequence of mark classes which are need to be extracted.
+
+They only save the marks whose positions are first or last.
+\end{function}
+
+\begin{function}{\updatemarks_update:N}
+ \begin{syntax}
+ \verb|\updatemarks_update:N| \meta{seq var}
+ \end{syntax}
+This function has the same function of \cs{UpdateMarks}.
+
+\meta{seq var} is the number sequence of mark classes which are need to be
+reinserted into the current box or the main vertical list.
+
+It only reinserts marks whose positions are first or last.
+\end{function}
+
+\begin{function}{\updatemarks_save:Nnn}
+ \begin{syntax}
+ \verb|\updatemarks_save:Nnn| \meta{seq var} \marg{position} \marg{value code}
+ \end{syntax}
+Saving marks at \meta{position} of specified mark classes \meta{seq var},
+whose values are expanding \meta{value code} \emph{once}.
+The \meta{value code} receives each item in the \meta{seq var}
+as a trailing brace group.
+\end{function}
+
+\begin{function}{\updatemarks_save_x:Nnn}
+ \begin{syntax}
+ \verb|\updatemarks_save_x:Nnn| \meta{seq var} \marg{position} \marg{value code}
+ \end{syntax}
+Saving marks at \meta{position} of specified mark classes \meta{seq var},
+whose values are fully expanding \meta{value code}.
+The \meta{value code} receives each item in the \meta{seq var}
+as a trailing brace group.
+\end{function}
+
+\begin{function}{\updatemarks_alias:Nnn}
+ \begin{syntax}
+ \verb|\updatemarks_alias:Nnn| \meta{seq var} \marg{alias position} \marg{source position}
+ \end{syntax}
+Setting marks at \meta{alias position} are equal to \meta{source position}
+of specified mark classes \meta{seq var}.
+\end{function}
+
+\begin{function}{\updatemarks_remove:Nn}
+ \begin{syntax}
+ \verb|\updatemarks_remove:Nn| \meta{seq var} \marg{position}
+ \end{syntax}
+Remove marks at \meta{position} of specified mark classes \meta{seq var}.
+\end{function}
+
+\begin{function}[EXP]{\updatemarks_value:nn}
+ \begin{syntax}
+ \verb|\updatemarks_value:nn| \marg{position} \marg{mark class}
+ \end{syntax}
+Return the value of \meta{mark class} at \meta{position}.
+If it has not been saved, then return to total empty.
+
+\begin{texnote}
+ The result is returned within the \tn{unexpanded} primitive (\cs{exp_not:n}).
+\end{texnote}
+\end{function}
+
+\begin{function}{\g_updatemarks_max_int}
+Readonly interger, its value is the maximum mark class number allocated.
+\end{function}
+
+\begin{function}{\g_updatemarks_seq}
+The number sequence which holds the mark classes needed to be automatical updated.
+\end{function}
+
+\begin{function}{\g_updatemarks_classes_seq}
+Readonly number sequence which holds the mark classes allocated by
+\cs{NewMarkClass}. If \cs{NewMarkClass} is undefined, then it's empty.
+\end{function}
+
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/updatemarks/tex/updatemarks.sty b/macros/latex/contrib/updatemarks/tex/updatemarks.sty
new file mode 100644
index 0000000000..ab5acb8aa3
--- /dev/null
+++ b/macros/latex/contrib/updatemarks/tex/updatemarks.sty
@@ -0,0 +1,503 @@
+% updatemarks.sty
+% Copyright 2023 Wenjian Chern.
+%
+% 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 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 Wenjian Chern.
+%
+% This work consists of the files updatemarks.sty and updatemarks.tex
+%
+\NeedsTeXFormat{LaTeX2e}
+\@ifundefined{ProvidesExplPackage}{\RequirePackage{expl3}}{}
+\@ifundefined{NewDocumentCommand}{\RequirePackage{xparse}}{}
+\ProvidesExplPackage{updatemarks}{2023/09/03}{0.2b}{extract and update marks from box}
+\RequirePackage{etoolbox}
+
+\seq_new:N \g__updatemarks_seq
+\box_new:N \l__updatemarks_r_box
+\cs_new_eq:NN \l__updatemarks_s_box \l_tmpa_box % this box is used for locally split
+\tex_countdef:D \g_updatemarks_max_int 256 \exp_stop_f:
+\tl_new:N \l__updatemarks_tl
+
+
+%% basicly copy from \__mark_update_structure:nn of LaTeX kernel
+\cs_new_protected:Npn \__updatemarks_extract:nnn #1#2#3 % box, map of number, code
+ {
+ \group_begin:
+ \dim_set_eq:NN \tex_splitmaxdepth:D \c_max_dim
+ \int_set_eq:NN \tex_vbadness:D \c_max_int
+ \dim_set_eq:NN \tex_vfuzz:D \c_max_dim
+ \vbox_set_to_ht:Nnw \l__updatemarks_r_box { -.5 \c_max_dim }
+ #1 \tex_unskip:D
+ \box_set_to_last:N \l__updatemarks_r_box
+ \int_compare:nNnT { \tex_lastnodetype:D } < { 0 }
+ {
+ \box_if_vertical:NT \l__updatemarks_r_box
+ {
+ \vbox_set_to_ht:Nnn \l__updatemarks_r_box { -.5 \c_max_dim }
+ { \vbox_unpack:N \l__updatemarks_r_box \tex_kern:D \c_zero_dim }
+ \int_compare:nNnT { \tex_badness:D } > { 0 }
+ { \vbox_unpack:N \l__updatemarks_r_box }
+ }
+ }
+ \tex_kern:D \c_zero_dim
+ \vbox_set_end:
+ \int_compare:nNnTF { \tex_badness:D } > { 0 }
+ {
+ \vbox_set_split_to_ht:NNn \l__updatemarks_s_box \l__updatemarks_r_box \c_max_dim
+ \__updatemarks_extract_split:nn {#2} {#3}
+ }
+ {
+ \msg_error:nn { updatemarks } { infinite-shrinkage }
+ #2
+ {
+ \cs_undefine:N \l_updatemarks_first_tl
+ \cs_undefine:N \l_updatemarks_last_tl
+ #3
+ }
+ }
+ \group_end:
+ }
+\cs_new_protected:Npn \__updatemarks_extract_split:nn #1#2 % map of number, code
+ {
+ #1
+ {
+ \tl_set:No \l_updatemarks_last_tl { \tex_splitbotmarks:D ##1 }
+ \tl_if_empty:NTF \l_updatemarks_last_tl
+ {
+ \cs_undefine:N \l_updatemarks_first_tl
+ \cs_undefine:N \l_updatemarks_last_tl
+ }
+ { \tl_set:No \l_updatemarks_first_tl { \tex_splitfirstmarks:D ##1 } }
+ #2
+ }
+ }
+\cs_new_protected:Npn \__updatemarks_extract_num:n #1 % number
+ {
+ \tl_if_exist:NT \l_updatemarks_last_tl
+ {
+ \tl_if_exist:cF { g__updatemarks_first-#1_tl }
+ { \tl_gset_eq:cN { g__updatemarks_first-#1_tl } \l_updatemarks_first_tl }
+ \tl_gset_eq:cN { g__updatemarks_last-#1_tl } \l_updatemarks_last_tl
+ }
+ }
+\cs_new_protected:Npn \updatemarks_extract:nN #1#2 % box material, seq
+ {
+ \__updatemarks_extract:nnn {#1}
+ { \seq_map_inline:Nn #2 }
+ { \__updatemarks_extract_num:n {##1} }
+ }
+\cs_new_protected:Npn \updatemarks_extract_split:N #1 % seq
+ {
+ \__updatemarks_extract_split:nn
+ { \seq_map_inline:Nn #1 }
+ { \__updatemarks_extract_num:n {##1} }
+ }
+
+
+\cs_new_protected:Npn \updatemarks_save:Nnn #1#2#3 % seq, pos, value
+ {
+ \seq_map_inline:Nn #1
+ { \tl_gset:co { g__updatemarks_#2-##1_tl } { #3 {##1} } }
+ }
+\cs_new_protected:Npn \updatemarks_save_x:Nnn #1#2#3 % seq, pos, value
+ {
+ \seq_map_inline:Nn #1
+ { \tl_gset:cx { g__updatemarks_#2-##1_tl } { #3 {##1} } }
+ }
+\cs_new_protected:Npn \updatemarks_alias:Nnn #1#2#3 % seq, pos1, pos2
+ {
+ \seq_map_inline:Nn #1
+ { \tl_gset_eq:cc { g__updatemarks_#2-##1_tl } { g__updatemarks_#3-##1_tl } }
+ }
+\cs_new_protected:Npn \updatemarks_remove:Nn #1#2 % seq, pos
+ { \seq_map_inline:Nn #1 { \cs_undefine:c { g__updatemarks_#2-##1_tl } } }
+\cs_new:Npn \updatemarks_value:nn #1#2 % pos, number
+ {
+ \tl_if_exist:cTF { g__updatemarks_#1- \int_eval:n {#2} _tl }
+ { \exp_not:v { g__updatemarks_#1- \int_eval:n {#2} _tl } } { }
+ }
+
+
+\cs_new_protected:Npn \updatemarks_update:N #1 % seq
+ {
+ \seq_if_empty:NF #1
+ {
+ \seq_map_inline:Nn #1
+ {
+ \tl_if_exist:cT { g__updatemarks_last-##1_tl }
+ {
+ \tl_if_exist:cT { g__updatemarks_first-##1_tl }
+ { \tex_marks:D ##1 { \exp_not:v { g__updatemarks_first-##1_tl } } }
+ \tex_marks:D ##1 { \exp_not:v { g__updatemarks_last-##1_tl } }
+ }
+ \cs_undefine:c { g__updatemarks_first-##1_tl }
+ \cs_undefine:c { g__updatemarks_last-##1_tl }
+ }
+ \if@nobreak\ifvmode\nobreak\fi\fi
+ }
+ }
+% do not check if it is <= \g_updatemarks_max_int
+\cs_new_protected:Npn \__updatemarks_gput:Nn #1#2
+ {
+ \group_begin:
+ \cs_set_eq:NN \MarkClass \__updatemarks_class_num:n
+ \cs_set_eq:NN \MaxClass \g_updatemarks_max_int
+ \clist_map_inline:nn {#2}
+ { \seq_gput_right:Nx #1 { \int_eval:n { \__updatemarks_maybe_class:n {##1} } } }
+ \seq_gremove_duplicates:N #1
+ \group_end:
+ }
+
+\cs_new:Npn \__updatemarks_class_num:n #1 { \cs:w c__mark_class_ #1 _mark \cs_end: }
+\cs_new:Npn \__updatemarks_maybe_class:n #1
+ {
+ \tl_if_head_eq_meaning:nNTF {#1} [ % ]
+ { \__updatemarks_maybe_class_aux:w #1 } {#1}
+ }
+\cs_new:Npn \__updatemarks_maybe_class_aux:w [#1]
+ {
+ \cs_if_exist_use:cF { c__mark_class_ #1 _mark }
+ { 0 \msg_expandable_error:nnn { updatemarks } { unknown-class } {#1} }
+ }
+
+
+
+\seq_new:N \g_updatemarks_seq
+\NewDocumentCommand \ExtractMarks { s o +m }
+ {
+ \tl_if_novalue:nTF {#2}
+ {
+ \updatemarks_extract:nN
+ {
+ \bool_if:nTF {#1} { #3 }
+ {
+ \if_hbox:N #3 \hbox_unpack:N #3 \scan_stop: \fi:
+ \if_vbox:N #3 \vbox_unpack:N #3 \scan_stop: \fi:
+ }
+ }
+ \g_updatemarks_seq
+ }
+ {
+ \seq_gclear:N \g__updatemarks_seq
+ \__updatemarks_gput:Nn \g__updatemarks_seq {#2}
+ \updatemarks_extract:nN
+ {
+ \bool_if:nTF {#1} { #3 }
+ {
+ \if_hbox:N #3 \hbox_unpack:N #3 \scan_stop: \fi:
+ \if_vbox:N #3 \vbox_unpack:N #3 \scan_stop: \fi:
+ }
+ }
+ \g__updatemarks_seq
+ }
+ }
+\NewDocumentCommand \ExtractSplitMarks { o }
+ {
+ \tl_if_novalue:nTF {#1}
+ { \updatemarks_extract_split:N \g_updatemarks_seq }
+ {
+ \seq_gclear:N \g__updatemarks_seq
+ \__updatemarks_gput:Nn \g__updatemarks_seq {#1}
+ \updatemarks_extract_split:N \g__updatemarks_seq
+ }
+ }
+\NewDocumentCommand \UpdateMarks { o }
+ {
+ \tl_if_novalue:nTF {#1}
+ { \updatemarks_update:N \g_updatemarks_seq }
+ {
+ \seq_gclear:N \g__updatemarks_seq
+ \__updatemarks_gput:Nn \g__updatemarks_seq {#1}
+ \updatemarks_update:N \g__updatemarks_seq
+ }
+ }
+\cs_new_protected:Npn \AddToUpdateMarksList
+ { \__updatemarks_gput:Nn \g_updatemarks_seq }
+\cs_new_protected:Npn \SetUpdateMarksList
+ {
+ \seq_gclear:N \g_updatemarks_seq
+ \AddToUpdateMarksList
+ }
+\cs_new_protected:Npn \RemoveFromUpdateMarksList #1
+ {
+ \__updatemarks_gput:Nn \g__updatemarks_seq {#1}
+ % to support old expl3, do not use \seq_map_tokens:Nn
+ \seq_map_inline:Nn \g__updatemarks_seq
+ { \seq_gremove_all:Nn \g_updatemarks_seq {##1} }
+ }
+\cs_new_protected:Npn \AddAllocatedToUpdateMarksList
+ {
+ \int_step_inline:nnn { 0 } { \g_updatemarks_max_int }
+ { \seq_gput_right:Nn \g_updatemarks_seq {##1} }
+ \seq_gremove_duplicates:N \g_updatemarks_seq
+ }
+
+\cs_new_protected:Npn \__updatemarks_get_all_classes:
+ {
+ \seq_map_inline:Nn \g__mark_classes_seq
+ {
+ \seq_gput_right:Nx \g_updatemarks_classes_seq
+ { \int_value:w \__updatemarks_class_num:n {##1} }
+ }
+ }
+\seq_new:N \g_updatemarks_classes_seq
+\cs_if_exist:NTF \g__mark_classes_seq
+ {
+ \hook_gput_code:nnn { begindocument/end } { updatemarks }
+ {
+ \__updatemarks_get_all_classes:
+ \AddAllocatedToUpdateMarksList
+ }
+ }
+ {
+ \AtBeginDocument
+ {
+ \int_step_inline:nnn { 0 } { \g_updatemarks_max_int }
+ { \seq_gput_right:Nn \g_updatemarks_seq {#1} }
+ }
+ }
+
+\msg_new:nnn { updatemarks } { unknown-class } { Unknown~mark~class~`#1'. }
+\msg_new:nnn { updatemarks } { infinite-shrinkage }
+ { Infinite~shrinkage~found~when~extracting~marks. }
+
+
+\cs_new_protected:Npn \savemarks@of #1 #2 #3
+ {
+ \bool_if:cT { l__updatemarks_#1_bool }
+ { \updatemarks_save:Nnn \g_updatemarks_seq {#2} {#3} }
+ }
+\cs_new_protected:Npn \removemarks@of #1 #2
+ {
+ \bool_if:cT { l__updatemarks_#1_bool }
+ { \updatemarks_remove:Nn \g_updatemarks_seq {#2} }
+ }
+\cs_new_protected:Npn \updatemarks@of #1
+ {
+ \bool_if:cT { l__updatemarks_#1_bool }
+ { \updatemarks_update:N \g_updatemarks_seq }
+ }
+\cs_new_protected:Npn \extractmarks@of #1 #2
+ {
+ \bool_if:cT { l__updatemarks_#1_bool }
+ { \updatemarks_extract:nN { #2 } \g_updatemarks_seq }
+ }
+\cs_new_protected:Npn \extractsplitmarks@of #1
+ {
+ \bool_if:cT { l__updatemarks_#1_bool }
+ { \updatemarks_extract_split:N \g_updatemarks_seq }
+ }
+% \let\updatemarks@@imakebox\@imakebox
+% % savebox and makebox
+% \cs_if_exist:NF \updatemarks@makebox@patch
+% {
+% \patchcmd \@imakebox { \hb@xt@ } { \extractmarks@of{makebox}\hb@xt@ }
+% { } { \ERROR }
+% \patchcmd \@imakebox { \@end@tempboxa } { \updatemarks@of{makebox}\@end@tempboxa }
+% { } { \ERROR }
+% }
+\let\updatemarks@endminipage\endminipage
+% minipage
+\cs_if_exist_use:NF \updatemarks@minipage@patch
+ {
+ \patchcmd \endminipage
+ { \color@endgroup\egroup }
+ { \color@endgroup\egroup\extractmarks@of{minipage}{\unvcopy\@tempboxa} }
+ { } { \ERROR }
+ \apptocmd \endminipage { \updatemarks@of{minipage} } { } { \ERROR }
+ }
+% tcolorbox
+\providecommand \updatemarks@tcolorbox@patch
+ {
+ \tcbset{updatemarks/.is~choice,
+ updatemarks/true/.code=\bool_set_true:N \l__updatemarks_tcolorbox_bool,
+ updatemarks/false/.code=\bool_set_false:N \l__updatemarks_tcolorbox_bool,
+ updatemarks/.default=true}
+ \patchcmd \tcbox@inner@hbox { \tcbdimto }
+ { \extractmarks@of{tcolorbox}{\unhcopy\tcb@upperbox}\tcbdimto }
+ { } { \ERROR }
+ \let\endtcb@lrbox=\updatemarks@endminipage
+ \patchcmd \endtcb@lrbox
+ { \color@endgroup\egroup }
+ { \color@endgroup\egroup\extractmarks@of{tcolorbox}{\unvcopy\@tempboxa} }
+ { } { \ERROR }
+ \let\endtcb@savebox=\endtcb@lrbox
+ \patchcmd \tcb@drawing@env@end { \csname }
+ { \updatemarks@of{tcolorbox}\csname } { } { \ERROR }
+ % breakable library
+ \ifdefined \tcb@vsplit@upper
+ \apptocmd \tcb@vsplit@upper { \extractsplitmarks@of{tcolorbox} } { } { \ERROR }
+ \apptocmd \tcb@vsplit@lower { \extractsplitmarks@of{tcolorbox} } { } { \ERROR }
+ \patchcmd \tcb@split@start { \iftcb@final@box }
+ { \iftcb@final@box
+ \extractmarks@of{tcolorbox}{\unvcopy\tcb@upperbox\unvcopy\tcb@lowerbox} }
+ { } { \ERROR }
+ \patchcmd \tcb@split@start
+ { \tcb@comp@h@page\tcb@check@for@final@box\iftcb@final@box }
+ { \tcb@comp@h@page\tcb@check@for@final@box\iftcb@final@box
+ \extractmarks@of{tcolorbox}{\unvcopy\tcb@upperbox\unvcopy\tcb@lowerbox}}
+ { } { \ERROR }
+ \patchcmd \tcb@split@USL { \iftcb@final@box }
+ { \iftcb@final@box
+ \extractmarks@of{tcolorbox}{\unvcopy\tcb@totalupperbox
+ \iftcb@lowerspace\unvcopy\tcb@totallowerbox\fi }
+ }
+ { } { \ERROR }
+ \patchcmd \tcb@split@SL@displayed { \iftcb@final@box }
+ { \iftcb@final@box
+ \extractmarks@of{tcolorbox}{\unvcopy\tcb@totallowerbox} }
+ { } { \ERROR }
+ \patchcmd \tcb@split@L { \iftcb@final@box }
+ { \iftcb@final@box
+ \extractmarks@of{tcolorbox}{\unvcopy\tcb@totallowerbox} }
+ { } { \ERROR }
+ \fi
+ }
+% multicol
+\providecommand \updatemarks@multicol@patch
+ {
+ %% the patch is used to extract marks
+ \tl_set:No \set@keptmarks
+ { \set@keptmarks \extractsplitmarks@of{multicol} }
+
+ %% the patch is used for boxmulticols
+ \patchcmd \endmulticols { \page@sofar }
+ { \updatemarks@of{multicol}\page@sofar }
+ { } { \ERROR }
+
+ %% the patch is used for middle page to remove unnecessary extract
+ \patchcmd \multi@column@out { \let\topmark\kept@topmark }
+ {
+ \let\topmark\kept@topmark
+ \removemarks@of{multicol}{first}
+ \removemarks@of{multicol}{last}
+ }
+ { } { \ERROR }
+
+ %% the patch is used for final page
+ \patchcmd \balance@columns@out { \page@sofar }
+ { \updatemarks@of{multicol}\page@sofar }
+ { } { \ERROR }
+
+ %% these patches are used to update marks after forced break
+ \patchcmd \balance@columns@out { \unvbox\colbreak@box }
+ { \extractmarks@of{multicol}{\unvcopy\colbreak@box}\unvbox\colbreak@box }
+ { } { \ERROR }
+ \patchcmd \balance@columns@out { \unvbox\@cclv }
+ { \extractmarks@of{multicol}{\unvcopy\@cclv}\unvbox\@cclv }
+ { } { \ERROR }
+ \patchcmd \balance@columns { \get@keptmarks\mult@box }
+ { \if@boxedmulticols\get@keptmarks\mult@box\fi }
+ { } { }
+
+ % patches of new mark mechanism
+ \updatemarks@multicolnewmark@patch
+ }
+\providecommand \updatemarks@adjmulticol@patch
+ {
+ \patchcmd \adjmc@process@ne@column { \unvbox }
+ { \extractmarks@of{multicol}{\unvcopy\mult@box}\unvbox }
+ { } { \ERROR }
+ \updatemarks@adjmulticolnewmark@patch
+ }
+\providecommand \updatemarks@paracol@patch
+ {
+ \updatemarks@paracolnewmark@patch
+ }
+
+\AtBeginDocument{
+ \@ifpackageloaded{tcolorbox}{\updatemarks@tcolorbox@patch}{}
+ \@ifpackageloaded{multicol}{\updatemarks@multicol@patch}{}
+ \@ifpackageloaded{adjmulticol}{\updatemarks@adjmulticol@patch}{}
+ \@ifpackageloaded{paracol}{\updatemarks@paracol@patch}{}
+}
+
+
+\keys_define:nn { updatemarks }
+ {
+% makebox .bool_set:N = \l__updatemarks_makebox_bool ,
+ minipage .bool_set:N = \l__updatemarks_minipage_bool ,
+ tcolorbox .bool_set:N = \l__updatemarks_tcolorbox_bool ,
+ multicol .bool_set:N = \l__updatemarks_multicol_bool ,
+ multicols .bool_set:N = \l__updatemarks_multicol_bool ,
+ paracol .bool_set:N = \l__updatemarks_paracol_bool ,
+ }
+
+\cs_if_exist:NTF \ProcessKeyOptions
+ { \ProcessKeyOptions [ updatemarks ] }
+ {
+ \RequirePackage{l3keys2e}
+ \ProcessKeysOptions { updatemarks }
+ }
+
+\cs_if_free:NT \mark_new_class:n
+ {
+ \providecommand \updatemarks@multicolnewmark@patch { }
+ \providecommand \updatemarks@adjmulticolnewmark@patch { }
+ \providecommand \updatemarks@paracolnewmark@patch { }
+ \endinput
+ }
+
+\tl_const:Nn \updatemarks@multicol@firstpage
+ {
+ \bool_if:NT \l__updatemarks_multicol_bool
+ {
+ \seq_map_inline:Nn \g_updatemarks_seq
+ {
+ \tl_set:Nx \l__updatemarks_tl { \updatemarks_value:nn { top } {#1} }
+ \tl_if_empty:NT \l__updatemarks_tl
+ { \tl_gset:co { g__updatemarks_top-#1_tl } { \tex_topmarks:D #1 } }
+ }
+ }
+ }
+\tl_const:Nn \updatemarks@multicol@middlepage
+ {
+ \__mark_update_structure_alias:nn { previous-page } { page }
+ \seq_map_inline:Nn \g__mark_classes_seq
+ {
+ \tl_gset_eq:cc { g__mark_page_top_#1_tl } { g__mark_page_last_#1_tl }
+
+ \tl_set:Nx \l__updatemarks_tl
+ { \updatemarks_value:nn { first } { \__updatemarks_class_num:n {#1} } }
+ \tl_if_empty:NTF \l__updatemarks_tl
+ { \tl_gset_eq:cc { g__mark_page_first_#1_tl } { g__mark_page_last_#1_tl } }
+ { \tl_gset_eq:cN { g__mark_page_first_#1_tl } \l__updatemarks_tl }
+
+ \tl_set:Nx \l__updatemarks_tl
+ { \updatemarks_value:nn { last } { \__updatemarks_class_num:n {#1} } }
+ \tl_if_empty:NF \l__updatemarks_tl
+ { \tl_gset_eq:cN { g__mark_page_last_#1_tl } \l__updatemarks_tl }
+ }
+ \updatemarks_remove:Nn \g_updatemarks_seq { top }
+ \updatemarks_remove:Nn \g_updatemarks_seq { first }
+ \updatemarks_remove:Nn \g_updatemarks_seq { last }
+ }
+
+\providecommand \updatemarks@multicolnewmark@patch
+ {
+ \patchcmd \prep@keptmarks { \fi }
+ { \updatemarks@multicol@firstpage\fi }
+ { } { \ERROR }
+ \patchcmd \multi@column@out
+ {
+ \removemarks@of{multicol}{first}
+ \removemarks@of{multicol}{last}
+ }
+ { }
+ { } { \ERROR }
+ \patchcmd \multi@column@out { \@makecol }
+ { \@makecol\updatemarks@multicol@middlepage }
+ { } { \ERROR }
+ }
+
+\providecommand \updatemarks@adjmulticolnewmark@patch { }
+\providecommand \updatemarks@paracolnewmark@patch { } \ No newline at end of file
diff --git a/macros/latex/contrib/wrapfig2/README.txt b/macros/latex/contrib/wrapfig2/README.txt
index b8169719a7..53aa5aa402 100644
--- a/macros/latex/contrib/wrapfig2/README.txt
+++ b/macros/latex/contrib/wrapfig2/README.txt
@@ -1,5 +1,5 @@
%%%% README.txt file
-This README.txt for package wrapfig2[2023-09-01 v.6.2.0 ...]
+This README.txt is for package wrapfig2[2023-09-03 v.6.2.1]
This work is author maintained
@@ -25,7 +25,7 @@ Supposedly this software is backwards compatible
with Arseneau's original environments. Future
experience may confirm this statement.
-The user commands are defined by means of the
+Some user commands are defined by means of the
LaTeX3 functionalities. Therefore this package does
not work with LaTeX2e kernels older than about
2018, although a warning is issued if the LaTeX
@@ -40,8 +40,9 @@ form key = value. Options are available to fall
back to version 5 and version 4.
IMPORTANT NOTICE: An incompatibility with the
-amsmath package but with version 6.2.0 this
-incompatibility was corrected.
+amstext package (loaded by amsmath, siunitx, and
+other packages) was discovered, but with version
+6.2.1 this incompatibility was corrected.
Claudio Beccari
diff --git a/macros/latex/contrib/wrapfig2/wrapfig2.dtx b/macros/latex/contrib/wrapfig2/wrapfig2.dtx
index c7a30fa316..32cb07b20c 100644
--- a/macros/latex/contrib/wrapfig2/wrapfig2.dtx
+++ b/macros/latex/contrib/wrapfig2/wrapfig2.dtx
@@ -45,7 +45,7 @@ wrapfig2.sty and wrapfig2.pdf, plus this file README.txt.
%<+package>\ProvidesPackage{wrapfig2}%
%^^A<+readme>File README.txt for package wrapfig2
%<*package|readme>
- [2023-09-01 v.6.2.0 Wrap text around figures, tables, framed text blocks]
+ [2023-09-03 v.6.2.1 Wrap text around figures, tables, framed text blocks]
%</package|readme>
%<*driver>
%
@@ -852,12 +852,17 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% needs to be used; he was so kind to send me a
% bug notice together with a minimum working
% example.
-% Thanks to Bruno Pagani whos pinpointed the exact
+% Thanks to Bruno Pagani who pinpointed the exact
% point that conflicts with \pack{wrapfig2} so
-% that I could fix this conflict.
+% that I could fix this conflict. Bruno Pagani
+% discovered also that package \pack{amstext} is
+% the source of this conflict and that this
+% package is loaded not only by \pack{amsmath}
+% but also by other packages such as, for example,
+% by \pack{siunitx}.
%
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \CheckSum{1428}
+% \CheckSum{1427}
% \StopEventually{}
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -985,14 +990,14 @@ X\ifdim\fontdimen1\font=0pt\kern-0.15em\fi
% redefines some \pack{color} internal commands; everything is
% explained in the \pack{xcolor} documentation.}
%
-% Here we have a little trick for avoiding
-% conflicts with \pack{amsmath} and its|\text|
-% command-
+%In ordet to avoid conflicts with \pack{amstext}
+% and its|\text| command, we have to save its
+% definition before actually execution any part of
+% this package, and restore ita value at the end
+% of this package; see the second part of this
+% procedure at the very end of this package.
% \begin{macrocode}
-\@ifpackageloaded{amsmath}{%
-\let\amsmathtext\text
-\AtEndPreamble{\let\text\amsmathtext}%
-}{\relax}
+\ifcsdef{text}{\let\amsTextText\text}{}
% \end{macrocode}
%
% In order to define the new floating object \texttt{text} we have
@@ -2081,6 +2086,8 @@ backgroundcolor, textcolor, fontstyle, radius, insertionwidth}
\@tempa
\fi
+\ifcsdef{amsTextText}{\let\text\amsTextText}{}
+
% \end{macrocode}
%
%\iffalse
diff --git a/macros/latex/contrib/wrapfig2/wrapfig2.pdf b/macros/latex/contrib/wrapfig2/wrapfig2.pdf
index 823efb6847..025536c30f 100644
--- a/macros/latex/contrib/wrapfig2/wrapfig2.pdf
+++ b/macros/latex/contrib/wrapfig2/wrapfig2.pdf
Binary files differ