I am trying to insert a table on the header, just like the example below. The whole document where I was inspired to create this header can be found here Moshell User Guide.
On this picture this is header on every page of the document. The pages of course can vary based on the page number.
I have created a sample of code, that can reproduce the table format and also the header with the logo on the left the text in the middle and the page numbering on the right.
Sample of code provided below:
\documentclass{memoir}
\usepackage[ a4paper , centering ]{geometry}
\usepackage{graphicx} % demo option just for the example
\usepackage{lipsum} % demo option just for text
\usepackage{lastpage} % include last page numbering
\usepackage{chngpage} % allows for temporary adjustment of side margins
\usepackage{datetime}
\newdateformat{mydate}{\THEYEAR-\twodigit{\THEMONTH}-\twodigit{\THEDAY}}
\makepagestyle{mystyle}
\makeevenhead{mystyle}{\includegraphics[height=20pt]{LaTeX_logo}}{\hspace{3cm}Informational\\\hspace{3.1cm} USER GUIDE}{\thepage(\pageref{LastPage})}
\makeoddhead{mystyle}{\includegraphics[height=20pt]{LaTeX_logo}}{\hspace{3cm}Informational\\\hspace{3.1cm} USER GUIDE}{\thepage(\pageref{LastPage})}
\pagestyle{mystyle}
\begin{document}
\begin{table}
\begin{adjustwidth}{-1in}{-1in}
\begin{center}
\begin{tabular}{|l|l|l|l|l|l|}
\hline
\multicolumn{3}{|l}{{\small\textbf{Prepared (subject responsible)}}} & \multicolumn{3}{|l|}{{\small\textbf{No.}}} \\
\multicolumn{3}{|l}{Thanos 1 \& Thanos 2} & \multicolumn{3}{|l|}{1553-CXC1328930} \\ \hline
\multicolumn{1}{|l}{{\small\textbf{Approved (Document responsible)}}} & & \multicolumn{1}{l}{{\small\textbf{Checked}}} & \multicolumn{1}{|l}{{\small\textbf{Date}}} & \multicolumn{1}{|l|}{{\small\textbf{Rev.}}} & \multicolumn{1}{l|}{{\small\textbf{Reference}}} \\
\multicolumn{1}{|l}{ } & \multicolumn{1}{l}{ } & \multicolumn{1}{l}{ } & \multicolumn{1}{|l}{\mydate\today} & \multicolumn{1}{l}{J} & \multicolumn{1}{l|}{Thanos\_UserGuide.tex} \\ \hline
\end{tabular}
\end{center}
\end{adjustwidth}
\end{table}
\tableofcontents
\listoffigures
\listoftables
\lipsum[1-20]
\end{document}
I want the header to start from the very first page. Unfortunately on my code the header starts on the second page because of the table of contents, list of figures and list of tables. I am using the memoir class because I think it is the most correct to solve my problem but maybe it can be done also by other classes. Thanks in advance for your time and effort.
Aucun commentaire:
Enregistrer un commentaire