texlive[70865] Master/texmf-dist: coloredtheorem (5apr24)

commits+karl at tug.org commits+karl at tug.org
Fri Apr 5 23:20:56 CEST 2024


Revision: 70865
          https://tug.org/svn/texlive?view=revision&revision=70865
Author:   karl
Date:     2024-04-05 23:20:56 +0200 (Fri, 05 Apr 2024)
Log Message:
-----------
coloredtheorem (5apr24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/coloredtheorem/README.md
    trunk/Master/texmf-dist/doc/latex/coloredtheorem/coloredtheorem-doc.pdf
    trunk/Master/texmf-dist/doc/latex/coloredtheorem/coloredtheorem-doc.tex
    trunk/Master/texmf-dist/tex/latex/coloredtheorem/coloredtheorem.sty

Modified: trunk/Master/texmf-dist/doc/latex/coloredtheorem/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/coloredtheorem/README.md	2024-04-05 21:20:49 UTC (rev 70864)
+++ trunk/Master/texmf-dist/doc/latex/coloredtheorem/README.md	2024-04-05 21:20:56 UTC (rev 70865)
@@ -1,6 +1,6 @@
 # coloredtheorem
 
-A colourful boxed theorem environment, combining `tcolorbox` and breakable boxes.  It supports full `tcolorbox` customization, automatic numbering, `\label{...}` and `\ref{…}`, and `\listof…`
+A colorful boxed theorem environment, combining `tcolorbox` and breakable boxes.  It supports full `tcolorbox` customization, automatic numbering, `\label{...}` and `\ref{…}`, and `\listof…`
 
 <!--
 --------
@@ -28,69 +28,113 @@
 --------
 -->
 
+## About
+
+* **Package:** coloredtheorem — A colorful boxed theorem environment
+* **Copyright:** 2024 © João M. Lourenço <joao.lourenco at fct.unl.pt>
+* **CTAN:** https://ctan.org/pkg/coloredtheorem
+* **Repository:** https://github.com/joaomlourenco/coloredtheorem
+* **License:** The LaTeX Project Public License 1.3c
+
 ## Introduction
 
-The `coloredtheorem` package is a simple environment, which takes no options, and that allows to write stuff inside boxes from `tcolorbox`. So, this packages includes `tcolorbox` if necessary. You may include `tcolorbox` with your own favourite options prior to including this package.
+The `coloredtheorem` package is a simple environment that allows to write stuff inside
+boxes from `tcolorbox`. If necessary the boxes gracefully overflow to the next page.
+This package takes no options and includes `tcolorbox` if necessary. You may include
+`tcolorbox` with your own favourite options prior to including this package.
 
-Akin to `\newtheorem` from the `amsmath` package, the user should start by defining a new theorem/box group and customize its aspect. Each new environment will have its own counter/numnering. Notice that `\label{...}` and `\ref{...}` work as expected. The is also a command to generate the corresponding `\listof...`
+Akin to `\newtheorem` from the `amsmath` package, the user should start by defining a 
+new _theorem/box_ group and customize its aspect. Each new environment will have its 
+own counter/numbering. Notice that `\label{...}` and `\ref{...}` work as expected. 
+There is also a command to generate the corresponding _\listof..._
 
 ## Usage
 
+* `\usepackage{coloredtheorem}`
+  * Load Load the `coloredtheorem` package. This package will load `tcolorbox` if necessary.
 * `\cthnewtheorem{<envname>}{<Name>}[<tcolorbox options>]`
-  * Load the tcbtheorem package. This package will load tcolorbox if not already loaded.
-* `\cthnewtheorem{<envname>}{<Name>}[<tcolorbox options>]`
-  * `<envname>` is the environment name, e.g., theorem.
-  * `<Name>` is the name for new environment being defined, e.g., Theorem.
-  * `<tcolorbox options>` options to be passed to the `tcolorbox` environment to customize the boxes for the given environment (this argument is optional).
+  * Create a new boxed algorithm-like environment.
+    * `<envname>` is the suffix for the new environment being defined, e.g., `algoritm`. The effective environment name will be `cth<envname>`, e.g., `cthalgorithm`.
+    * `<Name>` is the (printable) name or the new environment being defined, e.g., _Algorithm_.
+    * `<tcolorbox options>` default options for the environment being defined (this argument is optional). These options are passed straight to the `tcolorbox` environment, so anything valid for `tcolorbox` is also valid here.
 * `\begin{<envname>}{<Caption>}[<tcolorbox options>]<Contents>\end{<envname>}`
-  * `<envname>` is the environment name, e.g., theorem.
-  * `<Caption>` is the caption/title of the box.
-  * `<tcolorbox options>` options to be passed to the `tcolorbox` environment, which will override the defaults given in `\cthnewtheorem`.
-  * `<Contents>` the contents to by typeset inside the coulored environment.
+  * Create a new _algorithm-like_ box with the given contents.
+    ∗ `<AltCaption>` is the alternative caption for the `\cthlistof<envname>s` (see below).
+    * `<envname>` is the sffix for environment name, e.g., `algorithm`.
+    * `<Caption>` is the caption/title of the box. If the caption is left empty, this box will not be listed with the `\cthlistof<envname>s` (see below).
+    * `<tcolorbox options>` options to be passed to the `tcolorbox` environment, which will override the defaults given in `\cthnewalgorithm` (this argument is optional).
+    * `<Contents>` the contents to by typeset inside the colored environment.
 * `\listof<envname>s`
-  * Where `<envname>` is the environment name, e.g., `\listoftheorems`. Please notice that there is a ‘s’ (plural) after `<envname>`.
+  * `<envname>` is the environment name suffix, e.g., `\cthlistofalgorithms`. Please
+notice that there is a ‘s’ (plural) after `<envname>`.
 
 ## Example
 
-Let’s start by creating two new environments, one for algorithms and another for examples, both defaulting to a gray frame, the former with a yellowish background and the latter with a lighter gray background.
+Let’s start by creating two new environments, one for _algorithms_ and another for _examples_, both defaulting to a gray frame, the former with a yellowish background and the latter with a lighter gray background.
 
-    \cthnewtheorem{algorithm}{Algorithm}[coltitle=black, colback=yellow!10,
-                                         colframe=black!15]
-    \cthnewtheorem{example}{Example}[coltitle=black, colback=black!5,
-                                     colframe=black!30]
+```latex
+\cthnewtheorem{algorithm}{Algorithm}[coltitle=black, colback=yellow!10,
+                                     colframe=black!15]
+\cthnewtheorem{example}{Example}[coltitle=black, colback=black!5,
+                                 colframe=black!30]
+```
 
-An algorithm box will be created with:
+The box with Algorithm 1, which uses the default visual that was given when creating the environment with `\cthnewtheorem` and gracefully overflows onto the next page, was created with:
 
-    \begin{cthalgorithm}{Advance a counter to the next value in a domain
-                        $\omega \in \mathbb{N}$.}
+```latex
+\begin{cthalgorithm}{Advance a counter to the next value in a domain
+                    $\omega \in \mathbb{N}$.}
 
-        Algorithm body here!
-    \end{cthalgorithm}
+    Algorithm body here!
+\end{cthalgorithm}
+```
 
-<img width="491" alt="image" src="https://github.com/joaomlourenco/tcbtheorem/assets/2064643/54147631-3f5d-4ae0-a8b7-8b18b48d8db2">
+<img width="650" alt="image" src="https://github.com/joaomlourenco/coloredtheorem/assets/2064643/fa9cacce-89cc-4973-ac16-41a6e21dfded">
 
-Now, let's rewrite Algorithm 1, but now with a different customized visual, just for this entry! The customization (3rd) argument is passed straight to the `tcolorbox` environment, so anything valid for `tcolorbox` is also valid here.
+_(page break here)_
 
-<img width="491" alt="image" src="https://github.com/joaomlourenco/tcbtheorem/assets/2064643/be180e78-bc59-48ff-9efa-a26af5dae0bd">
+<img width="650" alt="image" src="https://github.com/joaomlourenco/coloredtheorem/assets/2064643/bc976d1a-2d7d-4f62-b651-4b23124d8d76">
 
-(page break here!)
 
-<img width="489" alt="image" src="https://github.com/joaomlourenco/tcbtheorem/assets/2064643/04c6fcaa-1a27-4550-8b17-2ae4d90809b0">
+The box Example 1, which uses the default visual for the environment (as given to `\cthnewtheorem...`), was created with:
 
-Now, let’s add an example here, this time using the default visual that was given when creating the environment with `\cthnewtheorem`…
+```latex
+\begin{cthexample}{This is an example!}
+  Example body here!
+\end{cthexample}
+```
 
-<img width="490" alt="image" src="https://github.com/joaomlourenco/tcbtheorem/assets/2064643/835c1537-5b18-48b6-8ac1-ba6a6cff7b1b">
+<img width="650" alt="image" src="https://github.com/joaomlourenco/coloredtheorem/assets/2064643/69bd5bbd-8da8-418f-805d-0837c62cfb2c">
 
+Now, let’s create a new box for Algorithm 1, but with a different customized visual, which will affect only this entry! Notice that the customization argument is passed straight to the `tcolorbox` environment, so anything valid for `tcolorbox` is also valid here. Algorithm 2 was created with the following code:
+
+```latex
+\begin{cthalgorithm}
+          {Advance a counter to the next value in a domain $\omega \in
+                \mathbb{N}$, but now with a customized visual. Also, notice
+                that this algorithm breaks the page boundaries.}
+          [coltitle=white, colback=green!10, colframe=green!70!black,
+                colbacktitle=\sffamily\bfseries\large, fonttitle=red!50!white]
+  Algorithm body here!
+\end{cthalgorithm}
+```
+
+<img width="650" alt="image" src="https://github.com/joaomlourenco/coloredtheorem/assets/2064643/977c371c-1ecb-43ca-9351-c4befc23f7e9">
+
+_(page break here)_
+
+<img width="650" alt="image" src="https://github.com/joaomlourenco/coloredtheorem/assets/2064643/c51ac463-c335-4132-9445-cb726ee616a1">
+
 And now and example with no caption and a different visual... this example will not go into the` \listofexamples` below!
 
-<img width="492" alt="image" src="https://github.com/joaomlourenco/tcbtheorem/assets/2064643/329e61a9-a12b-4cfe-9edf-1977f8158ee9">
+<img width="766" alt="image" src="https://github.com/joaomlourenco/coloredtheorem/assets/2064643/ab888abf-56ba-459d-aa94-2db9816d0a09">
 
-Now let’s print the lists of algorithms and examples. Remember to add the prefix cthth to the listof, i.e., `\cthlistofalgorithms` and `\cthlistofexamples`!
+Now let’s print the lists of algorithms and examples. Remember to add the prefix `cthth` to the `listof`, i.e., `\cthlistofalgorithms` and `\cthlistofexamples`!
 
 ## List of Algorithms
-<img width="492" alt="image" src="https://github.com/joaomlourenco/tcbtheorem/assets/2064643/f935bfcb-3387-426e-8511-c1f0efdcdd85">
+<img width="766" alt="image" src="https://github.com/joaomlourenco/coloredtheorem/assets/2064643/d2c4077e-ec5f-4b3d-8b24-a5713a8f3c29">
 
 ## List of Examples
-<img width="487" alt="image" src="https://github.com/joaomlourenco/tcbtheorem/assets/2064643/033f83d4-24c3-4e9d-8947-135f5765e3f3">
+<img width="767" alt="image" src="https://github.com/joaomlourenco/coloredtheorem/assets/2064643/483b6caf-f4f8-4e1c-83ff-f54101dad5f5">
 
 

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

Modified: trunk/Master/texmf-dist/doc/latex/coloredtheorem/coloredtheorem-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/coloredtheorem/coloredtheorem-doc.tex	2024-04-05 21:20:49 UTC (rev 70864)
+++ trunk/Master/texmf-dist/doc/latex/coloredtheorem/coloredtheorem-doc.tex	2024-04-05 21:20:56 UTC (rev 70865)
@@ -1,22 +1,14 @@
 \documentclass{article}
 
-\usepackage[margin=1.6in]{geometry}
-\usepackage{fancyvrb}
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% AMSMATH stuff
-% \usepackage{amsthm}
-% \usepackage{thmtools}
-% \usepackage{amsfonts}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% TCBTHEOREM stuff
 \usepackage{coloredtheorem}
 
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% EXAMPLE document
+\usepackage[margin=1.6in]{geometry}
+\usepackage{fancyvrb}
+\usepackage{minted}
 \usepackage{amsfonts}
 \usepackage{kantlipsum}
 \usepackage{tabularx}
@@ -48,7 +40,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% MAIN DOCUMENT
 \begin{document}
-  \title{The \tcthrm package}
+  \title{The \tcthrm package {\footnotesize(v1.0.2)}}
   \author{João M. Lourenço\\\texttt{\small joao.lourenco at fct.unl.pt}}
   \date{March 31, 2024}
   
@@ -58,62 +50,99 @@
 \section{Introduction}
 \label{sec:introduction}
 
-The \tcthrm package is a simple environment, which takes no options, and that allows to write stuff inside boxes from \texttt{tcolorbox}.  So, this packages includes \texttt{tcolorbox} if necessary. You may include \texttt{tcolorbox} with your own favourite options prior to including this package.
+The \tcthrm package is a simple environment that allows to write stuff inside boxes from \texttt{tcolorbox}.  If necessary the boxes gracefully overflow to the next page.  This package takes no options and includes \texttt{tcolorbox} if necessary. You may include \texttt{tcolorbox} with your own favourite options prior to including this package.
 
-Akin to \verb!\newtheorem! from the \verb!amsmath! package, the user should start by defining a new \emph{theorem/box} group and customize its aspect. Each new environment will have its own counter/numbering. Notice that \verb!\label{…}! and \verb!\ref{…}! work as expected.  The is also a command to generate the corresponding \emph{list of …}
+Akin to \mintinline{TeX}+\newtheorem+ from the \texttt{amsmath} package, the user should start by defining a new \emph{theorem/box} group and customize its aspect. Each new environment will have its own counter/numbering. Notice that \mintinline{TeX}+\label{…}+ and \mintinline{TeX}+\ref{…}+ work as expected.  There is also a command to generate the corresponding \emph{list of …}
 
 \section{Usage}
 \label{sec:usage}
 
-\begin{description}
-  \item[]{\bfseries\verb+\usepackage{coloredtheorem}+}
-  \begin{description}
-      \item[]Load the \texttt{coloredtheorem} package.  This package will load \texttt{tcolorbox} if necessary.
-  \end{description}
-  \item[]{\bfseries\Verb[commandchars=!()]+\!tcbth()newtheorem{<envname>}{<Name>}[<tcolorbox options>]+}
-  \begin{description}
-      \item[]\verb+<envname>+ is the environment name, e.g., \verb!theorem!.
-      \item[]\verb+<Name>+ is the name for new environment being defined, e.g., \emph{Theorem}.
-      \item[]\verb+<tcolorbox options>+ options to be passed to the \verb+tcolorbox+ environment to customize the boxes for the given environment (this argument is optional).
-  \end{description}
-  \item[]{\bfseries\Verb[commandchars=!()]+\begin{!tcbth()<envname>}{<Caption>}[<tcolorbox options>]<Contents>\end{!tcbth()<envname>}+}
-  \begin{description}
-    \item[]\verb+<envname>+ is the environment name, e.g., \verb+theorem+.
-    \item[]\verb+<Caption>+ is the caption/title of the box.
-    \item[]\verb+<tcolorbox options>+ options to be passed to the \verb+tcolobox+ environment, which will override the defaults given in \verb+\cthnewtheorem+.
-    \item[]\verb+<Contents>+ the contents to by typeset inside the coulored environment.
-  \end{description}
-  \item[]{\bfseries\Verb[commandchars=!()]+\!tcbth()listof<envname>s+}
-  \begin{description}
-      \item[]\verb+<envname>+ is the environment name, e.g., e.g., \Verb[commandchars=!()]+\!tcbth()listoftheorems+.  Please notice that there is a `s' (plural) after \verb+<envname>+.
-  \end{description}
-\end{description}
+\definecolor{mycgreen}{RGB}{57,126,27}
+\newcommand\ca[1]{\textcolor{blue}{#1}}
+\newcommand\co[1]{\textcolor{blue!50}{#1}}
+\newcommand\cc[1]{\textcolor{red!50!black}{#1}}
+\newcommand\ck[1]{\textcolor{mycgreen}{#1}}
 
+\begin{itemize}
+  \item \mintinline{TeX}+\usepackage{coloredtheorem}+
+  \begin{itemize}
+      \item Load the \texttt{coloredtheorem} package.
+            This package will load \texttt{tcolorbox} if necessary.
+  \end{itemize}
+
+  \item \mintinline[escapeinside=||]{TeX}+\cthnewtheorem{|\ca{<envname>}|}{|\ca{<Name>}|}[|\co{<tcolorbox options>}|]+
+  \begin{itemize}
+    \item Create a new boxed \emph{algorithm-like} environment.
+    \begin{itemize}
+      \item \mintinline[escapeinside=||]{TeX}+|\ca{<envname>}|+ is the suffix for the
+            new environment being defined, e.g., \ca{\texttt{algoritm}}. The effective environment name will be \mintinline[escapeinside=||]{TeX}+|\ca{cth<envname>}|+, e.g., \ca{\texttt{cthalgorithm}}.
+      \item \mintinline[escapeinside=||]{TeX}+|\ca{<Name>}|+ is the (printable) name
+            or the new environment being defined, e.g., \emph{Algorithm}.
+      \item \mintinline[escapeinside=||]{TeX}+|\co{<tcolorbox options>}|+ default
+            options for the environment being defined (this argument is optional).
+            These options are passed straight to the \texttt{tcolorbox} environment,
+            so anything valid for \texttt{tcolorbox} is also valid here.
+    \end{itemize}
+  \end{itemize}
+
+ \item \begin{minted}[escapeinside=||]{TeX}
+\begin{|\ca{ctb<envname>}|}[|\co{<AltCaption>}|]{|\ca{<Caption>}|}[|\co{<tcolorbox options>}|]
+  |\cc{<Contents>}|
+\end{|\ca{ctb<envname>}|}
+\end{minted}
+  \begin{itemize}
+    \item Create a new \emph{algorithm-like} box with the given contents.
+    \begin{itemize}
+      \item \mintinline[escapeinside=||]{TeX}+|\co{<AltCaption>}|+ is the alternative
+            caption for the
+            \mintinline[escapeinside=||]{TeX}+\cthlistof|\ck{<envname>s}|+
+            (see below).
+      \item \mintinline[escapeinside=||]{TeX}+|\ca{<envname>}|+ is the suffix for environment name,
+            e.g., \verb+algorithm+.
+      \item \mintinline[escapeinside=||]{TeX}+|\ca{<Caption>}|+ is the caption/title of
+            the box.  If the caption is left empty, this box will not be listed with the
+            \mintinline[escapeinside=||]{TeX}+\cthlistof|\ck{<envname>s}|+
+            (see below).
+      \item \mintinline[escapeinside=||]{TeX}+|\co{<tcolorbox options>}|+ options to be
+            passed to the \verb+tcolorbox+ environment, which will override the defaults
+            given in \mintinline{TeX}+\cthnewalgorithm+  (this argument is optional).
+      \item \mintinline[escapeinside=||]{TeX}+|\cc{<Contents>}|+ the contents to by typeset inside the colored environment.
+    \end{itemize}
+  \end{itemize}
+
+  \item \mintinline[escapeinside=||]{TeX}+\cthlistof|\ck{<envname>s}|+
+  \begin{itemize}
+      \item \mintinline[escapeinside=||]{TeX}+|\ca{<envname>}|+ is the environment name
+            suffix, e.g., \mintinline[escapeinside=||]{TeX}+\cthlistofalgorithms+.
+            Please notice that there is a `s' (plural) after
+            \mintinline[escapeinside=||]{TeX}+|\ca{<envname>}|+.
+  \end{itemize}
+\end{itemize}
+
 \section{Example}
 \label{sec:examples}
 
 Let's start by creating two new environments, one for \emph{algorithms} and another for \emph{examples}, both defaulting to a gray frame, the former with a yellowish background and the latter with a lighter gray background.
 
-\begin{verbatim}
-\cthnewtheorem{algorithm}{Algorithm}[coltitle=black, colback=yellow!10,
-                                       colframe=black!15]
-\cthnewtheorem{example}{Example}[coltitle=black, colback=black!5,
-                                   colframe=black!30]  
-\end{verbatim}
+\begin{minted}[bgcolor=red!5,fontsize=\small,escapeinside=||]{TeX}
+\cthnewtheorem{|\ca{algorithm}|}{|\ca{Algorithm}|}[|\co{coltitle=}|black, |\co{colback=}|yellow!10,
+                                     |\co{colframe=}|black!15]
+\cthnewtheorem{|\ca{example}|}{|\ca{Example}|}[|\co{coltitle=}|black, |\co{colback}|=black!5,
+                                 |\co{colframe=}|black!30]  
+\end{minted}
 
 \cthnewtheorem{algorithm}{Algorithm}[coltitle=black, colback=yellow!10, colframe=black!15]
 \cthnewtheorem{example}{Example}[coltitle=black, colback=black!5, colframe=black!30]
 
 
-An algorithm box will be created with:
-\begin{verbatim}
-\begin{cthalgorithm}{Advance a counter to the next value in a domain
-                    $\omega \in \mathbb{N}$.}
+The box with \autoref{alg:advance1}, which uses the default visual that was given when creating the environment with \mintinline{TeX}+\cthnewtheorem+ and gracefully overflows onto the next page, was created with:
+\begin{minted}[bgcolor=red!5,fontsize=\small,escapeinside=||]{TeX}
+\begin{|\ca{cthalgorithm}|}{|\co{Advance a counter to the next value in a domain}|
+                     $\omega \in \mathbb{N}$.}
+  |\cc{Algorithm body here!}|
+\end{|\ca{cthalgorithm}|}
+\end{minted}
 
-Algorithm body here!
-\end{cthalgorithm}
-\end{verbatim}
-
 \newcommand{\bracesemptyset}{\ensuremath{\lbrace\,\rbrace}}
 
 \begin{cthalgorithm}{Advance a counter to the next value in a domain $\omega \in \mathbb{N}$.}
@@ -145,9 +174,34 @@
 \end{algorithmic}
 \end{cthalgorithm}
 
-Now, let's rewrite \autoref{alg:advance1}, but now with a different customized visual, just for this entry!  The customization (3rd) argument is passed straight to the \texttt{tcolorbox} environment, so anything valid for \texttt{tcolorbox} is also valid here.
+The box \autoref{expl:explstd}, which uses the default visual for the environment (as given to \mintinline{TeX}+\cthnewtheorem...+), was created with:
 
-\begin{cthalgorithm}{Advance a counter to the next value in a domain $\omega \in \mathbb{N}$, but now with a customized visual. Also, notice that this algorithm breaks the page boundaries.}[coltitle=white, colback=green!10, colframe=green!70!black, fonttitle=\sffamily\bfseries\large, colbacktitle=red!50!white]
+\begin{minted}[bgcolor=red!5,fontsize=\small,escapeinside=||]{TeX}
+\begin{|\ca{cthexample}|}{|\co{This is an example!}|}
+  |\cc{Example body here!}|
+\end{|\ca{cthexample}|}
+\end{minted}
+
+
+\begin{cthexample}{This is an example!}
+  \label{expl:explstd}
+  \emph{As is shown in the writings of Aristotle, the things in themselves (and it remains a mystery why this is the case) are a representation of time. Our concepts have lying before them the paralogisms of natural reason, but our a posteriori concepts have lying before them the practical emploument of our experience.}
+\end{cthexample}
+
+Now, let's create a new box for \autoref{alg:advance1}, but with a different customized visual, which will affect only this entry!  Notice that the customization argument is passed straight to the \texttt{tcolorbox} environment, so anything valid for \texttt{tcolorbox} is also valid here.  \autoref{alg:advance2} was created with the following code:
+
+\begin{minted}[bgcolor=red!5,fontsize=\small,escapeinside=||]{TeX}
+\begin{|\ca{cthalgorithm}|}
+          {|\ca{Advance a counter to the next value in a domain}| $\omega \in
+                \mathbb{N}$|\ca{, but now with a customized visual. Also, notice}|
+                |\ca{that this algorithm breaks the page boundaries.}|}
+          [|\co{coltitle}=|white, |\co{colback}=|green!10, |\co{colframe}=|green!70!black,
+                |\co{colbacktitle}=|\sffamily\bfseries\large, |\co{fonttitle}|=red!50!white]
+  |\cc{Algorithm body here!}|
+\end{|\ca{cthalgorithm}|}
+\end{minted}
+
+\begin{cthalgorithm}{Advance a counter to the next value in a domain $\omega \in \mathbb{N}$, but now with a customized visual. Notice that this algorithm also breaks the page boundaries.}[coltitle=white, colback=red!10, colframe=red!50!black, fonttitle=\sffamily\bfseries\large, colbacktitle=red!70!black]
   \label{alg:advance2}
 \begin{algorithmic}[1]
   \Statex \Input $\alpha$: The current value; and $\omega$: the domain.
@@ -176,19 +230,13 @@
 \end{algorithmic}
 \end{cthalgorithm}
 
-Now, let's add an example here, this time using the default visual that was given when creating the environment with \verb+\cthnewtheorem+…
+And now an example with no caption and a different visual…  this example will not go into the \mintinline{TeX}+\listofexamples+ below!
 
-\begin{cthexample}{This is an example!}
-  \emph{\kant[3]}
-\end{cthexample}
-
-And now an example with no caption and a different visual…  this example will not go into the \verb+\listofexamples+ below!
-
 \begin{cthexample}{}[coltitle=yellow, colback=blue!30, colframe=blue!70]
   \emph{\kant[4]}
 \end{cthexample}
 
-Now let's print the lists of algorithms and examples. Remember to add the prefix \texttt{cthth} to the \texttt{listof}, i.e., \verb+\cthlistofalgorithms+ and \verb+\cthlistofexamples+!
+Now let's print the lists of algorithms and examples. Remember to add the prefix \ck{\texttt{cth}} to the \ck{\texttt{listof}}, i.e., \mintinline{TeX}+\cthlistofalgorithms+ and \mintinline{TeX}+\cthlistofexamples+!
 
 \cthlistofalgorithms
 

Modified: trunk/Master/texmf-dist/tex/latex/coloredtheorem/coloredtheorem.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/coloredtheorem/coloredtheorem.sty	2024-04-05 21:20:49 UTC (rev 70864)
+++ trunk/Master/texmf-dist/tex/latex/coloredtheorem/coloredtheorem.sty	2024-04-05 21:20:56 UTC (rev 70865)
@@ -1,4 +1,4 @@
-%% This is file `tcbtheorem.sty',
+%% This is file `coloredtheorem.sty',
 %%
 %% Copyright (C) 2024 by João Lourenço <joao.lourenco at fct.unl.pt>
 %%
@@ -14,7 +14,7 @@
 %%
 \NeedsTeXFormat{LaTeX2e}[2020/06/01]
 \ProvidesPackage{coloredtheorem}
-  [2024/03/31 v1.0 - a theorem-like environment inside a tcolobox]
+  [2024/04/03 v1.0.2 - A colorful boxed theorem environment]
 
 \RequirePackage{tcolorbox}
 \tcbuselibrary{breakable}
@@ -36,15 +36,16 @@
   \expandafter\NewDocumentEnvironment\expandafter{\tcbth#1} {O{} m O{}}%
   {% \begin{tcb<SOMETHING>}
     \begin{center}%
-      \ifx\relax##1\relax
-        \ifx\relax##2\relax\else
-          \expandafter\refstepcounter\expandafter{\tcbth#1}%
+      \ifx\relax##2\relax
+      \else
+        \expandafter\refstepcounter\expandafter{\tcbth#1}%
+        \ifx\relax##1\relax
           \expandafter\addcontentsline\expandafter{lo#1}{subsection}
                         {\protect\numberline{\csname the\tcbth#1\endcsname}##2}%
+        \else
+          \expandafter\addcontentsline\expandafter{lo#1}{subsection}
+                        {\protect\numberline{\csname the\tcbth#1\endcsname}##1}%
         \fi
-      \else
-        \expandafter\addcontentsline\expandafter{lo#1}{subsection}
-                        {\protect\numberline{\csname the\tcbth#1\endcsname}##1}%
       \fi
       \begin{tcolorbox}[breakable,
                         title={\textbf{\csname\tcbth#1name\endcsname



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