# Position of title

I have this chunk of code for the title page:

\documentclass{article}
\usepackage[utf8]{inputenc}
\title{My Title}
\author{My Name}
\date{Today}
\maketitle


I want to position My Title more above on the page. How do I possible achieve this?

• That code won't make a page, title or otherwise. Please can you make it compilable? By default, articles do not have title pages at all. Are you using titlepage or do you just have a title? I guess you want the title to be higher on the page? Have you looked at the titling package? – cfr Feb 23 '18 at 4:42
• @cfr Sorry I forgot writing \maketitle – Jun Jang Feb 23 '18 at 4:44
• @JunJang... Please always test your examples to be sure they are working examples (you miss begin and end document) – koleygr Feb 23 '18 at 4:49
• And you need a document environment. So you are not using a title page but you want less vertical space before the title, is that it? And you're using the standard layout? Are you happy with the default margins? Because, if not, I'd start by loading geometry and setting the margins. Then adjust the title relative to those if you still want to move it. – cfr Feb 23 '18 at 4:49

Let's start by seeing where the title is right now. Completing the example and adding geometry with pass, showframe, we can see the defaults:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[pass,showframe]{geometry}
\title{My Title}
\author{My Name}
\date{Today}
\begin{document}
\maketitle
\end{document}


If you want to fiddle with the margins, do this before adjusting the title. For example, if we drop the pass, we'll get geometry's defaults:

This itself has the effect of reducing the vertical space before the title, because the new top margin is smaller than LaTeX's default.

But you might, of course, want a still smaller margin. If so, adjust that before considering the title.

\geometry{top=20mm}


we get

If, when you've sorted the page layout, you'd still like to adjust the title position, consider loading the titling package.

The default uses a center environment for the title, so let's try just using \centering instead:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry}
\usepackage{titling}
\geometry{top=20mm}
\pretitle{\begingroup\centering\LARGE}
\posttitle{\par\endgroup}
\title{My Title}
\author{My Name}
\date{Today}
\begin{document}
\maketitle
\end{document}


Obviously, the document is now quite unbalanced: if you change top, you will want to change the other margins, too. Tweak as required.

I don't think that geometry is the right tool for this, because you want to move up an element of the first page, rather than changing the page layout.

\documentclass{article}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@maketitle}{\vskip 2em}{\vspace*{-3cm}}{}{}
\makeatother

\begin{document}

\title{My Title}
\author{My Name}
\date{Today}

\maketitle

\end{document}


Adjust -3cm to a value that suits you.