diff --git a/lvspec.cls b/lvspec.cls index ab29c2a..07fe552 100644 --- a/lvspec.cls +++ b/lvspec.cls @@ -305,11 +305,16 @@ % override chapter/section macros (it is important not to do this until we are % sure that nothing with use \chapter, as that formally does not accept an % argument...we treat it as though it does in order to make life easier) +\def\@hgcommon{% + \pnumrest + \phantomsection + \sinit +} \def\@hgrab{ - \gdef\chapter##1{\pnumoff\@chapterorig{##1}\pnumrest\sinit} - \gdef\section##1{\pnumoff\@sectionorig{##1}\pnumrest\sinit\smarkright{##1}} - \gdef\subsection##1{\pnumoff\@subsectionorig{##1}\pnumrest\sinit\smarkright{##1}} - \gdef\subsubsection##1{\pnumoff\@subsubsectionorig{##1}\pnumrest\sinit} + \gdef\chapter##1{\pnumoff\@chapterorig{##1}\@hgcommon} + \gdef\section##1{\pnumoff\@sectionorig{##1}\@hgcommon\smarkright{##1}} + \gdef\subsection##1{\pnumoff\@subsectionorig{##1}\@hgcommon\smarkright{##1}} + \gdef\subsubsection##1{\pnumoff\@subsubsectionorig{##1}\@hgcommon} \gdef\footnote##1{\pnumoff\@footnoteorig{##1}\pnumrest} \gdef\footnotetext##1{\pnumoff\@footnotetextorig{##1}\pnumrest} }