# How can I get rid of the numbering of one section in the header?

My last chapter is called "Anhang" and I wrote in LaTeX \section*{Anhang}. Then it doesn't have a numbering but for the heading I get 5.Anhang. How can I get rid of the 5. (the number is from the section before)?

  \documentclass[a4paper,12pt]{article}
\def\eop{\hfill$\square$}
\begin{document}

\section*{Anhang}
\sectionmark{Anhang}
\end{document}


Thank you so much.

try

\section*{Anhang}
\renewcommand\thesection{\hspace{-1em}}
\sectionmark{Anhang}


However, using package fancyhdr and also the command \appendix makes more sense.

I always use a custom \secstar because the changes can be done easily (like color, size, position etc.) see below

\newcommand{\secstar}[1]{

\subsecstar{Anhang}