2

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}
  \pagestyle{headings}
  \def\eop{\hfill$\square$}
  \begin{document}

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

Thank you so much.

2 Answers 2

4

try

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

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

0
0

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

\newcommand{\secstar}[1]{ 
\thispagestyle{fancy}\clearpage\phantomsection\vspace*0pt}\addcontentsline{toc}{section}{#1}
\centerline{\bf\lsstyle }
\centerline{\huge \lsstyle \color{cyan} #1}
\vspace*{35pt}
} 

and then

\subsecstar{Anhang}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .