Text FormattingBorder/Padding Above ToC, List of Figures, List of Tables

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
surrix
Posts: 9
Joined: Sun Nov 08, 2009 7:07 pm

Border/Padding Above ToC, List of Figures, List of Tables

Post by surrix »

Hey guys,

I use the following code to make the padding above Chapter headings match the padding around the rest of the text, so that there's approximately a 1 inch border around the whole document:

Code: Select all

\makeatletter
\renewcommand{\@makechapterhead}[1]{%
%\vspace*{0 pt}%
{\setlength{\parindent}{0pt} \raggedright \normalfont
\bfseries\Huge\thechapter.\ #1
\par\nobreak\vspace{20 pt}}} % Set this back to 40 pt if doublespacing is removed!
\makeatother
My Table of Contents, List of Figures, and List of Tables headings, however, still have their default large borders above them. How do I apply the same formatting to those headings?

Thanks

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Border/Padding Above ToC, List of Figures, List of Tables

Post by gmedina »

Those depend on \chapter* (the starred version), so you will also have to do some changes to the \@makeschapterhead internal command.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
surrix
Posts: 9
Joined: Sun Nov 08, 2009 7:07 pm

Border/Padding Above ToC, List of Figures, List of Tables

Post by surrix »

gmedina wrote:Those depend on \chapter* (the starred version), so you will also have to do some changes to the \@makeschapterhead internal command.
Perfect, got it. Thanks.

Code: Select all

\makeatletter
\renewcommand{\@makeschapterhead}[1]{%
%\vspace*{0 pt}%
{\setlength{\parindent}{0pt} \raggedright \normalfont
\bfseries\Huge #1
\par\nobreak\vspace{20 pt}}} % Set this back to 40 pt if doublespacing is removed!
\makeatother
Post Reply