\def \issuenumber{XXX}
\def \issuemonthname{Christmas}
\def \issueyyyy{20XX}

\documentclass[a4paper,9pt,twoside]{extreport}	% extends font sizes available
\usepackage[hyphens]{url}   % tell LaTeX to play nicely with very long URLs containing hyphens (JP)
\usepackage[utf8x]{inputenc}	% Allows easy insert of unicode characters (JP)
\usepackage[british]{babel}	% Setup for British English (Bertie)
\usepackage{aisbq}		% Homebrewed, contains more font and bib options (soon deprecated)
\addto\captionsbritish{\renewcommand{\bibname}{References}}

% make chapters start on current page 
% (use with \input rather than \include)
\usepackage{etoolbox}
\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother

% Set date format (Bertie)
\usepackage{datetime}
\usepackage{color}
\renewcommand{\dateseparator}{-}
\newcommand{\todayiso}{ \the\day \dateseparator \the\month \dateseparator \the\year}


\usepackage{multicol}
\setlength{\textwidth}{39pc}
\setlength{\textheight}{54pc}
\setlength{\parindent}{1em}
\setlength{\parskip}{0pt plus 1pt}
\setlength{\oddsidemargin}{0pc}
\setlength{\marginparwidth}{0pc}
\setlength{\topmargin}{-2.5cm}
\setlength{\headsep}{20pt}
\setlength{\columnsep}{1pc}
\setlength\columnseprule{.3pt}

\clubpenalty10000
\widowpenalty10000

\usepackage[sectionbib]{chapterbib}
\usepackage[a5paper,height=16.5cm,width=11.5cm]{geometry}
\usepackage{rotating}		% Graphics and figures
\usepackage{graphicx}		% Graphics and figures
\usepackage{wrapfig}
\usepackage{subfig}		% Graphics and figures
\usepackage[usenames,dvipsnames]{xcolor} 	% Front/back page colour scheme (Dandelion)
\usepackage{lmodern}		% Latin Modern fonts (used in titles)
\usepackage[T1]{fontenc}		% Encoding
\usepackage[noindentafter,calcwidth,medium,compact]{titlesec}
\usepackage{verbatim}		% To comment out blocks of text
\usepackage{amssymb,amsmath}
\usepackage{hyperref}
\usepackage{nth}
\usepackage[pages=some]{background}  % Watermark

\usepackage{textcomp}
\usepackage{setspace}       % \singlespacing

\usepackage{mdwlist}		% itemize*, enumerate* for tighter spaces

\usepackage{newclude}       % prevents problem of each article starting new page (JP)
\usepackage{xcolor}         % makes it easier to colour text (JP)
\usepackage{ragged2e}
\usepackage{titlesec}
\usepackage{framed}

\usepackage{setspace}
\usepackage{lipsum}

\usepackage[dvipsnames]{xcolor}

\definecolor{myRed}{RGB}{120, 1, 1}

\usepackage[hang,flushmargin]{footmisc}
% added for getting rid of ugly footnote indents
\usepackage{fancyvrb}	% required by one of this month's articles (April 2017)

%--- Customise title of \tableofcontents ----------------------------------------
\renewcommand{\contentsname}{\Large AISB Quarterly -- No.\ \issuenumber, \issuemonthname, \issueyyyy}
\setcounter{secnumdepth}{0}  % suppress section numbers
\setcounter{tocdepth}{0}     % just print out the chapter titles in the ToC


%--- Fancyhdr stuff ----------------------------------------
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancypagestyle{plain}{
	\fancyfoot[C]{\thepage}}
\pagestyle{plain}

% not fancyhdr??
\titlespacing*{\chapter}{0pt}{-25pt}{0pt}
\titlespacing\section{0pt}{8pt plus 4pt minus 2pt}{2pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{8pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{8pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}

\titleformat{\chapter}[display]
{\filright\LARGE\bfseries\sffamily}
{\titleline[r]{\LARGE\thesection}}{1ex}
{}

\renewcommand{\footrulewidth}{0.4pt}
\fancyhead{}
\fancyfoot{}
\fancyhead[O,E]{}
\fancyfoot[C]{\thepage}

\fancyfoot[RO]{AISB Quarterly}
%\fancyfoot[LE]{No. \issuenumber, \issuemonthname~\issueyyyy}
\fancyfoot[LE]{No. \issuenumber \hspace{80mm} \issuemonthname~\issueyyyy}
%\fancyfoot[RO]{AISB Quarterly~~~p.~\thepage}
%\fancyfoot[RO]{AISB Quarterly~~~p.~\thepage}
%\fancyfoot[LE]{p.~\thepage~~~No \issuenumber, \issuemonthname~\issueyyyy}


%--- Misc ----------------------------------------
\setlength{\parskip}{0cm}
\newcommand{\subscript}[1]{\ensuremath{_{\textrm{\small{#1}}}}}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}	% Creates a vertical line (for back cover)

\newcommand{\blankpage}{
	\newpage
	\thispagestyle{empty}
	\mbox{}
	\newpage
}

\renewcommand\bibname{References}	% Changes title for bibliography subsection

% Shouldn't need changing
\graphicspath{{./}{figures/}{cover-back/}{cover-front/}}

% Shorthands.. Does not work.
%\newcommand{\name}[1]{\textsc{#1}}
%\newcommand{\AISB}{\textsc{AISB}\xspace}
%\newcommand{\nAISB}{\name{The Society for the Study of Artificial Intelligence and Simulation of Behaviour}\xspace}
%\newcommand{\nCS}{\name{Connection Science}\xspace}
\usepackage{xspace}
\newcommand{\tm}{\textsuperscript{\texttrademark}} % TM sign, for FatherHacker
\newcommand{\AISB}{\textsc{AISB}\xspace}

% =================== Serendipity

\usepackage{combelow}

\usepackage{tikz}
%\usepackage{onimage}
\usetikzlibrary{positioning,backgrounds,fit,arrows,shapes,shadows,calc}
\usetikzlibrary{shapes.multipart,shapes.geometric,decorations.pathmorphing,shadows}

\DeclareRobustCommand\evaluationcompositeinternal{\tikz{\begin{scope}
			\node[draw,circle] (eventD) {};
			\node[right=.1cm of eventD,draw,regular polygon,regular polygon sides=4] (explanationD) {};
			\node[right=.13cm of explanationD,draw,regular polygon,regular polygon sides=3,scale=.65,yshift=-.08cm] (problemD) {};
		\end{scope}}}
		
		\makeatletter
		\newcommand*{\shifttext}[2]{%
			\settowidth{\@tempdima}{#2}%
			\makebox[\@tempdima]{\hspace*{#1}#2}%
		}
		\makeatother
		
		\usepackage{enumitem}
		
		% just to render some content non-printing
		\newcommand{\email}[1]{}
		
		%=================================================== 
		\begin{document}

%--- front page
\begin{titlepage}	% by default fancyhdr uses \pagestyle{plain} for titlepage
\input{cover-front/aisbq-front-cover01-input}
\end{titlepage}

% Example:
% \include{foo1/chapter1}		% ./foo1/refs1.bib needs bibtex-ing separately


			%\pagebreak

			
			\include*{aisbq-content}
			%\pagebreak
			\vspace{10mm}
			
			%\include*{fatherhacker}
			%\pagebreak
			
			
			%--- back matter and back cover
			%\include{backcover}
			
%			\bibliographystyle{AISBQ}
%			\bibliography{references}
			
		\end{document}