Posts

Showing posts with the label fancyhdr

Changing page style defination of "fancyhdr" package.

In this post I will show how to change the definition of the page style (say empty) if you are using fancyhdr package. Just add the following type of code in the preamble of the document (before the \begin{document} ): \fancypagestyle{empty}{% \fancyhf{} % clear all header and footer fields \fancyfoot[R]{\bfseries \em \thepage } % except the center \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{1pt}} Here you can use all kind of fancyhdr package command to specify you options and formatting. Hope this will be helpful. Cheers APaul

Page no positioning in latex using fancyhdr package.

 We can manually position the page no. in LaTeX using fancyhdr package. To position page no. (or any other thing) in header or footer there are total six position options, left, right and centre in header and footer. The corresponding commands are given in the table bellow position fancy head command left header \lhead right header \rhead centre header \chead left footer \lfoot right footer \rfoot centre footer \cfoot And the page no inserted by the command \thepage . Now suppose I want to insert page no in the left side of each page I can use following code: \documentclass[a4paper, 11pt]{report} \usepackage{amsmath}%just some package not necessary to \usepackage{graphicx}%test this page no. \usepackage{fancyhdr} \pagestyle{fancy} %declaring page style \lhead{\thepage} %page no inserted in left side of header \chead{} \rhead{} \lfoot{} \cfoot{} \rfoot{} \author{Apurba~Paul} \title{Inserting page no in custom position in \L...