texlive[65822] Master/texmf-dist: zref-clever (13feb23)

commits+karl at tug.org commits+karl at tug.org
Mon Feb 13 21:53:51 CET 2023


Revision: 65822
          http://tug.org/svn/texlive?view=revision&revision=65822
Author:   karl
Date:     2023-02-13 21:53:51 +0100 (Mon, 13 Feb 2023)
Log Message:
-----------
zref-clever (13feb23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/zref-clever/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever-code.pdf
    trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever.pdf
    trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever.tex
    trunk/Master/texmf-dist/source/latex/zref-clever/zref-clever.dtx
    trunk/Master/texmf-dist/tex/latex/zref-clever/zref-clever.sty

Modified: trunk/Master/texmf-dist/doc/latex/zref-clever/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zref-clever/CHANGELOG.md	2023-02-13 20:53:35 UTC (rev 65821)
+++ trunk/Master/texmf-dist/doc/latex/zref-clever/CHANGELOG.md	2023-02-13 20:53:51 UTC (rev 65822)
@@ -1,7 +1,16 @@
 # Changelog
 
-## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.3.3...HEAD)
+## [Unreleased](https://github.com/gusbrs/zref-clever/compare/v0.3.4...HEAD)
 
+## [v0.3.4](https://github.com/gusbrs/zref-clever/compare/v0.3.3...v0.3.4) (2023-02-13)
+
+### Added
+- `tcolorbox` how-to to the User manual.
+
+### Changed
+- The `KOMA` compatibility module has been removed, since it was rendered
+  unnecessary by recent versions of KOMA Script classes.
+
 ## [v0.3.3](https://github.com/gusbrs/zref-clever/compare/v0.3.2...v0.3.3) (2023-01-03)
 
 ### Added

Modified: trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever-code.pdf
===================================================================
(Binary files differ)

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

Modified: trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever.tex	2023-02-13 20:53:35 UTC (rev 65821)
+++ trunk/Master/texmf-dist/doc/latex/zref-clever/zref-clever.tex	2023-02-13 20:53:51 UTC (rev 65822)
@@ -115,6 +115,10 @@
     beamer at nameslide,
     beamer at dummynameslide,
     ordinal,
+    tcbuselibrary,
+    tcbset,
+    newtcolorbox,
+    newtcbtheorem,
   }
 }
 \lstdefinestyle{zrefclever}{
@@ -2051,6 +2055,55 @@
 \end{zchowto}
 
 
+\subsection{\pkg{tcolorbox}}
+
+\zctask{Make references to boxes from the \pkg{tcolorbox} package.}
+
+Since version 6.0.0, \pkg{tcolorbox} has support for \pkg{zref} and
+\pkg{zref-clever}, through the \opt{label is zlabel} option.  With this option
+enabled, the \opt{label} option sets a \cs{zlabel}, which can be referred to
+from \cs{zref} or \cs{zcref}.  If you are using the \opt{auto counter}, or
+some other custom counter, you can set the reference type for the box's labels
+with the \opt{label type} option.
+
+\begin{zchowto}[caption={\pkg{tcolorbox}}]
+\documentclass{article}
+\usepackage{zref-clever}
+\usepackage{zref-titleref}
+\usepackage{tcolorbox}
+\tcbuselibrary{theorems}
+\tcbset{label is zlabel}
+\newtcolorbox[auto counter,number within=section]{pabox}[2][]{%
+  label type=example,
+  title=Example~\thetcbcounter: #2,#1}
+\newtcolorbox[use counter from=pabox,number within=section]{pabox2}[2][]{%
+  label type=solution,
+  title=Solution~\thetcbcounter: #2,#1}
+\newtcbtheorem[number within=section]{mytheo}{My Theorem}{%
+  label type=mytheorem}{th}
+\zcRefTypeSetup{mytheorem}{
+  Name-sg=Mytheorem,
+  name-sg=mytheorem,
+  Name-pl=Mytheorems,
+  name-pl=mytheorems,
+}
+\usepackage{hyperref}
+\begin{document}
+\section{Section 1}
+\zlabel{sec:section-1}
+\begin{pabox}[label={box:1}]{Title text}
+  This is tcolorbox \zcref{box:1} on \zcpageref{box:1}.
+\end{pabox}
+\begin{pabox2}[label={box:2}]{Title text}
+  This is tcolorbox \zcref{box:2} on \zcpageref{box:2}.
+\end{pabox2}
+\begin{mytheo}{This is my title}{theo}
+  This is \zcref{th:theo} on \zcpageref{th:theo} and it is titled
+  ``\zcref[noname,ref=title]{th:theo}''.
+\end{mytheo}
+\end{document}\end{zchowto}
+
+
 \subsection{Ordinal references}
 
 \zctask{Typesetting the references as ordinal numbers.}
@@ -2224,19 +2277,6 @@
 \cs{bitwonumcaption}, \cs{bionenumcaption}, \cs{bicaption},
 \cs{@memsubcaption}, \cs{@makefntext}, and \cs{@makesidefntext}.
 
-\DescribeOption{KOMA} %
-The \cls{KOMA-Script} document classes are much more strict than \cls{memoir}
-in using standard mechanisms for cross-reference related features, so that
-very little adjustment is needed here.  Only the environments
-\env{captionbeside} and \env{captionofbeside} require special treatment.  And,
-though they do use \cs{refstepcounter} under the hood, since they are
-environments, we don't get to see reference variables outside them.
-\cs{@currentlabel} is smuggled out of the group, but not \cs{@currentcounter},
-so we must arrange for the later to have a correct value outside the caption
-environments too.  Environment hooks are used for the purpose, essentially
-setting \cs{@currentcounter} to \cs{@captype}, which would be the value the
-captioning infrastructure would set for it.
-
 \DescribeOption{amsmath} %
 \pkg{amsmath}'s display math environments have their contents processed twice,
 once for measuring and the second does the final typesetting.  Hence,
@@ -2572,6 +2612,7 @@
   %             and following discussion.
   % 2023-01-02: https://chat.stackexchange.com/transcript/message/62684358#62684358
   %             and following discussion.
+  % 2023-02-10: https://tex.stackexchange.com/a/674846
   Frank Mittelbach,
   % 2021-10-14: https://github.com/latex3/latex2e/issues/687
   \username{samcarter},
@@ -2591,9 +2632,11 @@
   % 2021-11-28: https://github.com/gusbrs/zref-clever/issues/2
   \username{niluxv},
   % 2022-01-05: https://github.com/gusbrs/zref-clever/issues/4
-  and Joseph Wright.
+  Joseph Wright,
   % 2023-01-02: https://chat.stackexchange.com/transcript/message/62684358#62684358
   %             and following discussion.
+  and Thomas F. Sturm.
+  % 2023-02-09: https://github.com/T-F-S/tcolorbox/issues/206
 
 The package's language files have been provided or improved thanks to:
   Denis Bitouzé (French),

Modified: trunk/Master/texmf-dist/source/latex/zref-clever/zref-clever.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/zref-clever/zref-clever.dtx	2023-02-13 20:53:35 UTC (rev 65821)
+++ trunk/Master/texmf-dist/source/latex/zref-clever/zref-clever.dtx	2023-02-13 20:53:51 UTC (rev 65822)
@@ -165,7 +165,7 @@
 %
 % Identify the package.
 %    \begin{macrocode}
-\ProvidesExplPackage {zref-clever} {2023-01-03} {0.3.3}
+\ProvidesExplPackage {zref-clever} {2023-02-13} {0.3.4}
   {Clever LaTeX cross-references based on zref}
 %    \end{macrocode}
 %
@@ -7916,58 +7916,6 @@
 %
 %
 %
-% \subsection{\opt{KOMA}}
-%
-% Support for \texttt{KOMA-Script} document classes.
-%
-%    \begin{macrocode}
-\@@_compat_module:nn { KOMA }
-  {
-    \cs_if_exist:NT \KOMAClassName
-      {
-%    \end{macrocode}
-% Add support for \env{captionbeside} and \env{captionofbeside} environments.
-% These environments \emph{do} run some variation of \cs{caption} and hence
-% \cs{refstepcounter}.  However, this happens inside a parbox inside the
-% environment, thus grouped, such that we cannot see the variables set by
-% \cs{refstepcounter} when we are setting the label.  \cs{@currentlabel} is
-% smuggled out of the group by KOMA, but the same care is not granted for
-% \cs{@currentcounter}.  So we have to rely on \cs{@captype}, which the
-% underlying caption infrastructure feeds to \cs{refstepcounter}.  Since we
-% must use \texttt{env/.../after} hooks, care should be taken not to set the
-% \opt{currentcounter} option unscoped, which would be quite disastrous.  For
-% this reason, though more ``invasive'', we set \cs{@currentcounter} instead,
-% which at least will be set straight the next time \cs{refstepcounter} runs.
-% It sounds reasonable, it is the same treatment \cs{@currentlabel} is
-% receiving in this case.
-%    \begin{macrocode}
-        \AddToHook { env / captionbeside / after }
-          {
-            \tl_if_exist:NT \@captype
-              { \tl_set_eq:NN \@currentcounter \@captype }
-          }
-        \tl_new:N \g_@@_koma_captionofbeside_captype_tl
-        \AddToHook { env / captionofbeside / end }
-          { \tl_gset_eq:NN \g_@@_koma_captype_tl \@captype }
-        \AddToHook { env / captionofbeside / after }
-          {
-            \tl_if_eq:NnF \@currenvir { document }
-              {
-                \tl_if_empty:NF \g_@@_koma_captype_tl
-                  {
-                    \tl_set_eq:NN
-                      \@currentcounter \g_@@_koma_captype_tl
-                  }
-              }
-            \tl_gclear:N \g_@@_koma_captype_tl
-          }
-        \msg_info:nnx { zref-clever } { compat-class } { \KOMAClassName }
-      }
-  }
-%    \end{macrocode}
-%
-%
-%
 % \subsection{\opt{amsmath}}
 %
 % About this, see \url{https://tex.stackexchange.com/a/402297}.
@@ -7986,7 +7934,8 @@
 % protection with \cs{zref at wrapper@babel}, because \cs{zlabel} makes itself
 % no-op when \cs{label} is equal to \cs{ltx at gobble}, and that's precisely the
 % case inside the \env{multline} environment (and, damn!, I took a beating of
-% this detail\dots{}).
+% this detail\dots{}).  See also \url{https://github.com/ho-tex/zref/issues/4}
+% and \url{https://github.com/latex3/latex2e/issues/272}.
 %    \begin{macrocode}
         \cs_set_nopar:Npn \@@_ltxlabel:n #1
           {

Modified: trunk/Master/texmf-dist/tex/latex/zref-clever/zref-clever.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/zref-clever/zref-clever.sty	2023-02-13 20:53:35 UTC (rev 65821)
+++ trunk/Master/texmf-dist/tex/latex/zref-clever/zref-clever.sty	2023-02-13 20:53:51 UTC (rev 65822)
@@ -53,7 +53,7 @@
       }%
     \endinput
   }%
-\ProvidesExplPackage {zref-clever} {2023-01-03} {0.3.3}
+\ProvidesExplPackage {zref-clever} {2023-02-13} {0.3.4}
   {Clever LaTeX cross-references based on zref}
 \RequirePackage { zref-base }
 \RequirePackage { zref-user }
@@ -5496,33 +5496,6 @@
         \msg_info:nnn { zref-clever } { compat-class } { memoir }
       }
   }
-\__zrefclever_compat_module:nn { KOMA }
-  {
-    \cs_if_exist:NT \KOMAClassName
-      {
-        \AddToHook { env / captionbeside / after }
-          {
-            \tl_if_exist:NT \@captype
-              { \tl_set_eq:NN \@currentcounter \@captype }
-          }
-        \tl_new:N \g__zrefclever_koma_captionofbeside_captype_tl
-        \AddToHook { env / captionofbeside / end }
-          { \tl_gset_eq:NN \g__zrefclever_koma_captype_tl \@captype }
-        \AddToHook { env / captionofbeside / after }
-          {
-            \tl_if_eq:NnF \@currenvir { document }
-              {
-                \tl_if_empty:NF \g__zrefclever_koma_captype_tl
-                  {
-                    \tl_set_eq:NN
-                      \@currentcounter \g__zrefclever_koma_captype_tl
-                  }
-              }
-            \tl_gclear:N \g__zrefclever_koma_captype_tl
-          }
-        \msg_info:nnx { zref-clever } { compat-class } { \KOMAClassName }
-      }
-  }
 \__zrefclever_compat_module:nn { amsmath }
   {
     \__zrefclever_if_package_loaded:nT { amsmath }



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