I did follow the instruction from Create a color box?, and succeed in the \documentclass{article}
.
However, if I put the Tex code in the beamer
class, it does not work.
The code is:
\tcbset{mystyle/.style={
breakable,
enhanced,
outer arc=0pt,
arc=0pt,
colframe=myblue,
colback=myblue!20,
attach boxed title to top left,
boxed title style={
colback=myblue,
outer arc=0pt,
arc=0pt,
},
fonttitle=\sffamily
}
}
> \newtcolorbox[auto counter,number within=section]{example}[1][]{
mystyle,
title=Example~\thetcbcounter,
overlay unbroken and first={
\node[anchor=west,font=\sffamily,color=myblue]
at (title.east) {#1};
}
}
\newtcolorbox[auto counter]{assumption}[1][]{
mystyle,
colback=white,
rightrule=0pt,
toprule=0pt,
title=Assumption SLR.\thetcbcounter,
overlay unbroken and first={
\node[anchor=west,font=\sffamily,color=myblue]
at (title.east) {#1};
}
}
if I use "assumption" environment as designed in the above code only, it works well in the beamer class. However, if I create a slide with "assumption" environment (above code) in the beamer class, it does not work.
Any helps is highly appreciated.
Thanks
Does not work
is not really helpful. Please show us a MWE what you have done so far