Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am writing my thesis using Kile. I encountered a mis-justification problem when creating table of contents, please see the uploaded picture. My institute insists to fix this. Can anybody help me on this?

enter image description here

Here is my MWE:

\documentclass[12pt,a4paper]{report}
\usepackage{OkanFBEStyle}
\usepackage[pdftex]{graphicx}
\usepackage{subfigure}
\usepackage{boxedminipage}
\usepackage{enumerate}
\usepackage[nosort]{cite}
\usepackage{wrapfig}
\pdfminorversion=5
 \makeatletter
  \renewcommand{\thesubfigure}{\alph{subfigure}.\hskip-0.5\subfiglabelskip}
\renewcommand{\@@thesubfigure}{\thefigure.\alph{subfigure}}
  \makeatother
\usepackage{float}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{array}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsxtra}
\usepackage{cases}
\usepackage{xfrac}
\setcounter{tocdepth}{3}
\usepackage{epstopdf}
\usepackage{pifont}
\usepackage{url}
\usepackage{hyperref}
\usepackage{color}
\usepackage{ctable}
\usepackage{tabularx}
\usepackage{soul}
\usepackage{lineno}
\usepackage{tikz}
\usetikzlibrary {calc}
\newcolumntype{x}[1]{
>{\raggedleft\hspace{0pt}}p{#1}}
\newcolumntype{+}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{^}{>{\currentrowstyle}}
  \newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
  #1\ignorespaces
  }
\newcommand{\otoprule}{\midrule[\heavyrulewidth]}
\newcolumntype{Z}{>{\centering\arraybackslash}X}

\begin{document}
\tableofcontents
\chapter{INTRODUCTION}
\section{Intramedullary Nailing}

\chapter{METHODS}
\section{Study 1: In modeling a distraction process, how should the tissue load be correctly represented in order to obtain a better understanding of the mechanical response of IM nails during limb lengthening?}
\subsection{Finite Element Model Considerations}
\end{document}
share|improve this question
1  
While code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. While solving problems is fun, setting them up is not. Then those trying to help can simply cut and paste your MWE and get started on solving problem. –  Peter Grill Jan 17 '13 at 7:50
    
It is not obvious from this preamble what is the problem. What it the package OkanFBEStyle. Also change \[ and \] with [ and ]. –  zunbeltz Jan 17 '13 at 8:18
    
@PeterGrill I updated my original question accordingly. –  Rıza Bayoğlu Jan 17 '13 at 8:26
    
How shall I attach OkanFBEStyle.sty file? –  Rıza Bayoğlu Jan 17 '13 at 8:29
1  
For your code to be a MWE you should exclude all packages that are irrelevant to replicate your problem. –  Vivi Jan 17 '13 at 9:54

1 Answer 1

This is actually correct. The first line is indented and the other lines are not. Admitedly this looks akward. Consider using different headings in the text and in the table of contents.

Example:

\section[Study 1: Chairs]{Study 1: The behaviour of chairs in the wilderness under the influence of time, love and water -- considering different frequencies of quantim flux compensation during recomfubeling phase.}

Edit: As i understand the question it is about the alignment of the new lines in the section header with the indent of subsections. The fastest way to get rid of that problem is to not have linebreaks. You can introduce alternative header by giving them as an optional argument. The table of contents will show the alternative header. You can now write a shorter header that is suitable for a table of contents and still preserve the long header in the actual text.

Rereading your questions, you may have asked wheather it is possible to have the indent of 3.1 be equal to the indent of 3.1.X. If that is the case you want to take a look at the tocloft package. It allows you to configure the TOC.

share|improve this answer
    
I did not get your point. The problem is due to section part, but you are giving a subsection example? Could you please be more explanatory? –  Rıza Bayoğlu Jan 17 '13 at 9:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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