I am preparing a lecture note using the \documentclass
lecture. In this document, I have few un-numbered sections (referring them throughout as Unit) which I want to show in the table of contents and the page number of these sections are not-numbered (using \pagenumbering{gobble}
). The MWE is as follows:
\documentclass[english,course]{lecture}
\usepackage{blindtext}
\usepackage{enumitem}
\usepackage{lipsum} % Only needed to generate dummy text for sample.tex
%
% First, provide some data about this document
\title{Main title of the lecture}
\subtitle{Subtitle of the lecture}
\shorttitle{Shortened title} % For headers; if undefined, the usual title will be used
\ccode{Code 7.45} % Most of these data are not compulsory
\subject{Subject of the Talk}
\author{Author's name}
% \date{02}{11}{2134}
% \dateend{07}{11}{2134}
\conference{Lecture hall 7}
\place{University of Physics}
\morelink{vhbelvadi.com}
\clearpage
%
% And then begin your document
\begin{document}
\setcounter{page}{1}
\pagenumbering{roman} %roemische ziffern
\thispagestyle{empty}
% \tableofcontents
\clearpage
%-----------------------------
\setcounter{page}{1}
\pagenumbering{arabic}
%==========================================
\phantomsection
\pagenumbering{gobble} %
\section*{\textbf{UNIT $-$ I : Laws of Thermodynamics}}
\thispagestyle{fancy}
\label{sec:unitone}
\addcontentsline{toc}{section}{\textbf{UNIT $-$ I : Laws of Thermodynamics}\nameref{sec:unitone}}
%
%
\section*{Syllabus}
\begin{itemize}[itemsep=1.0\baselineskip]
\item[$\bullet$] Thermodynamic Description of system: Zeroth Law of thermodynamics and temperature. First law and internal energy, conversion of heat into work, various thermodynamical processes, Applications of First Law: General Relation between $C_p$ \& $C_v$, Work Done during
Isothermal and Adiabatic Processes, Compressibility \& Expansion Coefficient, Reversible \& irreversible processes, Second law \& Entropy, Carnot’s cycle \& theorem, Entropy changes in reversible \& irreversible processes, Entropy temperature diagrams, Third law of thermodynamics, unattainability of absolute zero.
\end{itemize}
\clearpage
% %--------------------------------------------------
\pagenumbering{arabic}
% %--------------------------------------------------
\section{Introduction}
\blindtext[15]
%
\section{Carnot's cycle}
\blindtext[15]
%
\clearpage
%
% =====================
\phantomsection
\pagenumbering{gobble}
\thispagestyle{fancy}
\section*{\textbf{UNIT $-$ II : Thermodynamic Potentials}}
\label{sec:unittwo}
\addcontentsline{toc}{section}{\textbf{UNIT $-$ II : Thermodynamic Potentials}\nameref{sec:unittwo}}
%
%
\section*{Syllabus}
\begin{itemize}[itemsep=1.0\baselineskip]
\item[$\bullet$] Thermodynamic Potentials: Enthalpy, Gibbs, Helmholtz and Internal Energy functions, Maxwell’s relations \& applications Joule Thompson Effect, Clausius Clapeyron Equation, Expression for ($C_p$,$C_v$ ), $C_p/C_v$, $T\,dS$ equations.
\end{itemize}
\clearpage
% %--------------------------------------------------
\pagenumbering{arabic} %
\setcounter{section}{0} % section numbers to restart for a new unit
\addtocounter{page}{6} % last page number is 6;;
% %--------------------------------------------------
\section{Thermodynamic Potentials} % % section number restarts
\blindtext[15]
\vskip7ex
\centering
* * *
%
\end{document}%
Every Unit has got few numbered sections which are shown in ToC
with page numbers. These numbered sections restart from 1
after the start of a new Unit. The problem(s) I am having are as follows:
The
hyperref
does not work correctly when the section counter is restarted from 1. The answer to a similar issue did not solve my problem.The page numbering is not continuous once
\pagenumbering{gobble}
is used. Before the start of numbered section, I have used\pagenumbering{arabic}
but that restarts the page numbers. One solution I found is to add\addtocounter{page}{last page number}
manually at the beginning of a new numbered section. Is there a better solution than this?
Please help and provide suggestions.