Page Layout ⇒ ToC Formatting
ToC Formatting
I am working on my dissertation using latex. I have some difficulties in toc format.
I need double space between header "chapter" and "chapter 31" as shown below. Also I want to delete the highlights and move "Chapter" up as shown below
Here are the tex and sty file as the mwe. Thanks for your help.
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
ToC Formatting
Code: Select all
\addcontentsline{toc}{chapter}{CHAPTER}
Code: Select all
\addtocontents{toc}{CHAPTER\par}
Follow howtoTeX on twitter
ToC Formatting
CHAPTER \\ for one space and \\ \\ for two space and continue. It worked for me.
CHAPTER
\\
31. Chapter 4
This gives required spacing.
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
ToC Formatting
\\
is for ending a line. It's not for adding vertical space, it may be misused that way, such as with \\ \\
etc.\par would end a paragraph, and would add a paragraph skip if that's configured.
\par\vspace{\baselineskip}
would end the paragraph and adds a vertical space of a line height.Stefan
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
ToC Formatting
\\
. It could result in "there's no line to end here" errors and in empty lines at the beginning of a page. To add extra space, you can either use the optional argument of \\
or \vspace
.BTW: A very easy, real solution for the original problem with the first ToC page would be to remove
Code: Select all
\addtocontents{toc}{\protect\thispagestyle{toc}}
Code: Select all
\renewcommand*{\aftertoctitle}{\thispagestyle{plain}%
\par\nobreak \mbox{}\hfill{\normalfont Page}\par\nobreak}
Code: Select all
\renewcommand*{\aftertoctitle}{\thispagestyle{plain}%
\par\nobreak {\normalfont Chapter}\hfill{\normalfont Page}\par\nobreak}
Code: Select all
\addtolength{\headsep}{-\topskip}
