# Special header with logo and boxes

I'd like to write lots of procedure to different companies and the header is already fixed. I looks something like that:

I really know only the basics in LaTex but tried to make a code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[magyar]{babel}
\usepackage[left=2.5cm,right=2.5cm,top=3cm,bottom=3cm]{geometry}
\usepackage{parskip}
\usepackage{graphicx}
\pdfgentounicode=1

\begin{document}

\fbox{\begin{minipage}{0pt}
\vspace*{2.5cm}
\end{minipage}%
\begin{minipage}{.22\textwidth}
\begin{center}
\includegraphics[width=2cm]{latex_logo.png}

copany name
\end{center}
\end{minipage}}\hspace{.01\textwidth}%
%
\fbox{\begin{minipage}{0pt}
\vspace*{2.5cm}
\end{minipage}%
\begin{minipage}{.56\textwidth}
\begin{center}
\textsc{Some text}

\textbf{Some text}

more text

\end{center}
\end{minipage}}\hspace{.01\textwidth}%
%
\fbox{\begin{minipage}{0pt}
\vspace*{2.5cm}
\end{minipage}%
\begin{minipage}{.22\textwidth}
\begin{center}
Important

{\footnotesize
\textbf{some information:} ....

\textbf{edited by: }xy
}
\end{center}
\end{minipage}}
\end{document}


My questions:

• Could somebody make this code better? (eg: I used 0pt minipage because I can't make all boxes the same hight...)
• How can I put it in the header? I tried to use fancyhead but it doesn't worked for me (maybe if I can delete the LeftHeader and the RightHeader and change the size of the centered to \textwidth I can do, but it's still a big mess)

Thanks in advance (and happy Christmas)

• Welcome to TeX SX! I would do it using a single tabularx{\textwidth} and 3 columns. For the header, you'll have to specify, as an option of geometry, [headheight=2.5cm]. – Bernard Dec 24 '17 at 23:30

A command like \begin{minipage}[t][2.5cm][c]{.5\linewidth}...\end{minipage} will create a minipage with the specified height of 2.5cm (the minipage will be vertically aligned to the [t]op and its content to the [c]enter).

To place the minipages in the header, you can use fancyhdr but you need to be very careful to avoid having blank lines inside \lhead{...}, \chead{...} and \rhead{...}, because that will generate errors. For example, for the center box:

\chead{%
\fbox{%
\begin{minipage}[t][2.5cm][c]{.5\linewidth}%
\begin{center}
\textsc{Some text}\\
%
\textbf{Some text}\\
%
more text\\
%               %
\end{center}
\end{minipage}%
}% end \fbox


You also need to manually set the header height:

\setlength{\headheight}{3cm}


## MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[left=2.5cm,right=2.5cm,top=3cm,bottom=3cm]{geometry}
\usepackage{parskip}
\usepackage{graphicx}
\pdfgentounicode=1

\usepackage{fancyhdr}
\renewcommand{\footrulewidth}{0pt}
\pagestyle{fancy}
\fbox{%
\begin{minipage}[t][2.5cm][c]{.22\linewidth}%
\begin{center}
%               \includegraphics[width=2cm]{latex_logo.png}
company name
\end{center}
\end{minipage}%
}% end \fbox

\fbox{%
\begin{minipage}[t][2.5cm][c]{.5\linewidth}%
\begin{center}
\textsc{Some text}\\
%
\textbf{Some text}\\
%
more text\\
%               %
\end{center}
\end{minipage}%
}% end \fbox

\fbox{%
\begin{minipage}[t][2.5cm][c]{.22\linewidth}%
\begin{center}
Important\\
%
{\footnotesize
\textbf{some information:} ....\\
%