I am trying to a fancy theorem type for my notes. I like tcolorbox examples. But the one that I like most is giving me an error.
Missing \endcsname inserted.
This one is on page 360 of the tcolorbox manual. I do not understand why I am getting this error and how to fix. There was a similar question
https://tex.stackexchange.com/questions/174017/compile-error-missing-endcsname-inserted-with-code-and-tcolorbox
But it did not solve my problem. The result should be like this
I have added the code below. Please help me.
\documentclass[11pt]{article}
\usepackage{varioref}
\usepackage{cleveref}
\tcbuselibrary{skins}
\newtcbtheorem[use counter from=Definition]{YetAnotherTheorem}{Theorem}%
{theorem style=change apart,enhanced,arc=0mm,outer arc=0mm,
boxrule=0mm,toprule=1mm,bottomrule=1mm,left=1mm,right=1mm,
titlerule=0mm,toptitle=0mm,bottomtitle=1mm,top=0mm,
colframe=red!50!black,colback=red!5!white,coltitle=red!50!black,
title style={top color=yellow!50!white,bottom color=red!5!white,
middle color=yellow!50!white},
fonttitle=\bfseries\sffamily\normalsize,fontupper=\normalsize\itshape,
}{theo}
\begin{document}
\begin{YetAnotherTheorem}{Mittelwertsatz f\"{u}r $n$ Variable}{mittelwertsatz_n2}% Es sei $n\in\mathbb{N}$, $D\subseteq\mathbb{R}^n$ eine offene Menge und
$f\in C^{1}(D,\mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]\subset D$ einen Punkt $\xi\in[x_0,x]$, so dass gilt
\begin{equation*}
f(x)-f(x_0) = \operatorname{grad} f(\xi)^{\top}(x-x_0)
\end{equation*}
\end{YetAnotherTheorem}
\end{document}
tcolorbox
. – user121799 Nov 27 '18 at 2:52