[Tex/LaTex] Header, footer and font customization

header-footer

How can I create a default header, footer and customize the font of my LaTeX document?

I wanted something like this:

Default book title                     Chapter name
____________________________________________________________

content

____________________________________________________________
www.defaulturl.com                     PAGE NUMBER

Best Answer

As mentioned in Stefan's answer to How to customize headers and footers?, fancyhdr is the classical package to customize headers/footers. However, recently I've been using the titlesec package to define page styles, and I've found it really useful and as powerful as fancyhdr, so here's a little example achieving the desired result with titlesec:

\documentclass{report}
\usepackage[pagestyles]{titlesec}
\usepackage{url}
\usepackage{lipsum}% just to generate some filler text

\newcommand*\defaulturl{\url{www.some-url.com}}
\newcommand*\defaulttitle{Some Title}

\newpagestyle{mystyle}{
  \sethead{\defaulttitle}{}{\chaptertitle}\headrule
  \setfoot{\defaulturl}{}{\thepage}\footrule
}

\pagestyle{mystyle}

\begin{document}

\chapter{Test chapter}
\lipsum[1-40]

\end{document}