Page LayoutNo Page Break between ToC and LoF

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
swagatopablo
Posts: 16
Joined: Sun Mar 25, 2012 10:57 am

No Page Break between ToC and LoF

Post by swagatopablo »

I am preparing a report with latex. In the beginning of the documents, whenever I am putting

Code: Select all

\tableofcontents
\listoffigures
the list of figures shifts to the next page albeit both the table of contents and the list are small enough to fit into a single page together. Even when I am inserting another command like

Code: Select all

\tableofcontents
\nopagebreak
\listoffigures
the situation doesn't change. Is it possible to put both of them in a single page?

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

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

No Page Break between ToC and LoF

Post by Frits »

If you're using the "article" document class this shouldn't be a problem, so I'm assuming you're using something else ("report"/"book"/memoir even).

One solution would be to temporally disable the \clearpage command which causes the page break:

Code: Select all

\tableofcontents
\begingroup
\let\clearpage\relax
\listoffigures
\endgroup
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
Post Reply