# Consecutive numbering in theorem enviroments, inside framed boxes

I want to write propositions, lemmas, theorems,
corollaries inside the chosen boxes and definitions NOT inside boxes, all of them with consecutive numbering. I searched for similar posts and I found things, but all were without boxes.

So,

1) Any ideas to fix this issue?

2) Is there a way to write "theorem 1.0.1" instead of "1.0.1 theorem" in these boxes?

Example: Theorem 1.0.1, Definition 1.0.2. Lemma 1.0.3, Definition 1.0.4,...

\documentclass[10pt,a4paper]{book}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}
\usepackage[english,greek]{babel}
\renewcommand{\rmdefault}{udidot}

\newtcbtheorem[number within=section]{thm}{Θεώρημα}{
theorem style=change apart,
enhanced jigsaw,% <--- jigsaw
sharp corners,
boxrule=0pt,
toprule=1pt,bottomrule=1pt,
left=0.2cm,right=0.2cm,top=0.2cm,
titlerule=0.5em,
toptitle=0.1cm,
bottomtitle=-0.1cm,
colframe=white!25!black,colback=white,coltitle=white,
%title style={white!25!black},   & <---- remove
fonttitle=\bfseries,fontupper=\normalsize}{thm}

\newtcbtheorem[number within=thm]{prop}{Πρόταση}{
theorem style=change apart,
enhanced jigsaw,% <--- jigsaw
sharp corners,
boxrule=0pt,
toprule=1pt,bottomrule=1pt,
left=0.2cm,right=0.2cm,top=0.2cm,
titlerule=0.5em,
toptitle=0.1cm,
bottomtitle=-0.1cm,
colframe=white!25!black,colback=white,coltitle=white,
%title style={white!25!black},   & <---- remove
fonttitle=\bfseries,fontupper=\normalsize}{prop}

\begin{document}
\chapter{Hi}
\begin{thm}{\greektext Stokes}{stokes}
Let $D$ be a regular domain in an oriented $n$-dimensional manifold $M$,
and let $\omega$ be a smooth $(n-1)$ form of compact support. Then
$\int_D d\omega = \int_{\partial D} \omega.$ \greektext Και δηλαδή τι άλλα;
\end{thm}

\begin{prop}{}{}
sdfasdasdasd
\end{prop}

\end{document}

• Comment theorem style=change apart, to swap theorem and number. – Sigur Oct 20 '18 at 16:21
• @Sigur Thank you for your comment. Any ideas for the consecutive numbering? – Chris Oct 20 '18 at 16:22
• I never used this package, but I think the key point is the number within, which looks right to me. Strange. Lets wait some experienced user. – Sigur Oct 20 '18 at 16:31
• Nobody? :( :( :( – Chris Oct 21 '18 at 18:52

To have the consecutive numbering, use the option use counter from={...}.

To have definitions not inside boxes, you could create a non-box with tcolorbox.

As Sigur wrote in his/her comment, to write "theorem 1.0.1" instead of "1.0.1 theorem" just leave out theorem style=change apart.

You can easily find all this option in the very well done tcolorbox package manual.

\documentclass[10pt,a4paper]{book}
\usepackage[english,greek]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}

\renewcommand{\rmdefault}{udidot}

\newtcbtheorem[number within=section]{thm}{\greektext Θεώρημα}{
%  theorem style=change apart,
enhanced jigsaw,% <--- jigsaw
sharp corners,
boxrule=0pt,
toprule=1pt,
bottomrule=1pt,
left=0.2cm,right=0.2cm,top=0.2cm,
titlerule=0.5em,
toptitle=0.1cm,
bottomtitle=-0.1cm,
colframe=white!25!black,colback=white,coltitle=white,
%title style={white!25!black},   & <---- remove
fonttitle=\bfseries,fontupper=\normalsize}{thm}

\newtcbtheorem[number within=section,use counter from=thm]{prop}{\greektext Πρόταση}{
% theorem style=change apart,
enhanced jigsaw,% <--- jigsaw
sharp corners,
boxrule=0pt,
toprule=1pt,bottomrule=1pt,
left=0.2cm,right=0.2cm,top=0.2cm,
titlerule=0.5em,
toptitle=0.1cm,
bottomtitle=-0.1cm,
colframe=white!25!black,colback=white,coltitle=white,
%title style={white!25!black},   & <---- remove
fonttitle=\bfseries,fontupper=\normalsize}{prop}

\newtcbtheorem[number within=section,use counter from=thm]{defin}{Definition}{
boxrule=0pt,
boxsep=0pt,
left=0pt,right=0pt,
titlerule=0pt,
colframe=white,
coltitle=black,
colbacktitle=white,
colback=white,
fonttitle=\bfseries,fontupper=\normalsize}{defin}

\begin{document}
\selectlanguage{english}
\chapter{Hi}
\begin{thm}{\greektext Stokes}{stokes}
Let $D$ be a regular domain in an oriented $n$-dimensional manifold $M$,
and let $\omega$ be a smooth $(n-1)$ form of compact support. Then
$\int_D d\omega = \int_{\partial D} \omega.$ \greektext Και δηλαδή τι άλλα;
\end{thm}

\begin{prop}{}{}
sdfasdasdasd
\end{prop}

\begin{defin}{}{}
The definition is not boxed
\end{defin}
\end{document}