17

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}
2
  • \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
    Commented Jul 26, 2013 at 13:51
  • My images have the same width and height, about 200x200 px Commented Jul 26, 2013 at 14:05

4 Answers 4

15

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}
1
  • 1
    Why doesn't with work with amsbook instead of article ? (It gives an There's no line here to end error at the \maketitle line.)
    – Olórin
    Commented Nov 3, 2019 at 14:16
5

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}
1
  • Thank you, I like this, but both with your solution and with Fran's, it claims not to be able to find the author. Here is the code
    – Tanda
    Commented Jan 22, 2023 at 11:52
3

Another elegant solution would be to use the PGF/TikZ package and place the TikZ command after the standard \maketitle call, e.g.

\tikz [remember picture, overlay] %
\node [shift={(1cm,-1cm)}] at (current page.north west) %
[anchor=north west] %
{\includegraphics{logo}};

Option current page.north west ensures the logo will be at the top left corner of the title page and the shift option [shift={(1cm,-1cm)}] allows to control the offsets from the top left.

3
  • I tried it with report document, however, the logo is placed in the second page, not the title page.
    – AlFagera
    Commented Dec 7, 2020 at 19:20
  • Try to reset the title page formatting by placing \thispagestyle{empty} command right after the TikZ commands for logo.
    – mabalenk
    Commented Dec 9, 2020 at 11:55
  • tikz is so powerful and produces beautiful stuff. Like vim, once you get comfortable with it, everything else looks subpar.
    – Dilawar
    Commented Dec 4, 2023 at 4:05
1

Thank you very much. I tried both Fran's and user2768's solutions and in both cases it claims not to be able to find the author. The problem lies in the use of the \documentclass{amsart} rather than \documentclass{article}. Is there any way around this?

Here is the code

\documentclass [a4paper, 12pt]{amsart}

\usepackage{graphicx}

\title{Standard Operating Procedures} \author{Author} \date{\today}

\begin{document}

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

\end{document}

and here is the error

This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./front page.tex LaTeX2e <2020-10-01> patch level 4 L3 programming layer <2021-02-18> (/usr/local/texlive/2021/texmf-dist/tex/latex/amscls/amsart.cls Document Class: amsart 2020/05/29 v2.20.6 (/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?' option. (/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/usr/local/texlive/2021/texmf-dist/tex/latex/amsfonts/umsa.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/amsfonts/amsfonts.sty)) (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/graphicx.sty (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty) (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty) (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics-cfg/graphics.cfg) (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics-def/pdftex.def))) (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/epsfig.sty) (/usr/local/texlive/2021/texmf-dist/tex/latex/psfrag/psfrag.sty) (/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def) (./front page.aux) (/usr/local/texlive/2021/texmf-dist/tex/latex/amsfonts/umsa.fd) (/usr/local/texlive/2021/texmf-dist/tex/latex/amsfonts/umsb.fd) (/usr/local/texlive/2021/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/usr/local/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty (/usr/local/texlive/2021/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))

LaTeX Warning: No \author given.

./front page.tex:18: LaTeX Error: There's no line here to end.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...

l.18 {\LARGE @author}\ [50ex] ? [0 Non-PDF special ignored! header=psfrag.pro {/usr/local/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map} <./logo_ OSP.png>] (./front page.aux) )</usr/local/texlive/2021/texmf-dist/fonts/type1/p ublic/amsfonts/cm/cmbx12.pfb></usr/local/texlive/2021/texmf-dist/fonts/type1/pu blic/amsfonts/cm/cmr12.pfb> Output written on "front page.pdf" (1 page, 89386 bytes). SyncTeX written on "front page.synctex.gz" Transcript written on "front page.log".

1

You must log in to answer this question.

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