I'm trying to modify \maketitle to add a logo before the title, but it's not showing. I'm gessing the because of the titlepage option in \documentclass[titlepage, a4paper, 12pt]{article} but how to solve it ?

Here is my document :

\documentclass[titlepage, a4paper, 12pt]{article}

\title{CatCatch\\Cahier des charges\\42/2}
\author{John \bsc{Doe} \and Foo \bsc{Bar} \and Someone \bsc{Else}}
\date{19 janvier 2018}

        {\Huge \@title }\\[4ex] 
        {\Large \@author}\\[4ex] 

  • Just remove the titlepage option. What's its purpose? – egreg Jan 15 '18 at 13:22
  • What's the point of redefining \maketitle? What's wrong with \title{\includegraphics[width=120mm]{logo.png}\\[8ex] CatCatch\\Cahier des charges\\42/2} with the original \maketitle command? – user121799 Jan 15 '18 at 13:24
  • the purpose of titlepage is to have the title page separated from the rest of the document – Marc Schmitt Jan 15 '18 at 13:28

The report class defines \maketitle in two different ways, according to the presence of the titlepage option.

When the option is specified, \maketitle will not use \@maketitle, but will directly arrange the elements.

When the option is specified, \maketitle will delegate some aspects to \@maketitle. Use the titlepage environment in the redefinition of \@maketitle.

So, the correct definition for \@maketitle should be

  {\Huge \@title\\[4ex]}% <-- note where the brace is
  {\Large \@author\\[4ex]}% <-- note where the brace is

enter image description here

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.