The question was asked in How do I repeat a theorem number
and yasmar's answer there works for my tcolorbox theorem and even the link is live. But since yasmar uses amsthm's\theoremstyle, the duplicate loses thetcolorbox formatting.
Here is a MWE:
% !TEX TS-program = pdflatexmk
\documentclass{book}
\usepackage{makeidx}
\usepackage[hyperfootnotes=false]{hyperref}%[pdfborder={0 0 0}]
%Begin the ``quick and dirty hack'' due to Heiko Oberdiek which loads showidx
\makeatletter
\ifHy@hyperindex
\def\HyInd@ParenLeft{(}%
% Hook in \HyInd@@wrindex
\let\HyInd@showidx\@empty
% Hook in \HyInd@@wrindex for package showidx
\def\HyInd@showidx#1{%
\@showidx{#1}%
\if@nobreak
\ifvmode
\nobrak
\fi
\fi
}%
% Load package showidx
\let\siOrg@makeindex\makeindex
\let\siOrg@@index\@index
\let\siOrg@@wrindex\@wrindex
\let\siOrg@index\index
\RequirePackage{showidx}
\let\makeindex\siOrg@makeindex
\let\@index\siOrg@@index
\let\@wrindex\siOrg@@wrindex
\let\index\siOrg@index
% rest of hyperref part
\@ifpackageloaded{multind}{%
\let\HyInd@org@wrindex\@wrindex
\def\@wrindex#1#2{\HyInd@@wrindex{#1}#2||\\}%
\def\HyInd@@wrindex#1#2|#3|#4\\{%
\ifx\\#3\\%
\HyInd@org@wrindex{#1}{#2|hyperpage}%
\else
\def\Hy@temp@A{#3}%
\ifx\Hy@temp@A\HyInd@ParenLeft
HyInd@org@wrindex{#1}{#2|#3hyperpage}%
\else
\HyInd@org@wrindex{#1}{#2|#3}%
\fi
\fi
}%
}{%
\def\@wrindex#1{\@@wrindex#1||\\}
\def\@@wrindex#1|#2|#3\\{%
\ifx\\#2\\%
\protected@write\@indexfile{}{%
\string\indexentry{#1|hyperpage}{\thepage}%
}%
\else
\def\Hy@temp@A{#2}%
\ifx\Hy@temp@A\HyInd@ParenLeft
\protected@write\@indexfile{}{%
\string\indexentry{#1|#2hyperpage}{\thepage}%
}%
\else
\protected@write\@indexfile{}{%
\string\indexentry{#1|#2}{\thepage}%
}%
\fi
\fi
\endgroup
\HyInd@showidx{#1}%
\@esphack
}%
}%
\fi
\makeatother
%End the ``quick and dirty hack'' due to Heiko Oberdiek which loads showidx
\hypersetup{
colorlinks,
linkcolor={red!50!black},
citecolor={blue!50!black},
urlcolor={blue!80!black}
}%end colors
\usepackage{cleveref}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\newcounter{thm}%[chapter]
\newtcolorbox%
[%
use counter= thm,
number within=chapter,
number freestyle={\noexpand\thechapter.\noexpand\arabic{\tcbcounter}~\noexpand\mytitle},%
list inside= thm,%creates the list under tcblistof
list type=heorem,
crefname={Theorem}{Theorems},
Crefname={Theorem}{Theorems},
]%
{heorem}%
[2][]%
{%
detach title,%
before upper={\tcbtitle\quad},%
%breakable,%
enhanced,%
arc=0.2mm,%
%fontupper=\sffamily,
colback=green!5,%
colframe=green!35!black,%
fonttitle=\bfseries,%
coltitle=black,%
code={\gdef\mytitle{#2}},
%code={\def\mytitle{#2}},%
title=THEOREM \thetcbcounter,%
list entry={Theorem~\thetcbcounter},
#1%
}%
%Begin the Sharpe (2013-01-18) code as modified by Schulz (2016-02-1) to have math in Showindex
\let\oldopenparen\(
\let\oldcloseparen\)
\def\({\protect\oldopenparen}
\def\){\protect\oldcloseparen}
\newcommand{\INDEX}[1]{\index{#1}}
%End the Sharpe (2013-01-18) code as modified by Schulz (2016-02-1) to have math in Showindex
\newcommand*{\fullref}[1]{\hyperref[{#1}]{\cref*{#1} \nameref*{#1} \pageref*{#1}}}
%BeginYASMAR
%\theoremstyle{empty}%Does not work here.
\newtheorem{duplicate}{}
%EndYASMAR
\begin{document}
\begin{heorem}[label={thm:1-1}]{~}\hspace{-4mm}
\emph{Signed addition} and \emph{signed subtraction} of the same amount undo each other.
\end{heorem}
\begin{duplicate}[Theorem~\ref{thm:1-1}]
Translations of opposite amounts undo each other.
\end{duplicate}
\end{document}
and here is the output:
As I said, almost there. But how do I get the tcolorbox formatting? (And of course get rid of the 1 and the parentheses?)



thmtoolspackage, which cooperates withamsthmas well asntheorem, offers this possibility (§ 1.4, Restatable theorems). – Bernard Jan 11 '17 at 23:37tcolorboxis now irreplaceable and I don't useamsthmanymore. Since\duplicate(from what package?) is working, what I need is to learn about doing withtcolorboxsomething like yasmar's\theoremstyle{empty}which is what he used to format the duplicate. Thethmtoolsdoc says "The major backends provide a command\theoremstyleto switch between looks of theorems" but I can't see how to do it intcolorboxeven thoughtcolorbox"can be used to put a box around anamsthm". – schremmer Jan 12 '17 at 00:56