I am beginner in LaTeX, and I have been unable to find a solution to what looks a simple problem.
I use the article
class for a paper. I have received a rectangular logo, about 40 mm
high and as wide as the text, to be placed on top of every page for the conference. Also every page should have a "RESTRICTED DISTRIBUTION" and a page number at the bottom.
The following code adds neither header nor footer, but the text of the front page is OK. If I remove the \maketitle
, the header appears (but not the footer) and the title is removed….
Other attempts add the header and footer, but move all the text, abstract, etc to the second page. I have been trying a number of things.
What it the correct solution?
\documentclass[11pt, a4paper, english]{article}
\usepackage[top=20mm, bottom=30mm, left=18mm, right=18mm]{geometry} %Layout of page
\usepackage[english]{babel}
\usepackage{fancyhdr, lipsum}
\usepackage[draft]{graphicx}%
\fancypagestyle{titlepage}{
\setlength{\headheight}{175pt}
\fancyhf{}
\centering
\fancyhead[C]{\includegraphics[width= \textwidth]{AbstractHeader.jpg}}
\fancyfoot[R]{\bfseries{\thepage}}
\fancyfoot[C]{RESTRICTED DISTRIBUTION}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
} %
\begin{document}
\begin{titlepage}
\thispagestyle{titlepage}
\title{Using \LaTeX for industrial documents}
\author{Do \underline{\large{NOT}} list authors in this document}
\maketitle
\begin{abstract}
\lipsum[1]
\end{abstract}
\section{Background}
\lipsum[2]
\end{titlepage}
\end{document}
Best Answer
All you have to do is to redefine the
plain
page style (internally issued by the\maketitle
command) to be thefancy
style you defined:As azetina mentions in a comment, another option would be to use the background package to place the logo and the footer in all the pages of your document. A little example:
Some general remarks:
demo
option forgraphicx
was only used to replace the actual image with a black rectangle; do not use that option in your actual code.height=40mm
as an option for\includegraphics
to simulate the actual size of the logo; probably you won't need to set that option explicitly.\SetBgVshift
and also of the top margin.titlepage
environment so I removed it from my examples.