In the MWE I would like the numbering:
\documentclass[11pt]{book}
%================================================ Begin PREAMBLE
\usepackage{relsize} %Set the font size relative to the current font size
\usepackage[neveradjust]{paralist}%
\usepackage{titlesec}
\usepackage{etoolbox} %what does it do, why is it here?
\usepackage[dotinlabels]{titletoc}
\usepackage{tcolorbox}%
\tcbuselibrary{%Begin load libraries for tcolorbox
skins,%
raster,%
breakable,%
xparse,%
}%End load libraries for tcolorbox
\usepackage[hyperfootnotes=false]{hyperref}%[pdfborder={0 0 0}]
\usepackage{cleveref}% should be the last package
%============== Begin definition of EXAMPLE
\newcounter{XPL}%
\newtcolorbox%
[%beginForReferences
use counter= XPL,
number within=chapter,%
crefname={\textsc{example}}{\textsc{examples}},%
Crefname={\textsc{Example}}{\textsc{Examples}},%
]%endForReferences
{EXAMPLE}%NameEnvironment
[2][]%WhateverThatIs
{%beginDescription
detach title,before upper={\tcbtitle\quad},
left=-1mm,right=-1mm,
breakable,
enhanced,%
%grow to left by=5mm,
fontupper=\sffamily,
colback=white,
colframe=white,
fonttitle=\sffamily,
fonttitle=\bfseries,
coltitle=black,%
title={E\smaller{XAMPLE} \larger{\thetcbcounter}.\notblank{#2}{\hspace{2mm} #2}{}},%
#1,%
}%end Description
%============== End definition of EXAMPLE
%============== Begin definition of DEMO
\newcounter{DMO}%[chapter]
\newtcolorbox%
[%beginForReferences
use counter= DMO,
number within=chapter,%
list inside= DMO,%creates the list under tcblistof
%number freestyle={\noexpand\thechapter.\noexpand\arabic{\tcbcounter}~\noexpand\mytitlemod},%Makes for LONG titles in the references.
crefname={\textsc{demo}}{\textsc{demos}},%
Crefname={\textsc{Demo}}{\textsc{Demos}}%
]%endForReferences
{%beginNameEnvironment
DEMO%
}%endNameEnvironment
[2]%
[]%WhateverThatIs
{%begin Description OUTER tcbox
breakable,
enhanced,%
detach title,
attach title to upper=~,%
lower separated=true,
bicolor,%
boxrule=1mm,%
colframe=white,%controls both the background color for the top and the frame of the bottom
colback=white,%This is the background color below the title.
colbacklower=white,%This is the background color below the title.
top=0pt,
bottom=0pt,
boxsep=0pt,% Sets a common padding between text and frame of box. Added to left, right, top, bottom, and middle.
outer arc=2mm,%when line is thick. Else, can just use arc.
fontupper=\sffamily,
fontlower=\sffamily,
% fonttitle=\small\sffamily,
fonttitle=\bfseries,
coltitle=black,%
title={\textbf{D\smaller{EMO}}\hspace{1.5mm}\textbf{\thetcbcounter} \hspace{2mm} #2},%
#1%
}%end Description OUTER tcbox
%=========== End definition of DEMO
%================= Begin definition of DEFINITION
\newcounter{DFN}%[chapter] %To be entered in Control>ALL
\newtcolorbox%
[%beginForReferences
use counter= DFN,
number within=chapter,
list inside= DFN,%creates the list under tcblistof
%list type=definition,
crefname={\textsc{definition}}{\textsc{definitions}},%
Crefname={\textsc{Definition}}{\textsc{Definitions}},%
]%endForReferences
{%beginNameEnvironment
DEFINITION%
}%EndNameEnvironment
[2][]%Two brackets say to enter one label and one title?
{%beginDescription
detach title,%
before upper={\tcbtitle\quad},%
breakable,%
enhanced,%
arc=0.2mm,%
%fontupper=\sffamily,%NotSerifBecauseNotPartOfText
colback= yellow!30,%
colframe= yellow!35!black,%
fonttitle=\bfseries,%
coltitle=black,%
%code={\gdef\mytitlealert{#2}},%Used to make for LONG titles in the references.
title=D\smaller{EFINITION} \larger{\thetcbcounter\, #2},%
nameref={#2},%
list entry={D\smaller{EFINITION}~\larger{\thetcbcounter ~ #2}},%the default format puts the label upfront
#1,%Required for references.
}%end Description
%==================== End definition of DEFINITION
%================ Begin definition of DEFINITIONrestated as per YASMAR and STURM
\newcounter{DFNrst}
\newtcolorbox%
[%beginForReferences
use counter=DFNrst,
list inside= DFN,
%number within=chapter,%
crefname={definition (Restated)}{definitions (Restated)},%
Crefname={Definition (Restated)}{Definitions (Restated)},%
]%endForReferences
{%begin name environment
DEFINITIONrestated%
}%end name Environment
[3][]%
{%begin Format
detach title,%This prevents the top from being the color of the frame
before upper={\tcbtitle\quad},%This prevents the top from being the color of the frame
%breakable,%WHY NOT?
enhanced,%
arc=0.2mm,%
colback= yellow!30,%
colframe= yellow!35!black,%
fonttitle=\bfseries,%
coltitle=black,%
%begin TITLE
title= D\smaller{EFINITION} ~\larger{\ref{#2}}~(Restated) \nameref{#2},%
nameref={\getrefbykeydefault{#2}{name}{UNDEFINED REFERENCE}},%
list entry= D\smaller{EFINITION} ~\larger{\ref{#2}}~\nameref{#2} (Restated),%Order not the same as in THEOREMrestated
label type={DFNrst},
code={\renewcommand{\theDFNrst}{\getrefnumber{#2}}},
#1%,
%end TITLE
}%end Format
%============================== End definition of DEFINITIONrestated
as per YASMAR and STURM
%================================================ End PREAMBLE
\begin{document}
\chapter{Something}\label{1-0-0}.
\begin{EXAMPLE}[label={XPL:1-1}]{~}
Text
\end{EXAMPLE}
\begin{EXAMPLE}[label={XPL:1-2}]{~}
Text
\end{EXAMPLE}
\begin{EXAMPLE}[label={XPL:1-3}]{~}
Text
\end{EXAMPLE}
\begin{EXAMPLE}[label={XPL:1-4}]{~}
Text
\end{EXAMPLE}
\begin{EXAMPLE}[label={XPL:1-5}]{~}
Text
\end{EXAMPLE}
References: \Cref{XPL:1-1}, \Cref{XPL:1-2}, \Cref{XPL:1-3}
\bigskip
\begin{DEMO}[label={DMO:1-1}]{}
Text
\end{DEMO}
\begin{DEMO}[label={DMO:1-2}]{}
Text
\end{DEMO}
\begin{DEMO}[label={DMO:1-3}]{}
Text
\end{DEMO}
\begin{DEMO}[label={DMO:1-4}]{}
Text
\end{DEMO}
\begin{DEMO}[label={DMO:1-5}]{}
Text
\end{DEMO}
References: \Cref{DMO:1-1}, \Cref{DMO:1-2a}, \Cref{DMO:1-2b}, \Cref{DMO:1-2c}, \Cref{DMO:1-3}
%============================== begin DEFINITION
% \INDEX[]{direct problems} \INDEX[]{reverse problems} \INDEX[]{given reference info} \INDEX[]{given info of concern}
\begin{DEFINITION}[label={DFN:1-1}]{Title}
This is yak, yak.
\end{DEFINITION}
%============================== end DEFINITION
%============================== begin DEFINITION restated
\begin{DEFINITIONrestated}[label={DFN:1-1a}]{DFN:1-1}{~}%
This is now restated as YAK, YAK
\end{DEFINITIONrestated}
%================================== end DEFINITION restated
\end{document}






tcolorboxwhen you essentially use no box? – egreg May 07 '21 at 22:05\Cref{XPL:1-n}"in a couple of places. As for the DEMOs, normally, I use a DEMO after each PROCEDURE but in a few places I need more than one DEMO after the PROCEDURE and I thought it would be better to keep the numbering of the DEMOS matched.with the numbering of the PROCEDURES. So, it;s not crucial but I sure hope you can fix it. – schremmer May 08 '21 at 13:02hyperlinkNeeds to be loaded as\usepackage[hypertexnames=false, hyperfootnotes=false]{hyperref}. (3) I update my answer with your coloring recommendations and \newpage to test the links. More fun! – Simon Dispa May 09 '21 at 22:18PROCEDURE 1.2.a. Would it be possible to get rid of the dot between the2and theaand getPROCEDURE 1.2a? – schremmer May 12 '21 at 18:36\tcblistof[\chapter]{DMO}{List of Demos}. See pp. 91, 92 and 107 of link – schremmer May 12 '21 at 22:04\tcblistof[\chapter]{PROC}{List of Procedures}. – Simon Dispa May 13 '21 at 04:391.1 PROCEDURE 1.1instead ofPROCEDURE 1.1Otherwise, everything seems OK. – schremmer May 14 '21 at 05:41PROCEDURE 1-4,PROCEDURE 1-5,PROCEDURE 1-6a,PROCEDURE 1-6b, ...PROCEDURE 1-7, to Chapter 2, you will see that the numbering is wrong: ...PROCEDURE 1-3,PROCEDURE 2-4,PROCEDURE 2-5,PROCEDURE 2-6a,PROCEDURE 2-6b,...PROCEDURE 2-7, instead of ...PROCEDURE 1-3,PROCEDURE 2-1,PROCEDURE 2-2,PROCEDURE 2-3a,PROCEDURE 2-3b, ...PROCEDURE 2-4. In other words, the procedure number is not reset with the new chapter. – schremmer May 14 '21 at 08:34List of Proceduresit should bePROCEDURE 1.1instead of1.1 PROCEDURE 1.1. (In other words,1.1should appear only once, afterProcedure) – schremmer May 14 '21 at 22:29PROCEDURE_def. – Simon Dispa May 14 '21 at 22:48Document.pdf– schremmer May 18 '21 at 22:06PROCEDURE 1.10aandPROCEDURE 1.10bbutPROCEDURE 1.10and the new tcboxPROCEDURErestated 1.10which Yasmar -Sturm defined to automatically get its number fromPROCEDURE 1.10. See my link. And then, afterPROCEDURE 1.10, there should beDEMO 1.10a,DEMO 1.10b,DEMO 1.10cand afterPROCEDURErestated 1.10there should be the new tcboxDEMOrestated 1.10a,DEMOrestated 1.10b,DEMOrestated 1.10cwhich automatically get their numbers fromDEMO 1.10a,DEMO 1.10b,DEMO 1.10c. – schremmer May 21 '21 at 22:46PROCEDURE 1.10change\begin{PROCEDUREsub}[label={PROC:1-10}]to\begin{PROCEDURE}[label={PROC:1-10}]. DEMOS 1.10a to c are fine after. I do not understand the restarted. You want to reuse a previous number? – Simon Dispa May 23 '21 at 23:06restatedtakes 3 parameters: (#1) Its own label, (#2) a label of the "original" and (#3) title of the "original". But #2 and #3 are in fact arbitrary and using for printing the output as(Restated)and making the links. There is no check that the "original" actually exists. It is just a rubber stamp with the content you choose. (Procedure 1.8c is there, page 5. see the list)(2)
– Simon Dispa May 26 '21 at 13:37DEMOandPROCEDUREare independent chains. There are no sync between their numbers, they increase independently. Only thesub(s) take their number from their parent untilend.