I have the following code:
\documentclass[a4paper,12pt]{article}
\renewcommand{\proofname}{\textbf{Beweis}}
\newtheorem{Satz}{Satz}[section]
\newtheorem{code}[Satz]{MATLAB-Code}
\begin{document}
\section*{Anhang}
\renewcommand\thesection{\hspace{-1em}}
\sectionmark{Anhang}
\addcontentsline{toc}{section}{Anhang}
\begin{code}
...
\end{code}
\end{document}
The problem is that the number of the code overlaps with the word MATLAB-Code in the appendix (Anhang). I guess it has something to do that there is no section number for the appendix. How can I fix that? If I write
\newtheorem{code}{MATLAB-Code}
then the number of the newtheorem and the word MATLAB-Code don't overlap, but then the codes get numberes from 1 on instead of using the section number. Thanks a lot!!!
[Satz]
from the above code makes it compilable, but also does not show any problem with overlapping numbers. – Andrew Swann Nov 27 '13 at 13:44Satz
, and possibly theorem related packages you are loading... – Andrew Swann Nov 27 '13 at 13:50