I would like to get
- the page number of the first page of the current chapter
- the page number of the first page of the current section
Is it possible?
The goal is to add the chapter/section to a secondary toc, but currectly I get the actual page instead of the page number of the first page of the current chapter
\addcontentsline{todo}{section}%
{\protect\numberline{\thesection}{\Sectionname}}%
EDIT I will not maintain the labels for chapter and section.
Further, the whole thing has to be automatic, that is the program does not know if it has to use the label sec:function or sec:relation; and I do not want to define label of the form sec:1:3.
EDIT 2 One way would be to modify the chapter command in order to save the page number in a variable (I do not know how!), but perhaps there is a more clean way.
