I am working on my thesis and it is due in 5 days. I have a problem with my Table of Contents, List of Figures and List of Tables. At the moment, all of my entries go over the margin and expend out of the page. Somehow, the some of the entries (long section title and long captions of figures or tables) are not being wrapped or breaking into multiple lines.

I have searched everywhere for a solution but couldn't found one. Below is my code with all of the packages I have included. Not sure if it is because some packages causing the problem.

\documentclass[a4paper, 12pt, fleqn]{report}
\usepackage{amsfonts, amsmath, amsgen, amsopn, amssymb, amstext, enumitem, accents, amsthm, bm} %  bezier, amsxtra, amsbsy, amsgen, amsopn, amscd, latexsym, enumitem,
\usepackage{array} % mdwtab, mdwmath, url
\usepackage{graphicx} % Required for including pictures
% \usepackage{ntheorem}
\usepackage[space,sort]{cite} %nobreak option removed
\usepackage[top=3.81cm, bottom=3.81cm, left=3.81cm, right=3.81cm]{geometry}


\usepackage{calc}       % For indent of label in description
\usepackage{enumitem}   % For indent of label in description
\usepackage[table]{xcolor}     % For cell colours
\usepackage{commath}    % For "absolute" symbol "||"
\usepackage{ulem}       % For creating underline

%% Below is for creating overline
     \hrule height 0.5pt%                  % Line above with certain width
     \kern0.25ex%                          % Distance between line and content
       \kern-0.1em%                        % Distance between content and left side of box, negative values for lines shorter than content
       \ifmmode#1\else\ensuremath{#1}\fi%  % The content, typeset in dependence of mode
       \kern-0.1em%                        % Distance between content and left side of box, negative values for lines shorter than content
     }% end of hbox
   }% end of vbox

colorlinks = true,
citecolor = black,
linkcolor = black

%setcounter{tocdepth}{3}% Include \subsubsection in ToC
\setcounter{secnumdepth}{4}% Number \subsubsection

\hyphenpenalty =1000

\newtheorem{design_strategy}{Design Strategy}[chapter]


\cleardoublepage \addcontentsline{toc}{chapter}{Table of Contents} \tableofcontents
\cleardoublepage\addcontentsline{toc}{chapter}{List of Tables} \listoftables
\cleardoublepage\addcontentsline{toc}{chapter}{List of Figures} \listoffigures


Please advise me what to do.

Thank you so much!


  • 1
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Jan 14, 2018 at 13:11
  • If I add some long entries to your example code, they nicely wrap. Can you please add an example which does not warp lines? Jan 14, 2018 at 13:13
  • Hi Thank you so much for the quick response. I have tried adding two lines (chapter and section to it) and see if it wraps Jan 14, 2018 at 14:54
  • 1
    Can you modify the code in your question to show us the missing wrapping? Jan 14, 2018 at 14:59
  • i.sstatic.net/XGmoz.png is what I get if I compile the code from your non-answer below (after removing the lines with \input because I do have your files) Jan 14, 2018 at 15:05

1 Answer 1


As already indicated by John Kormylo this is most likely due to an interaction of hyperref with the compiler you use. To fix this you have several options:

  1. Explicitly use pdflatex
  2. Use the hyperref option linktocpage=true to turn the page numbers in the toc into hyperlinks instead of the chapter titles.
  3. If you want to / have to use the latex compiler instead and want to keep the titles hyperlinked, you can include the hypdvips package after loading hyperref to enable linebreaks inside hyperlinks.

Note: In all cases keep in mind the correct loading order of packages: hyperref should generally (with a few exceptions) be loaded last.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .