A journal, which I intend to submit to, asks that section headings are preceded with <heading number ...>
. So I used this answer to create my custom prefix to the section headings:
\renewcommand\thesection{\textless heading level 1\textgreater \ \arabic{section}}
\renewcommand\thesubsection{\textless heading level 2\textgreater \ \arabic{section}.\arabic{subsection}}
\renewcommand\thesubsubsection{\textless heading level 3\textgreater \ \arabic{section}.\arabic{subsection}.\arabic{subsubsection}}
This works very well for the headers, but when I \cite{ch:foo}
the reference appears as "<heading level 2> 2.3", which I would like to avoid. The second answer on the question gives an alternative solution, which seems to me (as a Latex rookie) more of a hack:
\makeatletter
\def\section{\@startsection{section}{1}{\z@ }%
{-3.5ex\@plus -1ex\@minus -.2ex}{2.3ex \@plus .2ex}%
{\noindent\normalfont \Large \bfseries Prefix\ }%
}
\makeatother
Can you propose a better way?