# How do I use \hfill and \maketitle without creating a blank page?

I'm trying to put my name in the right-hand side of the header and have a title that is not on its own page. When I put \hfill before \maketitle, I get a page with just the header, followed by the rest of the document. When I put it after, LaTeX prints the header below the title. I tried using \nopagebreak[4] but it didn't make a difference. How can I get the header to print above the title on one page?

This is the start of my code:

\documentclass[12pt]{article}
\usepackage{tikz, amsmath}
\title{My title}
\author{}
\date{}
\setlength{\parindent}{.5in}
\pdfpagewidth 8.5in
\pdfpageheight 11in

\begin{document}
\hfill My Name
\maketitle

-
Welcome to TeX.sx! –  Kurt Feb 22 '13 at 1:21

\documentclass[12pt]{article}
\usepackage{tikz, amsmath}
\usetikzlibrary{calc}
\title{My title}
\author{}
\date{}
\setlength{\parindent}{.5in}
\pdfpagewidth 8.5in
\pdfpageheight 11in

\newcommand{\myname}[1]{%
\begin{tikzpicture}[overlay, remember picture]
\node[anchor=east] at ( $(current page.north east) + (-1in,-2cm)$) {#1};
\end{tikzpicture}%
}

\begin{document}
\maketitle
\myname{My Name}
\end{document}


-
It's perfect. Thanks. –  user26305 Feb 22 '13 at 1:34