[Tex/LaTex] setting section number, etc with counter

numberingtheorems

Originally, I have these types of numbering:

\newtheorem{theorem}{Theorem}[section]
\newtheorem{definition}[theorem]{Definition}
\newtheorem{lemma}[theorem]{Lemma} 
\newtheorem{proposition}[theorem]{Proposition} 
\newtheorem{corollary}[theorem]{Corollary} 
\newtheorem{example}[theorem]{Example}

\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{section}}

Now because of the box theorem function, I modified them to below:

\newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,titleboxcolor = black]{theorem}{Theorem}{mycounter}
\newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,titleboxcolor = black]{definition}{theorem}{mycounter}
\newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,titleboxcolor = black]{lemma}{theorem}{mycounter}
\newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,titleboxcolor = black]{proposition}{theorem}{mycounter}
\newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,titleboxcolor = black]{corollary}{theorem}{mycounter}
\newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,titleboxcolor = black]{example}{theorem}{mycounter}

\renewcommand{\themycounter}{\arabic{section}.\arabic{mycounter}}

\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{section}}

My numbering system is now messed up.

For example:
Hope I am right in explaining like this: Originally, before I add in the function that will "box theorem" I have the following numbering system: Chapter I, Section 1, Theorem 1 will be identified as Theorem 1.1. If you use eqnarray then it will be listed as I.1.1. For subsection, there is no effect, the theorem number will just move on like Theorem 1.2, Theorem 1.3 and so forth but once I have new section, the cycle will restart, in other words Theorem 2.1, Theorem 2.2, etc and when using eqnarray, I will have I.2.1, I.2.2
Now in the second chapter, the theorem will be II.1.1 for Chapter 2, Section 1, Theorem 1, and so forth.

But now after I add in the "box theorem" function, my numbering messed up in other words the theorem just move on like. 1.1, 1.2, 1.3 then 2.4, 2.5, 2.6 rather than 2.1, 2.2, 2.3.

ORIGINAL HEADER

\documentclass[11pt,a4paper,twoside]{report}
\usepackage{t1enc,mathrsfs,latexsym,amsmath,amsxtra,amsthm,amssymb,makeidx,graphics}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
%\usepackage{arabtex}
%\pagestyle{plain}
\usepackage{graphicx}
\usepackage{color, fontenc, titlesec,amsfonts}

MODIFIED HEADER

\documentclass[11pt,a4paper,twoside]{report}
\usepackage{t1enc,mathrsfs,latexsym,amsmath,amsxtra,amsthm,amssymb,makeidx,graphics}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
%\usepackage{arabtex}
%\pagestyle{plain}
\usepackage{graphicx}
\usepackage{color, fontenc, titlesec,amsfonts,boiboites}

Best Answer

A shot in the dark

I asked Google about the comment \newboxedtheorem and found the following page:

Nice boxes for your theorems with LaTeX using tikz

There the unsupported package boiboites can be found. The code is very transparent and you can see that the command \newboxedtheorem doesn't support the manipulation of counters like \netheorem. You can set only one counter. The default usage is:

\newboxedtheorem{defi}{Definition}{thCounter}

So your code fails

\newboxedtheorem[]{example}{theorem}{mycounter}

because you have to many arguments.

To allow the possibility of \newtheorem you have to change the code of boiboites.sty.


As discussed in the chat the package has no license information and must be classified as non-free. So you can download the code and use but I don't know whether we can manipulate this code here.