General ⇒ customizing TOC
customizing TOC
Hi,
I know this has been asked before and given reference to tocloft package.
However, as I'm new to latex, I appreciate that if someone can give me an example script
TOC needs to be
Table of Contents (mid of page)
Chapter(left of page) Page(right)
DEDICATION...............................ii
ACKNOW.....................................iii
.
.
.
CHAPTERS
(indent)CHAPTER 1-- Introduction...1
(more indent)1.1 N#1...................2
.
.
.
APPENDICIES
(indent) Appendix A--Numerical......100
...
I know this has been asked before and given reference to tocloft package.
However, as I'm new to latex, I appreciate that if someone can give me an example script
TOC needs to be
Table of Contents (mid of page)
Chapter(left of page) Page(right)
DEDICATION...............................ii
ACKNOW.....................................iii
.
.
.
CHAPTERS
(indent)CHAPTER 1-- Introduction...1
(more indent)1.1 N#1...................2
.
.
.
APPENDICIES
(indent) Appendix A--Numerical......100
...
NEW: TikZ book now 40% off at Amazon.com for a short time.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
customizing TOC
Try your luck with tocloft. In case of occurring questions, feel free to ask.
Best regards
Thorsten¹
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: customizing TOC
I've went through "tocloft" and solved a few typesettings.
However, there are still some are remaining
1. How to insert "CHAPTERS" as a separate line before Chapter1, 2.... starts
2. How to change the font of all the contents listed NOT in bold face.
Only "Table of Contents" and "Chapter ....... Page" remain in bold.
3. How to insert "..........." between to all the contents and pages?
Thanks very much for any hint!
ps: TOC format attached
However, there are still some are remaining
1. How to insert "CHAPTERS" as a separate line before Chapter1, 2.... starts
2. How to change the font of all the contents listed NOT in bold face.
Only "Table of Contents" and "Chapter ....... Page" remain in bold.
3. How to insert "..........." between to all the contents and pages?
Thanks very much for any hint!
ps: TOC format attached
- Attachments
-
- toc-format.png (21.27 KiB) Viewed 19077 times
Last edited by chao on Fri Jun 20, 2008 12:40 am, edited 1 time in total.
- Stefan Kottwitz
- Site Admin
- Posts: 10322
- Joined: Mon Mar 10, 2008 9:44 pm
Re: customizing TOC
Hi chao,
perhaps post a minimal example that shows how you typeset the table of contents using tocloft until know, then we probably could suggest changes.
Stefan
perhaps post a minimal example that shows how you typeset the table of contents using tocloft until know, then we probably could suggest changes.
Stefan
LaTeX.org admin
Re: customizing TOC
sty file
\usepackage[subfigure]{tocloft}
...
\renewcommand{\contentsname}{Table of contents} % change "Contents" to "Table of Contents"
\renewcommand{\cfttoctitlefont}{\hfill\large\bfseries\MakeUppercase} % change toc title to upper case
\renewcommand{\cftaftertoctitle}{\hfill}
\renewcommand{\cftchapfont}{\MakeUppercase} % change chapter headings to uppercase
\renewcommand{\cftchappresnum}{CHAPTER } % try to put "Chapter" in front of e.g."1. Introduction"
main.tex file
...
\titlepage
\addtocontents{toc}{\bfseries \underline{Chapter} \hfill \underline{Page}\par} % add underlined "Chapter" and "page" before actually contents show up.
...
Now I'm stuck with the previously mentioned questions
Attached is a toc I finished
Hope this could help to understand my problem
\usepackage[subfigure]{tocloft}
...
\renewcommand{\contentsname}{Table of contents} % change "Contents" to "Table of Contents"
\renewcommand{\cfttoctitlefont}{\hfill\large\bfseries\MakeUppercase} % change toc title to upper case
\renewcommand{\cftaftertoctitle}{\hfill}
\renewcommand{\cftchapfont}{\MakeUppercase} % change chapter headings to uppercase
\renewcommand{\cftchappresnum}{CHAPTER } % try to put "Chapter" in front of e.g."1. Introduction"
main.tex file
...
\titlepage
\addtocontents{toc}{\bfseries \underline{Chapter} \hfill \underline{Page}\par} % add underlined "Chapter" and "page" before actually contents show up.
...
Now I'm stuck with the previously mentioned questions
Attached is a toc I finished
Hope this could help to understand my problem
- Attachments
-
- toc-format-done.png (32.88 KiB) Viewed 16991 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
customizing TOC
You have to set the space which is reserved for the chapter number to a suitable value.
For further information see section 2.3 of the tocloft documentation.
Best regards
Thorsten¹
Code: Select all
\renewcommand{\cftchappresnum}{\chaptername\space}
\settowidth{\cftchapnumwidth}{\widthof{\cftchappresnum}}
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: customizing TOC
The adding chapter in front of number problem is solved.
However,
"In the default ToC typsetting only the more minor entries have dotted leader \cftdot lines between the sectioning title and the page number. The tocloft package pro- vides for general leaders for all entries"
How to add dotted leader to all entries?
However,
"In the default ToC typsetting only the more minor entries have dotted leader \cftdot lines between the sectioning title and the page number. The tocloft package pro- vides for general leaders for all entries"
How to add dotted leader to all entries?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
customizing TOC
Add a command to your preamble to get the desired result.chao wrote:[...] How to add dotted leader to all entries?
Code: Select all
\renewcommand{\cftchapdotsep}{\cftdotsep}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
customizing TOC
I am having difficulty with tocloft trying to do some of the same things listed above. The documentation has so few examples that it is hard to work out how to use the commands.
My last remaining task for my dissertation is indenting chapter entries in the TOC. I am using memoir. This is what I have tried so far:
Any suggestions are welcome.
My last remaining task for my dissertation is indenting chapter entries in the TOC. I am using memoir. This is what I have tried so far:
Code: Select all
\renewcommand{\cftchapterpresnum}{\hspace{.5in}\normalfont} % Does not indent the whole entry
\setlength{\cftXindent}{.5in} % Produces errors
\newcommand{\cftchappresnum}{\hspace{.5in}} % Ineffective
\renewcommand*\l@chapter{\@dottedtocline{0}{.5in}{0em}} % Produces errors
customizing TOC
1,1,2,3,5,8,13,21,34,55,89,144,233,...