I'm trying to use fancy header and \maketitle concurrently. This causes a problem because apparently \maketitle calls \plainstyle, which overrides the fancyhdr settings. Is there a simple patch for this? In the following MWE, commenting and un-commenting line 34 totally changes the layout of the document. I want to preserve all the document characteristics with \maketitle commented out, with just the addition of the title section about the text columns. Any help?
\documentclass[a4paper,11pt]{article}
%..define packages to be used in controlling document features and layout
\usepackage{multicol}
\usepackage[left=1.5cm,right=1.5cm,bottom=2cm,top=1cm]{geometry}
\usepackage{graphicx}
\usepackage[english]{babel}
\usepackage{fancyhdr, lipsum}
\usepackage{textcomp}
\usepackage{titling}
\usepackage{etoolbox} %..http://tex.stackexchange.com/questions/199317/custom-footer-on-title-page-using-maketitle-and-book-document-class
\patchcmd{\maketitle}
{\end{titlepage}}
{\thispagestyle{titlepagestyle}\end{titlepage}}
{}{}
%..This section controls the header-footer layout of the document
\setlength\headheight{25mm}
\pagestyle{fancy}
\fancyhead[L]{\parbox[b][10mm][t]{0.5\textwidth}{\large{COMPANY NAME HERE}}}
\fancyhead[R]{LOGO HERE}
\fancyfoot[C]{\textit{\textcopyright \,DRAFT: SOME COMPANY, \today}}
%..This section controls the title layout
\title{TITLE}
\author{NAME and ID}
\date{\today}
\begin{document}
%\maketitle
\begin{multicols*}{2}
\section{First Section}
Hello, here is some text without a meaning. This text should show what a printed text will look like at this place. If you read this text, you will get no information. Really? Is there no information? Is there...
\section{Second Section}
Hello, here is some text without a meaning. This text should show what a printed text will look like at this place. If you read this text, you will get no information. Really? Is there no information? Is there...
\end{multicols*}
\end{document}
Best Answer
As it stands, the bottom of your pages will disappear to Never, Never Land as soon as you get to the bottom of a column. This is because you change the value of
headheight
aftergeometry
has done its magic.If you include
headheight=25mm
in the options forgeometry
, the header is cut off because you have not allowed sufficient space.top
cannot be smaller than the size you want for the header.article
does not use atitlepage
by default so the patching has no effect. Since it uses an undefined page style, that may be just as well.Here's a fixed version which maintains as much of your layout as possible subject to the constraint of everything fitting on the page. I use
showframe
to make the layout clearer.\thispagestyle{fancy}
is used after\maketitle
to ensure the header and footer.