Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to put a logo above my title, but I would also like to keep the title/author/date on the first page of text.

All of the solutions I've found so far relate to the title page package, which instigates a separate page.

Inserting a figure turns the first page into a 'regular' page, with header and footer, followed by the title on the next page.

I'm using article class.

Any suggestions?

Code below is slightly modified from XeLaTeX template to provide MWE.

\documentclass[12pt]{article}
\usepackage{geometry} 
\geometry{a4paper}              

\usepackage{graphicx}
\usepackage{amssymb}


\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Hoefler Text}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}
\setmonofont[Scale=MatchLowercase]{Andale Mono}

\title{Brief Article}
\author{The Author}
\date{}     

\begin{document}
\maketitle

Content of document, starting straight away, same page...
I would like the image to have appeared at the top, above Brief Article.
    But where to put the command?


\end{document}  
share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

The titling package is what you're looking for:

\documentclass[12pt]{article}
\usepackage{geometry} 
\geometry{a4paper}              

\usepackage[demo]{graphicx} % the demo option is just for the example
\usepackage{amssymb}
\usepackage{titling}

\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Hoefler Text}
\setsansfont[Scale=MatchLowercase,Ligatures=TeX]{Gill Sans}
\setmonofont[Scale=MatchLowercase]{Andale Mono}

\pretitle{%
  \begin{center}
  \LARGE
  \includegraphics[width=6cm,height=2cm]{logo}\\[\bigskipamount]
}
\posttitle{\end{center}}

\begin{document}

\title{Brief Article}
\author{The Author}
\date{}     

\maketitle

Content of document, starting straight away, same page...
I would like the image to have appeared at the top, above Brief Article.
    But where to put the command?


\end{document}  

enter image description here

Note that you're using a quite old syntax for loading fonts.

share|improve this answer
    
This is the one, easy as pie. Especially as I am actually using the titling package in the report. I noticed you have changed \setmainfont for \setromanfont etc. –  Pwdr Feb 7 at 13:49
add comment

Why don't you simply add the picture in to the title like

\title[Brief Article]{\includegraphics[scale=0.2]{example-image-a}\\ Brief Article}

As noted by Barbara, since an article title becomes a running head, it is better to use the optional argument with suitable text for use as header.

Full code:

\documentclass[12pt]{article}
\usepackage{geometry}
\geometry{a4paper}

\usepackage{graphicx}
\usepackage{amssymb}


\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Hoefler Text}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}
\setmonofont[Scale=MatchLowercase]{Andale Mono}

\title[Brief Article]{\includegraphics[scale=0.2]{example-image-a}\\ Brief Article}
\author{The Author}
\date{}

\begin{document}
\maketitle

Content of document, starting straight away, same page...
I would like the image to have appeared at the top, above Brief Article.
    But where to put the command?


\end{document} 

enter image description here

share|improve this answer
    
since an article title becomes a running head, it would be a good idea to use the optional argument for \title to provide suitable text. –  barbara beeton Feb 7 at 14:44
    
@barbarabeeton Fair point :) Edited with thanks. –  Harish Kumar Feb 7 at 14:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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