0

The problem is when I insert the \listoffigures command I get !Paragraph ended before \@dottedtocline was complete. Here is my code:

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{images/}}
\usepackage{xcolor}
\usepackage{float}
\usepackage{listings}
\lstset{
    frame=single,
    breaklines=true,
    postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{red}\hookrightarrow\space}}
}
\usepackage[a4paper,top=30mm,bottom=30mm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[R]{\leftmark}

\begin{document}

\pagenumbering{Roman}

\chapter*{Abstract}
Recent years have witnessed massive growth in the popularity of smart portable 

\chapter*{Dedication}
to mum and dad

\chapter*{Acknowledgments}
I would like to express my gratitude to my supervisor  
\tableofcontents

\listoftables

\listoffigures

\cleardoublepage\pagenumbering{arabic}

\chapter{Introduction}
some introduction...

\chapter*{Conclusion}


\end{document}

It says also \par ... a bug in a package file you are using what is causing this problem?

  • Intriguing... but how can we reproduce your problem? We don't have introduction.tex, related_work.tex, ... – Werner Oct 26 '16 at 23:53
  • Can you please make an example that demonstrates you error? Without any included files we don't have? If I just add a dummy figure to your code and remove the included files, you code runs without problem. – samcarter_is_at_topanswers.xyz Oct 26 '16 at 23:55
  • even if I don't include the chapters the error stays the same – Mark wallest Oct 26 '16 at 23:55
  • Since we don't have access to any of your included files, your example doesn't give enough information to solve the problem. In order to diagnose the problem you need to start by removing each included file until the error disappears, deleting your .aux files each run). This will show which included file causes it. Then you need to look at each \caption command for your figures (which is probably where the problem lies) or move the \end{document} successively backwards in that included file until the error goes away again. Then you will probably find the source of the problem yourself. – Alan Munn Oct 26 '16 at 23:55
  • @Markwallest With the exact same code as above? Try to delete all the auxiliary files and compile again? – samcarter_is_at_topanswers.xyz Oct 26 '16 at 23:56
  • I did remove the auxiliary files but the error is still occuring – Mark wallest Oct 26 '16 at 23:57
  • @Markwallest That sounds interesting. As you don't have any figures in your example, it should not try to draw any dotted lines in the lof. How are you compiling? I tried with pdflatex from texlive2016. – samcarter_is_at_topanswers.xyz Oct 27 '16 at 00:04
  • I'm using texmaker with MikTex. Even if there is no figures it should at least display "list of figures" in a separate page. – Mark wallest Oct 27 '16 at 00:09
  • @Markwallest yes, there will be a separate page, but the dotted line are drawn between the name of the figure and the pagenumber, so not in case of an empty list. I have no idea about miktex, but can you find out which version? And which engine you are using? pdflatex or something else? [I'm sorry, but I have to leave you alone now, as I am done for the day] – samcarter_is_at_topanswers.xyz Oct 27 '16 at 00:30
  • @samcarter thank you i'll try uninstall miktex and reinstalled it I think what is happening is maybe a latex bug. – Mark wallest Oct 27 '16 at 00:39
  • @Markwallest: Did you also remove the .toc, .lof and .lot files? There are a bunch of auxiliary files that may be the source of this problem. See Egad! What are all those files? and File extensions related to LaTeX, etc. – Werner Oct 27 '16 at 00:39
  • @Markwallest This is highly unlikely to be a problem with installation. – Alan Munn Oct 27 '16 at 00:42
  • @Werner I removed all the auxiliary files and it works thank you so much. – Mark wallest Oct 27 '16 at 00:50

1 Answers1

1

The solution is to remove all the auxiliary files .toc , .lof , .lot.