General ⇒ customizing TOC
customizing TOC
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
...
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
customizing TOC
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: customizing TOC
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 20005 times
- Stefan Kottwitz
- Site Admin
- Posts: 10397
- Joined: Mon Mar 10, 2008 9:44 pm
Re: customizing TOC
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
Re: customizing TOC
\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 17919 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
customizing TOC
Code: Select all
\renewcommand{\cftchappresnum}{\chaptername\space}
\settowidth{\cftchapnumwidth}{\widthof{\cftchappresnum}}
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: customizing TOC
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}Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
customizing TOC
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