10

I need to make a title page with a logo on the top left corner, the title and the author centered and another picture under this. I tried this code but the problem is that the second image is right under the logo and the title and the author are on another page.

%%!TEX encoding = UTF-8 Unicode

\documentclass[a4paper,12pt]{article}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xspace}
\usepackage{epstopdf}
\usepackage[frenchb]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\geometry{dvips,a4paper,margin=1.5in}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}



\begin{document}

    \begin{titlepage}

        \includegraphics[width = 40mm]{logo.jpg}

        \begin{center}

            \title{Report}
            \author{Author}
            \date{Septembre 2013}

            \includegraphics[width = 40mm]{image.png}

        \end{center}

    \end{titlepage}

    \maketitle

\newpage

\tableofcontents

\newpage

\vspace{2.5cm}

\section{Abstract}

\newpage

\section{Introduction}

\end{document}
  • \maketitle has a predefined layout. To change it you should edit that command. In your case, is better to type the title page as you want. Instead of using \title{} format it using \textbf{}, large or something else. Also, you can use \vspace{??cm} to insert vertical space. – Sigur Jul 26 '13 at 13:51
  • My images have the same width and height, about 200x200 px – Elie Gnrd Jul 26 '13 at 14:05
10

The problem is that \author, \title and \date are only definitions, not commands to print this information. These commands in titlepage without \maketitle do nothing. So all is printed when you said \maketitle, that is, after the title page.

Usually you choose between using only \maketitle at the beginning of the document, that print \author, \title and \date at the top of the article (defined before, preferably in the preamble) with a default format, or a titlepage environment to have a title page, where you simply insert what you want with the format that you want.

But in order to clean the document environment, you can also redefine \maketitle so this command followed by a \newpage (or inside titlepage) make all the work:

MWE

\documentclass[a4paper12pt]{article}
\usepackage{geometry}
\usepackage[demo]{graphicx}

\title{Report}
\author{Author}
\date{Septembre 2013}

% Definition of \maketitle
\makeatletter         
\def\@maketitle{
\raggedright
\includegraphics[width = 40mm]{logo.jpg}\\[8ex]
\begin{center}
{\Huge \bfseries \sffamily \@title }\\[4ex] 
{\Large  \@author}\\[4ex] 
\@date\\[8ex]
\includegraphics[width = 40mm]{image.png}
\end{center}}
\makeatother


\begin{document}

\maketitle
% \thispagestyle{empty}
\newpage

\tableofcontents

\newpage
\vspace{2.5cm}
\section{Abstract}
\newpage
\section{Introduction}
\end{document}
4

Fran's solution works, but I prefer the following variant, because it essentially allows you to prepend the title page before the original document, which is sometimes useful.

\documentclass{article}

\usepackage{graphicx}

\title{My Title}
\author{My name}
\date{November 2, 2015}

\begin{document}

\makeatletter
    \begin{titlepage}
        \begin{center}
            \includegraphics[width=0.7\linewidth]{logo.png}\\[4ex]
            {\huge \bfseries  \@title }\\[2ex] 
            {\LARGE  \@author}\\[50ex] 
            {\large \@date}
        \end{center}
    \end{titlepage}
\makeatother
\thispagestyle{empty}
\newpage

%Add content for page two here (useful for two-sided printing)
\thispagestyle{empty}
\newpage

\maketitle
\setcounter{page}{1} %Start the actually document on page 1

\begin{abstract}
...
\end{abstract}

\section{Introduction}
...

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.