4

I'm writing a document to my college and it requires a header on every page with two logos and some text, as shown below:

enter image description here

Here are the images:

enter image description here

enter image description here

Any ideas on how to do it? I have tried with the package fancyhdr, but I just couldn't make the figures work with it. The document class is article.

Please note that this header must be on the top of every page of the document and not on just particular ones.

3
  • Possible duplicate of tex.stackexchange.com/q/34040/24974
    – erik
    Apr 27, 2016 at 22:48
  • Is it two-sided? Is thee text just under the horizontal line part of the header?
    – Bernard
    Apr 27, 2016 at 22:52
  • @Bernard It's one sided and the text below the horizontal line is not part of the header. Apr 28, 2016 at 21:39

2 Answers 2

5

Here is a solution, with geometry and titleps, instead of fancyhdr:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{microtype}
\SetTracking[no ligatures={f}]{encoding=*}{40}
\usepackage{graphicx, array}
\usepackage[headheight=136pt, top=6.5cm]{geometry}

\usepackage{titleps}
\usepackage{lipsum} %
\newpagestyle{myheader}{%
\sethead{\includegraphics{htFCS}}{\sffamily\large\raisebox{6ex}{\parbox{6cm}{\centering\lsstyle%
  Centro Universitário da FEI\\[3ex]Projeto de Iniciação Científica}}}{\scalebox{0.75}{\includegraphics{aNF04}}}
\headrule}
\pagestyle{myheader}

\begin{document}

\section{Section One}
\lipsum

\end{document} 

enter image description here

8
  • Thank you very much for your answer! It worked very well. The only remaining problem is that the header doesnt show up on tittlepage, abstract and the table of contents page. Apr 28, 2016 at 21:35
  • Which class of document do you have?
    – Bernard
    Apr 28, 2016 at 21:37
  • Its an article. I managed to add the header to the title page and abstract by using \thispagestyle{myheader} Dont know how to do it with the TOC however. Apr 28, 2016 at 21:48
  • Oops, nevermind. Problem solved! Thank you very much! Apr 28, 2016 at 21:50
  • That's what I was going to answer for this case. Fine! Often the page style in title pages is set to plain.
    – Bernard
    Apr 28, 2016 at 21:50
2

I'm a bit in a rush so I will comment the code later.

I hope this can inspire you.

header with logos

The Code

\documentclass{report}
\usepackage[utf8x]{inputenc}
\usepackage{fancyhdr}
\usepackage[left=4cm,top=6cm,right=3cm,bottom=3cm,headheight=5cm]{geometry}
\pagestyle{fancy}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{tikzpagenodes}
\renewcommand{\headrulewidth}{.2pt}
\lhead{\begin{tikzpicture}[remember picture,overlay]
\node [anchor=west,inner sep=0] (logoLEFT) at (current page header area.west) {\includegraphics[height=3cm]{logoSX}};   
\node [anchor=east,inner sep=0] (logoRIGHT) at (current page header area.east) {\includegraphics[height=3.5cm]{logoDX}};  
\coordinate (tt) at ($(logoLEFT.east)!.5!(logoRIGHT.west)$);
\node [above=.5cm,font=\bfseries\Large] at (tt) {Centro Universitário da FEI};
\node [below=.5cm,font=\bfseries\Large] at (tt) {Projeto de Iniciação Científica};
\end{tikzpicture}}
\begin{document}
\section{First section}
Type your document as usual!
\newpage
\section{Second section}
Type your document as usual!
\end{document}

You must log in to answer this question.

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