From 24c6de40a2869f5b6c213c2cf69e597f885f2b19 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 8 Apr 2023 03:01:13 +0000 Subject: CTAN sync 202304080301 --- graphics/pgf/contrib/yquant/doc/yquant-doc.pdf | Bin 1022921 -> 1023770 bytes graphics/pgf/contrib/yquant/doc/yquant-doc.tex | 6 ++++- graphics/pgf/contrib/yquant/tex/yquant.sty | 2 +- .../contrib/yquant/tex/yquantlanguage-groups.sty | 27 +++++++++++++++++---- 4 files changed, 28 insertions(+), 7 deletions(-) (limited to 'graphics/pgf') diff --git a/graphics/pgf/contrib/yquant/doc/yquant-doc.pdf b/graphics/pgf/contrib/yquant/doc/yquant-doc.pdf index 5f6f30a2b3..c5de54c0c1 100644 Binary files a/graphics/pgf/contrib/yquant/doc/yquant-doc.pdf and b/graphics/pgf/contrib/yquant/doc/yquant-doc.pdf differ diff --git a/graphics/pgf/contrib/yquant/doc/yquant-doc.tex b/graphics/pgf/contrib/yquant/doc/yquant-doc.tex index a944533ba9..22d624b637 100644 --- a/graphics/pgf/contrib/yquant/doc/yquant-doc.tex +++ b/graphics/pgf/contrib/yquant/doc/yquant-doc.tex @@ -232,7 +232,7 @@ This document outlines the scope and usage of the \Yquant{} package. It contains both a reference and a huge number of examples. \Yquant{} is a package that makes typesetting quantum circuits easy; the package is available on CTAN. - This beta version~0.7.3 \emph{should} be stable and interfaces are not very likely to change in an incompatible way in the future. + This beta version~0.7.4 \emph{should} be stable and interfaces are not very likely to change in an incompatible way in the future. \compat{New in 0.4}Sometimes, backwards\hyp incompatible changes are required or advisable, in which case a compatibility setting will allow to revert back to the old behavior (rather, to maximize compatibility, this is an opt\hyp in setting: unless you choose the new behavior, you will get the old one). Please do report all issues and desirable additions on \href{https://github.com/projekter/yquant/issues}{GitHub}. @@ -5390,5 +5390,9 @@ $=$ Address \href{https://github.com/projekter/yquant/issues/25}{\#25}: We now provide the styles \style{/tikz/only at} and \style{/tikz/not at} that allow to easily use styles on an multi\hyp register operator that just affect some parts of their register representation. \\ Now the size of controls is taken into account when calculating the size of an operation---so extremely large controls will appropriate enlarge the height/depth or horizontal increment. This is more useful when putting labels to controls. + + \subsection*{2023-03-05: Version 0.7.4} + Fix \href{https://github.com/projekter/yquant/issues/26}{\#25}: Reset all the special groups\hyp related commands that are only valid \emph{directly} in a \tex!yquantgroups! environment when parsing the arguments of \tex!\registers!, \tex!\circuit!, or \tex!\equals!. + Most notably, this affects \tex!\\!, which can now be used properly within a grouped circuit. %END_FOLD \end{document} \ No newline at end of file diff --git a/graphics/pgf/contrib/yquant/tex/yquant.sty b/graphics/pgf/contrib/yquant/tex/yquant.sty index 63cdebbd1d..6c4bbe4754 100644 --- a/graphics/pgf/contrib/yquant/tex/yquant.sty +++ b/graphics/pgf/contrib/yquant/tex/yquant.sty @@ -15,7 +15,7 @@ % % The Current Maintainer of this work is Benjamin Desef. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{yquant}[2023/02/19 v0.7.3 Yet another quantum circuit library for LaTeX] +\ProvidesPackage{yquant}[2023/03/05 v0.7.4 Yet another quantum circuit library for LaTeX] \RequirePackage{etoolbox}[2018/02/11] \RequirePackage{tikz}[2015/08/29] diff --git a/graphics/pgf/contrib/yquant/tex/yquantlanguage-groups.sty b/graphics/pgf/contrib/yquant/tex/yquantlanguage-groups.sty index fc1986ff04..8274094e1c 100644 --- a/graphics/pgf/contrib/yquant/tex/yquantlanguage-groups.sty +++ b/graphics/pgf/contrib/yquant/tex/yquantlanguage-groups.sty @@ -65,11 +65,7 @@ \let\yquantgroup@save@linebreak=\\% \let\yquantgroup@save@gatecallback=\yquant@langhelper@gatecallback% % assign the new meaning - \let\registers=\yquantgroup@registers% - \let\circuit=\yquantgroup@circuit% - \let\equals=\yquantgroup@equals% - \let\shiftright=\yquantgroup@shiftright% - \let\\=\yquantgroup@linebreak% + \yquantgroup@set@cmds% % This is a bit inconsistent, we should check \iftikz@inside@picture, but this is no longer appropriately set since at least pgf 3.1.2. \let\ifyquantgroup@inpicture=\ifpgfpicture% \pgfkeysgetvalue{/yquant/preamble}\yquantgroup@save@preamble% @@ -127,6 +123,22 @@ }{% \endyquantgroup% } + +\protected\def\yquantgroup@set@cmds{% + \let\registers=\yquantgroup@registers% + \let\circuit=\yquantgroup@circuit% + \let\equals=\yquantgroup@equals% + \let\shiftright=\yquantgroup@shiftright% + \let\\=\yquantgroup@linebreak% +} + +\protected\def\yquantgroup@reset@cmds{% + \let\registers=\yquantgroup@save@registers% + \let\circuit=\yquantgroup@save@circuit% + \let\equals=\yquantgroup@save@equals% + \let\shiftright=\yquantgroup@save@shiftright% + \let\\=\yquantgroup@save@linebreak% +} % END_FOLD % BEGIN_FOLD Register declaration @@ -140,6 +152,7 @@ \let\yquantgroup@save@lang@create@parse=\yquant@lang@create@parse@name% \let\yquant@lang@create@parse@name=\yquantgroup@registers@create@parse% \let\yquant@env@begin@generic=\yquantgroup@registers@env@generic% + \yquantgroup@reset@cmds% \appto\yquant@langhelper@setup@attrs@set@nobit{% \let\yquantgroup@registers@remember@attrs=\yquant@langhelper@list@attrs% }% @@ -301,9 +314,11 @@ } \long\def\yquantgroup@circuit@i[#1]#2{% + \yquantgroup@reset@cmds% \yquantgroup@startenvironments% \yquant [{#1}] group\space circuit {#2} (-);% discard -; + \yquantgroup@set@cmds% } \yquant@langhelper@declare@command@uncontrolled% @@ -392,6 +407,7 @@ } \protected\long\def\yquantgroup@equals@ii#1[#2]{% + \yquantgroup@reset@cmds% \unless\ifx0#1% \numgdef\yquantgroup@alignments{\yquantgroup@alignments+1}% \fi% @@ -440,6 +456,7 @@ \fi% \fi% \fi% + \yquantgroup@set@cmds% } % END_FOLD -- cgit v1.2.3