LaTeX specific issues not fitting into one of the other forums of this category.
uetech
Posts: 4
Joined: Tue Apr 15, 2008 1:30 pm

Hi friends,

I recently started using latex and while I have faced many problems and found most of the solutions, there is still a problem I cannot fix.

The problem is with the TOC and the List of Figures. The section headings and figure captions are long and so in the TOC and the List of Figures, they should wrap around. Instead, latex displays them on a single line. Pls see figure below:

The code I am using is the following. Many thanks for any kind of help or pointers.


Stefan Kottwitz
Posts: 8207
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Hi uetech,

could you please post your diss.cls as attachment? Without it I cannot compile your document to reproduce the problem. It's probably not a standard class.
Your code is not a minimal working example. One may get an impression by reading it and may try to type some additional code to get it compiled and showing the problem, but if you provided a compilable example showing some not-wrapping lines, one could easier give specific help.

Stefan

uetech
Posts: 4
Joined: Tue Apr 15, 2008 1:30 pm
Hi Stefan_K,

I thank you for your efforts.
I have attached the diss.cls file as well as "mychapter.tex" file. Now the code given in my first post should compile.

Best Regards
Attachments
mychapter.tex
diss.cls
Custom class file

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Location: Colombia
I would suggest you to use the hyperref package with the breaklinks option activated; in your preamble, delete hyperref from this list of packages
\usepackage{a4,epsfig,exscale,longtable,amsfonts,amsmath,fancyhdr,makeidx,bibunits,hyperref,paralist,tocbibind,subfigure}

\usepackage[breaklinks=true]{hyperref}

By the way, you are using problematic and/or obsolete packages such as a4, epsfig,subfigure. The l2tabu document addresses this issue.
1,1,2,3,5,8,13,21,34,55,89,144,233,...

Stefan Kottwitz
Posts: 8207
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Hi uetech,

I agree with gmedina.
With your attachments I was able to compile (just without makeidx, even added subsections for testing), and the result looks like this:

Probably you should consider updating your used packages.

Stefan

uetech
Posts: 4
Joined: Tue Apr 15, 2008 1:30 pm
Thanks a lot gmedina and Stefan. The solution works perfectly.

Also thankyou for the information on packages. Actually the template I am using is supplied by my institute, is a very old one and needs to be updated. I will update it soon.

Best Regards

otnemem
Posts: 9
Joined: Mon May 05, 2008 11:29 pm
Hi all!

I was going through this post as i have the same problem. Unfortunately this remedy is not working for me. I would be really grateful if someone could give me a hand with this.

The main document is as follows:

\documentclass [a4paper,12pt,oneside]{book} \usepackage{float}\usepackage{harvard}\usepackage{graphicx}\usepackage[bottom]{footmisc} %package used to place footnotes at bottom of page\usepackage[hang,scriptsize,bf]{caption}\usepackage{multirow}\usepackage{eurofont} \renewcommand{\baselinestretch} {1.6} \normalsize    \setlength{\oddsidemargin}{0.5in}   \setlength{\evensidemargin}{0.0in}   \setlength{\topmargin}{0.0in}   \setlength{\footskip}{0.4in}   \setlength{\headsep}{0.3in}   \setlength{\headheight}{0.0in}   \setlength{\textwidth}{5.6in}   \setlength{\textheight}{9.3in} \begin{document}      \include{preamble}      \pagenumbering{roman}     \thispagestyle{empty}     \tableofcontents     \thispagestyle{empty}     \listoffigures     \thispagestyle{empty}     \listoftables     \thispagestyle{empty}      \pagebreak     \include{Abbreviations}      \setlength{\oddsidemargin}{20mm}     \setlength{\evensidemargin}{40mm}     \setlength{\topmargin}{0mm}     \setlength{\footskip}{0.4in}     \setlength{\headsep}{0.3in}     \setlength{\headheight}{0.0in}     \setlength{\textheight}{8.5in}      \pagenumbering{arabic}     \include{Introduction}     \include{Literature}     \include{Methodology}     \include{Analysis}     \include{Conclusions}     \include{Recommendations}     \include{Reflections}     \appendix     \include{appendixa}     \include{appendixb}     \include{appendixc}     \include{appendixd}      \setlength{\oddsidemargin}{0.5in}     \setlength{\evensidemargin}{0.0in}     \setlength{\topmargin}{0.0in}     \setlength{\footskip}{0.4in}     \setlength{\headsep}{0.3in}     \setlength{\headheight}{0.0in}     \setlength{\textwidth}{5.6in}     \setlength{\textheight}{9.3in}      \nocite{*}      \addcontentsline{toc}{chapter}{References}     \bibliography{References}     \bibliographystyle{agsm}     \thispagestyle{empty} \end{document}

Thanks again in advance for all!

Stefan Kottwitz
Posts: 8207
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Hi otnemem,

welcome to the LateX Community board!
I cannot compile your main document because I don't have the files that you are including. If I compile it without those files I cannot see the unwanted behaviour. Perhaps you could insert some lines (\chapter, \section ?) so that we can see what's meant. A minimal working example should be compilable and showing the problem. See here for more information. Usually compilable code quickly leads to a solution.

Stefan

otnemem
Posts: 9
Joined: Mon May 05, 2008 11:29 pm

I am taking off all the related files and just created a toc entry that is long enough not to wrap properly. The code is this...hope it's more indicative:

\documentclass [a4paper,12pt,oneside]{book} \usepackage{float}\usepackage{harvard}\usepackage{graphicx}\usepackage[bottom]{footmisc} %package used to place footnotes at bottom of page\usepackage[hang,scriptsize,bf]{caption}\usepackage{multirow}\usepackage{eurofont} \renewcommand{\baselinestretch} {1.6} \normalsize    \setlength{\oddsidemargin}{0.5in}   \setlength{\evensidemargin}{0.0in}   \setlength{\topmargin}{0.0in}   \setlength{\footskip}{0.4in}   \setlength{\headsep}{0.3in}   \setlength{\headheight}{0.0in}   \setlength{\textwidth}{5.6in}   \setlength{\textheight}{9.3in} \begin{document}      \pagenumbering{roman}     \thispagestyle{empty}     \tableofcontents     \setlength{\oddsidemargin}{20mm}     \setlength{\evensidemargin}{40mm}     \setlength{\topmargin}{0mm}     \setlength{\footskip}{0.4in}     \setlength{\headsep}{0.3in}     \setlength{\headheight}{0.0in}     \setlength{\textheight}{8.5in}      \section{The relationship between economic instruments and road transport policies}      \setlength{\oddsidemargin}{0.5in}     \setlength{\evensidemargin}{0.0in}     \setlength{\topmargin}{0.0in}     \setlength{\footskip}{0.4in}     \setlength{\headsep}{0.3in}     \setlength{\headheight}{0.0in}     \setlength{\textwidth}{5.6in}     \setlength{\textheight}{9.3in}      \nocite{*}      \addcontentsline{toc}{chapter}{References}     \bibliography{References}     \bibliographystyle{agsm}     \thispagestyle{empty} \end{document}

Stefan Kottwitz
Posts: 8207
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Hi otnemem,

I've tested your example without changes, the output looks like this:
contents.png (11.97 KiB) Viewed 12444 times

Do you get different wrapping?

Stefan