texlive[73443] Master/texmf-dist: creationboites (13jan25)

commits+karl at tug.org commits+karl at tug.org
Mon Jan 13 21:59:53 CET 2025


Revision: 73443
          https://tug.org/svn/texlive?view=revision&revision=73443
Author:   karl
Date:     2025-01-13 21:59:53 +0100 (Mon, 13 Jan 2025)
Log Message:
-----------
creationboites (13jan25)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/creationboites/CreationBoites-doc.pdf
    trunk/Master/texmf-dist/doc/latex/creationboites/CreationBoites-doc.tex
    trunk/Master/texmf-dist/tex/latex/creationboites/CreationBoites.sty

Modified: trunk/Master/texmf-dist/doc/latex/creationboites/CreationBoites-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/creationboites/CreationBoites-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/creationboites/CreationBoites-doc.tex	2025-01-13 20:59:41 UTC (rev 73442)
+++ trunk/Master/texmf-dist/doc/latex/creationboites/CreationBoites-doc.tex	2025-01-13 20:59:53 UTC (rev 73443)
@@ -36,8 +36,8 @@
 \usepackage[margin=1.5cm]{geometry}
 \setlength{\parindent}{0pt}
 
-\def\TPversion{0.1.0}
-\def\TPdate{26 août 2023}
+\def\TPversion{0.1.1}
+\def\TPdate{13 janvier 2025}
 \sethlcolor{lightgray!25}
 \NewDocumentCommand\MontreCode{ m }{%
 	\hl{\vphantom{\texttt{pf}}\texttt{#1}}%
@@ -76,7 +76,7 @@
 	\begin{tabular}{c}
 	\texttt{Cédric Pierquet}\\
 	{\ttfamily c pierquet -- at -- outlook . fr}\\
-	\texttt{\url{https://github.com/cpierquet/creationboites}}
+	\texttt{\url{https://forge.apps.education.fr/pierquetcedric/packages-latex}}
 \end{tabular}
 \end{center}
 
@@ -113,6 +113,10 @@
 	\lipsum[1][1]
 \end{BoiteDeDemo}
 
+\begin{BoiteDeDemo}[Icone={\faLightbulb}]
+	\lipsum[1][1]
+\end{BoiteDeDemo}
+
 \begin{BoiteDanger}[Compteur=false]
 	\lipsum[1][1]
 \end{BoiteDanger}
@@ -148,7 +152,7 @@
 	\item un \textbf{nom} (pour l'environnement) ;
 	\item un nom de \textbf{compteur} pour la numéroter ;
 	\item une \textbf{couleur} (optionnelle et noire par défaut) ;
-	\item une \textbf{icône} ;
+	\item une \textbf{icône} ou un \textbf{logo} ;
 	\item un \textbf{label} (singulier ou pluriel).
 \end{itemize}
 
@@ -164,13 +168,17 @@
 
 \begin{itemize}
 	\item \MontreCode{tcolorbox} (avec les libraires \MontreCode{fitting,skins}) ;
-	\item \MontreCode{fontawesome5}, \MontreCode{simplekv} et \MontreCode{xstring}.
+	\item \MontreCode{fontawesome5}, \MontreCode{simplekv} et \MontreCode{xstring} ;
+	\item la librairie \MontreCode{breakable} avec l'option \MontreCode{[breakable]} de chargement du package.
 \end{itemize}
 
 \begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
-\usepackage{CreationBoites}
+\usepackage{CreationBoites}                    %version classique
+\usepackage[breakable]{CreationBoites}         %version avec breakable
 \end{codehigh}
 
+\pagebreak
+
 \subsection{Utilisation basique}
 
 Le package propose deux macros principales :
@@ -269,12 +277,23 @@
 	\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=...]}.
+		\item en spécifiant hauteur/rotation/opacité grâce aux clés \MontreCode{[HauteurLogo=...]} , \MontreCode{[RotationLogo=...]} et \MontreCode{[OpaciteLogo=...]} ;
 	\end{itemize}
+	\item une petit logo (type \textsf{fontawesome5}) peut être rajoutée (d'échelle 1 et pivotée de 30° 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{[Icone=...]} ;
+		\item en spécifiant échelle/rotation/opacité grâce aux clés \MontreCode{[EchelleIcone=...]} , \MontreCode{[RotationIcone=...]} et \MontreCode{[OpaciteIcone=...]}.
+	\end{itemize}
 \end{itemize}
 
+Dans le cas de l'utilisation de \MontreCode{[Logo=...]} ou \MontreCode{[Icone=...]}, il est également possible de spécifier la position relative par rapport au coin inférieur droit, via la clé \MontreCode{[OffsetDeco=\{xoffset,yoffset\}]} (valant \MontreCode{\{-10pt,10pt\}} par défaut).
+
+\medskip
+
 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.
 
+\pagebreak
+
 \begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
 \setcounter{CompteurBoiteDemo}{0}
 \begin{BoiteDeDemo}[Compteur=false]
@@ -318,7 +337,11 @@
 \end{BoiteDeDemo}
 \end{demohigh}
 
-\pagebreak
+\begin{demohigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\begin{BoiteDeDemo}[Icone={\faYoutube},EchelleIcone=1.25,RotationLogo=15]
+	\lipsum[1][3-4]
+\end{BoiteDeDemo}
+\end{demohigh}
 
 Et en \textit{cumulant} des clés de personnalisation on peut obtenir :
 
@@ -332,6 +355,8 @@
 \end{BoiteDeDemo}
 \end{demohigh}
 
+\pagebreak
+
 \subsection{Personnalisation \textit{intermédiaire}}
 
 Il est possible de paramétrer \textit{facilement} certaines options, via la commande \MontreCode{\textbackslash ParamBoites[...]} :
@@ -409,14 +434,23 @@
 
 \begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
 \NewDocumentCommand\LogoCoinDroit{ }{%
-    \begin{tcbclipinterior}%
+    \begin{tcbclipinterior}
         \node[opacity=\BoxOpaciteLogo,rotate=-\BoxRotationLogo]%
-        at ($(interior.south east)+(-10pt,10pt)$) %
+        at ($(interior.south east)+(\BoxOffsetLogo)$) %
         {\includegraphics[height=\BoxHauteurLogo]{\BoxLogo}};%
     \end{tcbclipinterior}%
 }
 \end{codehigh}
 
+\begin{codehigh}[language=latex/latex2,style/main=cyan!10,style/code=cyan!10]
+\NewDocumentCommand\IconeCoinDroit{ }{%
+    \begin{tcbclipinterior}
+        \node[opacity=\BoxOpaciteIcone,rotate=-\BoxRotationIcone,scale=\BoxEchelleIcone]%
+        at ($(interior.south east)+(\BoxOffsetLogo)$){\BoxIcone};
+    \end{tcbclipinterior}%
+}
+\end{codehigh}
+
 \pagebreak
 
 \subsection{Exemple de personnalisations avancées}
@@ -573,6 +607,8 @@
 
 \section{Historique}
 
+\verb|v0.1.1|~:~~~~Correction d'un bug avec \texttt{[breakable]} + Clés pour des \texttt{[Icone]}
+
 \verb|v0.1.0|~:~~~~Version initiale
 
 \vspace*{15mm}

Modified: trunk/Master/texmf-dist/tex/latex/creationboites/CreationBoites.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/creationboites/CreationBoites.sty	2025-01-13 20:59:41 UTC (rev 73442)
+++ trunk/Master/texmf-dist/tex/latex/creationboites/CreationBoites.sty	2025-01-13 20:59:53 UTC (rev 73443)
@@ -1,12 +1,19 @@
 % Author     : C. Pierquet
-% licence    : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+% licence    : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{CreationBoites}[2023/08/26 0.1.0 Macros pour creer des boites tcbox simples, avec personnalisation(s)]
+\ProvidesPackage{CreationBoites}[2025/01/13 0.1.1 Macros pour creer des boites tcbox simples, avec personnalisation(s)]
 
 %====HISTORIQUE
+% v 0.1.1	Correction d'un bug avec [breakable] pour autoriser la coupure des boîtes + Clé pour décaler le logo CoinBasDroit + Décoration Icone
 % v 0.1.0	Version initiale
 
+%====OPTION
+\newif\if at breakable \@breakablefalse
+\DeclareOption{breakable}{\@breakabletrue}
+\DeclareOption*{}%si option inconnue ;-)
+\ProcessOptions\relax
+
 %====BASE
 \RequirePackage{tcolorbox}
 \tcbuselibrary{fitting,skins}
@@ -29,12 +36,23 @@
 \newcommand\margeinttitreboite{3pt}
 
 %====STYLE GÉNÉRAL DES TCBOX
-\tcbset{baseboite/.style={
+\if at breakable
+	\tcbuselibrary{breakable}
+	\tcbset{baseboite/.style={
 		enhanced,sharp corners=uphill,boxrule=\eptraitboite,%
+		breakable,%
 		before skip=0.5em,after skip=0.5em,%
 		colback=white,top=4mm,left={\margeboite-\margeinttitreboite-\eptraitboite},right={\margeboite-\margeinttitreboite-\eptraitboite}
-	}%
-}
+		}%
+	}
+\else
+	\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}
+		}%
+	}
+\fi
 
 %====MACROS TITRE/SOUS-TITRE/LOGO
 \NewDocumentCommand\TitreBoite{ m m m m }{%
@@ -49,8 +67,11 @@
 	\node[fill=white,anchor=east,xshift=-\margeboite,text=\couleursoustitreboite!75!black,font=\policesoustitreboite] at (frame.north east) {\vphantom{Ppé}\BoxSubTitle} ;
 }
 \NewDocumentCommand\LogoCoinDroit{ }{%
-	\begin{tcbclipinterior}\node[opacity=\BoxOpaciteLogo,rotate=-\BoxRotationLogo] at ($(interior.south east)+(-10pt,10pt)$){\includegraphics[height=\BoxHauteurLogo]{\BoxLogo}};\end{tcbclipinterior}%
+	\begin{tcbclipinterior}\node[opacity=\BoxOpaciteLogo,rotate=-\BoxRotationLogo] at ($(interior.south east)+(\BoxOffsetLogo)$){\includegraphics[height=\BoxHauteurLogo]{\BoxLogo}};\end{tcbclipinterior}%
 }
+\NewDocumentCommand\IconeCoinDroit{ }{%
+	\begin{tcbclipinterior}\node[opacity=\BoxOpaciteIcone,rotate=-\BoxRotationIcone,scale=\BoxEchelleIcone] at ($(interior.south east)+(\BoxOffsetLogo)$){\BoxIcone};\end{tcbclipinterior}%
+}
 
 %====MACRO POUR QQUES PARAMÈTRES BASIQUES
 \defKV[ParamBoites]{%
@@ -84,7 +105,12 @@
 	ModifLabel=\def\BoxModifLabel{#1},%
 	HauteurLogo=\def\BoxHauteurLogo{#1},%
 	RotationLogo=\def\BoxRotationLogo{#1},%
-	OpaciteLogo=\def\BoxOpaciteLogo{#1}
+	OpaciteLogo=\def\BoxOpaciteLogo{#1},%
+	OffsetDeco=\def\BoxOffsetLogo{#1},%
+	Icone=\def\BoxIcone{#1},%
+	EchelleIcone=\def\BoxEchelleIcone{#1},%
+	RotationIcone=\def\BoxRotationIcone{#1},%
+	OpaciteIcone=\def\BoxOpaciteIcone{#1}
 }
 \setKVdefault[Boites]{%
 	Pluriel=false,%
@@ -95,7 +121,12 @@
 	ModifLabel={},%
 	HauteurLogo=24pt,%
 	RotationLogo=45,%
-	OpaciteLogo=0.33
+	OpaciteLogo=0.33,%
+	OffsetDeco={-10pt,10pt},%
+	Icone={},%
+	EchelleIcone=1,%
+	RotationIcone=30,%
+	OpaciteIcone=0.5
 }
 
 \NewDocumentCommand\CreationBoite{ O{black} m m m m }{%
@@ -114,6 +145,7 @@
 			\ifboolKV[Boites]{Compteur}{\stepcounter{#3}}{}%on augmente le compteur si demandé
 			\tcolorbox[baseboite,colframe=#1,##2,overlay={%
 				\IfStrEq{\BoxLogo}{}{}{\LogoCoinDroit}%logo 
+				\IfStrEq{\BoxIcone}{}{}{\IconeCoinDroit}%icone 
 				\tikzset{overlay=false}%
 				\TitreBoite{#1}{#4}{#5}{\arabic{#3}}%titre
 				\IfStrEq{\BoxSubTitle}{}{}{\SousTitreBoite}%soustitre



More information about the tex-live-commits mailing list.