I would like to create a newcounter (lectcount
) which will be one level above the "section" in article class, and use its name in the headings (I am using fancyhdr
).
I don't know how to set the hierarchy level above section, and also I don't know how to refer to its name in order to write it in the page headings.
I have come out with the following code. The end of \lecture
definition was supposed to capture the lecture's name argument, which doesn't work. Any help will be appreciated.
\newcounter{lectcount}
\newcommand{\lecture}[1]{\refstepcounter{lectcount}%
\noindent\textbf{\LARGE Lecture \thelectcount: #1}\par\bigskip%
\let\lectname\#1}
\fancyhead[L]{Lecture \thelectcount: \lectname}
\begin{document}
\lecture{My First Lecture}
...
\end{document}
\renewcommand{\chaptername}{Lecture}
into your preamble.