2

I'm getting overlap of the numbering of my figures in the LOF (list of figures) into the figure text like shown below.

enter image description here

I know there are other questions about this but this only happens to my figures list in the LOF and nothing else. I have however changed the figure numbering. I guess that's why this happens. Is there a way to change only the figure list of the LOF spacing between the numbers and the text?

EDIT: I'm using a LaTeX template provided by my university so there's a lot happening behind the curtains here. Even so I believe I should be able to change the numbering and spacing in the LOF without diving deep into the template setup. Code shown below. GitHub thesis template.

\documentclass[BIELE,norsk,oneside]{ntnuthesis/ntnubachelorthesis}
\usepackage{chngcntr}               
\counterwithin{figure}{section}    
\counterwithin{table}{section}

\begin{document}

\input{inc/BachelorThesisData} % this is the file which contains all the details about the thesis

\makefrontpages % make the frontpages

\input{inc/forord}


\tableofcontents
\listoffigures
\listoftables
%\lstlistoflistings


\input{inc/innledning}
\input{inc/teori}
\input{inc/metode}
\input{inc/resultater}
\input{inc/diskusjon}
\input{inc/konklusjon}


\bibliographystyle{ieeetr}
\bibliography{inc/referanser}


\appendix %after this line all chapters will have letters instead of numbers

\end{document}
  • 1
    We could not help you much if you did not provide us with a minimal working example starting from \documentclas and ending with \end{document} – Al-Motasem Aldaoudeyeh May 7 at 0:38
  • Added updated description – Marius Gulbrandsen May 7 at 1:28
  • 3
    This is not a self-contained sample because you are using files in your PC. To verify that the sample works on other PCs, create a new untitled document and copy the contents to that file and try to compile it. Here is a quick solution: use tocloft package and fine-tune \setlength{\cftsubsecnumwidth}{<value>} \setlength{\cftsubsubsecnumwidth}{<value>} – Al-Motasem Aldaoudeyeh May 7 at 1:48
2

Based on your given link and your given, not compiling code I created a compiling mwe using the document part of the given example bachelor thesis.

Then you can add package tocloft to change the width of the numbers displayed in your list of figures (LOF) with

\setlength{\cftfignumwidth}{1cm}

and for the list of tables (LOT) with

\setlength{\cfttabnumwidth}{1cm}

Please change the used values 1cm for your needs ...

With the following compiling mwe

\documentclass[BIELE,norsk,oneside]{ntnuthesis/ntnubachelorthesis}

\usepackage{tocloft} % <================================================
%\setlength{\cftsecnumwidth}{1cm} 
%\setlength{\cftsubsecnumwidth}{1.5cm} 
%\setlength{\cftsubsubsecnumwidth}{2cm}
\setlength{\cftfignumwidth}{1cm} % <====================================
\setlength{\cfttabnumwidth}{1cm} 

\usepackage{chngcntr}               
\counterwithin{figure}{section}    
\counterwithin{table}{section}


\begin{document}

\input{inc/BachelorThesisData} % this is the file which contains all the details about the thesis

\makefrontpages % make the frontpages

\input{inc/preface}


\tableofcontents
\listoffigures
\listoftables
\lstlistoflistings


\input{inc/introduction}
\input{inc/requirements}
\input{inc/technical}
\input{inc/process}
\input{inc/implementation}
\input{inc/deployment}
\input{inc/testing}
\input{inc/discussion}
\input{inc/conclusion}


\bibliographystyle{unsrt}
\bibliography{inc/BachelorExample}

\appendix %after this line all chapters will have letters instead of numbers
\input{inc/projectplan}

%\input{inc/gantt}
\input{inc/meetinglog}
%\input{inc/worklog}

\end{document}

you get the result:

resulting LOF and LOT

As you can see and as also mentioned in the documentation of tocloft you need to add some clearpages to get your TOC, LOF and LOT on separate pages as before ... For me it was easier to show you both list of figures and tables without that clearpages. So please change the given code above to

\input{inc/preface}

\clearpage % <=======================
\tableofcontents
\clearpage % <=======================
\listoffigures
\clearpage % <=======================
\listoftables
\clearpage % <=======================
\lstlistoflistings 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.