How can I achieve different margins on different pages? The reason I want to do this is that I have an align environment that I don't want to break in two. So the first page is a little crowded at the bottom but I want all the math together. Right now I use the following code. Sorry I don't know how to fill the page with math like the lipsum package does for text.
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
The geometry package has the \newgeometry command which allow you to define a new page layout in the middle of your document then go back to your initial layout with the \restoregeometry command
There is also \savegeometry, and \loadgeometry if you intend to reuse your new page layout.
This is a very complete package, you can find a lot in the geometry documentation.
If I understand, you just want to add a bit of vertical space at the bottom of a page, so that the align environment fits on just one page. You can achieve that with \enlargethispage . For example, to add 2cm to the page height, put something like
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