Generalfancyhdr | Custom Page Style stops working

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dallaglio
Posts: 1
Joined: Tue Nov 13, 2012 2:03 am

fancyhdr | Custom Page Style stops working

Post by dallaglio »

Dear all,

fancyhdr seems to have stopped working - here is the code of my preamble:

Code: Select all

\documentclass[pdftex, 12pt, english]{report}
\usepackage{graphicx, palatino,amsmath,amssymb,setspace,verbatim} % Palatino is the font
\usepackage{babel} %For dealing with other languages e.g. Spanish author names/accents
\usepackage[T1]{fontenc} % As above
\usepackage{marvosym} % Allows insertion of symbols such as Euro sign, maths signs etc
\usepackage{wasysym} %%More symbols e.g. male/female glyphs
\setlength{\parindent}{0in} % Determines whether there is an indent at start of paragraph
\setlength{\parskip}{0.1in} %Vertical distance between paragraphs
\usepackage{setspace}


\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{1pt}
\fancyhead[R]{\nouppercase{\textsc{\leftmark}}}
\renewcommand{\footrulewidth}{0pt}

%% PAGE DIMENSIONS
\usepackage{geometry}
\geometry{a4paper}
%\geometry{margin=2cm}

\usepackage{long table} % Allows tables that span more than one page

%% SECTIONS/HEADINGS

%\usepackage{titlesec}% http://ctan.org/pkg/titlesec
%\titleformat{\chapter}{\Huge\bfseries}{\chaptername\ \thechapter}{0pt}{\vskip 20pt\raggedright}%
%\titlespacing{\chapter}{0pt}{50pt}{20pt}% Alter the last value to vary the gap between title + text

%Use this section to change the style of headings in the report - I didnt like the changes!
%\usepackage{sectsty}
%\chapterfont{\thispagestyle{empty}\Huge\selectfont\raggedright}
%\chaptertitlefont{\fontfamily{phv}\selectfont\raggedright\Huge}

%% BIBLIOGRAPHY

\usepackage{tocbibind} %This section sets up the bibliography in the TOC

%This section determines the level of hyphenation of words
\usepackage {microtype} 		
% Provides two features to improve the typesetting of paragraphs: Margin kerning: characters, especially punctuation, will protrude a small fraction %into the margin. Practically, this has the effect of very slightly increasing the line length and (IMO) visually looks very nice.Font expansion: as %well as stretching/shrinking the space between words to create a flush paragraph, the characters themselves are stretched/shrunk by very small %amounts (less than one percent). This is visually imperceptible at the character level but, surprisingly, makes a huge difference at the paragraph %level.
\hfuzz=\maxdimen
\tolerance=10000
\hbadness=10000
\hyphenpenalty=5000

% This section allows you to write T2 and T2* without entering maths mode
\newcommand{\Ttwostar}{\ensuremath{T_2^*}}
\newcommand{\Ttwo}{\ensuremath{T_2}}
\newcommand{\Tone}{\ensuremath{T_1}}

% This section allows mini-table of contents to be inserted at the start of each chapter
\usepackage{minitoc}

% Defining Maths symbols
\def\th{\theta}
\def\Th{\Theta}
\def\ph{\phi}
\def\Ph{\Phi}

\def\A{\mathbf{A}}
\def\C{\mathbf{C}}
\def\F{\mathcal{F}}
\def\K{\mathcal{K}}
\def\L{\mathcal{L}}
\def\S{\mathcal{S}}
\def\X{\mathbf{X}}
\def\x{\mathbf{x}}
\def\R{\mathbf{R}}
\def\r{\mathbf{r}}
\def\Y{\mathbf{Y}}
\def\y{\mathbf{y}}
\def\f{\mathbf{f}}
\def\c{\mathbf{c}}
\def\d{\mathbf{d}}
\def\b{\mathbf{b}}
\def\s{\mathbf{s}}

\def\M{\mathcal{M}}

% Stop the Table of Contents from adding it's page number to the list
\makeatletter
\renewcommand\tableofcontents{%
    \section*{\contentsname
        \@mkboth{%
           \MakeUppercase\contentsname}{}}% ADDED
    \@starttoc{toc}%
    } 
\makeatother
Any ideas why it has stopped working suddenly?


Thanks
Matt
Last edited by localghost on Tue Nov 13, 2012 10:03 am, edited 1 time in total.

Recommended reading 2024:

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

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

Post Reply