localghost wrote:This code snippet is useless, thus represents no solution. It uses self-defined stuff and commands from other packages. A full example would be best to comprehend what you did. Finally your are not only writing here for yourself, but also for others.
I could respond to this comment in many ways, however, for the best of humanity I choose to make things crystal clear, in the best possible way that I can:
The problem: I wanted to have one header in the first page of my doc and a different one in the remaining pages. Also, only one footer in the first page and nothing in the rest.
The solution: Redefine, via "\fancypagestyle", the plain pagestyle and later use it, when required. This is shown in the previous "useless" snippet.Then, when the
document begins (that is, the first page of my doc, which I want it to be different than the rest):
Code: Select all
\begin{document}
\maketitle\thispagestyle{plain}
[/code]
we may call:
, defined above with the
parameters that apply in each case ( for me it was a \chead and a \cfoot ). This way, we are asking latex to use
the pagestyle we have user-defined, for the first page only, in order to differ from the rest.
Now, for the rest of the pages in my doc, I used again the previous "useless" snippet, given in my previous post. So all in all, the code would like:
Code: Select all
\documentclass[whatever_here]{something_here}
.....
.....
.....
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COMMANDS FOR OTHER PAGES HEADER/FOOTER GO HERE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{as_u_prefer_here}
\rhead{yada..yada...yada}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COMMANDS FOR FIRST PAGE ONLY HEADER/FOOTER GO HERE (redefine via \fancypagestyle the plain pagestyle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fancypagestyle{plain}{
\fancyhf{}
\renewcommand{\headrulewidth}{as_u_prefer_here}
\chead{bla..bla}
\cfoot{yada..yada}
}