I am using a LaTeX template for a report I'm writing. Currently, I am having one small issue. The formatting of the TOC is not correct. When I create a pdf from the files, the Bibliography entry is indented (it has a left-margin of about 5 whitespaces) and not aligned with the other entries. How can I adjust this? Am using MixTex 2.9 and TexMakerX. Here are the files:
Code: Select all
%main.tex
%------------------------------------------------------------------------
\documentclass[11pt,a4paper]{report}
% Packages and commands file
\input{include/packagescommands}
% Settings (Metadata)
\input{include/settings}
\begin{document}
% Title page and abstract
\input{include/titlepageabstract}
% Table of contents
\newpage
\pagenumbering{roman}
\setcounter{page}{1}
\pagestyle{fancy}
\setspecialhdr
\tableofcontents
% Main area
\newpage
\setdefaulthdr
\pagenumbering{arabic}
\setcounter{page}{1}
% Content
\input{include/introduction}
\newpage
% Test kapitel
%\input{include/test}
% Test method
%\input{include/method}
%\input{include/discussion}
% Nocite references
\nocite{Brody1996,Carillo2011,boken}
\bibliography{references}
\addcontentsline{toc}{chapter}{\numberline{} Bibliography} % For pdf
\setspecialhdr
\newpage
% Appendices
\appendix
\setdefaulthdr
%\input{include/appendix1}
\end{document}
Code: Select all
%include/settings.tex
%------------------------------------------------------------------------
% References, choose bst-file
\bibliographystyle{elsart-num}
% PDF Metadata and link styles
\hypersetup{
pdftitle={Master's Thesis: },%
pdfauthor={John Doe},%
colorlinks=true,%
citecolor=black,%
filecolor=black,%
linkcolor=black,%
urlcolor=black
}
% Dropping initial letter color
\renewcommand{\LettrineFontHook}{\color[gray]{0.5}}
% Chapter headings style (fncychap)
\makeatletter
\ChNumVar{\fontsize{20pt}{20pt}\selectfont {\bf Chapter} }
%\ChNumVar{\fontsize{40pt}{20pt}Chapter } % sets the style for digit
%\ChTitleVar{\Huge\bfseries\centering} % sets the style for title
\ChRuleWidth{4pt} % Set RW=4pt
\ChNameUpperCase % Make name uppercase
\renewcommand{\DOCH}{
%\centering
{\CNoV {\bf \fontsize{20pt}{20pt}\selectfont\thechapter} }
\vskip 40\p@}
\renewcommand{\DOTI}[1]{%
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@}
\renewcommand{\DOTIS}[1]{%
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@}
\makeatother
% Single page abstract
\renewenvironment{abstract}%
{\begin{center} \bfseries \abstractname \end{center}}%
{\vspace{2\baselineskip}}%
% Figure & Table captions
\captionsetup{margin=10pt,font=small,labelfont=bf}
\captionsetup[table]{position=top}
\setlength{\extrarowheight}{4pt}
\addtolength{\headheight}{\baselineskip}
% Fancyheader (see packagescommands.tex for default/special)
\pagestyle{fancy}
\setdefaulthdr
% Stolen settings (unknown origin):
% Alter some LaTeX defaults for better treatment of figures:
% See p.105 of "TeX Unbound" for suggested values.
% See pp. 199-200 of Lamport's "LaTeX" book for details.
% General parameters, for ALL pages:
\renewcommand{\topfraction}{0.9} % max fraction of floats at top
\renewcommand{\bottomfraction}{0.8} % max fraction of floats at bottom
% Parameters for TEXT pages (not float pages):
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4} % 2 may work better
\setcounter{dbltopnumber}{2} % for 2-column pages
\renewcommand{\dbltopfraction}{0.9} % fit big float above 2-col. text
\renewcommand{\textfraction}{0.07} % allow minimal text w. figs
% Parameters for FLOAT pages (not text pages):
\renewcommand{\floatpagefraction}{0.7} % require fuller float pages
% N.B.: floatpagefraction MUST be less than topfraction !!
\renewcommand{\dblfloatpagefraction}{0.7} % require fuller float pages
% remember to use [htp] or [htpb] for placement
%include/titlepageabstract.tex
%------------------------------------------------------------------------
\begin{titlepage}
%\AddToShipoutPicture{\backgroundpic{-4}{56.7}{fig/auxiliary/frontpage}}
\mbox{}
\vfill
\addtolength{\voffset}{2cm}
\begin{flushleft}
{\noindent {\Huge Legacy Systems} \\[0.5cm]
\emph{\Large Master's Thesis in Software Engineering} \\[.8cm]
{\huge John Doe}\\[.8cm]
{\Large Department of Computer Science \& Software Engineering \\
Non-linear Dynamics \& Statistical Physics \\
\textsc{University of Technology} \\
Goburg, England 2011 \\
Master's Thesis 2011:1\\
}
}
\end{flushleft}
\end{titlepage}
\ClearShipoutPicture
% End Chalmers title page
\pagestyle{empty}
\newpage
\clearpage
\mbox{}
\newpage
\clearpage
\thispagestyle{empty}
\begin{abstract}
This is a case study regarding a legacy system that is is to be modernised with MDE.
\end{abstract}
\newpage
\clearpage
\mbox{}
\newpage
\clearpage
\thispagestyle{empty}
\section*{Acknowledgements}
I wanna thank... \\[1cm]
\hfill John Doe, Goburg 2011
\newpage
\clearpage
\mbox{}
%include/packagescommands.tex
%------------------------------------------------------------------------
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{ae}
\usepackage{icomma}
\usepackage{units}
\usepackage{color}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{subfigure}
\usepackage{bbm}
\usepackage{caption}
\usepackage[square, numbers, sort]{natbib}
\usepackage{multirow}
\usepackage{array}
\usepackage{geometry}
\usepackage{fancyhdr}
\usepackage{fncychap}
\usepackage[hyphens]{url}
\usepackage[breaklinks,pdfpagelabels=false]{hyperref}
\usepackage{lettrine}
\usepackage{eso-pic}
\newcommand{\rd}{\ensuremath{\mathrm{d}}}
\newcommand{\id}{\ensuremath{\,\rd}}
\newcommand{\degC}{\ensuremath{\,\unit{^\circ C}}}
% Fancyheader shortcuts
\newcommand{\setdefaulthdr}{%
\fancyhead[L]{\slshape \rightmark}%
\fancyhead[R]{\slshape \leftmark}%
\fancyfoot[C]{\thepage}%
}
\newcommand{\setspecialhdr}{%
\fancyhead[L]{ }%
\fancyhead[R]{\slshape \leftmark}%
\fancyfoot[C]{\thepage}%
}
\newcommand{\mail}[1]{\href{mailto:#1}{\nolinkurl{#1}}}
\newcommand{\backgroundpic}[3]{%
\put(#1,#2){
\parbox[b][\paperheight]{\paperwidth}{%
\centering
\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{#3}
\vfill
}}}
%include/introduction.tex
%------------------------------------------------------------------------
\chapter{Introduction}
%\lettrine[lines=4, loversize=-0.1, lraise=0.1]{L}{orem ipsum dolor} % Fixar stora förstabokstäver
Sit amet, consectetur adipiscing elit. Donec viverra gravida adipiscing. Morbi vitae dui eu leo dapibus venenatis quis laoreet augue.
Proin sem nunc, lobortis sed gravida id, iaculis id justo. Sed convallis, mauris vel mattis posuere, tortor quam molestie sem, vel
feugiat risus dolor sit amet purus. Nulla facilisi. Duis ac velit non tortor malesuada pellentesque vitae vitae erat. Aliquam dapibus
porta lorem lacinia vestibulum. Nulla convallis venenatis euismod. Suspendisse adipiscing lacus id nisi hendrerit dapibus. Sed quam
diam, pretium vel accumsan vel, pulvinar et odio. Nulla facilisis ullamcorper metus non suscipit. Aliquam nec augue odio. In hac
habitasse platea dictumst. Nulla facilisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis
egestas. Maecenas consequat mattis metus, in imperdiet purus suscipit eu. Mauris velit lorem, pharetra nec vehicula cursus, vulputate
sit amet dui. Nam sed eros magna, quis molestie urna.
\section{Maecenas iaculis}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra gravida adipiscing. Morbi vitae dui eu leo dapibus venenatis
quis laoreet augue. Proin sem nunc, lobortis sed gravida id, iaculis id justo. Sed convallis, mauris vel mattis posuere, tortor quam
molestie sem, vel feugiat risus dolor sit amet purus. Nulla facilisi. Duis ac velit non tortor malesuada pellentesque vitae vitae erat
\begin{gather*}
\left\{\begin{split}
\tan \varphi &= \lambda \tan \tau \\
\tan^2 \theta &= \tan^2 \gamma (\sin^2\tau + \lambda^2 \cos^2\tau)
\end{split}\right., \tau = \frac{\pi}{2}-\beta t.
\end{gather*}
Aliquam dapibus porta lorem lacinia vestibulum. Nulla convallis venenatis euismod. Suspendisse adipiscing lacus id nisi hendrerit
dapibus. Sed quam diam, pretium vel accumsan vel, pulvinar et odio. Nulla facilisis ullamcorper metus non suscipit. Aliquam nec augue
odio. In hac habitasse platea dictumst. Nulla facilisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac
turpis egestas. Maecenas consequat mattis metus, in imperdiet purus suscipit eu. Mauris velit lorem, pharetra nec vehicula cursus,
vulputate sit amet dui. Nam sed eros magna, quis molestie urna.
\subsection{Sub-header}
\section{Header}
\subsection{Sub-header}
\subsection{Sub-header}
%include/references.bib
%------------------------------------------------------------------------
% ARTICLES (FLUID DYNAMICS)
@article{Brody1996,
author = {Bladig, J and Yager, P and Goldstein, R and Austin, R},
doi = {10.1016/S0006-3495(96)79538-3},
file = {:D$\backslash$:/MendeleyPapers/Brody et al./1996/Biotechnology at low Reynolds numbers - 1996.pdf:pdf},
issn = {00063495},
journal = {Biophysical Journal},
month = dec,
number = {6},
pages = {3430--3441},
publisher = {Elsevier},
title = {{Biotechnology at low Reynolds numbers}},
url = {http://linkinghub.elsevier.com/retrieve/pii/S0006349596795383},
volume = {71},
year = {1996}
}
@article{Carrillo2011,
author = {Carrillo de Gea, J.M. and Nicolas, J. and Aleman, J.L.F. and Toval, A. and Ebert, C. and Vizcaino, A. and },
title = {Requirements Engineering Tools},
journal = {IEEE Software},
year = {2011},
OPTvolume = {28},
OPTnumber = {4},
OPTpages = {89-91},
OPTmonth = {July/August}
}
@INPROCEEDINGS{Gherbi2009,
author={Gherbi, T. and Meslati, D. and Borne, I.},
booktitle={Computer Modelling and Simulation, 2009. UKSIM '09. 11th International Conference on}, title={MDE between Promises and
Challenges},
year={2009},
month={march},
volume={},
number={},
pages={152 -155},
keywords={MDA;MDE;OMG;model driven architecture;model driven engineering;object management group;software construction;software
development approach;object-oriented programming;software engineering;},
doi={10.1109/UKSIM.2009.13},
ISSN={},}