Page LayoutMove the top matter

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
zoopilandia
Posts: 4
Joined: Fri Sep 14, 2012 9:26 pm

Move the top matter

Post by zoopilandia »

Hi!

I'm new to the forum and new to LaTeX so you could say I'm a newbie :D.

Is it possible to move the top matter (the title, author, date etc etc). I want it to be a little higher on the page than the standard. Is that possible?

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Move the top matter

Post by Stefan Kottwitz »

Hi,

welcome to the board!

Of course this is possible. To give useful advice, we need to know your document class and how you do your top matter. The best would be, if you would post a Infominimal working example. Just follow that link to learn why and how.

Stefan
LaTeX.org admin
zoopilandia
Posts: 4
Joined: Fri Sep 14, 2012 9:26 pm

Move the top matter

Post by zoopilandia »

Thanks for the swift reply!

Here is all the code:

Code: Select all

\documentclass {article}

\begin{document}
\title{Title}
\author{Author}
\maketitle

\section*{Conclusions}

\

text
\end {document}
That's it, there's nothing else. Thanks!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Move the top matter

Post by Stefan Kottwitz »

For sure there are nice general solutions. As here it's deep in the night already, a quick patch: article.cls uses \vskip 2em before the title, you can disable it by these lines in your preamble, using etoolbox:

Code: Select all

\makeatletter
\patchcmd{\@maketitle}{\vskip 2em}{}{}{}
\makeatother
Then it's at the top of the text area.

Stefan
LaTeX.org admin
zoopilandia
Posts: 4
Joined: Fri Sep 14, 2012 9:26 pm

Re: Move the top matter

Post by zoopilandia »

That's a great start, I managed to get it a little higher by changing 2em to 1em, but it doesn't really change that much. I guess I explained my situation a little bad.

How can you make the top margin (the space between the top edge of the page and the title of the article) smaller? That way the top matter will be higher on the page. I've been looking around in article.cls and I haven't seen anything.

Sorry for the confusion, guys. Thanks!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Move the top matter

Post by localghost »

If you want to alter the page dimensions, take a look at the geometry package.


Best regards and welcome to the board
Thorsten
zoopilandia
Posts: 4
Joined: Fri Sep 14, 2012 9:26 pm

Move the top matter

Post by zoopilandia »

Thank you both for the help. The geometry package did the thing.

What you have to do is put

Code: Select all

\usepackage[top=Xcm]{geometry}
(where X is the number of cm you want) in the preamble. There are also a lot of options for it, so be sure to check out the user manual by following the link in the message above this one.

Cheers!
Post Reply