I've got many tcolorboxes in my document and I want to add one to my table of contents.
A test code:
\documentclass[10pt,a4paper,twoside,spanish]{scrbook}
\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{4}
\usepackage{units}
\usepackage{endnotes}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{scrhack}
\usepackage{graphicx}
\usepackage{color,xcolor}
\usepackage[most]{tcolorbox}
\tcbuselibrary{theorems}
\usepackage{tikz, pgf, pgfplots}
\usetikzlibrary{arrows,backgrounds,plotmarks,shapes.geometric,calc}
\pgfplotsset{width=7cm,compat=newest}
\pgfplotsset{plot coordinates/math parser=false}
\tcbset {
teoestilo/.style={
shadow={2mm}{-1mm}{0mm}{black!50!white},
colback=gray!20!white,
coltext=black,
coltitle=white,
enlarge top by=\baselineskip/2+1mm,
enlarge top at break by=0mm,
pad at break=2mm,
fonttitle=\bfseries\large,
fontupper=\normalsize,
enhanced,
colframe=black,
boxrule=1pt,
arc=2mm,
breakable,
top=2mm,
toptitle=1mm,
bottomtitle=1mm,
before=\vskip18pt,
separator sign ={\ $\blacktriangleright$}
},
}
\newtcbtheorem[auto counter, number within=section]{teorema}%
{Teorema}{teoestilo}{th}
\newtcbtheorem[auto counter, number within=section]{definicion}%
{Definicion}{teoestilo}{def}
\newtcbtheorem[auto counter, number within=section]{ejercicio}%
{Ejercicio}{teoestilo}{ejer}
\newtcbtheorem[auto counter, number within=section]{corolario}%
{Corolario}{teoestilo}{coro}
\newtcbtheorem[auto counter, number within=section]{ejemplo}%
{Ejemplo}{teoestilo}{ejem}
\newtcbtheorem[auto counter, number within=section]{nota}%
{Nota}{teoestilo}{not}
\newtcbtheorem[auto counter, number within=section]{propo}%
{Proposición}{teoestilo}{prop}
\begin{document}
\maketitle
\tableofcontents{}
\chapter{MÉTODOS ITERATIVOS PARA RAÍCES REALES}
\section{Método De la Bisección}
\subsection{Introducción}
text test
\begin{teorema}{Bolzano}{}
Sea una función cualquiera $f\: :[a,\: b]\longrightarrow\mathbb{R}$, tal que $f\in C([a,\: b])$. Entonces:\\
Si $f(a)\cdot f(b)<0\Rightarrow \exists c\in ]a,\: b[\:/\: f(c)=0$
\end{teorema}
\begin{definicion}{Definicion}{}
xdkdkdkdkd
\end{definicion}
\end{document}
Thanks