Inhalt, Abbildungen, Tabellen, Quellcodes und andere Verzeichnisse
Dave Miller
Forum-Century
Beiträge: 102 Registriert: Fr 19. Jun 2015, 19:18
Beitrag
von Dave Miller » Mi 12. Aug 2015, 15:21
Hi,
da ich langsam selber nicht mehr durch mein Code steige. An euch die Frage:
Wie bekomme ich den Eintrag Inhaltsverzeichnis wieder ins Inhaltsverzeichnis?
Ich würde euch ja gerne ein Minimalbeispiel liefern, aber wie gesagt ich steige selber langsam nicht mehr durch.
%Dokumentklasse
\documentclass[a4paper,12pt,
toc=chapterentrywithdots,
listof=entryprefix,
headsepline,
plainheadsepline,
headings=normal,
captions=tableabove,
captions=nooneline]
{scrreprt}
% ============= Packages =============
\usepackage[ngerman]{babel} %Sprache
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{img/}}
\usepackage[scaled=0.92]{helvet}
\usepackage{setspace}
\usepackage{scrhack}
\usepackage{tgheros}
\usepackage{tabularx}
\usepackage{xpatch}
\usepackage{colortbl}
%\usepackage{tocloft}
\usepackage{scrbase}
\usepackage[justification=RaggedRight, singlelinecheck=false]{caption}
\usepackage{lipsum}
\usepackage{float}
\usepackage{booktabs}
\addtokomafont{caption}{\bfseries\small}
\addtokomafont{captionlabel}{\bfseries\small}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[automark]{scrlayer-scrpage}
\usepackage{acronym} %Abkürzungen
\setlength{\parindent}{0pt} %Einrücken von Absätzen
\setlength{\parskip}{6pt} %Absatzabstand
\usepackage{chngcntr} %Counter (durchgängige Nummerierung)
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\usepackage{scrhack}
\KOMAoption{listof}{entryprefix}
\AfterTOCHead[lof]{\renewcommand*\autodot{:}} % : nach lof (figures)
\AfterTOCHead[lot]{\renewcommand*\autodot{:}} % : nach lot (tables)
\RedeclareSectionCommand[%
beforeskip=18pt,
afterskip=18pt
]{chapter}
\RedeclareSectionCommand[%
beforeskip=18pt,
afterskip=14pt
]{section}
\RedeclareSectionCommand[%
beforeskip=18pt,
afterskip=10pt
]{subsection}
\renewcommand{\chaptermarkformat}{}
\geometry{paper=a4paper,left=35mm,right=25mm,top=30mm,bottom=25mm}
\clearpairofpagestyles
\ihead*{\headmark}
\ohead*{\pagemark}
\usepackage{xcolor}
\usepackage[automark]{scrlayer-scrpage}
\addtokomafont{pagehead}{\upshape\color{gray!100}\footnotesize}
\addtokomafont{pagenumber}{\upshape\color{gray!100}\footnotesize}
\clearpairofpagestyles
\ihead*{\headmark}
\ohead*{\pagemark}
\captionsetup[figure]{labelfont=bf,labelfont=bf} %
\newcommand{\figuresource}[1]{{
\parbox{\linewidth}{Quelle:~#1}}}
\renewcommand{\figuresource}[1]{\begingroup\captionsetup{font=small,aboveskip=0.4\baselineskip}\caption*{Quelle:~#1}\endgroup}
\addtokomafont{caption}{\bfseries}
\newcommand{\tableemph}[1]{\textbf{#1}}
% ============= Dokumentbeginn =============
\begin{document}
%======================================================================
%INHALTSVERZEICHNIS
%======================================================================
\newpage
\setcounter{page}{3} % Setzt die Seitenzahl hoch auf III.
\tableofcontents
%======================================================================
%ABBILDUNGSVERZEICHNIS
%======================================================================
\newpage
\addcontentsline{toc}{chapter}{\listfigurename}
\addtocontents{toc}{\protect\vspace{-0.2cm}}
\listoffigures
%======================================================================
%TABELLENVERZEICHNIS
%======================================================================
\newpage
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables
\end{document}
Danke
Dave Miller
Forum-Century
Beiträge: 102 Registriert: Fr 19. Jun 2015, 19:18
Beitrag
von Dave Miller » Mi 12. Aug 2015, 15:41
Funktioniert:
\setuptoc{toc}{totoc}
Funktioniert nicht:
\setuptoc{toc}{totoc}{\protect\vspace{-0.2cm}
Bei den anderen geht es so:
\addcontentsline{toc}{chapter}{\listfigurename}
\addtocontents{toc}{\protect\vspace{-0.2cm}}
\listoffigures
Hab ich was übersehen?
Johannes_B
Moderator
Beiträge: 5079 Registriert: Do 1. Nov 2012, 14:55
Kontaktdaten:
Beitrag
von Johannes_B » Mi 12. Aug 2015, 16:30
\documentclass[
toc=chapterentrywithdots,
listof=entryprefix,
listof=totoc,
parskip=half,%<<<<<<<<
]{scrreprt}
%\usepackage{scrbase}%??
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\AfterTOCHead[lof]{\renewcommand*\autodot{:}}
\AfterTOCHead[lot]{\renewcommand*\autodot{:}}
\usepackage{pgffor}
\setuptoc{toc}{totoc}
\begin{document}
\tableofcontents
\listoffigures
\listoftables
\foreach \x in {1,...,10} {\chapter{\x}
\foreach \y in {1,...,5} {\captionof{figure}{\y}\captionof{table}{\y}}
}
\end{document}
TeXwelt - Fragen und Antworten Schaut vorbei und stellt Fragen.
LaTeX-Vorlagen ?
Der Weg zum Ziel: Ruhe bewahren und durchatmen, Beiträge und unterstützende Links aufmerksam lesen, Lösungsansätze verstehen und ggf. nachfragen.
Besserwisser
Beitrag
von Besserwisser » Mi 12. Aug 2015, 17:18
Johannes hat dir gezeigt, wie man \setuptoc richtig einsetzt, wie man die Gleitumgebungsverzeichnisse per Option ins Inhaltsverzeichnis bekommt, wie man den Code etwas entrümpelt, indem man Optionen nicht über die ganze Präambel verteilt … und schlussendlich, wie man ein Beispiel mit prima Mitteln minimieren kann.
Die Sache mit \setuptoc und den Optionen kannst du übrigens einfach mal in der
KOMA-Script-Anleitung oder im
KOMA-Script-Buch (beide haben dafür passende Indexe) zusätzlich nachlesen. Wenn dann noch immer Fragen bleiben, dann stell sie ordentlich.
Dave Miller
Forum-Century
Beiträge: 102 Registriert: Fr 19. Jun 2015, 19:18
Beitrag
von Dave Miller » Mi 12. Aug 2015, 19:06
Ich würde mich wirklich liebend gerne damit auseinandersetzen. Aber ich muss gestehen ich habe momentan keine Zeit dafür
Könntet ihr mir das vielleicht ausnahmsweise hier einbinden?
Ich wäre Euch sehr dankbar!
%Dokumentklasse
\documentclass[a4paper,12pt,
toc=chapterentrywithdots,
listof=entryprefix,
headsepline,
plainheadsepline,
headings=normal,
captions=tableabove,
captions=nooneline]
{scrreprt}
% ============= Packages =============
\usepackage[ngerman]{babel} %Sprache
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{img/}}
\usepackage[scaled=0.92]{helvet}
\usepackage{setspace}
\usepackage{scrhack}
\usepackage{tgheros}
\usepackage{tabularx}
\usepackage{calc}
\usepackage{xpatch}
\usepackage{colortbl}
%\usepackage{tocloft}
\usepackage{scrbase}
\usepackage[justification=RaggedRight, singlelinecheck=false]{caption}
\usepackage{lipsum}
\usepackage{float}
\usepackage{booktabs}
\addtokomafont{caption}{\bfseries\small}
\addtokomafont{captionlabel}{\bfseries\small}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[automark]{scrlayer-scrpage}
\usepackage{acronym} %Abkürzungen
\setlength{\parindent}{0pt} %Einrücken von Absätzen
\setlength{\parskip}{6pt} %Absatzabstand
\usepackage{chngcntr} %Counter (durchgängige Nummerierung)
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\usepackage{scrhack}
\KOMAoption{listof}{entryprefix}
\AfterTOCHead[lof]{\renewcommand*\autodot{:}} % : nach lof (figures)
\AfterTOCHead[lot]{\renewcommand*\autodot{:}} % : nach lot (tables)
\RedeclareSectionCommand[%
beforeskip=18pt,
afterskip=18pt
]{chapter}
\RedeclareSectionCommand[%
beforeskip=18pt,
afterskip=14pt
]{section}
\RedeclareSectionCommand[%
beforeskip=18pt,
afterskip=10pt
]{subsection}
% ============= Quellenverzeichnis =============
\usepackage[autocite=footnote,style=authortitle,alldates=short]{biblatex}
\ExecuteBibliographyOptions{dashed=false}
\renewcommand*{\finentrypunct}{\addspace} %entfernt Punkt am Ende des Lit.Verz.
\renewcommand{\labelnamepunct}{\addspace} %entfernt ":" bzw. "," Lit.Verz.
\DeclareFieldFormat{title}{#1} %titel nicht kursiv (standard) fußnote
\DeclareFieldFormat*{citetitle}{#1} %titel nicht kursiv (standard)
%\renewcommand*{\labelnamepunct}{\addcolon\addspace} % ":" nach letztem namen
\renewcommand{\bibfootnotewrapper}[1]{% entfernt punkt nach fußnote
\bibsentence#1}
\renewbibmacro*{prenote}{%
\iffieldundef{prenote}
{\printtext{Vgl.}%
\setunit{\prenotedelim}}
{\iffieldequalstr{prenote}{XX} %\footcite[xx]{key}
{}
{\printfield{prenote}%
\setunit{\prenotedelim}}}}
\setlength{\bibitemsep}{2\itemsep}
\renewbibmacro*{prenote:nocf}{%
\iffieldundef{prenote}
{}
{\printfield{prenote}%
\setunit{\prenotedelim}}}
\DeclareCiteCommand{\cite}
{\usebibmacro{prenote:nocf}}
{\usebibmacro{citeindex}%
\usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{postnote}}
\addbibresource{MeineLiteratur.bib}
\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand*{\labelnamepunct}{\addspace}
\renewcommand*{\nametitledelim}{\addcolon\space}
\renewcommand*{\finentrypunct}{\addspace}
\setlength{\bibhang}{1,25cm}
\DeclareNameAlias{sortname}{last-first}
% Reihenfolge ändern und Standardtrenner
\renewbibmacro*{publisher+location+date}{%
\printlist{publisher}%
\newunit
\printlist{location}%
\newunit
\usebibmacro{date}%
\newunit}
% Kurztitel (shorttitle) hinzufügen
\renewbibmacro*{title}{%
\ifboolexpr{
test {\iffieldundef{title}}
and
test {\iffieldundef{subtitle}}
}
{}
{\printfield[brackets]{shorttitle}%
\setunit{\addspace}%
\ifentrytype{online}
{\printtext[brackets]{%
\printfield[titlecase]{title}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}}
{\printtext[title]{%
\printfield[titlecase]{title}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}}%
\newunit}%
\printfield{titleaddon}}
\urlstyle{same}
\DeclareFieldFormat[online]{url}{\url{#1}}
\DeclareFieldFormat{urldate}{Abrufdatum\addcolon\space#1}
\xpatchbibdriver{online}
{\usebibmacro{date}}
{}
{}{}
\newbibmacro*{url+urldate}{%
\setunit{\addspace}%
\usebibmacro{url}%
\ifentrytype{online}
{\setunit{\addcomma\space}%
\printtext{Stand\addcolon\addspace}%
\usebibmacro{date}}
{}
\iffieldundef{urlyear}
{}
{\setunit*{\addcomma\space}%
\usebibmacro{urldate}}}
% Jahr hinzufügen
\renewbibmacro*{cite}{%
\iffieldundef{shorthand}
{\ifnameundef{labelname}
{}
{\printnames{labelname}%
\setunit{\nametitledelim}}%
\usebibmacro{cite:title}%
\newunit
\printfield{year}}%
{\usebibmacro{cite:shorthand}}}
\renewcommand{\chaptermarkformat}{}
\geometry{paper=a4paper,left=35mm,right=25mm,top=30mm,bottom=25mm}
\clearpairofpagestyles
\ihead*{\headmark}
\ohead*{\pagemark}
\usepackage{xcolor}
\usepackage[automark]{scrlayer-scrpage}
\addtokomafont{pagehead}{\upshape\color{gray!100}\footnotesize}
\addtokomafont{pagenumber}{\upshape\color{gray!100}\footnotesize}
\clearpairofpagestyles
\ihead*{\headmark}
\ohead*{\pagemark}
\captionsetup[figure]{labelfont=bf,labelfont=bf} %
\newcommand{\figuresource}[1]{\begingroup\captionsetup{font=small,aboveskip=0.4\baselineskip}\caption*{Quelle:~\parbox[tt]{\linewidth-\widthof{Quelle:~}}{#1}}\endgroup}
%\renewcommand{\thefigure}{\arabic{figure}}
%\renewcommand{\thetable}{\arabic{table}}
%\renewcommand{\cfttabpresnum}{{Tabelle} }
%\renewcommand{\cftfigpresnum}{{Abbildung} }
%\renewcommand{\cftfigaftersnum}{{:}}
%\renewcommand{\cfttabaftersnum}{{:}}
%\setlength{\cftfignumwidth}{2,5cm}
%\setlength{\cfttabnumwidth}{2,0cm}
%\setlength{\cftfigindent}{0cm}
%\setlength{\cfttabindent}{0cm}
\addtokomafont{caption}{\bfseries}
\newcommand{\tableemph}[1]{\textbf{#1}}
%\renewcommand*{\chapterheadstartvskip}{\vspace*{.5\baselineskip}}%
%\RedeclareSectionCommand[beforeskip=.5\baselineskip]{chapter}
%============Zeilenabstand===========
\makeatletter
\newcommand{\MSonehalfspacing}{%
\setstretch{1.44}% default
\ifcase \@ptsize \relax % 10pt
\setstretch {1.448}%
\or % 11pt
\setstretch {1.399}%
\or % 12pt
\setstretch {1.433}%
\fi
}
\newcommand{\MSdoublespacing}{%
\setstretch {1.92}% default
\ifcase \@ptsize \relax % 10pt
\setstretch {1.936}%
\or % 11pt
\setstretch {1.866}%
\or % 12pt
\setstretch {1.902}%
\fi
}
\MSonehalfspacing
\makeatother
\setuptoc{toc}{totoc}{\protect\vspace{-0.2cm}
% ============= Dokumentbeginn =============
\begin{document}
%======================================================================
%INHALTSVERZEICHNIS
%======================================================================
\newpage
\setcounter{page}{3} % Setzt die Seitenzahl hoch auf III.
\tableofcontents
%======================================================================
%ABBILDUNGSVERZEICHNIS
%======================================================================
\newpage
\addcontentsline{toc}{chapter}{\listfigurename}
\addtocontents{toc}{\protect\vspace{-0.2cm}}
\listoffigures
%======================================================================
%TABELLENVERZEICHNIS
%======================================================================
\newpage
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables
%======================================================================
%ABKÜRZUNGSVERZEICHNIS
%======================================================================
\newpage
\addtocontents{toc}{\protect\vspace{-0.2cm}}
\addchap{Abkürzungsverzeichnis}
\begin{acronym}[Bash]
\acro{MSN}{}
\acro{ACM}{}
\acro{Bash}{Bourne-again shell}
\acro{JDK}{Java Development Kit}
\acro{VM}{Virtuelle Maschine}
\end{acronym}
\begin{document}
Johannes_B
Moderator
Beiträge: 5079 Registriert: Do 1. Nov 2012, 14:55
Kontaktdaten:
Beitrag
von Johannes_B » Mi 12. Aug 2015, 19:19
Ich habe ehrlich gesagt den Überblick verloren, wo das Problem liegt. Es gibt einen Eintrag des Inhaltsverzeichnisses in selbiges.
TeXwelt - Fragen und Antworten Schaut vorbei und stellt Fragen.
LaTeX-Vorlagen ?
Der Weg zum Ziel: Ruhe bewahren und durchatmen, Beiträge und unterstützende Links aufmerksam lesen, Lösungsansätze verstehen und ggf. nachfragen.
Dave Miller
Forum-Century
Beiträge: 102 Registriert: Fr 19. Jun 2015, 19:18
Beitrag
von Dave Miller » Mi 12. Aug 2015, 19:21
Ja, das ist richtig. Aber der Abstand (wie oben geschrieben -0,2) ist nicht gleich zu den anderen Verzeichnisse.
Johannes_B
Moderator
Beiträge: 5079 Registriert: Do 1. Nov 2012, 14:55
Kontaktdaten:
Beitrag
von Johannes_B » Mi 12. Aug 2015, 19:22
Diesen Abstand fügst du bei weiteren Verzeichnis von Hand ein. Auch die Einträge ins IHV setzt du von Hand. Was hindert dich, es auch für das IHV von Hand zu machen?
TeXwelt - Fragen und Antworten Schaut vorbei und stellt Fragen.
LaTeX-Vorlagen ?
Der Weg zum Ziel: Ruhe bewahren und durchatmen, Beiträge und unterstützende Links aufmerksam lesen, Lösungsansätze verstehen und ggf. nachfragen.