LyX ⇒ Style of \tableofcontents
Style of \tableofcontents
i wrote a Text with Dokumentclass book(KOMA-Script) and got some Problems with the Tableofcontent.
All entries are aligned at the Left side. Subsections are at same vertical line as their Sections. Im fine with the Design right now, just the Tableofcontent looks crappy.
My lyx "Header" of the Document is as follows:
%Definition des Absatz%-Abstandes
\setlength{\parskip}{0pt}%geändert
%Definition der Kopfzeile
\usepackage{scrpage2}
\pagestyle{scrheadings}
%test
%set fonts for nicer pdf view
\usepackage{lmodern}
\usepackage{mathptmx}
\usepackage{courier}
%test
%\ihead[]{} %geändert
%\ohead[]{} %geändert
\chead[]{} %geänder
\ihead[]{}
\ohead[]{}
%\setheadsepline{1pt} %Separate Linie im Kopf
%\setfootsepline{1pt} %Separate Linie im Fuss
\cfoot{ - Alexander } %geändert
\renewcommand*{\chapterpagestyle}{scrheadings}
%Definition der Schrift für Fußnote, Nummerierung und allgemein
\renewcommand{\pnumfont}{\normalfont\sffamily}
\setkomafont{footnote}{\sffamily}
\renewcommand{\familydefault}{\sfdefault}
%Schusterjungen und Hurenkinder
\clubpenalty=10000
\widowpenalty=10000 \displaywidowpenalty=10000
%Definition der Abbildungs- und Tabellenbeschreibungen
\setkomafont{captionlabel}{\sffamily \bfseries}
\renewcommand*{\figureformat}{Abb.~\thefigure\autodot}
%Realisierung der Hyperref-Attribute unter verschiedenen Voraussetzungen
\usepackage{ifpdf} % part of the hyperref bundle
\ifpdf % if pdflatex is used
% link all cross references and URLs in pdf output
\usepackage[colorlinks=true, bookmarks, bookmarksnumbered,
linkcolor=black, citecolor=black, urlcolor=blue, filecolor=blue,
pdfpagelayout=OneColumn, pdfnewwindow=true,
pdfstartview=XYZ, plainpages=false, pdfpagelabels,
pdfauthor={Alexander }, pdftex,
pdftitle={T-Mobile G1 als Angriffs-Werkzeug},pdfsubject={LyX},
pdfkeywords={LyX}]{hyperref}
\else % if dvi or ps is produced
% link all cross references and URLs in dvi output
\usepackage[ps2pdf]{hyperref}
\fi % end if pdflatex is used
% the pages of the LOT are numbered roman
% and a pdf-bookmark for the TOC is added
\pagenumbering{arabic}
\let\myTOC\tableofcontents
\renewcommand\tableofcontents{%
\pdfbookmark[1]{Inhaltsverzeichnis}{}
\myTOC
\cleardoublepage
}
\let\myLOT\listoftables
\renewcommand\listoftables{%
\myLOT
\cleardoublepage
\pagenumbering{arabic}
}
%Fügt Füllzeichen für die oberste Ebene im TOC bei
\makeatletter
\renewcommand\l@section[2]{%
\ifnum \c@tocdepth >\z@
\addpenalty\@secpenalty
\addvspace{1.0em \@plus\p@}%
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@
\rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode \bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip #1
\nobreak\
\leaders\hbox{$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$} \hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}
\par
\endgroup \fi}
\makeatother
%Fügt "Abb. " vor die Nummern in der LOF
\makeatletter
\def\list@ffigure{Abbildung }
\long\def\@caption#1[#2]#3{%
\par
\addcontentsline{\csname ext@#1\endcsname}{#1}%
{\csname list@f#1\endcsname\protect\numberline{%
\csname the#1\endcsname}{\ignorespaces #2}}%
\begingroup \@parboxrestore \if@minipage \@setminipage \fi \normalsize \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par \endgroup}
\makeatother
%Fügt Tab. " vor die Nummern in der LOF
\makeatletter
\def\list@ftable{Tabelle }
\long\def\@caption#1[#2]#3{%
\par
\addcontentsline{\csname ext@#1\endcsname}{#1}%
{\csname list@f#1\endcsname\protect\numberline{%
\csname the#1\endcsname}{\ignorespaces #2}}%
\begingroup \@parboxrestore \if@minipage \@setminipage \fi \normalsize \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par \endgroup}
\makeatother
Thanks a lot
Regards
Alex
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis