So in this lesson we will learn how to make some fancy headers and footers in a document
and we will be using the document class of book because book offers us a lot of variety
so that we can explore all these features and the package which we will be using is
called fancy header so which is denoted by fancyhdr. So this is the package and only
this package we will be discussing and then later may be we will use the package geometry
which we have already discussed in one of the previous lectures so only with the help
of these two packages we will see how we can achieve different forms of headers and footers
in a document so in this document this is some text nothing special about this this
last paragrapgh, this is just a dummy text which i have put here just to increase the
number of pages i actually just copy and pasted some text twice so that we can get some pages
in this document and there is some detail about this package which we are discussing
now so this will be helpfull for you later as a reference so if i compile this document
but before we start i want to show you few page styles which we have by default in latex
and then we will come back to this program so by default we have four page styles in
latex so the first page style is empty so if you use this page style and i will show
you how we can use these page styles in empty page style there is no header and no footer
and please note that when we talk about page styles there are two main things one is the
header and the other is the footer so these are the two main things which basically alters
the style of the page because all other things are minor you can format the paragrapgh and
other things but these are the two major things which change the look and feel of a page so
what type of header we have do we have header or not and what type of footer we have or
dont have a footer so if we if we use empty page style in a document so this page will
not have any header and no footer and if we use plain page style so there will not be
any header but there will be a footer and the page number will be at the centre of the
footer so probably you all know that if this is the page so this is for example our text
area inside this page so this part here is called header and this part here is called
footer so the in plain style have only page number at the bottom in the middle here so
there is no header so if we use this heading page style so in heading page style we dont
have any footer but we have header and our page number will become here at this left
of the page and then there will be a chapter number because we are using we will be using
book class so article class does not support chapters so please note this thing so in this
heading style we will have our page number here and then chapter of the book or a report
and then we have section so it will show like this it will show the chapter and i will show
you in a minute how it looks like if you are using myheading style so it will contain the
chapter name and plus any information you want to include in this so these are four
default page styles in latex but because these four have very limited capabilities styling
is concerned so what an do we have couple of options he first option is that you can
actually redefine all of these pages and the second option is while making the pdf, you
can use certain output variables and by using these output variables you can change he look
and feel of output document so your latex document can use any of these page styles
but while creating the output you can change this with certain variables which you can
use and the third and the easy way is to use a package any other package which can give
you an extra style so this is the simplest way you have already styles you are not happy
with these then you can use an extra package which can provide you an extra style so one
example would be if you use this package fancy header then we can get another style which
is called fancy page style and this is what we will be doing in this lesson another thing
I would like to highlight is that these are some of the commands which effect the style
of the page so we will be using some of these commands in this lecture so I just want to
give you a brief introduction of these commands so the first command is the pagestyle whenever
you put this command \pagestyle in these curly brackets you can put any of these styles available
to you empty, heading, myheadings or if you are you are using that package so you can
also use the fancy page style here so this is one thing the second command which you
can use temporarily for any particular page and that is \thispagestyle so when you put
this command so only that pageill be affected in which you put this command so in this way
you can temporarily change the style of a page while other pages of the document will
stay in any of these styles whatever is the default style of the documentnd another important
command \pagenumbering so there are different styles of numbers for example Arabic numbers
like 2 in this way and then there are Roman numbers so if you write Roman with a case
r the numbering will be like this i, ii and like and with capital you will get capital
numerals like this and with this alph, a l p h if it starts from lowercase you will be
having numbers like this a,b and c so these type of numbering sometimes you need for appendicies
or some glossaries or some terms or some part of your document so if you use this capital
the numbers will be A B and C like capital so you select any of these styles by using
page numbering command now backslah the page, when you put \thepage so basically it inserts
the current page number so if you insert this in a footer or in a header so it will insert
the current page number wherever you insert this so similarly page break obviously forces
the page break no page break means even if there is a page break it will not make it
a break the page so when you put clear page so \clearpage means a page ends where it where
it sees this command and all the tables and figures they will be sent to float pages and
this we will discuss in one of the advanced topics later somewhere in this course so this
will send these two tables and figures all tables and figures will be sent to the float
pages and but no text will be sent so these are some of the commands which effect the
style of the page so I just mentioned briefly here but when we will use these commands then
you will understand how they behave.