I'm writing my thesis using documentclass book
.
I want to change the header and footer of pages and modify slightly the size and position of chapter.
Now it looks more or less like this:
But I want something like this:
So what I want is:
- Page numbers always centered at the bottom of pages
- Headers in lowercase
- Chapter number aligned to the left, not in bold and larger
- Chapter title right aligned, in bold and size as it is now.
This is my preamble:
\documentclass[a4paper, 11pt, titlepage]{book}
\usepackage[italian]{babel}
\usepackage{courier}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[nouppercase, swapnames]{frontespizio}
\usepackage[hidelinks]{hyperref}
\usepackage{alltt}
\usepackage{cancel}
\usepackage{textcomp}
\usepackage{float}
\restylefloat{table}
\usepackage{titlesec}
\titleclass{\subsubsubsection}{straight}[\subsection]
\newcounter{subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
\renewcommand\theparagraph{\thesubsubsubsection.\arabic{paragraph}} % optional; useful if paragraphs are to be numbered
\titleformat{\subsubsubsection}
{\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{}
\titlespacing*{\subsubsubsection}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{6}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\def\toclevel@subsubsubsection{4}
\def\toclevel@paragraph{5}
\def\toclevel@paragraph{6}
\def\l@subsubsubsection{\@dottedtocline{4}{7em}{4em}}
\def\l@paragraph{\@dottedtocline{5}{10em}{5em}}
\def\l@subparagraph{\@dottedtocline{6}{14em}{6em}}
\makeatother
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\newsavebox{\RGbox}
\newcommand{\R}[1]{%
\begingroup\setlength{\fboxsep}{0pt}%
\sbox{\RGbox}{\colorbox{lightred}{\vphantom{fg}#1}}%
\usebox{\RGbox}%
\makebox[0pt][r]{\vrule width \wd\RGbox height .5ex depth -\dimexpr.5ex-0.4pt\relax}%
\endgroup
}
\newcommand{\G}[1]{%
\begingroup\setlength{\fboxsep}{0pt}%
\sbox{\RGbox}{\colorbox{lightgreen}{\vphantom{fg}#1}}%
\usebox{\RGbox}%
\makebox[0pt][r]{\vrule width \wd\RGbox height -\dimexpr\dp\RGbox-0.4pt\relax depth \dp\RGbox}%
\endgroup
}
\usepackage{amsmath}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\usepackage{listings}
\usepackage{fancyvrb}
\usepackage{textcomp}
\usepackage{xcolor}
\definecolor{lightgray}{rgb}{.95,.95,.95}
\definecolor{darkgray}{rgb}{.4,.4,.4}
\definecolor{purple}{rgb}{0.65, 0.12, 0.82}
\definecolor{darkred}{rgb}{0.8, 0.0, 0.0}
\definecolor{darkgreen}{rgb}{0.13, 0.55, 0.13}
\colorlet{lightgreen}{green!30}
\colorlet{lightred}{red!30}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{frame=tb,
language=Python,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle={\small\ttfamily},
numbers=left,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
mathescape=<false>,
tabsize=3
}
\lstnewenvironment{pseudocode}
{\lstset{frame=tb,
language=Python,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle={\small\ttfamily},
numbers=left,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
mathescape=<false>,
tabsize=3
}}
{}
\lstnewenvironment{html}
{\lstset{language=HTML,basicstyle={\ttfamily\small},frame=none, tabsize=3, numbers=none}}
{}
\usepackage{booktabs}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\usepackage{graphicx}
\usepackage{subfig}
\captionsetup[subfigure]{subrefformat=simple,labelformat=simple,listofformat=subsimple}
\renewcommand\thesubfigure{(\alph{subfigure})}
\usepackage{color}
\usepackage{hyperref}
I know it's a little messed up.. Sorry.
I read that I have to use the package fancyhdr but I'm just starting out with latex. Someone would know help me?
Thank you!
fancyhdr
, for examplescrlayer-scrpage
. – Johannes_B Nov 18 '15 at 17:47titletoc
, since you usetitlesec
. – Bernard Nov 18 '15 at 17:52