diff options
Diffstat (limited to 'graphics')
20 files changed, 208 insertions, 88 deletions
diff --git a/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams-doc.pdf b/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams-doc.pdf Binary files differindex f9dd77a8a2..d8f3c74dcd 100644 --- a/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams-doc.pdf +++ b/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams-doc.pdf diff --git a/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams-doc.tex b/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams-doc.tex index bb431eb276..e76b8b987b 100644 --- a/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams-doc.tex +++ b/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams-doc.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % %==[ document class ]=========================================================== @@ -180,6 +180,10 @@ \usepackage{listings} +% Use straight quotes in code listings. https://tex.stackexchange.com/a/145417/82186 +\usepackage{textcomp} +\lstset{upquote=true} + % http://tex.stackexchange.com/a/336331/82186 \makeatletter \lst@Key{lastline}\relax{\ifnumcomp{#1}{<}{0}{% @@ -247,7 +251,7 @@ \startcodi,\stopcodi, \lay,\obj,\mor, \bye, - \draw,\foreach, + \draw,\foreach,\pgfqkeys, \ar, \psset,\everypsbox,\ncline,\ncarc, \xymatrix, @@ -258,13 +262,15 @@ frame=none, % extendedchars=false, inputencoding=utf8, +} + +\lstdefinestyle{metacode}{ escapeinside={(@}{@)}, moredelim=**[is][\color{orange!80!black}]{@opt@}{@/opt@}, moredelim=**[is][\color{blue!80!black}]{@nws@}{@/nws@}, % moredelim=**[is][\color\underbar]{@rep@}{@/rep@}, moredelim=**[s][\itshape]{<}{>}, - % NOTE: × and ı are needed just for the associahedron example - literate={~}{{\textvisiblespace}}1 {XOR}{{$\vert$}}1 {:}{{\textbf{:}}}1 {:=}{{$\equiv$}}1 {×}{{\texttimes}}1 {ı}{{\i}}1, + literate={XOR}{{$\vert$}}1 {:}{{\textbf{:}}}1 {:=}{{$\equiv$}}1, } \lstset{style=TeX} @@ -386,6 +392,11 @@ \def\NiceURL#1#2{\href{#2}{\color{blue}\ul{#1}}} +%==[ Import tikz-cd arrow styles ]=============================================? + +\usepackage{tikz-cd} +\pgfqkeys{/codi}{every arrow/.append style={/ektropi/add=/tikz/commutative diagrams}} + %==[ microtype ]================================================================ \usepackage{microtype} @@ -401,7 +412,7 @@ \resizebox{\linewidth}{!}{\scshape enchiridion}\par \vfill \marginpar{ - \resizebox{\linewidth}{!}{\scshape 1.0.1}\\[0.62em] + \resizebox{\linewidth}{!}{\scshape 1.1.0}\\[0.62em] \resizebox{\linewidth}{!}{\scshape \today} } @@ -778,7 +789,7 @@ Finally, \textbf{\CoDi}. The first of the two macros that \CoDi\ offers is \lstinline|\obj|. It is polymorphic and can draw both single objects and layouts. -\begin{lstlisting} +\begin{lstlisting}[style=metacode] \obj@opt@ <object options> @/opt@{<math>};(@ \marginpar{\scriptsize {\color{orange!80!black}Orange fragments} are optional.}@) \obj@opt@ <layout options> @/opt@{<layout>}; @@ -786,7 +797,7 @@ It is polymorphic and can draw both single objects and layouts. Layouts are described using the customary \TeX\ tabular syntax. -\begin{lstlisting} +\begin{lstlisting}[style=metacode] <layout> := (@\itshape\underbar{<row> <row separator>}@)(@ \marginpar{\scriptsize \underbar{Underlined fragments} can repeat one or more times.}@) <row> := <cell> (@\itshape\color{orange!80!black}\underbar{<cell separator> <cell>}@) @@ -798,7 +809,7 @@ Layouts are described using the customary \TeX\ tabular syntax. The discretionary options syntax is analogous to standard \TikZ\ nodes and matrices, respectively. -\begin{lstlisting} +\begin{lstlisting}[style=metacode] <object options> := (@\itshape\color{orange!80!black}\underbar{[object keylist]}@) @opt@(<name>) at (<coordinate>)@/opt@ <layout options> := (@\itshape\color{orange!80!black}\underbar{[layout keylist]}@) @opt@(<name>) at (<coordinate>)@/opt@ \end{lstlisting} @@ -854,7 +865,7 @@ by their row/column index pairs. The second and last macro that \CoDi\ offers is \lstinline|\mor|. It can draw single or chained morphisms. -\begin{lstlisting} +\begin{lstlisting}[style=metacode] \mor@opt@ <chain options> @/opt@<object>(@ \itshape\underbar{\textvisiblespace<morphism>\textvisiblespace<object>}@);(@ \marginpar{\scriptsize Whitespace marked as \textvisiblespace\ is mandatory.}@) @@ -862,14 +873,14 @@ It can draw single or chained morphisms. Source and target objects are referred to by their name. -\begin{lstlisting} +\begin{lstlisting}[style=metacode] <object> := @nws@(<name>)@/nws@ (@ \marginpar{\scriptsize {\color{blue!80!black}Blue fragments} can be either enclosed in the shown delimiters, or a \TeX\ group (not idiomatic), or simply devoid of whitespace.}@) \end{lstlisting} Morphisms consist of one or more optional labels and an arrow. -\begin{lstlisting} +\begin{lstlisting}[style=metacode] <morphism> := @opt@<labels> : @/opt@<arrow> <labels> := @nws@"<math>"@/nws@ XOR (@\underbar{[{\itshape "<math>", <label keylist>}]}@) (@ \marginpar{\scriptsize Alternatives are separated by $\vert$s.}@) @@ -879,7 +890,7 @@ Morphisms consist of one or more optional labels and an arrow. Global options can be given to both labels and arrows. -\begin{lstlisting} +\begin{lstlisting}[style=metacode] <chain options> := [<label keylist>] @opt@: [<arrow keylist>]@/opt@ \end{lstlisting} @@ -926,6 +937,16 @@ and keep the code terse and readable. \newpage \section{Names} As you'll have guessed by now, objects name themselves. +This also applies to the nodes labeling the morphisms. + +\begin{tcblisting}{snippet} +\begin{codi} + \obj{ A & B \\ }; + \mor A f:-> B; + \draw [red] (A) circle (1em); + \draw [blue] (f) circle (1em); +\end{codi} +\end{tcblisting} The process happens in three steps: \begin{itemize}[nosep] @@ -1040,7 +1061,7 @@ Chain gluing can be obtained using {\ttfamily +}. The expansion behaviour of the naming routine can be configured inside any \CoDi\ scope using the \lstinline!expand! key. -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/expand = none | once | full \end{lstlisting} @@ -1083,9 +1104,7 @@ yields unpractical results when parametrizing macros. \begin{codi} \foreach [count=\c] \m in {\lim,\prod} \obj [expand=full] at (4em*\c,0) {\m F}; -\mor (protect mathop {relax kern z@ mathgroup - symoperators lim}nmlimits@ F) - -> (DOTSI prodop slimits@ F); +\mor (lim F) -> (DOTSI prodop slimits@ F); \end{codi} \end{tcblisting} @@ -1103,7 +1122,7 @@ This explains why a setting to force a single expansion exists. The character replacement behaviour of the naming routine can be configured inside any \CoDi\ scope using various keys. -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/replace character = <character> with <character> /codi/replace charcode = <charcode> with <character> /codi/remove characters = <characters> @@ -1168,7 +1187,7 @@ The wise solution is writing better code. The name overwriting behaviour of the naming routine can be configured inside any \CoDi\ scope using the \lstinline!overwrite! key. -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/overwrite = false | alias | true \end{lstlisting} @@ -1212,6 +1231,17 @@ semantic alias. The hard overwriting behaviour ignores any label except generated ones; it exists for completeness and debugging purposes. + +All of the above applies to morphisms too. +The only difference is that the name of the node labelling the arrow is changed using the standard \lstinline|/tikz/name| key: + +\begin{tcblisting}{snippet} +\begin{codi} + \obj{ A & B \\ }; + \mor A [name=foo, "f"]:-> B; + \draw [red] (foo) circle (1em); +\end{codi} +\end{tcblisting} \newpage \section{Styles: scopes} \CoDi\ structures diagrams into five layers implemented with \TikZ. @@ -1233,7 +1263,7 @@ ones; it exists for completeness and debugging purposes. Each layer can be styled using \TikZ\ keys. Each layer possesses a default style: -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/every diagram /codi/every layout /codi/every object @@ -1247,7 +1277,7 @@ You can customize them using \TikZ\ key handlers, \eg \end{lstlisting} Each layer possesses a library of commonplace styles: -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/diagrams/ /codi/layouts/ /codi/objects/ @@ -1403,12 +1433,12 @@ search algorithm. Here's some meta code demonstrating this: Diagrams can be laid over regular grids: -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/diagrams/tetragonal=base <length> height <length> (@\hfill@) (default: base 4.5em height 2.8em) \end{lstlisting} -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/diagrams/hexagonal=<direction> side <length> angle <angle> (@\hfill@) (default: horizontal side 4.5em angle 60) \end{lstlisting} @@ -1444,12 +1474,12 @@ with red zones displaying the default radii around the origins. \section{Styles: layouts} Layouts can be laid over regular grids: -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/layouts/tetragonal=base <length> height <length> (@\hfill@) (default: base 4.5em height 2.8em) \end{lstlisting} -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/layouts/hexagonal=<direction> side <length> angle <angle> (@\hfill@) (default: horizontal side 4.5em angle 60) \end{lstlisting} @@ -1480,12 +1510,14 @@ spaced and offset in order to reproduce the grids given by diagram styles. Note that \emph{each row must have the same number of cells}% \footnote{this is different from the behaviour of, say, tables} or the spacing will be incorrect. + +Note that these keys will be recognized by \lstinline|\obj| only if you're using the tabular syntax. \newpage \section{Styles: objects} No styles are available at the moment. \newpage \section{Styles: arrows} -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/arrows/crossing over /codi/arrows/crossing over/clearance=<length> (@\hfill@) (default: 0.5ex) /codi/arrows/crossing over/color=<color> (@\hfill@) (default: white) @@ -1504,7 +1536,7 @@ over a \emph{previously drawn} one. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/arrows/slide=<length> \end{lstlisting} @@ -1521,7 +1553,7 @@ This key slides an arrow backward (negative) and forward (positive) along its di %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/arrows/shove=<length> \end{lstlisting} @@ -1535,9 +1567,39 @@ This key shoves an arrow to the left (negative) and to the right (positive) with \mor :[shove=+.3em, blue] A -> B; \end{codi} \end{tcblisting} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\hfill$\therefore$\hfill\null + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\CoDi\ is currently missing a base arrow style library. + +You can define your own styles adding them to \lstinline|/codi/arrows/|. + +If you're familiar with {\ttfamily\small tikz-cd}, you can import its arrow styles to use them with \CoDi\ as follows in you preamble: +\begin{lstlisting} +\usepackage{tikz-cd} +\pgfqkeys{/codi}{ + every arrow/.append style={ + /ektropi/add=/tikz/commutative diagrams + } +} +\end{lstlisting} + +Then, you can use them seamlessly: + +\begin{tcblisting}{snippet, trim={2 and -1}} +\begin{codi} +\obj{ X & Y \\ & Z \\ }; +\mor X f:->,hook Y g:-> Z; +\mor X f:dashrightarrow Z; +\end{codi} +\end{tcblisting} \newpage \section{Styles: labels} -\begin{lstlisting} +\begin{lstlisting}[style=metacode] /codi/labels/mid \end{lstlisting} @@ -1559,6 +1621,29 @@ The remainder of the text is just commented examples. \clearpage +\subsection{2-cells} + +\begin{tcblisting}{gallery} +% From the LaTeX preamble: +% \usepackage{tikz-cd} + +% We use tikz-cd keys to quickly whip up an arrow style for a 2-morphism. +\pgfqkeys{/codi/arrows}{ + -2>/.style={ + /tikz/commutative diagrams/Rightarrow, + /tikz/commutative diagrams/shorten=2pt, + } +} + +\begin{codi} + \obj{ X & Y & Z \\ }; + \mor[swap]:[bend right] X f:-> Y m:-> Z; + \mor :[bend left] X g:-> Y n:-> Z; + \mor f \alpha:-2> g; + \mor[swap] m \beta:-2> n; +\end{codi} +\end{tcblisting} + \subsection{Snake} \begin{tcblisting}{gallery} @@ -1587,7 +1672,7 @@ The remainder of the text is just commented examples. \subsection{The fourth associahedron} -\begin{tcblisting}{gallery} +\begin{tcblisting}{gallery,listing options={literate={×}{{\texttimes}}1 {ı}{{\i}}1}} \begin{codi} % From the LaTeX preamble: % \usepackage{newunicodechar} diff --git a/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams.sty b/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams.sty index 56b5a0c657..aa98819c29 100644 --- a/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams.sty +++ b/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams.sty @@ -1,13 +1,13 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % \RequirePackage{tikz}%[2013/12/13] % pgf version 3.0.0 required -\ProvidesPackage{commutative-diagrams}[2020/06/11 1.0.1 CoDi: Commutative Diagrams for TeX] +\ProvidesPackage{commutative-diagrams}[2023/08/23 1.1.0 CoDi: Commutative Diagrams for TeX] \usetikzlibrary{commutative-diagrams} \let\codi\kDRammaOpen \let\endcodi\kDRammaShut diff --git a/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams.tex b/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams.tex index 8cd0ed181d..ad34513b6d 100644 --- a/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams.tex +++ b/graphics/pgf/contrib/commutative-diagrams/commutative-diagrams.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % \input tikz.tex diff --git a/graphics/pgf/contrib/commutative-diagrams/kodi.sty b/graphics/pgf/contrib/commutative-diagrams/kodi.sty index 149c1cbe10..e1086be386 100644 --- a/graphics/pgf/contrib/commutative-diagrams/kodi.sty +++ b/graphics/pgf/contrib/commutative-diagrams/kodi.sty @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % \RequirePackage{commutative-diagrams} diff --git a/graphics/pgf/contrib/commutative-diagrams/t-commutative-diagrams.tex b/graphics/pgf/contrib/commutative-diagrams/t-commutative-diagrams.tex index 6a65083d05..2d7e084c2d 100644 --- a/graphics/pgf/contrib/commutative-diagrams/t-commutative-diagrams.tex +++ b/graphics/pgf/contrib/commutative-diagrams/t-commutative-diagrams.tex @@ -1,12 +1,12 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % -\writestatus{loading}{2020/06/11 1.0.1 CoDi: Commutative Diagrams for TeX} +\writestatus{loading}{2023/08/23 1.1.0 CoDi: Commutative Diagrams for TeX} \startmodule[commutative-diagrams] \usemodule[tikz] \usetikzlibrary[commutative-diagrams] diff --git a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.bapto.code.tex b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.bapto.code.tex index 57339b8696..77faf65699 100644 --- a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.bapto.code.tex +++ b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.bapto.code.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % % βάπτω • (báptō) diff --git a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.code.tex b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.code.tex index d1a8ece647..6448bd41a3 100644 --- a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.code.tex +++ b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.code.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % %==[ dependencies graph ]======================================================= diff --git a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.diorthono.code.tex b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.diorthono.code.tex index 90677affb5..cfc3bd1e23 100644 --- a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.diorthono.code.tex +++ b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.diorthono.code.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % % διορθώνω • (diorthóno) diff --git a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.ektropi.code.tex b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.ektropi.code.tex index 0a418942c6..8255348dcc 100644 --- a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.ektropi.code.tex +++ b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.ektropi.code.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % % εκτροπή • (ektropí) diff --git a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.katharizo.code.tex b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.katharizo.code.tex index f89e99c9c0..49184a0d01 100644 --- a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.katharizo.code.tex +++ b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.katharizo.code.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % % καθαρίζω • (katharízo) @@ -98,7 +98,8 @@ \def\kDKatharizoStringify#1\kD{ \def\kDFoo{#1} \edef\kDFoo{\meaning\kDFoo} - \def\kDAct##1:->##2\kD{##2} + % NOTE: in recent versions of ConTeXt \macro does not output an arrow + \ifdefined\contextversion\def\kDAct##1:##2\kD{##2}\else\def\kDAct##1:->##2\kD{##2}\fi \edef\kDFoo{\expandafter\kDAct\kDFoo\kD} \kDKatharizoStringified\expandafter{\kDFoo} } diff --git a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.koinos.code.tex b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.koinos.code.tex index 5e15eab768..50c497ece9 100644 --- a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.koinos.code.tex +++ b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.koinos.code.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % % κοινός • (koinós) diff --git a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.mandyas.code.tex b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.mandyas.code.tex index b1116fd50a..4aa56324be 100644 --- a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.mandyas.code.tex +++ b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.mandyas.code.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % % μανδύας • (mandýas) diff --git a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.mitra.code.tex b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.mitra.code.tex index 90b41a7eb4..815a8570e0 100644 --- a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.mitra.code.tex +++ b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.mitra.code.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % % μήτρα • (mítra) diff --git a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.ozos.code.tex b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.ozos.code.tex index b309cc3b13..973cc2911f 100644 --- a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.ozos.code.tex +++ b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.ozos.code.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % % όζος • (ózos) diff --git a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.ramma.code.tex b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.ramma.code.tex index cdc8ceaab5..8a0f4bcdca 100644 --- a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.ramma.code.tex +++ b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.ramma.code.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % % ράμμα • (rámma) diff --git a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.velos.code.tex b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.velos.code.tex index b1d500cdbc..cf3a82ebed 100644 --- a/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.velos.code.tex +++ b/graphics/pgf/contrib/commutative-diagrams/tikzlibrarycommutative-diagrams.velos.code.tex @@ -1,9 +1,9 @@ % % CoDi: Commutative Diagrams for TeX -% Copyright (c) 2015-2020 Paolo Brasolin <paolo.brasolin@gmail.com> +% Copyright (c) 2015-2023 Paolo Brasolin <paolo.brasolin@gmail.com> % SPDX-License-Identifier: MIT % -% This file is part of CoDi 1.0.1, released on 2020/06/11 under MIT license. +% This file is part of CoDi 1.1.0, released on 2023/08/23 under MIT license. % % βέλος • (vélos) @@ -23,7 +23,9 @@ % and avoid any conflict a priori. /velos/install quote handler/.style={ /handlers/first char syntax=true, - /handlers/first char syntax/the character "/.initial=\kDVelosQuoteHandler + /handlers/first char syntax/the character "/.initial=\kDVelosQuoteHandler, + % NOTE: next line is required by recent versions of ConTeXt + /handlers/first char syntax/the character U+0022 'quotation mark'/.initial=\kDVelosQuoteHandler, % node quotes mean={node contents={#1}}, % edge quotes mean={node contents={#1}} }, diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf Binary files differindex 2cb83a3d52..003e8804f4 100644 --- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf +++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex index b884128e87..c05b020cee 100644 --- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex +++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex @@ -5,8 +5,8 @@ \documentclass[french,a4paper,11pt]{article} \usepackage[margin=2cm,includefoot]{geometry} -\def\TPversion{0.1.3} -\def\TPdate{6 juillet 2023} +\def\TPversion{0.1.4} +\def\TPdate{23 août 2023} %\usepackage[utf8]{inputenc} %\usepackage[T1]{fontenc} \usepackage{amsmath,amssymb} @@ -255,6 +255,8 @@ \section{Historique} +\verb|v0.1.4|~:~~~~Possibilité de remplir une table de Karnaugh sans virgule + \verb|v0.1.3|~:~~~~Style alternatif et Clé \Cle{PoliceTT} pour les tables de Karnaugh \verb|v0.1.2|~:~~~~Clé \Cle{Offset} pour les diagrammes sagittaux + Diagrammes sagittaux de composées. @@ -717,7 +719,8 @@ En ce qui concerne le remplissage des cases : \item l'argument obligatoire, et entre \texttt{\{....\}} est la liste des cases, de gauche à droite en partant de la ligne du haut ; \item la couleur de cases est gérée par la clé idoine de l'environnement. \end{itemize} -\vspace*{-\baselineskip}\leavevmode + +À noter que la liste peut être donnée sous forme \Cle{\{1,0,1,0,0,0,0,0\}} ou \Cle{\{1010000\}} \end{tipblock} \subsection{Arguments et clés pour la commande de regroupement des blocs} @@ -759,7 +762,7 @@ Les deux arguments obligatoires, et entre \texttt{\{...\}}, correspondent aux \t \end{TableKarnaugh} \hspace{5mm} \begin{TableKarnaugh}[Aide] - \KarnaughCasesResult{0,1,1,0,1,1,1,1} + \KarnaughCasesResult{01101111} \KarnaughBlocRegroup[Type=Centre,Couleur=orange,Decalage=-1.5pt]{10}{32} \KarnaughBlocRegroup[Type=Gauche,Couleur=teal,Decalage=-1.5pt]{00}{11} \KarnaughBlocRegroup[Type=Droite,Couleur=teal,Decalage=-1.5pt]{40}{31} @@ -789,7 +792,7 @@ On obtient le tableau de Karnaugh suivant : \begin{TableKarnaugh} [Variables=k/l/m,Unite=1.25cm,Couleur=darkgray, PosVarLaterale=Droite,CouleurLegende=black/blue/red, StyleAlternatif] - \KarnaughCasesResult{1,1,1,0,1,1,1,0} + \KarnaughCasesResult{11101110} \KarnaughBlocRegroup[Type=Centre,Couleur=brown,Decalage=-3pt]{00}{22} \KarnaughBlocRegroup[Type=Centre,Couleur=teal,Decalage=-1.5pt]{10}{32} \end{TableKarnaugh} diff --git a/graphics/pgf/contrib/profsio/tex/ProfSio.sty b/graphics/pgf/contrib/profsio/tex/ProfSio.sty index b4d4a4fa62..3e8a9ca3c5 100644 --- a/graphics/pgf/contrib/profsio/tex/ProfSio.sty +++ b/graphics/pgf/contrib/profsio/tex/ProfSio.sty @@ -3,7 +3,8 @@ % : Luatruthtable from Chetan Shirore and Dr. Ajit Kumar https://ctan.org/pkg/luatruthtable \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfSio}[2023/07/06 0.1.3 Pour les enseignants en BTS SIO] +\ProvidesPackage{ProfSio}[2023/08/23 0.1.4 Pour les enseignants en BTS SIO] +%0.1.4 Possibilité de remplir une table de Karnaugh sans virgule %0.1.3 Style alternatif et Clé [PoliceTT] pour les tables de Karnaugh %0.1.2 Ajout d'une option [Offset] pour les diagrammes sagittaux + Diagrammes sagittaux de composée + Tables de vérité %0.1.1 Correction de la documentation + Ajout des diagrammes sagittaux @@ -363,28 +364,56 @@ } \NewDocumentCommand\KarnaughCasesResult{ s m }{% - \setsepchar{,}% - \readlist*\KGHListeResult{#2}% \IfBooleanTF{#1}% {% - \xintifboolexpr{\KGHListeResult[1] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A01) rectangle (A12) ;}{}% - \xintifboolexpr{\KGHListeResult[2] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A11) rectangle (A22) ;}{}% - \xintifboolexpr{\KGHListeResult[3] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A21) rectangle (A32) ;}{}% - \xintifboolexpr{\KGHListeResult[4] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A31) rectangle (A42) ;}{}% - \xintifboolexpr{\KGHListeResult[5] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A00) rectangle (A11) ;}{}% - \xintifboolexpr{\KGHListeResult[6] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A10) rectangle (A21) ;}{}% - \xintifboolexpr{\KGHListeResult[7] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A20) rectangle (A31) ;}{}% - \xintifboolexpr{\KGHListeResult[8] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A30) rectangle (A41) ;}{}% + \IfSubStr{#2}{,}% + {% + \setsepchar{,}% + \readlist*\KGHListeResult{#2}% + \xintifboolexpr{\KGHListeResult[1] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A01) rectangle (A12) ;}{}% + \xintifboolexpr{\KGHListeResult[2] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A11) rectangle (A22) ;}{}% + \xintifboolexpr{\KGHListeResult[3] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A21) rectangle (A32) ;}{}% + \xintifboolexpr{\KGHListeResult[4] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A31) rectangle (A42) ;}{}% + \xintifboolexpr{\KGHListeResult[5] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A00) rectangle (A11) ;}{}% + \xintifboolexpr{\KGHListeResult[6] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A10) rectangle (A21) ;}{}% + \xintifboolexpr{\KGHListeResult[7] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A20) rectangle (A31) ;}{}% + \xintifboolexpr{\KGHListeResult[8] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A30) rectangle (A41) ;}{}% + }% + {% + \StrChar{#2}{1}[\TmpCharA]\xintifboolexpr{\TmpCharA == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A01) rectangle (A12) ;}{}% + \StrChar{#2}{2}[\TmpCharB]\xintifboolexpr{\TmpCharB == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A11) rectangle (A22) ;}{}% + \StrChar{#2}{3}[\TmpCharC]\xintifboolexpr{\TmpCharC == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A21) rectangle (A32) ;}{}% + \StrChar{#2}{4}[\TmpCharD]\xintifboolexpr{\TmpCharD == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A31) rectangle (A42) ;}{}% + \StrChar{#2}{5}[\TmpCharE]\xintifboolexpr{\TmpCharE == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A00) rectangle (A11) ;}{}% + \StrChar{#2}{6}[\TmpCharF]\xintifboolexpr{\TmpCharF == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A10) rectangle (A21) ;}{}% + \StrChar{#2}{7}[\TmpCharG]\xintifboolexpr{\TmpCharG == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A20) rectangle (A31) ;}{}% + \StrChar{#2}{8}[\TmpCharH]\xintifboolexpr{\TmpCharH == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A30) rectangle (A41) ;}{}% + }% }% {% - \draw (0.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[1]} ; - \draw (1.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[2]} ; - \draw (2.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[3]} ; - \draw (3.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[4]} ; - \draw (0.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[5]} ; - \draw (1.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[6]} ; - \draw (2.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[7]} ; - \draw (3.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[8]} ; + \IfSubStr{#2}{,}% + {% + \setsepchar{,}% + \readlist*\KGHListeResult{#2}% + \draw (0.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[1]} ; + \draw (1.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[2]} ; + \draw (2.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[3]} ; + \draw (3.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[4]} ; + \draw (0.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[5]} ; + \draw (1.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[6]} ; + \draw (2.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[7]} ; + \draw (3.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[8]} ; + }% + {% + \draw (0.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{1}} ; + \draw (1.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{2}} ; + \draw (2.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{3}} ; + \draw (3.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{4}} ; + \draw (0.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{5}} ; + \draw (1.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{6}} ; + \draw (2.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{7}} ; + \draw (3.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{8}} ; + }% }% } |