Error in tcolorbox Missing endcsname inserted











up vote
0
down vote

favorite












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
enter image description here



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=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}{theo}


begin{document}
begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $n$ Variable}{mittelwertsatz_n2}% Es sei $ninmathbb{N}$, $Dsubseteqmathbb{R}^n$ eine offene Menge und
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}









share|improve this question






















  • One obvious point: you're not even loading tcolorbox.
    – marmot
    Nov 27 at 2:52










  • @marmot I am actually loading tcolorbox package I just forgot to put it here
    – Kumarm
    Nov 27 at 3:03















up vote
0
down vote

favorite












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
enter image description here



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=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}{theo}


begin{document}
begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $n$ Variable}{mittelwertsatz_n2}% Es sei $ninmathbb{N}$, $Dsubseteqmathbb{R}^n$ eine offene Menge und
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}









share|improve this question






















  • One obvious point: you're not even loading tcolorbox.
    – marmot
    Nov 27 at 2:52










  • @marmot I am actually loading tcolorbox package I just forgot to put it here
    – Kumarm
    Nov 27 at 3:03













up vote
0
down vote

favorite









up vote
0
down vote

favorite











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
enter image description here



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=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}{theo}


begin{document}
begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $n$ Variable}{mittelwertsatz_n2}% Es sei $ninmathbb{N}$, $Dsubseteqmathbb{R}^n$ eine offene Menge und
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}









share|improve this question













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
enter image description here



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=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}{theo}


begin{document}
begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $n$ Variable}{mittelwertsatz_n2}% Es sei $ninmathbb{N}$, $Dsubseteqmathbb{R}^n$ eine offene Menge und
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 27 at 2:41









Kumarm

22819




22819












  • One obvious point: you're not even loading tcolorbox.
    – marmot
    Nov 27 at 2:52










  • @marmot I am actually loading tcolorbox package I just forgot to put it here
    – Kumarm
    Nov 27 at 3:03


















  • One obvious point: you're not even loading tcolorbox.
    – marmot
    Nov 27 at 2:52










  • @marmot I am actually loading tcolorbox package I just forgot to put it here
    – Kumarm
    Nov 27 at 3:03
















One obvious point: you're not even loading tcolorbox.
– marmot
Nov 27 at 2:52




One obvious point: you're not even loading tcolorbox.
– marmot
Nov 27 at 2:52












@marmot I am actually loading tcolorbox package I just forgot to put it here
– Kumarm
Nov 27 at 3:03




@marmot I am actually loading tcolorbox package I just forgot to put it here
– Kumarm
Nov 27 at 3:03










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










This is too long for a comment. You have several issues:




  • you are not loading tcolorbox package

  • you need to add tcbuselibrary{theorems}

  • you have not defined mathbb

  • the use counter from=Definition does not work because you have not defined a definition environment. As per the comments, I have replaced this with no counter to remove the numbering.


The following code compiles and perhaps does what you want:



documentclass[11pt]{article}
usepackage{amssymb}
usepackage{varioref}
usepackage{tcolorbox}
tcbuselibrary{skins,theorems}
usepackage{cleveref}

newtcbtheorem[no number]{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=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}{theo}

begin{document}

begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $n$ Variable}{mittelwertsatz_n2}% Es sei $ninmathbb{N}$, $Dsubseteqmathbb{R}^n$ eine offene Menge und
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}


The output is:



enter image description here



Edit
To remove both the theorem name and number and just have the box itself, it is better to use newtcolorbox, to give:



enter image description here



Here is the updated code:



documentclass[11pt]{article}
usepackage{amsmath,amssymb}
usepackage{varioref}
usepackage{tcolorbox}
tcbuselibrary{skins}
usepackage{cleveref}

newtcolorbox{YetAnotherTheorem}[1]%
{enhanced,arc=0mm,outer arc=0mm,
boxrule=0mm,toprule=1mm,bottomrule=1mm,left=1mm,right=1mm,
titlerule=0mm,toptitle=0mm,bottomtitle=0mm,top=0mm,
colframe=red!50!black,colback=red!5!white,coltitle=red!50!black,
colbacktitle=yellow!50!white,colback=red!5!white,
title=#1,
fonttitle=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}

begin{document}

begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $mathbf{n}$ Variable}
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}





share|improve this answer























  • In my full document I have tcolorbox loded, I just forgot to put here. I have theorems loaded as well. It did not work. When I copy this and create a new document this works.
    – Kumarm
    Nov 27 at 3:08








  • 1




    @Kumarm From your comment it is not clear to me, has this solved your issue? For me I think that the endcsname error was caused by the use counter from=Definition. Perhaps this was your problem? In any case, this was all that I changed in the newtcbtheorem definition.
    – Andrew
    Nov 27 at 3:18












  • Yes you are right after replacing use counter from=Definition with number within=section this works. However actually I do not want the numbers at all when I delete use counter from=Definition part it still gives me 1. Can you help me how to get rid of the numbering at all.
    – Kumarm
    Nov 27 at 3:23










  • @Kumarm To remove the numbering, replace number within=section with no counter. I'll edit my post.
    – Andrew
    Nov 27 at 3:27












  • I know that this was the issue because I was just about to post a very similar answer in which just added newtcbtheorem{Definition}{Theorem}% {colback=white,colframe=red!50!black,fonttitle=bfseries, separator sign={ $blacktriangleright$}}{theo} to solve the issue, this also works. BTW, I'd use boldmath for the theorem title to make $n$ bold as well.
    – marmot
    Nov 27 at 3:28











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461931%2ferror-in-tcolorbox-missing-endcsname-inserted%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










This is too long for a comment. You have several issues:




  • you are not loading tcolorbox package

  • you need to add tcbuselibrary{theorems}

  • you have not defined mathbb

  • the use counter from=Definition does not work because you have not defined a definition environment. As per the comments, I have replaced this with no counter to remove the numbering.


The following code compiles and perhaps does what you want:



documentclass[11pt]{article}
usepackage{amssymb}
usepackage{varioref}
usepackage{tcolorbox}
tcbuselibrary{skins,theorems}
usepackage{cleveref}

newtcbtheorem[no number]{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=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}{theo}

begin{document}

begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $n$ Variable}{mittelwertsatz_n2}% Es sei $ninmathbb{N}$, $Dsubseteqmathbb{R}^n$ eine offene Menge und
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}


The output is:



enter image description here



Edit
To remove both the theorem name and number and just have the box itself, it is better to use newtcolorbox, to give:



enter image description here



Here is the updated code:



documentclass[11pt]{article}
usepackage{amsmath,amssymb}
usepackage{varioref}
usepackage{tcolorbox}
tcbuselibrary{skins}
usepackage{cleveref}

newtcolorbox{YetAnotherTheorem}[1]%
{enhanced,arc=0mm,outer arc=0mm,
boxrule=0mm,toprule=1mm,bottomrule=1mm,left=1mm,right=1mm,
titlerule=0mm,toptitle=0mm,bottomtitle=0mm,top=0mm,
colframe=red!50!black,colback=red!5!white,coltitle=red!50!black,
colbacktitle=yellow!50!white,colback=red!5!white,
title=#1,
fonttitle=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}

begin{document}

begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $mathbf{n}$ Variable}
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}





share|improve this answer























  • In my full document I have tcolorbox loded, I just forgot to put here. I have theorems loaded as well. It did not work. When I copy this and create a new document this works.
    – Kumarm
    Nov 27 at 3:08








  • 1




    @Kumarm From your comment it is not clear to me, has this solved your issue? For me I think that the endcsname error was caused by the use counter from=Definition. Perhaps this was your problem? In any case, this was all that I changed in the newtcbtheorem definition.
    – Andrew
    Nov 27 at 3:18












  • Yes you are right after replacing use counter from=Definition with number within=section this works. However actually I do not want the numbers at all when I delete use counter from=Definition part it still gives me 1. Can you help me how to get rid of the numbering at all.
    – Kumarm
    Nov 27 at 3:23










  • @Kumarm To remove the numbering, replace number within=section with no counter. I'll edit my post.
    – Andrew
    Nov 27 at 3:27












  • I know that this was the issue because I was just about to post a very similar answer in which just added newtcbtheorem{Definition}{Theorem}% {colback=white,colframe=red!50!black,fonttitle=bfseries, separator sign={ $blacktriangleright$}}{theo} to solve the issue, this also works. BTW, I'd use boldmath for the theorem title to make $n$ bold as well.
    – marmot
    Nov 27 at 3:28















up vote
1
down vote



accepted










This is too long for a comment. You have several issues:




  • you are not loading tcolorbox package

  • you need to add tcbuselibrary{theorems}

  • you have not defined mathbb

  • the use counter from=Definition does not work because you have not defined a definition environment. As per the comments, I have replaced this with no counter to remove the numbering.


The following code compiles and perhaps does what you want:



documentclass[11pt]{article}
usepackage{amssymb}
usepackage{varioref}
usepackage{tcolorbox}
tcbuselibrary{skins,theorems}
usepackage{cleveref}

newtcbtheorem[no number]{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=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}{theo}

begin{document}

begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $n$ Variable}{mittelwertsatz_n2}% Es sei $ninmathbb{N}$, $Dsubseteqmathbb{R}^n$ eine offene Menge und
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}


The output is:



enter image description here



Edit
To remove both the theorem name and number and just have the box itself, it is better to use newtcolorbox, to give:



enter image description here



Here is the updated code:



documentclass[11pt]{article}
usepackage{amsmath,amssymb}
usepackage{varioref}
usepackage{tcolorbox}
tcbuselibrary{skins}
usepackage{cleveref}

newtcolorbox{YetAnotherTheorem}[1]%
{enhanced,arc=0mm,outer arc=0mm,
boxrule=0mm,toprule=1mm,bottomrule=1mm,left=1mm,right=1mm,
titlerule=0mm,toptitle=0mm,bottomtitle=0mm,top=0mm,
colframe=red!50!black,colback=red!5!white,coltitle=red!50!black,
colbacktitle=yellow!50!white,colback=red!5!white,
title=#1,
fonttitle=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}

begin{document}

begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $mathbf{n}$ Variable}
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}





share|improve this answer























  • In my full document I have tcolorbox loded, I just forgot to put here. I have theorems loaded as well. It did not work. When I copy this and create a new document this works.
    – Kumarm
    Nov 27 at 3:08








  • 1




    @Kumarm From your comment it is not clear to me, has this solved your issue? For me I think that the endcsname error was caused by the use counter from=Definition. Perhaps this was your problem? In any case, this was all that I changed in the newtcbtheorem definition.
    – Andrew
    Nov 27 at 3:18












  • Yes you are right after replacing use counter from=Definition with number within=section this works. However actually I do not want the numbers at all when I delete use counter from=Definition part it still gives me 1. Can you help me how to get rid of the numbering at all.
    – Kumarm
    Nov 27 at 3:23










  • @Kumarm To remove the numbering, replace number within=section with no counter. I'll edit my post.
    – Andrew
    Nov 27 at 3:27












  • I know that this was the issue because I was just about to post a very similar answer in which just added newtcbtheorem{Definition}{Theorem}% {colback=white,colframe=red!50!black,fonttitle=bfseries, separator sign={ $blacktriangleright$}}{theo} to solve the issue, this also works. BTW, I'd use boldmath for the theorem title to make $n$ bold as well.
    – marmot
    Nov 27 at 3:28













up vote
1
down vote



accepted







up vote
1
down vote



accepted






This is too long for a comment. You have several issues:




  • you are not loading tcolorbox package

  • you need to add tcbuselibrary{theorems}

  • you have not defined mathbb

  • the use counter from=Definition does not work because you have not defined a definition environment. As per the comments, I have replaced this with no counter to remove the numbering.


The following code compiles and perhaps does what you want:



documentclass[11pt]{article}
usepackage{amssymb}
usepackage{varioref}
usepackage{tcolorbox}
tcbuselibrary{skins,theorems}
usepackage{cleveref}

newtcbtheorem[no number]{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=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}{theo}

begin{document}

begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $n$ Variable}{mittelwertsatz_n2}% Es sei $ninmathbb{N}$, $Dsubseteqmathbb{R}^n$ eine offene Menge und
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}


The output is:



enter image description here



Edit
To remove both the theorem name and number and just have the box itself, it is better to use newtcolorbox, to give:



enter image description here



Here is the updated code:



documentclass[11pt]{article}
usepackage{amsmath,amssymb}
usepackage{varioref}
usepackage{tcolorbox}
tcbuselibrary{skins}
usepackage{cleveref}

newtcolorbox{YetAnotherTheorem}[1]%
{enhanced,arc=0mm,outer arc=0mm,
boxrule=0mm,toprule=1mm,bottomrule=1mm,left=1mm,right=1mm,
titlerule=0mm,toptitle=0mm,bottomtitle=0mm,top=0mm,
colframe=red!50!black,colback=red!5!white,coltitle=red!50!black,
colbacktitle=yellow!50!white,colback=red!5!white,
title=#1,
fonttitle=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}

begin{document}

begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $mathbf{n}$ Variable}
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}





share|improve this answer














This is too long for a comment. You have several issues:




  • you are not loading tcolorbox package

  • you need to add tcbuselibrary{theorems}

  • you have not defined mathbb

  • the use counter from=Definition does not work because you have not defined a definition environment. As per the comments, I have replaced this with no counter to remove the numbering.


The following code compiles and perhaps does what you want:



documentclass[11pt]{article}
usepackage{amssymb}
usepackage{varioref}
usepackage{tcolorbox}
tcbuselibrary{skins,theorems}
usepackage{cleveref}

newtcbtheorem[no number]{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=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}{theo}

begin{document}

begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $n$ Variable}{mittelwertsatz_n2}% Es sei $ninmathbb{N}$, $Dsubseteqmathbb{R}^n$ eine offene Menge und
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}


The output is:



enter image description here



Edit
To remove both the theorem name and number and just have the box itself, it is better to use newtcolorbox, to give:



enter image description here



Here is the updated code:



documentclass[11pt]{article}
usepackage{amsmath,amssymb}
usepackage{varioref}
usepackage{tcolorbox}
tcbuselibrary{skins}
usepackage{cleveref}

newtcolorbox{YetAnotherTheorem}[1]%
{enhanced,arc=0mm,outer arc=0mm,
boxrule=0mm,toprule=1mm,bottomrule=1mm,left=1mm,right=1mm,
titlerule=0mm,toptitle=0mm,bottomtitle=0mm,top=0mm,
colframe=red!50!black,colback=red!5!white,coltitle=red!50!black,
colbacktitle=yellow!50!white,colback=red!5!white,
title=#1,
fonttitle=bfseriessffamilynormalsize,fontupper=normalsizeitshape,
}

begin{document}

begin{YetAnotherTheorem}{Mittelwertsatz f"{u}r $mathbf{n}$ Variable}
$fin C^{1}(D,mathbb{R})$. Dann gibt es auf jeder Strecke
$[x_0,x]subset D$ einen Punkt $xiin[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}






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 27 at 3:44

























answered Nov 27 at 2:55









Andrew

29.9k34380




29.9k34380












  • In my full document I have tcolorbox loded, I just forgot to put here. I have theorems loaded as well. It did not work. When I copy this and create a new document this works.
    – Kumarm
    Nov 27 at 3:08








  • 1




    @Kumarm From your comment it is not clear to me, has this solved your issue? For me I think that the endcsname error was caused by the use counter from=Definition. Perhaps this was your problem? In any case, this was all that I changed in the newtcbtheorem definition.
    – Andrew
    Nov 27 at 3:18












  • Yes you are right after replacing use counter from=Definition with number within=section this works. However actually I do not want the numbers at all when I delete use counter from=Definition part it still gives me 1. Can you help me how to get rid of the numbering at all.
    – Kumarm
    Nov 27 at 3:23










  • @Kumarm To remove the numbering, replace number within=section with no counter. I'll edit my post.
    – Andrew
    Nov 27 at 3:27












  • I know that this was the issue because I was just about to post a very similar answer in which just added newtcbtheorem{Definition}{Theorem}% {colback=white,colframe=red!50!black,fonttitle=bfseries, separator sign={ $blacktriangleright$}}{theo} to solve the issue, this also works. BTW, I'd use boldmath for the theorem title to make $n$ bold as well.
    – marmot
    Nov 27 at 3:28


















  • In my full document I have tcolorbox loded, I just forgot to put here. I have theorems loaded as well. It did not work. When I copy this and create a new document this works.
    – Kumarm
    Nov 27 at 3:08








  • 1




    @Kumarm From your comment it is not clear to me, has this solved your issue? For me I think that the endcsname error was caused by the use counter from=Definition. Perhaps this was your problem? In any case, this was all that I changed in the newtcbtheorem definition.
    – Andrew
    Nov 27 at 3:18












  • Yes you are right after replacing use counter from=Definition with number within=section this works. However actually I do not want the numbers at all when I delete use counter from=Definition part it still gives me 1. Can you help me how to get rid of the numbering at all.
    – Kumarm
    Nov 27 at 3:23










  • @Kumarm To remove the numbering, replace number within=section with no counter. I'll edit my post.
    – Andrew
    Nov 27 at 3:27












  • I know that this was the issue because I was just about to post a very similar answer in which just added newtcbtheorem{Definition}{Theorem}% {colback=white,colframe=red!50!black,fonttitle=bfseries, separator sign={ $blacktriangleright$}}{theo} to solve the issue, this also works. BTW, I'd use boldmath for the theorem title to make $n$ bold as well.
    – marmot
    Nov 27 at 3:28
















In my full document I have tcolorbox loded, I just forgot to put here. I have theorems loaded as well. It did not work. When I copy this and create a new document this works.
– Kumarm
Nov 27 at 3:08






In my full document I have tcolorbox loded, I just forgot to put here. I have theorems loaded as well. It did not work. When I copy this and create a new document this works.
– Kumarm
Nov 27 at 3:08






1




1




@Kumarm From your comment it is not clear to me, has this solved your issue? For me I think that the endcsname error was caused by the use counter from=Definition. Perhaps this was your problem? In any case, this was all that I changed in the newtcbtheorem definition.
– Andrew
Nov 27 at 3:18






@Kumarm From your comment it is not clear to me, has this solved your issue? For me I think that the endcsname error was caused by the use counter from=Definition. Perhaps this was your problem? In any case, this was all that I changed in the newtcbtheorem definition.
– Andrew
Nov 27 at 3:18














Yes you are right after replacing use counter from=Definition with number within=section this works. However actually I do not want the numbers at all when I delete use counter from=Definition part it still gives me 1. Can you help me how to get rid of the numbering at all.
– Kumarm
Nov 27 at 3:23




Yes you are right after replacing use counter from=Definition with number within=section this works. However actually I do not want the numbers at all when I delete use counter from=Definition part it still gives me 1. Can you help me how to get rid of the numbering at all.
– Kumarm
Nov 27 at 3:23












@Kumarm To remove the numbering, replace number within=section with no counter. I'll edit my post.
– Andrew
Nov 27 at 3:27






@Kumarm To remove the numbering, replace number within=section with no counter. I'll edit my post.
– Andrew
Nov 27 at 3:27














I know that this was the issue because I was just about to post a very similar answer in which just added newtcbtheorem{Definition}{Theorem}% {colback=white,colframe=red!50!black,fonttitle=bfseries, separator sign={ $blacktriangleright$}}{theo} to solve the issue, this also works. BTW, I'd use boldmath for the theorem title to make $n$ bold as well.
– marmot
Nov 27 at 3:28




I know that this was the issue because I was just about to post a very similar answer in which just added newtcbtheorem{Definition}{Theorem}% {colback=white,colframe=red!50!black,fonttitle=bfseries, separator sign={ $blacktriangleright$}}{theo} to solve the issue, this also works. BTW, I'd use boldmath for the theorem title to make $n$ bold as well.
– marmot
Nov 27 at 3:28


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461931%2ferror-in-tcolorbox-missing-endcsname-inserted%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to send String Array data to Server using php in android

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Is anime1.com a legal site for watching anime?