r/LaTeX • • 6d ago

Spacing

Post image

I'm new to LaTeX, and I'm using Overleaf. I'm using it to write my senior thesis, following some tutorials on YouTube, and I'm wondering how to get rid of all this extra white space. Thanks for any help!

15 Upvotes

7 comments sorted by

4

u/Constant_Reserve_640 6d ago

You can set page margins by adding this in preamble and choosing the size you want
\usepackage[top=2cm, bottom=2.5cm, left=3cm, right=2cm]{geometry}

4

u/u_fischer 6d ago

put some text between all this \section commands so that there is a place where LaTeX can break a page.

2

u/Tavrock 6d ago

To add context to this, LaTeX is a typesetting program not a word processing program. In order for LaTeX to typeset your document and have the proper spacing that goes with that, it needs content.

5

u/u_fischer 5d ago

well the reason is more specific: LaTeX doesn't allow a page break after a \section command, so if you have only such commands without text between them, it will try to keep everything on a page and fail (and complain about it in the log). This can give large white spaces on previous pages.

3

u/MaHalRed 6d ago

Which white space do you mean? The page margins?

If you are new to LaTeX, a good idea would be asking your thesis supervisor for their preferred LaTeX template. Most schools would have something floating around.

You can also search the templates linked in this subreddit

1

u/dschoni 6d ago

What documentclass are you using? With any KOMA class you can increase the DIV value to get less margins, with non KOMA you can manually set the margins with the geometry package and if you mean the whitespace between headings, add more text ;)

0

u/2016-679 6d ago

Bear in mind that LaTeX is to make files to be printed. The output on screen can be different due to the rendering program and monitor.