summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-03-11 19:56:28 +0000
committerKarl Berry <karl@freefriends.org>2024-03-11 19:56:28 +0000
commite135cc1357adae2735270b710d708e344136c9cd (patch)
treee3bb9ec65050f9c99a177b27a000bf6bd08f73ef /Master/texmf-dist/tex
parent424a559e3ea494f8b9d925a843000392b171e728 (diff)
zx-calculus (11mar24)
git-svn-id: svn://tug.org/texlive/trunk@70591 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/zx-calculus/tikzlibraryzx-calculus.code.tex25
-rw-r--r--Master/texmf-dist/tex/latex/zx-calculus/zx-calculus.sty2
2 files changed, 19 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/zx-calculus/tikzlibraryzx-calculus.code.tex b/Master/texmf-dist/tex/latex/zx-calculus/tikzlibraryzx-calculus.code.tex
index c23955e6cf8..a5261522264 100644
--- a/Master/texmf-dist/tex/latex/zx-calculus/tikzlibraryzx-calculus.code.tex
+++ b/Master/texmf-dist/tex/latex/zx-calculus/tikzlibraryzx-calculus.code.tex
@@ -1,5 +1,4 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Version: 2.0
%%% License: MIT
%%% Author: Léo Colisson
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -234,6 +233,13 @@
zx set execute at begin node={},
zx set execute at end node={},
},
+ %% Like bar/.store in=\foo except that bar={mystyle={fill=#1}} is valid
+ %% as we do not expand the argument
+ /handlers/.style store in/.code={%
+ \pgfkeysalso{%
+ \pgfkeyscurrentpath/.code={\edef#1{\unexpanded{##1}}},%
+ }%
+ },
}
@@ -2966,7 +2972,12 @@
%%%%% We will create an alias \zx, but when we use externalization we
%%%%% wrap it around a figure.
\NewDocumentCommand{\zxNoExt}{O{}+m}{% Warning, expl syntax removes space.
- \tl_rescan:nn { \char_set_catcode_active:N \& } { \begin{ZXNoExt}[#1] #2 \end{ZXNoExt} }
+ %%\tl_rescan:nn { \char_set_catcode_active:N \& } { \begin{ZXNoExt}[#1] #2 \end{ZXNoExt} }
+ %% -> tl_rescan has the issue of forbidding the # character, at least in my experience:
+ % https://tex.stackexchange.com/a/707336/116348
+ \tl_set:Nn \l_tmpa_tl {\begin{ZXNoExt}[#1] #2 \end{ZXNoExt}}
+ \regex_replace_all:nnN { \& } { \cA\& } \l_tmpa_tl
+ \tl_use:N \l_tmpa_tl
}
\ExplSyntaxOff
@@ -3580,7 +3591,7 @@
/tikz/cleanup style for measure node/.style={
a/.style={},%
},
- cleanup style for fit node/.store in=\zx@cleanupStyleFitNode,
+ cleanup style for fit node/.style store in=\zx@cleanupStyleFitNode,
cleanup style for fit node={},
%%% this part is mostly used by the wrapping macro (e.g. to create \zxGateMulti)
command to run to measure node/.store in=\zx@commandToRunToMeasureNode,
@@ -3597,15 +3608,15 @@
%%% and is more fine grained that the above commands
content inner nodes/.store in=\myContent,
%%% TODO: in the function: content inner nodes={#4},
- style inner nodes/.store in=\zx@genericMultiStyle,
+ style inner nodes/.style store in=\zx@genericMultiStyle,
style inner nodes={},
% this will be set by fit content not to override the user value
- before style inner nodes/.store in=\zx@genericBeforeStyleInnerNodes,
+ before style inner nodes/.style store in=\zx@genericBeforeStyleInnerNodes,
before style inner nodes={},
% style for the main style
- main/.store in=\zx@genericMultiMainStyle,
+ main/.style store in=\zx@genericMultiMainStyle,
main={},
- main text/.store in=\zx@genericMultiMainTextStyle,
+ main text/.style store in=\zx@genericMultiMainTextStyle,
main text={},
original content/.store in=\zx@GenericMultiOriginalContent,
% Run additional code after the last \node
diff --git a/Master/texmf-dist/tex/latex/zx-calculus/zx-calculus.sty b/Master/texmf-dist/tex/latex/zx-calculus/zx-calculus.sty
index 4cb629b5138..5ab1ba55c5d 100644
--- a/Master/texmf-dist/tex/latex/zx-calculus/zx-calculus.sty
+++ b/Master/texmf-dist/tex/latex/zx-calculus/zx-calculus.sty
@@ -2,7 +2,7 @@
% Written by Léo Colisson. Report bugs on https://github.com/leo-colisson/zx-calculus/issues
% Published under the MIT license.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{zx-calculus}[v2.0 A package to typeset ZX calculus and circuits directly in LaTeX, based on tikz/tikzcd.]
+\ProvidesPackage{zx-calculus}[v2.2 A package to typeset ZX calculus and circuits directly in LaTeX, based on tikz/tikzcd.]
\RequirePackage{tikz}
\RequirePackage{tikz-cd}