von hotspot2000 » Sa 19. Nov 2011, 15:37
Hallo!
Bei mir muss im Anhangsverzeichnis "Anhang 1: Überschrift 1" stehen...
Das funktioniert im Prinzip auch, nur werden im Anhangsverzeichnis die Überschriften doppelt überlagert (was ziemlich bescheiden aussieht).
Als Dokumentklasse verwende ich scrartcl.
Minimal beispiel:
....
\documentclass[a4paper,12pt]{scrartcl}
\usepackage[left=3cm,right=2cm,top=2cm,bottom=2cm,includehead]{geometry}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{makeidx}
\usepackage[intoc]{nomencl}
\usepackage[automark]{scrpage2}
\usepackage{fancyhdr}
\usepackage[hyperfootnotes=false]{hyperref}
\usepackage[labelfont=bf,aboveskip=1mm]{caption}
\usepackage{setspace}
\usepackage[bottom,multiple,hang,marginal]{footmisc}
\usepackage{longtable}
\usepackage{colortbl}
\usepackage{color}
\usepackage{enumitem}
\usepackage{listings}
\usepackage{zref}
\usepackage{tocloft}
\usepackage{amsmath}
\usepackage{acronym}
\usepackage{chngcntr}
\usepackage{array}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{chngcntr}
\usepackage{pdfpages}
\usepackage{eurosym}
\usepackage[style=dhbw-style,
citestyle=dhbw-style,
isbn=false,
url=false,
defernums=false]{biblatex}
\bibliography{sources}
\makeatletter
\newcommand*{\maintoc}{
\begingroup
\@fileswfalse
\renewcommand*{\appendixattoc}{
\value{tocdepth}=-10000
}
\tableofcontents
\endgroup
}
\newcommand*{\appendixtoc}{
\begingroup
\edef\@alltocdepth{\the\value{tocdepth}}
\setcounter{tocdepth}{-10000}
\renewcommand*{\contentsname}{
Anhangsverzeichnis}
\renewcommand*{\appendixattoc}{
\setcounter{tocdepth}{\@alltocdepth}
}
\tableofcontents
\setcounter{tocdepth}{\@alltocdepth}
\endgroup
}
\g@addto@macro\appendix{
\renewcommand{\thesection}{Anhang \protect\arabic{section}:}
\addcontentsline{toc}{section}{\appendixname}
\addtocontents{toc}{\protect\appendixattoc}
}
\makeatother
\begin{document}
\clearpage
\section*{Anhang}
\appendix
\appendixtoc
\end{document}
Bitte um Hilfe! Ist dringend!
Grüße
Hallo!
Bei mir muss im Anhangsverzeichnis "Anhang 1: Überschrift 1" stehen...
Das funktioniert im Prinzip auch, nur werden im Anhangsverzeichnis die Überschriften doppelt überlagert (was ziemlich bescheiden aussieht).
Als Dokumentklasse verwende ich scrartcl.
Minimal beispiel:
[code]
....
\documentclass[a4paper,12pt]{scrartcl}
\usepackage[left=3cm,right=2cm,top=2cm,bottom=2cm,includehead]{geometry}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{makeidx}
\usepackage[intoc]{nomencl}
\usepackage[automark]{scrpage2}
\usepackage{fancyhdr}
\usepackage[hyperfootnotes=false]{hyperref}
\usepackage[labelfont=bf,aboveskip=1mm]{caption}
\usepackage{setspace}
\usepackage[bottom,multiple,hang,marginal]{footmisc}
\usepackage{longtable}
\usepackage{colortbl}
\usepackage{color}
\usepackage{enumitem}
\usepackage{listings}
\usepackage{zref}
\usepackage{tocloft}
\usepackage{amsmath}
\usepackage{acronym}
\usepackage{chngcntr}
\usepackage{array}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{chngcntr}
\usepackage{pdfpages}
\usepackage{eurosym}
\usepackage[style=dhbw-style,
citestyle=dhbw-style,
isbn=false,
url=false,
defernums=false]{biblatex}
\bibliography{sources}
\makeatletter
\newcommand*{\maintoc}{
\begingroup
\@fileswfalse
\renewcommand*{\appendixattoc}{
\value{tocdepth}=-10000
}
\tableofcontents
\endgroup
}
\newcommand*{\appendixtoc}{
\begingroup
\edef\@alltocdepth{\the\value{tocdepth}}
\setcounter{tocdepth}{-10000}
\renewcommand*{\contentsname}{
Anhangsverzeichnis}
\renewcommand*{\appendixattoc}{
\setcounter{tocdepth}{\@alltocdepth}
}
\tableofcontents
\setcounter{tocdepth}{\@alltocdepth}
\endgroup
}
\g@addto@macro\appendix{
\renewcommand{\thesection}{Anhang \protect\arabic{section}:}
\addcontentsline{toc}{section}{\appendixname}
\addtocontents{toc}{\protect\appendixattoc}
}
\makeatother
\begin{document}
\clearpage
\section*{Anhang}
\appendix
\appendixtoc
\end{document}
[/code]
Bitte um Hilfe! Ist dringend! ;-)
Grüße