A guy had a problem personalizing his ToC, and you helped him suggesting to use this lines:
\newcommand{\mychapter}[2]{
\setcounter{chapter}{#1}
\setcounter{section}{0}
\chapter*{#2}
\addcontentsline{toc}{chapter}{#2}
}
Could you explain me
Why do you write
[2]next to\mychapter?Why do you use the hashtag for numerating?
What is the function of
\addcontentline?
I hope no to bother you too much, I am just a new young user trying to understand the software.