% example file to change the style of LaTeX
% Tony Roberts May 2004, revised Sep 2011
% first colour for latex or pdflatex
\ifx\pdfoutput\@undefined\usepackage[usenames,dvips]{color}
\else\usepackage[usenames,dvipsnames]{color}
\IfFileExists{microtype.sty}{\usepackage{microtype}}{} 
% and fix pdf colour problems
\IfFileExists{pdfcolmk.sty}{\usepackage{pdfcolmk}}{} 
\fi
% second test for a5paper
\ifdim\paperwidth=148mm \usepackage[a5paper]{geometry}\fi
% lastly load colour hyperref
\usepackage[colorlinks]{hyperref}

\let\LaTeXtitle\title
\renewcommand{\title}[1]{\LaTeXtitle{\textsf{#1}}}

\pagestyle{headings}
% crunching MakeUppercase is very naughty
\renewcommand{\MakeUppercase}[1]{\color{OliveGreen}\textsf{#1}}

\renewcommand{\abstractname}{\color{blue}Abstract}
\renewcommand{\figurename}{\color{Sepia}Figure}
\renewcommand{\tablename}{\color{Sepia}Table}

\let\LaTeX@startsection\@startsection 
\renewcommand{\@startsection}[6]{\LaTeX@startsection%
{#1}{#2}{#3}{#4}{#5}{\color{blue}\raggedright #6}} 
 
% Rob J Hyndman (2011) recommends these float settings
% http://robjhyndman.com/researchtips/latex-floats/
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.85}
\renewcommand{\textfraction}{0.15}
\renewcommand{\floatpagefraction}{0.7}

