From 9eb6f85105699320d8cbdbb33bcdc88c41ea709a Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 15 Jun 2023 03:03:06 +0000 Subject: CTAN sync 202306150303 --- .../pgf/contrib/fenetrecas/doc/FenetreCas-doc.pdf | Bin 627278 -> 659575 bytes .../pgf/contrib/fenetrecas/doc/FenetreCas-doc.tex | 30 +++++---- graphics/pgf/contrib/fenetrecas/tex/FenetreCas.sty | 58 +++++++++++++---- .../contrib/string-diagrams/string-diagrams.dtx | 69 +++++++++++++++------ .../contrib/string-diagrams/string-diagrams.ins | 2 +- .../contrib/string-diagrams/string-diagrams.pdf | Bin 549184 -> 551603 bytes 6 files changed, 116 insertions(+), 43 deletions(-) (limited to 'graphics') diff --git a/graphics/pgf/contrib/fenetrecas/doc/FenetreCas-doc.pdf b/graphics/pgf/contrib/fenetrecas/doc/FenetreCas-doc.pdf index ac533e9a3a..85c5fe3f8b 100644 Binary files a/graphics/pgf/contrib/fenetrecas/doc/FenetreCas-doc.pdf and b/graphics/pgf/contrib/fenetrecas/doc/FenetreCas-doc.pdf differ diff --git a/graphics/pgf/contrib/fenetrecas/doc/FenetreCas-doc.tex b/graphics/pgf/contrib/fenetrecas/doc/FenetreCas-doc.tex index 355aad1580..827d667357 100644 --- a/graphics/pgf/contrib/fenetrecas/doc/FenetreCas-doc.tex +++ b/graphics/pgf/contrib/fenetrecas/doc/FenetreCas-doc.tex @@ -3,8 +3,8 @@ % arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)') \documentclass[french,a4paper,11pt]{article} -\def\TPversion{0.1.2} -\def\TPdate{21 mai 2023} +\def\TPversion{0.1.3} +\def\TPdate{14 juin 2023} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath,amssymb} @@ -74,9 +74,9 @@ \tcbset{vignetteMaJ/.style={% fontupper={\vphantom{pf}\footnotesize\ttfamily}, - vignettes,colframe=ForestGreen!50!black,coltitle=white,colback=purple!25,% + vignettes,colframe=green!50!black,coltitle=white,colback=purple!25,% overlay={\begin{tcbclipinterior}% - \fill[fill=purple!75]($(interior.south west)$) rectangle node[rotate=90]{\tiny \sffamily{\textcolor{Black}{\scalebox{0.85}[0.75]{\textbf{MàJ}}}}} ($(interior.north west)+(5pt,0pt)$);% + \fill[fill=purple!75]($(interior.south west)$) rectangle node[rotate=90]{\tiny \sffamily{\textcolor{black}{\scalebox{0.85}[0.75]{\textbf{MàJ}}}}} ($(interior.north west)+(5pt,0pt)$);% \end{tcbclipinterior}} } } @@ -175,7 +175,7 @@ \vspace{0.5cm} -%\hfill{}\textit{Merci à Denis Bitouzé et à Gilles Le Bourhis pour leurs retours et idées !} +\hfill{}\textit{Merci à Christophe Bal pour ses retours !} \smallskip @@ -265,9 +265,12 @@ Le fonctionnement global est : \section{Historique} -\verb|v0.1.2|~:~~~~Clés [Select] pour le \textit{rond} de sélection sur Geogebra -\verb|v0.1.1|~:~~~~Clés [Fond] et [FondCouleur] pour le fond des lignes +\verb|v0.1.3|~:~~~~Clé \textsf{[PosRes]} pour la réponse (gauche/centre/droite) + correction de bugs mineurs. + +\verb|v0.1.2|~:~~~~Clé \textsf{[Select]} pour le \textit{rond} de sélection sur Geogebra. + +\verb|v0.1.1|~:~~~~Clés \textsf{[Fond]} et \textsf{[FondCouleur]} pour le fond des lignes. \verb|v0.1.0|~:~~~~Version initiale. @@ -367,6 +370,9 @@ Le premier argument, optionnel et entre \texttt{[...]} propose les \Cle{clés} s \hfill~défaut : \Cle{true} \item \Cle{TailleCommande} pour la taille de la commande ; \hfill~défaut : \Cle{\textbackslash normalsize} \item \Cle{TailleResultat} pour la taille du résultat ; \hfill~défaut : \Cle{\textbackslash large} + \item \cmaj{0.1.3} \Cle{PosRes} pour la position du résultat parmi \Cle{gauche/centre/droite} ; + + \hfill~défaut : \Cle{gauche} \item le booléen \Cle{Fond} pour activer la coloration de fond de la ligne ; \hfill~défaut : \Cle{false} \item \Cle{CouleurFond} pour spécifier une couleur de fond si \Cle{Fond=true} ; \hfill~défaut : \Cle{white} \item le booléen \Cle{Select} pour (dés)activer le \textit{rond} de sélection ; \hfill~défaut : \Cle{true} @@ -408,7 +414,7 @@ Les arguments obligatoires, et entre \texttt{\{...\}}, correspondent à la comma {(1/4+1/3)/(1/5+2/7)} {$\rightarrow$ \: $\dfrac{\dfrac14+\dfrac13}{\dfrac15+\dfrac27}= \fpeval{(1/4+1/3)/(1/5+2/7)}$} - \LigneCalculsGeogebra[HauteurAuto=false,HauteurLigne=5,Fond,CouleurFond=cyan!10] + \LigneCalculsGeogebra[HauteurAuto=false,HauteurLigne=5,Fond,CouleurFond=cyan!10, PosRes=droite] {(1+i)\textasciicircum{}2} {$2\text{i}$} \end{CalculFormelGeogebra} @@ -505,7 +511,9 @@ Le premier argument, optionnel et entre \texttt{[...]} propose les \Cle{clés} s \begin{itemize} \item \Cle{CouleurCmd} pour la couleur de la commande ; \hfill~défaut : \Cle{red} \item \Cle{CouleurRes} pour la couleur du résultat ; \hfill~défaut : \Cle{blue} - \item \Cle{PosRes} pour la position du résultat ; \hfill~défaut : \Cle{centre} + \item \cmaj{0.1.3} \Cle{PosRes} pour la position du résultat parmi \Cle{gauche/centre/droite} ; + + \hfill~défaut : \Cle{centre} \item \Cle{TailleCommande} pour la taille de la commande ; \hfill~défaut : \Cle{\textbackslash normalsize} \item \Cle{TailleResultat} pour la taille du résultat ; \hfill~défaut : \Cle{\textbackslash large} \item le booléen \Cle{Fond} activer la coloration de fond de la ligne ; \hfill~défaut : \Cle{false} @@ -539,7 +547,7 @@ Un exemple en ligne :~ \LigneCalculsXcas% {\sffamily g(x):=4/(1+e\textasciicircum(-k x))} {$\mathsf{x \rightarrow \dfrac{4}{e^{-kx}+1}}$} - \LigneCalculsXcas[TailleCommande=\Large,TailleResultat=\LARGE]% + \LigneCalculsXcas[TailleCommande=\Large,TailleResultat=\LARGE,PosRes=droite]% {\sffamily g(x):=4/(1+e\textasciicircum(-k x))} {$\mathsf{x \rightarrow \dfrac{4}{e^{-kx}+1}}$} \LigneCalculsXcas @@ -548,7 +556,7 @@ Un exemple en ligne :~ \LigneCalculsXcas[,Fond,CouleurFond=yellow!10] {\texttt{Dériver[exp(0.1*x)]}} {\texttt{x $\rightarrow$ 0.1*exp(0.1*x)}} - \LigneCalculsXcas[TailleResultat=\Huge,Fond,CouleurFond=orange!5/cyan!5] + \LigneCalculsXcas[TailleResultat=\Huge,Fond,CouleurFond=orange!5/cyan!5, PosRes=gauche] {(1/4+1/3)/(1/5+2/7)} {$\rightarrow$ \: $\dfrac{\dfrac14+\dfrac13}{\dfrac15+\dfrac27}$} \end{CalculFormelXcas} diff --git a/graphics/pgf/contrib/fenetrecas/tex/FenetreCas.sty b/graphics/pgf/contrib/fenetrecas/tex/FenetreCas.sty index e7d41da444..a55c8ba894 100644 --- a/graphics/pgf/contrib/fenetrecas/tex/FenetreCas.sty +++ b/graphics/pgf/contrib/fenetrecas/tex/FenetreCas.sty @@ -3,10 +3,11 @@ % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{FenetreCas}[2023/05/21 0.1.2 Simuler une fenetre CAS type Geogebra ou Xcas] -% 0.1.2 Clés [Select] pour les numéros avec des ronds -% 0.1.1 Clés [FondCouleur] pour le fond des cases -% 0.1.0 Version initiale +\ProvidesPackage{FenetreCas}[2023/06/14 0.1.3 Simuler une fenetre CAS type Geogebra ou Xcas] +% 0.1.3 Clé [PosRes] pour positionner la réponse (gauche/centre/droite) + Correction de bugs mineurs. +% 0.1.2 Clés [Select] pour les numéros avec des ronds. +% 0.1.1 Clés [FondCouleur] pour le fond des cases. +% 0.1.0 Version initiale. %------Option(s) @@ -90,7 +91,8 @@ MargeV=\def\GEOCFoffset{#1},% MargeH=\def\GEOCFoffseth{#1},% CouleurFond=\def\GEOCFcolfond{#1},% - CouleurSelect=\def\GEOCFcolselect{#1} + CouleurSelect=\def\GEOCFcolselect{#1},% + PosRes=\def\GEOCFposrep{#1} } \setKVdefault[paramlgeogebra]{% HauteurLigne=2,% @@ -103,7 +105,8 @@ Fond=false,% CouleurFond=white,% Select=true,% - CouleurSelect=white + CouleurSelect=white,% + PosRes=gauche } \NewDocumentCommand\LigneCalculsGeogebra{ O{} m m }{% @@ -147,16 +150,43 @@ \ifboolKV[paramlgeogebra]{Fond} {\draw[semithick,fill=\GEOCFcolfond] (A2\GGBL) rectangle++({\GEOCFlarg-\GEOCFlargnum},{-\GEOCFhauteur}) ;} {\draw[semithick] (A2\GGBL) rectangle++({\GEOCFlarg-\GEOCFlargnum},{-\GEOCFhauteur}) ;} - %les commande/résultat \ifboolKV[paramlgeogebra]{HauteurAuto} {% + %commande \draw ($(A2\GGBL) + ({\GEOCFoffseth},{-\the\offsetcfgeogebra-0.5*\GEOCFelargirauto*\the\hauteurboiteggbcmd})$) node[font=\GEOCFtaillecmd,right] {#2} ; - \draw ($(A3\GGBL) + ({\GEOCFoffseth},{\the\offsetcfgeogebra+0.5*\GEOCFelargirauto*\the\hauteurboiteggbres})$) node[font=\GEOCFtailleres,right] {#3} ; - } + %résultat + \IfStrEq{\GEOCFposrep}{gauche} + {% + \draw ($(A3\GGBL) + ({\GEOCFoffseth},{\the\offsetcfgeogebra+0.5*\GEOCFelargirauto*\the\hauteurboiteggbres})$) node[font=\GEOCFtailleres,right] {#3} ; + }{}% + \IfStrEq{\GEOCFposrep}{droite} + {% + \draw ($(A3\GGBL) + ({\GEOCFlarg-\GEOCFlargnum},0) + ({-\GEOCFoffseth},{\the\offsetcfgeogebra+0.5*\GEOCFelargirauto*\the\hauteurboiteggbres})$) node[font=\GEOCFtailleres,left] {#3} ; + %\draw ($(A3\GGBL) + ({\GEOCFlarg-\GEOCFlargnum},0) + ({-\GEOCFoffseth},{\the\offsetcfgeogebra+0.5*\GEOCFelargirauto*\the\hauteurboiteggbres})$) node[font=\GEOCFtailleres,left] {#3} ; + }{}% + \IfStrEq{\GEOCFposrep}{centre} + {% + \draw ($(A3\GGBL) + ({0.5*(\GEOCFlarg-\GEOCFlargnum)},{\the\offsetcfgeogebra+0.5*\GEOCFelargirauto*\the\hauteurboiteggbres})$) node[font=\GEOCFtailleres] {#3} ; + }{}% + }% {% + %commande \draw ($(A2\GGBL) + ({\GEOCFoffseth},{-0.25*\GEOCFhauteur})$) node[font=\GEOCFtaillecmd,right] {#2} ; - \draw ($(A2\GGBL) + ({\GEOCFoffseth},{-0.66*\GEOCFhauteur})$) node[font=\GEOCFtailleres,right] {#3} ; + %résultat + \IfStrEq{\GEOCFposrep}{gauche} + {% + \draw ($(A2\GGBL) + ({\GEOCFoffseth},{-0.66*\GEOCFhauteur})$) node[font=\GEOCFtailleres,right] {#3} ; + }{}% + \IfStrEq{\GEOCFposrep}{droite} + {% + \draw ($(A2\GGBL) + ({\GEOCFlarg-\GEOCFlargnum},0) + ({-\GEOCFoffseth},{-0.66*\GEOCFhauteur})$) node[font=\GEOCFtailleres,left] {#3} ; + }{}% + \IfStrEq{\GEOCFposrep}{centre} + {% + \draw ($(A2\GGBL) + ({0.5*(\GEOCFlarg-\GEOCFlargnum)},0) + (0,{-0.66*\GEOCFhauteur})$) node[font=\GEOCFtailleres] {#3} ; + }% + {}% } } @@ -290,7 +320,13 @@ }{} \IfStrEq{\XCCFposres}{droite}%si posrep=right {% - \draw ($(A1\XCL) + ({\XCCFlarg-{\XCCFoffseth}},{\the\offsetcfxcas+0.5*\XCCFelargirauto*\the\hauteurboiteresxcas})$) node[\XCCFcoulres,font=\XCCFtailleres,left] {#3} ; + \ifboolKV[paramfenxcascf]{Menu}%si menu=true + {% + \draw ($(A1\XCL) + ({\XCCFlarg-1},0) + ({-\XCCFoffseth},{\the\offsetcfxcas+0.5*\XCCFelargirauto*\the\hauteurboiteresxcas})$) node[\XCCFcoulres,font=\XCCFtailleres,left] {#3} ; + }% + {% + \draw ($(A1\XCL) + ({\XCCFlarg},0) + ({-\XCCFoffseth},{\the\offsetcfxcas+0.5*\XCCFelargirauto*\the\hauteurboiteresxcas})$) node[\XCCFcoulres,font=\XCCFtailleres,left] {#3} ; + }% }{} %LA LIGNE DE SÉPARATION \ifboolKV[paramfenxcascf]{Sep}%si sep=true diff --git a/graphics/pgf/contrib/string-diagrams/string-diagrams.dtx b/graphics/pgf/contrib/string-diagrams/string-diagrams.dtx index 7bad0f7a63..d6480673a2 100644 --- a/graphics/pgf/contrib/string-diagrams/string-diagrams.dtx +++ b/graphics/pgf/contrib/string-diagrams/string-diagrams.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment %% ============================================================================= %% -%% string-diagrams 0.2.0 (2023/06/12) +%% string-diagrams 0.2.1 (2023/06/13) %% %% Copyright (C) 2023 by Paolo Brasolin %% SPDX-License-Identifier: LPPL-1.3c @@ -75,6 +75,8 @@ \documentclass[a4paper,full]{l3doc} \usepackage{parskip} +\NewDocumentCommand{\TikZ}{}{Ti\emph{k}Z} + \EnableCrossrefs \CodelineIndex \RecordChanges @@ -168,7 +170,7 @@ % \end{tikzpicture} % \end{tcblisting} % -% You can draw multiple boxes using any of your standard Ti\emph{k}Z positioning techniques. +% You can draw multiple boxes using any of your standard \TikZ\ positioning techniques. % Don't forget to label the nodes so you can easily reference them. % % \begin{tcblisting}{example} @@ -247,13 +249,13 @@ % % \end{function} % -% \begin{function}[added=2023-05-31]{\wires} +% \begin{function}[added=2023-05-31,updated=2023-06-13]{\wires} % \begin{syntax} -% \cs{wires}\oarg{Ti\emph{k}Z keys}\marg{connectivity}\marg{loose ends} +% \cs{wires}\oarg{\TikZ\ keys}\marg{connectivity}\marg{loose ends} % \end{syntax} % % To connect boxes, you can use the \cmd\wires\ macro. -% The first argument is Ti\emph{k}Z styling for the wires; the second argument is a nested dicionary specifying the connectivity; the third argument is a list of the loose ends to draw. +% The first argument is \TikZ\ styling for the wires; the second argument is a nested dicionary specifying the connectivity; the third argument is a list of the loose ends to draw. % \texttt{box}es have the following anchors: \texttt{west}, \texttt{west.0}, \texttt{west.1}, \texttt{east}, \texttt{east.0}, and \texttt{east.1}. % % \begin{tcblisting}{example} @@ -262,7 +264,7 @@ % \node[box=0/1/0/2] (B) at (+2, 0) {B}; % \node[box=0/1/0/1] (C) at ( 0,+1) {C}; % \node[box=0/1/0/1] (D) at ( 0,-1) {D}; -% \wires[]{ +% \wires{ % A = { east.1 = C.west, east.2 = D.west }, % C = { east = B.west.1 }, % D = { east = B.west.2 }, @@ -322,8 +324,8 @@ % \begin{macrocode} \ProvidesExplPackage {string-diagrams} - {2023/06/12} - {0.2.0} + {2023/06/13} + {0.2.1} {Draw string diagrams using TikZ} % \end{macrocode} % @@ -401,7 +403,7 @@ % \end{macro} % % \begin{macro}{box} -% \changes{0.2.0}{2023/06/12}{make ports configurable through Ti\emph{k}Z keys} +% \changes{0.2.0}{2023/06/12}{make ports configurable through \TikZ\ keys} % % Define a rectangular shape with configurable ports. % \begin{macrocode} @@ -487,31 +489,34 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\wires} -% Define our main actor. +% \begin{macro}{\@@_draw_bound_wires:nn} +% Draws bound wires. +% \begin{arguments} +% \item \TikZ\ keys +% \item dictionary of port labels +% \end{arguments} % \begin{macrocode} -\NewDocumentCommand{\wires}{ o m m } -{ +\cs_new:Nn \@@_draw_bound_wires:nn { \prop_set_from_keyval:Nn \l_tmpa_prop { #2 } \prop_map_inline:Nn \l_tmpa_prop { \prop_set_from_keyval:Nn \l_tmpb_prop { ##2 } \prop_map_inline:Nn \l_tmpb_prop { - \regex_match_case:nnTF + \regex_match_case:nn { { \. north } { \tl_gset:Nn \g_tmpa_tl { 90 } } { \. south } { \tl_gset:Nn \g_tmpa_tl { -90 } } { \. west } { \tl_gset:Nn \g_tmpa_tl { 180 } } { \. east } { \tl_gset:Nn \g_tmpa_tl { 0 } } - } { ####2 } {} {} - \regex_match_case:nnTF + } { ####2 } + \regex_match_case:nn { { north } { \tl_gset:Nn \g_tmpb_tl { 90 } } { south } { \tl_gset:Nn \g_tmpb_tl { -90 } } { west } { \tl_gset:Nn \g_tmpb_tl { 180 } } { east } { \tl_gset:Nn \g_tmpb_tl { 0 } } - } { ####1 } {} {} + } { ####1 } \draw [ out={\tl_use:N \g_tmpb_tl}, in={\tl_use:N \g_tmpa_tl}, @@ -519,9 +524,21 @@ ] (##1.####1) to (####2); } } - \clist_set:Nn \l_tmpa_clist { #3 } +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_draw_loose_wires:nn} +% Draws loose wires. +% \begin{arguments} +% \item \TikZ\ keys +% \item list of port labels +% \end{arguments} +% \begin{macrocode} +\cs_new:Nn \@@_draw_loose_wires:nn { + \clist_set:Nn \l_tmpa_clist { #2 } \clist_map_inline:Nn \l_tmpa_clist { - \regex_match_case:nnTF + \regex_match_case:nn { { \. north } { \draw[#1] (##1) -- +( 0,+1); } % TODO: cleaner solution? { \. south } @@ -531,12 +548,24 @@ } % TODO: not sure why this works { \. west } { \draw[#1] (##1) -- +(-1, 0); } { \. east } { \draw[#1] (##1) -- +(+1, 0); } - } { ##1 } {} {} + } { ##1 } } } % \end{macrocode} % \end{macro} % +% \begin{macro}{\wires} +% \changes{0.2.1}{2023/06/13}{now correctly handles optional style parameter} +% Define our main actor. +% \begin{macrocode} +\NewDocumentCommand{\wires}{ O{} m m } +{ + \@@_draw_bound_wires:nn { #1 } { #2 } + \@@_draw_loose_wires:nn { #1 } { #3 } +} +% \end{macrocode} +% \end{macro} +% % Close the \pkg{DocStrip} guards and call it a day. % \begin{macrocode} % diff --git a/graphics/pgf/contrib/string-diagrams/string-diagrams.ins b/graphics/pgf/contrib/string-diagrams/string-diagrams.ins index 9d4304f591..96d08b2a9f 100644 --- a/graphics/pgf/contrib/string-diagrams/string-diagrams.ins +++ b/graphics/pgf/contrib/string-diagrams/string-diagrams.ins @@ -8,7 +8,7 @@ %% %% ============================================================================= %% -%% string-diagrams 0.2.0 (2023/06/12) +%% string-diagrams 0.2.1 (2023/06/13) %% %% Copyright (C) 2023 by Paolo Brasolin %% SPDX-License-Identifier: LPPL-1.3c diff --git a/graphics/pgf/contrib/string-diagrams/string-diagrams.pdf b/graphics/pgf/contrib/string-diagrams/string-diagrams.pdf index a0db3e4625..3eb4e9ca2e 100644 Binary files a/graphics/pgf/contrib/string-diagrams/string-diagrams.pdf and b/graphics/pgf/contrib/string-diagrams/string-diagrams.pdf differ -- cgit v1.2.3