Text Formatting ⇒ Modifying the Table of Contents
Modifying the Table of Contents
Hello,
How can I do something like this:
..................TABLE OF CONTENTS................
TITLE.....................................PAGE
CHAPTER ONE: ..............................23
Specifically, how can I center the title TABLE OF CONTENTS and add the TITLE address in the left and PAGE address in the right.
Note: For the title TABLE OF CONTENTS I am using the \chapter command, i.e.: \chapter{\contentsname}
Thanks in advance
How can I do something like this:
..................TABLE OF CONTENTS................
TITLE.....................................PAGE
CHAPTER ONE: ..............................23
Specifically, how can I center the title TABLE OF CONTENTS and add the TITLE address in the left and PAGE address in the right.
Note: For the title TABLE OF CONTENTS I am using the \chapter command, i.e.: \chapter{\contentsname}
Thanks in advance
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: Modifying the Table of Contents
Have you tried using the tocloft package? The documentation is quite extensive to help you achieve what you want.
Regards,
sridhar
Regards,
sridhar
OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
Modifying the Table of Contents
Thank you sridhar for replying.mas wrote:Have you tried using the tocloft package? The documentation is quite extensive to help you achieve what you want.
Regards,
sridhar
Actually, I am not professional in Latex, and I don't know how to handle and create my own layout.
I just discussed my master thesis and the Faculty of Graduate Study needs me to make some modifications in order for my thesis to be accepted and the certificate to be generated. However, these requirements make it difficult for me. At the same time, it is too late to return to the Microsoft Word because my thesis is already written in Latex. I think it is more efficient to continue in Latex than using the Word at this point.
So, any help will be highly appreciated.
Best regards
Re: Modifying the Table of Contents
Which document class are you using? Memoir, or something else?
Presumably you want spaces where the '.' symbols appear in your original
e-mail?
tocloft will not change the overall layout, as I understand it.
Presumably you want spaces where the '.' symbols appear in your original
e-mail?
tocloft will not change the overall layout, as I understand it.
Modifying the Table of Contents
Yes, I am using the Memoir class. I really need this very soon. The '.' symbols are just to illustrate my point here where it is not allowed to do more than one space.adrian wrote:Which document class are you using? Memoir, or something else?
Presumably you want spaces where the '.' symbols appear in your original
e-mail?
tocloft will not change the overall layout, as I understand it.
Thanks in advance
Re: Modifying the Table of Contents
at the moment I don't think there is any package that provides the Title and Page headers for the titles and page number 'columns'
I'm thinking about adding such a feature to memoir, but how do you add it after a page break in a long toc?
How long is the ToC? We might be able to hack something.
I'm thinking about adding such a feature to memoir, but how do you add it after a page break in a long toc?
How long is the ToC? We might be able to hack something.
Modifying the Table of Contents
It would be great if there is a package provides such options. However, as I know, you can tail features you want using Latex. Unfortunately, during my working on my thesis, I have focused on the contents and contribution more than the format and layout. Anyway, the ToC in my thesis is two pages long.daleif wrote:at the moment I don't think there is any package that provides the Title and Page headers for the titles and page number 'columns'
I'm thinking about adding such a feature to memoir, but how do you add it after a page break in a long toc?
How long is the ToC? We might be able to hack something.
Best regards
Modifying the Table of Contents
Let's see if this helps. I used \book sectioning command provided by memoir class to typeset fake "Title" and "Page" entries in TOC. I choose it since it is not used that much.
Note that this is manual approach and not very elegant, but since your TOC isn't that long, it may be used. Another way could be using headers for this purpose (with fancyhdr or memoir's own way); this way you don't have to do any manual work. However, if you're already using header (e.g. for typesetting "Table of contents" and/or page numbers), then this manual approach may be easier.
Here's an example code:
BTW, I don't see any reason to use \chapter{\contentsname}.
Note that this is manual approach and not very elegant, but since your TOC isn't that long, it may be used. Another way could be using headers for this purpose (with fancyhdr or memoir's own way); this way you don't have to do any manual work. However, if you're already using header (e.g. for typesetting "Table of contents" and/or page numbers), then this manual approach may be easier.
Here's an example code:
Code: Select all
\documentclass{memoir}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
%%%%%%% Setting contents name
\renewcommand{\printtoctitle}[1]{\hfill\Huge\bfseries TABLE OF CONTENTS\hfill\vspace{1em}}% Setting custom contents title; change \vspace as you like
%%%%%%% Book entry
\renewcommand{\booknumberline}[1]{}% removes book number
\renewcommand{\cftbookformatpnum}[1]{}% removes book page number in TOC
\renewcommand{\cftbookfont}{\normalfont\Large}% formatting
\newcommand{\addtitlepage}{\addcontentsline{toc}{book}{TITLE\hfill PAGE}}% a new command to add in text where "Title" and "Page" should appear in TOC
\usepackage{blindtext}
\begin{document}
\addtitlepage% adding "Title" and "Page" in TOC at the beginning
\addcontentsline{toc}{chapter}{TABLE OF CONTENTS}% adds "Table of Content" entry in TOC
\tableofcontents*% use stared version of TOC; previous line adds customized entry in TOC
\Blinddocument
\Blinddocument
\Blinddocument
\Blinddocument
\Blinddocument
\Blinddocument
\Blinddocument
\Blinddocument
\addtitlepage% added a manual entry posing as "Title" and "Page" in TOC; I added it here because after 8th chapter there is a pagebreak in TOC
\Blinddocument
\Blinddocument
\end{document}