\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\cfoot{\thepage}
\lhead{\includegraphics[width=0.15\textwidth]{images/image.eps}}
\rhead{
text\\
text\\
text\\
text}
\title{\vspace{-1cm} \centering TITLE}
\author{AUTHOR}
\date{\today}
\begin{document}
\setlength{\headheight}{80pt}
\maketitle
\thispagestyle{fancy}
\end{document}
- 169
-
Welcome to TeX SX! Without a full minimal working example, it's hard to say: we don't even know your document class. – Bernard Nov 20 '16 at 17:44
-
Oh, sorry . The document class is "article" – User01 Nov 20 '16 at 17:51
-
Your example only has one page ... – cfr Nov 20 '16 at 18:13
2 Answers
You could use one style for the document and an other one just for the first page :
\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{empty}
\fancyhf{}
\cfoot{\thepage}
\lhead{COUCOU}
\rhead{
text\\
text\\
text\\
text}
\title{\vspace{-1cm} \centering TITLE}
\author{AUTHOR}
\date{\today}
\begin{document}
\setlength{\headheight}{80pt}
\maketitle
\thispagestyle{fancy}
blabla
\newpage
blabla
\newpage
\newpage
blabla
\newpage
\newpage
blabla
\newpage
\end{document}
- 4,714
-
-
@EijiWatanabe And you will have a lot of white space at the top of every page! – cfr Nov 20 '16 at 20:45
-
for the space at the top see
geometrypackage (http://texdoc.net/texmf-dist/doc/latex/geometry/geometry.pdf) ; For the numbers pages, you can usefancyhdrpackage (https://www.ctan.org/pkg/fancyhdr) to make you own style. – flav Nov 21 '16 at 06:17
It seems to me that the header is really part of the title: it is a one-off addition to the first page. For example, you probably don't really want to change \headheight for your entire document as you'll just end up with ugly space at the top of all pages after the first.
I would, therefore, not use fancyhdr for this, but would customise the title. I like to use titling for this, although you could do it directly if you preferred.
I didn't have your image so I've substituted a cauldron (available separately) and I altered the text on the right as a check on the alignment I was creating.
titling modifies \maketitle in various ways. One of these is that it adds various hooks before, between and after the standard title elements. By default, these are empty. However, by redefining them, material can be added wherever required.
Here, we need only redefine \maketitlehooka to add material before the title.
For example:
\documentclass{article}
\usepackage{titling}
\usepackage{graphicx}
\renewcommand\maketitlehooka{%
\setlength\parindent{0pt}%
\begin{minipage}{\textwidth}
\begin{minipage}{.15\textwidth}
\includegraphics[width=\linewidth]{cauldron}
\end{minipage}%
\begin{minipage}{.85\textwidth}
\raggedleft
text\par
more text\par
yet more text\par
the final word
\end{minipage}%
\end{minipage}\vskip 2.5ex
\par
\hrule
}
\title{TITLE}
\author{AUTHOR}
\date{\today}
\usepackage{kantlipsum}
\begin{document}
\maketitle
\kant[1-10]
\end{document}
Don't put spacing and markup in the arguments to things like \title{}. The default centres the contents anyway and adjustments to vertical spacing are better made elsewhere. Here, I've used \vskip at the end of \maketitlehooka. I used 2.5ex. Simply increase or decrease this value according to preference.
This way, we don't need to change the header height and subsequent pages aren't affected. The default page numbering is not affected, so there is not even any need for fancyhdr here unless you want to customise the footer or use a custom header on later pages.
- 198,882

