9

Hi I have some problem again with my first page, this is my code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\title{balalla}
\author{someone}

\begin{document}

\centering \includegraphics[scale=0.5]{logo_inria}
\nopagebreak
\maketitle


\end{document}

Can someone tell me how to avoid the page break?

2 Answers 2

11

You should rather use

\begingroup
{\centering \includegraphics[scale=0.5]{logo_inria}\par}
\let\newpage\relax%
\maketitle
\endgroup

which locally changes the definition of \newpage - executed by \maketitle to start at fresh on a clean page - to a no-op.

1
  • +1 Using tufte-handout, the accepted answer centres my title (though not my logo) even when removing the center environment around the \includegraphics statement, this answer just works. Apart from the centering issue though, both work equally fine with declaring the logo as a marginfigure :)
    – ThomasH
    Commented Apr 10, 2014 at 14:52
6

You can incorporate the image into the title by the »titling« package.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[demo]{graphicx}   % drop `demo` option in actual document!
\usepackage{titling}

\title{Document Title with incorporated Image}
\author{JaCkO91}

\setlength{\droptitle}{-60pt}
\renewcommand{\maketitlehooka}{%
  \begin{center}
    \includegraphics[scale=0.5]{logo_inria}
  \end{center}%
}

\begin{document}
 \maketitle
\end{document}

enter image description here

You must log in to answer this question.

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