Page Layoutreduce empty space btw title and top margin

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
onewiki
Posts: 10
Joined: Mon Nov 16, 2009 4:54 am

reduce empty space btw title and top margin

Post by onewiki »

Hi,
In the title page, there is a lot of space between the title and the top margin. How can I reduce it? Thank you very much.

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

magicmoose
Posts: 90
Joined: Fri Nov 06, 2009 7:29 am

reduce empty space btw title and top margin

Post by magicmoose »

Hi

You could make your own custom titlepage, see here for more information

Hope that helps
onewiki
Posts: 10
Joined: Mon Nov 16, 2009 4:54 am

Re: reduce empty space btw title and top margin

Post by onewiki »

thanks for your reply, but is there an easier way since I only need to change the amount of space?
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: reduce empty space btw title and top margin

Post by josephwright »

Not really. The standard LaTeX layouts are rather inflexible.
Joseph Wright
onewiki
Posts: 10
Joined: Mon Nov 16, 2009 4:54 am

Re: reduce empty space btw title and top margin

Post by onewiki »

Is it possible to do that by changing the top margin for just this page? What's the best way to change margins for just one page? Thanks.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

reduce empty space btw title and top margin

Post by gmedina »

Hi,
onewiki wrote:Is it possible to do that by changing the top margin for just this page?..
I don't think so. The link provided by magicmoose contains a useful example. Perhaps if you tell us which document class you are using, how are you building your titlepage, and what kind of layout you are looking for the titlepage, we could give additional advise.
onewiki wrote:...What's the best way to change margins for just one page? Thanks.
You could try one of the environments provided by the changepage package.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
onewiki
Posts: 10
Joined: Mon Nov 16, 2009 4:54 am

Re: reduce empty space btw title and top margin

Post by onewiki »

Here are some codes, just plain ones. Thanks.

\documentclass[12pt]{article}

............

\title{sometitle}
\author{me}
\maketitle
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

reduce empty space btw title and top margin

Post by gmedina »

Hi,

try this:

Code: Select all

\documentclass{article}
\usepackage{lipsum}% just to automatically generate some text

\makeatletter
\renewcommand\maketitle{%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
  \null
  \vskip 0\p@ % default: 60pt
  \begin{center}%
    {\LARGE \@title \par}%
    \vskip 3em%
    {\large
     \lineskip .75em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
      \vskip 1.5em%
    {\large \@date \par}% 
  \end{center}\par
  \@thanks
  \vfil\null
  %
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
\makeatother

\title{The title}
\author{The Author}

\begin{document}

\maketitle
\lipsum[1-4]

\end{document}
I borrowed the code from the file article.cls. Change the value of the \vskip command in the line commented with "default: 60pt" according to your needs.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
onewiki
Posts: 10
Joined: Mon Nov 16, 2009 4:54 am

Re: reduce empty space btw title and top margin

Post by onewiki »

I tried it, but changing the value of the \vskip command does nothing.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

reduce empty space btw title and top margin

Post by gmedina »

Then use the \changepage command, provided by the changepage package:

Code: Select all

\documentclass{article}
\usepackage{changepage}
\usepackage{lipsum}% just to automatically generate some text

\title{The title}
\author{The Author}

\begin{document}

\changepage{4cm}{}{}{}{}{-4cm}{}{}{}% adding 4 cm to the textheight
\maketitle
\lipsum[1-4]
\clearpage
\changepage{-4cm}{}{}{}{}{4cm}{}{}{}% restoring the original values
\lipsum[1-4]

\end{document}
Of course, instead of 4cm use the value that suits your needs.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply