Page LayoutIndentation for Chapter Entries in ToC

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
spirulerlocus
Posts: 2
Joined: Fri Jul 05, 2013 8:18 pm

Indentation for Chapter Entries in ToC

Post by spirulerlocus »

The current formatting of my TOC is:

Code: Select all

                              TABLE OF CONTENTS

LIST OF TABLES....................................................... Page No
LIST OF FIGURES...................................................... Page No
CHAPTER
1  INTRODUCTION...................................................... Page No

2  BACKGROUND LITERATURE............................................. Page No

3  A NETWORK PERSPECTIVE OF ORG...................................... Page No
The formatting needs to be:

Code: Select all

LIST OF TABLES....................................................... Page No
LIST OF FIGURES...................................................... Page No
CHAPTER
   1  INTRODUCTION................................................... Page No

   2  BACKGROUND LITERATURE.......................................... Page No

   3  A NETWORK PERSPECTIVE OF ORG................................... Page No
Note that there is an indent after the word "CHAPTER"


My .tex code is this.

Code: Select all

\documentclass[oneside,12pt]{memoir}

\usepackage{longtable}
\usepackage{amsmath}
\usepackage{graphics}
\usepackage[dvips]{graphicx}
\usepackage{psfrag,epsfig}
\usepackage{amssymb}
\usepackage{array}
\usepackage{lscape}
\usepackage{mathptmx}
\DoubleSpacing
\usepackage{pwasu}
\usepackage{anysize}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{indentfirst}
\usepackage{geometry}
\usepackage{etoolbox}

\parskip 7.2pt
\parindent 0.5in

\DoubleSpacing

\begin{document}
\maxtocdepth{subparagraph}
\pagestyle{plain}
\frontmatter
\thetitlepage

% Macro for List of Symbols
\def\listofsymbols{\input{memoir/symbols} \clearpage}
\def\addsymbol #1: #2#3{$#1$ \> \parbox{5.45in}{#2 \dotfill \pageref{#3}}\\}
\def\newnot#1{\label{#1}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% put your abstract here
\asuabstract
\setcounter{page}{1}
\setlength{\parindent}{.5in}
This is the abstract.


\newpage
\centering{DEDICATION}
\flushleft{Enter your dedication text here}
\clearpage

\asuacknowledgements
\hspace{0.5in} Enter your acknowledgement text here.
\clearpage


\tableofcontents*  
\listoftables
\listoffigures

\cftlocalchange{toc}{400pt}{0cm}% change settings to suppress dots
\cftaddtitleline{toc}{chapter}{CHAPTER}{}% add word "CHAPTER"
\cftlocalchange{toc}{1.55em}{2.55em}% restore original settings %\cftlocalchange{toc}{1.55em}{2.55em}% restore original settings

\newpage

%\newpage
%\chapter*{List of Symbols\hfill} \addcontentsline{toc}{chapter}{LIST OF SYMBOLS/NOMENCLATURE}
%\listofsymbols


\pagestyle{plain}

\pagenumbering{roman}
\setcounter{page}{14}

\clearpage
\newpage

\mainmatter
\pagestyle{asu}

\setcounter{page}{1} \pagenumbering{arabic} %
\setcounter{table}{0}

\pagestyle{plain}


\chapter{Chapter}
\section{This is a section}
\section{This is a section}
\section{This is a section}
\section{This is a section}
\subsection{This is a subsection}
\subsection{This is a subsection}

\chapter{Chapter}
\section{This is a section}
\section{This is a section}
\section{This is a section}
\subsection{This is a subsection}

\chapter{Chapter}

\chapter{Chapter}
\section{This is a section}
\subsection{This is a subsection}
\subsection{This is a subsection}

\chapter{Chapter}
\section{This is a section}
\section{This is a section}
\subsection{This is a subsection}
\subsection{This is a subsection}
\section{This is a section}
\section{This is a section}
\section{This is a section}
\subsection{This is a subsection}
\subsection{This is a subsection}
\subsection{This is a subsection}

\chapter{Chapter}
\section{This is a section}
\section{This is a section}
\section{This is a section}

\chapter{Chapter}

\end{document}
The "pwasu.sty" file is attached.
Attachments
pwasu.sty
The used style file.
(10.7 KiB) Downloaded 353 times
Last edited by localghost on Fri Jul 05, 2013 8:38 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Indentation for Chapter Entries in ToC

Post by Johannes_B »

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Indentation for Chapter Entries in ToC

Post by mas »

You should post a minimal example by removing all the unwanted packages, etc. Most of them are not related to what you want to achieve.

I have pruned your sample. Try the following example:

Code: Select all

\documentclass[oneside,12pt]{memoir}

  \setlength{\cftchapterindent}{2em}
  \setlength{\cftsectionindent}{3em}
  \setlength{\cftsubsectionindent}{4em}

\begin{document}

\tableofcontents*  

\newpage

\setcounter{page}{1} \pagenumbering{arabic} %

\pagestyle{plain}


\chapter{Chapter}
\section{This is a section}
\section{This is a section}
\section{This is a section}
\section{This is a section}
\subsection{This is a subsection}
\subsection{This is a subsection}

\chapter{Chapter}
\section{This is a section}
\section{This is a section}
\section{This is a section}
\subsection{This is a subsection}

\chapter{Chapter}

\chapter{Chapter}
\section{This is a section}
\subsection{This is a subsection}
\subsection{This is a subsection}

\chapter{Chapter}
\section{This is a section}
\section{This is a section}
\subsection{This is a subsection}
\subsection{This is a subsection}
\section{This is a section}
\section{This is a section}
\section{This is a section}
\subsection{This is a subsection}
\subsection{This is a subsection}
\subsection{This is a subsection}

\chapter{Chapter}
\section{This is a section}
\section{This is a section}
\section{This is a section}

\chapter{Chapter}

\end{document}
It gives you an idea of fine tuning the toc entries. Please take a look at the documentation of memoir, under the heading "Content Lists".

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Indentation for Chapter Entries in ToC

Post by localghost »

Just for information to all those who have to build a minimal example, be it for questions or for answers.

Such sample codes can be boiled down further by using the blindtext package instead of using hundreds of single heading commands. The provided example then looks like this.

Code: Select all

\documentclass[12pt,oneside]{memoir}
\usepackage{blindtext}

\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}

\setlength{\cftchapterindent}{2em}
\setlength{\cftsectionindent}{3em}
\setlength{\cftsubsectionindent}{4em}

\begin{document}
  \tableofcontents*  

  \newpage

  \setcounter{page}{1} \pagenumbering{arabic}

  \pagestyle{plain}

  \blinddocument
  \blinddocument
  \blinddocument
  \blinddocument
  \blinddocument
  \blinddocument
  \blinddocument
\end{document}
This way examples become more compact and easier to read. Thus errors or causes of misbehaviour are easier to spot for those who try to help.


Thorsten
spirulerlocus
Posts: 2
Joined: Fri Jul 05, 2013 8:18 pm

Re: Indentation for Chapter Entries in ToC

Post by spirulerlocus »

@localghost and @mas, thank you for the example. I'll incorporate your suggestions into future posts.
Post Reply