2

I am trying to set margin 0.5in for my latex documents. I used:

\usepackage[margin=0.5in]{geometry}

and it works perfectly fine. However when I added the title on top of the article, the top margin of the first page (which contains the title) does not seem to be 0.5in anymore but became bigger. Is there anyway to make it to 0.5in since I have a 3-page limit and need to put a lot of things into 3 pages.

1
  • 2
    Welcome to TeX.SE! Can you please show us a short, compilable code showing how you build the title. Use package blindtext or simular to create dummy text ...
    – Mensch
    Oct 4, 2017 at 20:48

1 Answer 1

1

You can patch \@maketitle to remove the inserted 2em vertical skip using etoolbox:

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@maketitle}{\null\vskip 2em}{}{}{}
\makeatother

Alternatively, you can also do something crude:

{\def\null\vskip 2em{}\maketitle}

enter image description here

\documentclass{article}

\usepackage{lipsum}
\usepackage[margin=0.5in,showframe]{geometry}

\title{A title}
\author{An author}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@maketitle}{\null\vskip 2em}{}{}{}
\makeatother

\begin{document}

\maketitle% or...
% {\def\null\vskip 2em{}\maketitle}

\lipsum[1-17]

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .