Page Layoutfancyhdr | Headers and Footers

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
kruftin
Posts: 7
Joined: Tue Apr 17, 2012 6:16 am

fancyhdr | Headers and Footers

Post by kruftin »

Good day!

I find no solution for my question: I need in header and footer for my document with image and I want that header and footer was in even page. I try use fancyhdr package, but get not result, may be there are another package for headers and footers?
It'll be cool if you give me example. Thank you for you attention.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

fancyhdr | Headers and Footers

Post by Stefan Kottwitz »

Another good package for headers and footers is scrpage2. It belongs to the koma-script bundle, but works with the other classes too.

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

fancyhdr | Headers and Footers

Post by localghost »

There is also the titleps package, which has recently been split from the titlesec package. It has the most simple user interface to create page styles.


Thorsten
User avatar
justdeath
Posts: 69
Joined: Mon Sep 05, 2011 10:27 am

fancyhdr | Headers and Footers

Post by justdeath »

Hi, you should use the twoside option in article, combined with the geometry package to fix the page margins:

Code: Select all

\documentclass[10pt, twoside]{article}

\usepackage[margin=3cm, showframe]{geometry}
\usepackage{fancyhdr}
\usepackage{graphicx}

\renewcommand{\headrulewidth}{0.2mm}
\renewcommand{\footrulewidth}{0.2mm}
\fancyhead{} % Clear all header fields
\fancyfoot{} % Clear all footer fields 

\fancyhead[LE]{\thepage}
\fancyhead[RE]{even page \ \includegraphics[scale=0.179]{logos}}
\fancyhead[LO]{\includegraphics[scale=0.179]{logos} \ odd page}
\fancyhead[RO]{\thepage}

\pagestyle{fancy}

\begin{document}
Some text 
\newpage
Second page
\newpage
Third page
\newpage
Fourth page
\end{document}
Post Reply