GeneralIssues with TOC and Bibliography

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
lenziwagner
Posts: 4
Joined: Tue Mar 30, 2021 2:34 pm

Issues with TOC and Bibliography

Post by lenziwagner »

Hey guys i have a few questions:

I created a new document for my thesis and defined it as an article. Now my supervisor told me i should use a report as a class. Now the TOC looks kinda messed up, the "0.1.1" f.e. How do i change it back to "1.1" f.e. In the article i used \section and \subscetion. Shall i use a different command?

The Bibliography/List of Tables/List of Figures were created using \bibliography and \listoffigures, while on the other hand, were created by myself. Now the the format of the heading are different, as seen in the pictures here https://ibb.co/cJmmgk8 and here https://ibb.co/ZYp1Gzn. The title for the Bibliography is my much bigger than the one for the list of symbols. How do i make it looking uniform?

As can be seen in the picture here https://ibb.co/P992rmr, the formatting of the "Tables of Figures" is much different than the one of "Symbolverzeichniss". How do i make it look the same?

This is my code:

Code: Select all

\documentclass[a4paper,11pt]{report}

\usepackage{amsthm}

\usepackage{mathptmx}

\usepackage{graphicx}

\usepackage[utf8]{inputenc}

\usepackage[british]{babel}

\usepackage[T1]{fontenc}

\usepackage{amsmath}

\usepackage{microtype}

\usepackage{makeidx}

\usepackage{graphicx}

\usepackage{fourier}

\usepackage{fancyhdr}

\usepackage{paralist}

\usepackage{color}

\usepackage{acronym}

\usepackage{hyperref}

\usepackage[nottoc]{tocbibind}

\usepackage{tocloft}



%% Citation

\usepackage{natbib}

\bibliographystyle{apalike} %%abbrv

\def\bibfont{\small}

\renewcommand\cftfigfont{\small}



%% Kopf/Fußzeile

\lhead{\slshape \leftmark}

\chead{}

\rhead{\slshape \rightmark}

\lfoot{}

\cfoot{\thepage}

\rfoot{}

\renewcommand{\headrulewidth}{0.3pt}

\renewcommand{\footrulewidth}{0pt}



%% Beginn des Dokuments

\begin{document}

\include{Fertig/Titelblatt}

\newpage

\tableofcontents



\newpage

\setcounter{page}{1}

\part{Kapitel I}



\section{Einleitung}

...

\subsection{Formel}

...



\subsubsection{Weitere Infos}

...

\subsection{Bilder}

...



\subsection{Text 2}

...



\newpage

\part{Mehr Infos}

\section{Hintergrund}

...



\subsection{Alter in Jahren}

....

\newpage



\part{Verzeichnisse}

\newpage

\include{Fertig/Abkürzung}

\newpage

\include{Fertig/Symbole}

\newpage

\listoffigures

\newpage

\listoftables

\newpage

\bibliography{Literatur/Literatur}

\newpage

\include{Fertig/Eid}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Issues with TOC and Bibliography

Post by Ijon Tichy »

The top level sectioning command of report or book classes below \part is \chapter not \section. So I would say, you have to do the following substitutions (in exactly this order!):
\section\chapter
\subsection\section
\subsubsection\subsection
\paragraph\subsubsection
\subparagraph\paragraph

Usually this substitutions can be done in minutes using a global search&replace. However instead of doing all these substitutions you tell TeX to handle the existing commands suitable, adding the following lines to the preamble of your document (in exactly this order!):

Code: Select all

\let\subparagraph\paragraph
\let\paragraph\subsubsection
\let\subsubsection\subsection
\let\subsection\section
\let\section\chapter
But maybe you just want to replace \part by \chapter? This is hard so say but seems so, because you are using \part{Kapitel 1} in your example. And "Kapitel" is "chapter". Unfortunately your code is not a Infominimal working example. You can test this yourself using the "Run LaTeX here" button automatically added below your code.

BTW: From LaTeX 2018/04/01 \usepackage[utf8]{inputenc} is not needed any longer.
AFAIK hyperref should be loaded after natbib. And \usepackage[utf8]{inputenc} selects British English as main document language. For a document with headings like "Einleitung" you should use \usepackage[ngerman]{babel}.

BTW. Please do not link to external references (I never click to them, because such are often misused for spam, trojan etc. latex.org allows to attach pictures and include them into the text. See the "Attachments" tab below the input field.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
lenziwagner
Posts: 4
Joined: Tue Mar 30, 2021 2:34 pm

Issues with TOC and Bibliography

Post by lenziwagner »

Ijon Tichy wrote: BTW. Please do not link to external references (I never click to them, because such are often misused for spam, trojan etc. latex.org allows to attach pictures and include them into the text. See the "Attachments" tab below the input field.
Thanks for the anwser. I know that i should use [ngerman] but i changed it to [british] to create an "english" output, because more user understand english. I got to fix nearly everything, there is only one problem left.

1) I was able to add lsit of figures/tables in the TOC the way i want, but it doesnt work for the bibliography. The output still does look like this, but i want it to look just like the others. How do i achieve this?
Image

I used following command to add List of Tables to TOC:

Code: Select all

\renewcommand\listoftables{%
    \section{\listtablename}%
    \@mkboth{\MakeUppercase\listtablename}%
        {\MakeUppercase\listtablename}%
    \@starttoc{lot}%}
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Issues with TOC and Bibliography

Post by Ijon Tichy »

Without Infominimal working example I can only say:
Package tocbibind
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
lenziwagner
Posts: 4
Joined: Tue Mar 30, 2021 2:34 pm

Issues with TOC and Bibliography

Post by lenziwagner »

Ijon Tichy wrote:Without Infominimal working example I can only say:
Package tocbibind
Thanks, i tried to add

Code: Select all

\addcontentsline{toc}{section}{References}
but "Literaturverzeichnis" does still show up with a number and a bigger font then the rest
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Issues with TOC and Bibliography

Post by Ijon Tichy »

Without Infominimal working example I cannot tell you much more. Only, that if you are loading package tocbibind you should use it to add the "Verzeichnisse" to the ToC and not prevent it from doing so and then try to do it manually again. This just makes no sense.

So, if you need more help, you should show us a Infominimal working example (← this is a link, read the page!). Perhaps then I could help more. But without: Sorry, your problem!

BTW: Feierabend! ;)
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
lenziwagner
Posts: 4
Joined: Tue Mar 30, 2021 2:34 pm

Issues with TOC and Bibliography

Post by lenziwagner »

Ijon Tichy wrote:Without Infominimal working example I cannot tell you much more. Only, that if you are loading package tocbibind you should use it to add the "Verzeichnisse" to the ToC and not prevent it from doing so and then try to do it manually again. This just makes no sense.

So, if you need more help, you should show us a Infominimal working example (← this is a link, read the page!). Perhaps then I could help more. But without: Sorry, your problem!

BTW: Feierabend! ;)
I got it working using ...

Code: Select all

\usepackage[section,numbib]{tocbibind}
Thanks for helping me...

BTW next time i will use a MWE
Post Reply