Page Layout ⇒ Indent contents line of table of content
-
- Posts: 3
- Joined: Fri Feb 08, 2019 10:33 am
Indent contents line of table of content
I used the following formatting to include apa references in my report, importing it from Mendeley.
% REFERENCES
\bibliographystyle{apacite}
\bibliography{Library.bib}
It automatically included a line in my table of content, as you can see below. However, I want to tab (indent) the reference line, in order to align it with the rest of the sections (summery, acknowledgement, etc.). Does anyone know how I can fix this problem?
ps. when I add another section line to my table of content, I get two references lines.
\addcontentsline{toc}{section}{\numberline{}References}
Thank you!!
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
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Indent contents line of table of content
welcome to the forum!
It seems you have somewhere else in your code such an
\addcontentsline
already, but without that \numberline{}
. That happens for example if you simply use the tocbibind
package.Quick patch, at the end of your document preamble, so right before
\begin{document}
:Code: Select all
\let\origaddcontentsline\addcontentsline
\renewcommand{\addcontentsline}[3]{\origaddcontentsline{#1}{#2}{\numberline{}#3}}
-
- Posts: 3
- Joined: Fri Feb 08, 2019 10:33 am
Indent contents line of table of content
Thank you so much, this was very much of a help. Fixed the 'reference' problem.
However, next problem the appendix's have indented now. Do you also know how to get them aligned with the numbers?
Excuse me, just started working with Latex, so it's all a bit new to me.
Thank you!
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Indent contents line of table of content
\bibliography
and before the appendix:Code: Select all
\let\addcontentsline\origaddcontentsline
-
- Posts: 3
- Joined: Fri Feb 08, 2019 10:33 am