插入 \listoffigures 时出现此错误:“ !Paragraph 在 \@dottedtocline wa 完成之前结束”

插入 \listoffigures 时出现此错误:“ !Paragraph 在 \@dottedtocline wa 完成之前结束”

问题是当我插入\listoffigures命令时我得到了!Paragraph ended before \@dottedtocline was complete。这是我的代码:

\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}

它还说了\par ... a bug in a package file you are using是什么原因导致了这个问题?

答案1

解决方法是删除所有辅助文件.toc、、.lof.lot

相关内容