How could I print the current page (of the section) and the total pages of a section, in the footer? Suppose the footer of page 20 reads
page 3 of 6 in section 5 (20)
because page 20 is the third page of section 5, which consists of 6 pages. @JamesT This is the minimum example I could do
\usepackage[spanish, es-noshorthands]{babel}
\usepackage[pdftex]{graphicx}
\usepackage{lastpage}
\usepackage{kantlipsum} % get some text
\usepackage{fancyhdr}
\pagestyle{fancy}
\newcounter{dummy}
\newcommand{\secpages}{\pageref{first}}
\newcommand{\resetpagecounts}{%
\refstepcounter{dummy}\label{first}% store page number
\clearpage
\let\secpages=\numpages
\setcounter{page}{1}}
\cfoot{\thepage\ of *TotalOfSection* en Actividad \thesection \rule[1mm]{1cm}{1pt} *current page* (*Total pages*)}
\begin{document}
\section{Actividad}
\kant[1-5]
\resetpagecounts
\section{Actividad}
\kant[1-10]
\resetpagecounts
\section{Actividad}
\kant[1-15]
\end{document}
fancyhdr
etc?