%%
%% This is file `dccpaper-base.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% dccpaper.dtx  (with options: `base')
%% 
%% ----------------------------------------------------------------
%% The dccpaper bundle: Classes for submissions to IJDC and IDCC
%% Author:  Alex Ball
%% E-mail:  a.ball@ukoln.ac.uk
%% License: Released under the LaTeX Project Public License v1.3c or later
%% See:     http://www.latex-project.org/lppl.txt
%% ----------------------------------------------------------------
%% 
\def\Version{2019/03/08 v1.8}
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{dccpaper-base}
    [\Version\space Common class code for IJDC and IDCC papers.]
\RequirePackage[british]{babel}
\RequirePackage{etoolbox}
\RequirePackage{iftex}
\ifPDFTeX
  \RequirePackage[T1]{fontenc}
  \IfFileExists{newtxtext.sty}{%
    \RequirePackage{newtxtext,newtxmath}
  }{%
    \RequirePackage{mathptmx}}
  \IfFileExists{tgheros.sty}{%
    \ifx\undefined\qhv@scale
      \RequirePackage[scale=0.92]{tgheros}\else
      \def\qhv@scale{0.92}\fi
  }{%
    \RequirePackage[scaled=0.92]{helvet}}
  \renewcommand{\ttdefault}{cmtt}
\else
  \RequirePackage{fontspec}
  \IfFileExists{newtxtext.sty}{%
    \setmainfont{TeXGyreTermesX}
    \RequirePackage{newtxmath}
    \DeclareSymbolFont{oldoperators}{OT1}{ntxtlf}{m}{n}
    \SetSymbolFont{oldoperators}{bold}{OT1}{ntxtlf}{b}{n}
    \AtBeginDocument{%
\DeclareMathSymbol{0}{\mathalpha}{operators}{`0}%
\DeclareMathSymbol{1}{\mathalpha}{operators}{`1}%
\DeclareMathSymbol{2}{\mathalpha}{operators}{`2}%
\DeclareMathSymbol{3}{\mathalpha}{operators}{`3}%
\DeclareMathSymbol{4}{\mathalpha}{operators}{`4}%
\DeclareMathSymbol{5}{\mathalpha}{operators}{`5}%
\DeclareMathSymbol{6}{\mathalpha}{operators}{`6}%
\DeclareMathSymbol{7}{\mathalpha}{operators}{`7}%
\DeclareMathSymbol{8}{\mathalpha}{operators}{`8}%
\DeclareMathSymbol{9}{\mathalpha}{operators}{`9}%
\DeclareMathSymbol{\Gamma}{\mathalpha}{oldoperators}{"00}%
\DeclareMathSymbol{\Delta}{\mathalpha}{oldoperators}{"01}%
\DeclareMathSymbol{\Theta}{\mathalpha}{oldoperators}{"02}%
\DeclareMathSymbol{\Lambda}{\mathalpha}{oldoperators}{"03}%
\DeclareMathSymbol{\Xi}{\mathalpha}{oldoperators}{"04}%
\DeclareMathSymbol{\Pi}{\mathalpha}{oldoperators}{"05}%
\DeclareMathSymbol{\Sigma}{\mathalpha}{oldoperators}{"06}%
\DeclareMathSymbol{\Upsilon}{\mathalpha}{oldoperators}{"07}%
\DeclareMathSymbol{\Phi}{\mathalpha}{oldoperators}{"08}%
\DeclareMathSymbol{\Psi}{\mathalpha}{oldoperators}{"09}%
\DeclareMathSymbol{\Omega}{\mathalpha}{oldoperators}{"0A}%
\DeclareMathSymbol{!}{\mathclose}{operators}{"21}%
\DeclareMathSymbol{+}{\mathbin}{operators}{"2B}%
\DeclareMathSymbol{:}{\mathrel}{operators}{"3A}%
\DeclareMathSymbol{;}{\mathpunct}{operators}{"3B}%
\DeclareMathSymbol{=}{\mathrel}{operators}{"3D}%
\DeclareMathSymbol{?}{\mathclose}{operators}{"3F}%
\DeclareMathDelimiter{(}{\mathopen} {operators}{"28}{largesymbols}{"00}%
\DeclareMathDelimiter{)}{\mathclose}{operators}{"29}{largesymbols}{"01}%
\DeclareMathDelimiter{[}{\mathopen} {operators}{"5B}{largesymbols}{"02}%
\DeclareMathDelimiter{]}{\mathclose}{operators}{"5D}{largesymbols}{"03}%
\DeclareMathAccent{\acute}{\mathalpha}{operators}{"B4}%
\ifLuaTeX\DeclareMathAccent{\grave}{\mathalpha}{operators}{"60}\fi
\DeclareMathAccent{\ddot}{\mathalpha}{operators}{"A8}%
\DeclareMathAccent{\tilde}{\mathalpha}{oldoperators}{"7E}%
\DeclareMathAccent{\bar}{\mathalpha}{oldoperators}{"16}%
\DeclareMathAccent{\breve}{\mathalpha}{oldoperators}{"15}%
\DeclareMathAccent{\check}{\mathalpha}{oldoperators}{"14}%
\DeclareMathAccent{\hat}{\mathalpha}{oldoperators}{"5E}%
\DeclareMathAccent{\dot}{\mathalpha}{oldoperators}{"5F}%
\DeclareMathAccent{\mathring}{\mathalpha}{oldoperators}{"17}%
\DeclareMathSymbol{\mathdollar}{\mathord}{operators}{"24}%
    }
  }{%
    \RequirePackage[T1]{fontenc}
    \RequirePackage{mathptmx}
  }
  \IfFontExistsTF{texgyreheros-regular.otf}{%
    \setsansfont{texgyreheros}%
      [ Extension = .otf
      , UprightFont = *-regular
      , ItalicFont = *-italic
      , BoldFont = *-bold
      , BoldItalicFont = *-bolditalic
      , Scale = 0.92
      ]
  }{%
    \IfFileExists{newtxtext.sty}{%
      \appto\sffamily{\fontencoding{T1}\selectfont}%
    }{}
    \RequirePackage[scaled=0.92]{helvet}
  }
\fi
\RequirePackage{graphicx}
\IfFileExists{xcolor.sty}%
  {\RequirePackage{xcolor}}%
  {\RequirePackage{color}}
\definecolor[named]{struct}{rgb}{0,0.5,0.5}
\definecolor[named]{links}{rgb}{0,0.4,0.4}
\RequirePackage{calc}

\let\OrigLineBreak\\
\newdimen\RaggedParindent
\setlength{\RaggedParindent}{\parindent}

\newcommand{\raggedyright}[1][2em]{%
  \let\\\@centercr\@rightskip \z@ \@plus #1\relax
  \rightskip\@rightskip
  \leftskip\z@skip
  \parindent\RaggedParindent}
\AtBeginDocument{\raggedyright}

\newcommand*{\flushleftright}{%
  \let\\\OrigLineBreak
  \leftskip\z@skip
  \rightskip\leftskip
  \parfillskip\@flushglue
  \everypar{}}

\RequirePackage{ifpdf}
\newtoggle{dccp@dummyspaces}
\def\fixspaces{\toggletrue{dccp@dummyspaces}}
\def\nofixspaces{\togglefalse{dccp@dummyspaces}}
\AtBeginDocument{%
\iftoggle{dccp@dummyspaces}{%
  \ifpdf
    \ifdef{\pdfinterwordspaceon}{\pdfinterwordspaceon}{}%
  \fi
}{}%
}

\def\thecorrespondence{}
\newcommand*{\correspondence}[1]{\def\thecorrespondence{#1}}
\newcommand*{\Authfont}{\normalfont}
\newcommand*{\Affilfont}{\normalfont\small}
\newlength{\affilsep}\setlength{\affilsep}{0pt}
\newlength{\authblksep}\setlength{\authblksep}{1.5\baselineskip}
\newcommand{\AuthorBlock}{}
\newcommand{\MainAuthor}{}
\newcommand{\dccp@author}{}
\newcounter{authors}
\newcounter{authorsinblock}
\newcounter{block}
\AtBeginDocument{\setcounter{block}{0}}
\renewcommand{\author}[1]{%
  \ifnum\theauthors=0
    \def\dccp@author{#1}%
    \def\MainAuthor{#1}%
  \else
    \appto\dccp@author{, #1}%
    \ifnum\theauthors=1%
      \def\OtherMainAuthors{ and #1}%
      \appto\MainAuthor{\OtherMainAuthors}%
    \else
      \ifnum\theauthors=2%
        \def\OtherMainAuthors{ et al.}%
      \fi
    \fi
  \fi
  \stepcounter{authors}%
  \ifnum\theauthorsinblock=0%
    \stepcounter{block}%
    \expandafter\def\csname block\roman{block}@auth\endcsname{\Authfont#1}%
    \ifnum\theblock>1\appto\AuthorBlock{\quad}\fi
    \appto\AuthorBlock{%
      \stepcounter{block}%
      \begin{minipage}[t]{0.45\textwidth}\centering
      \csname block\roman{block}@auth\endcsname
      \ifx\undefined\csname block\roman{block}@affil\endcsname
      \else
        \\[\affilsep]\csname block\roman{block}@affil\endcsname
      \fi
      \end{minipage}%
      \rule{0pt}{2\baselineskip}%
      }
  \else
    \csappto{block\roman{block}@auth}{, #1}%
  \fi
  \stepcounter{authorsinblock}%
}
\newcommand{\affil}[1]{%
  \expandafter\def\csname block\roman{block}@affil\endcsname{\Affilfont#1}%
  \setcounter{authorsinblock}{0}%
}

\newcommand*{\HeadTitle}{}
\let\ProperTitle=\title
\renewcommand{\title}[2][\empty]{
  \ifx\empty #1%
    \renewcommand*{\HeadTitle}{#2}%
  \else
    \renewcommand*{\HeadTitle}{#1}%
  \fi%
  \begingroup\let\footnote\@gobble
  \ProperTitle{#2}%
  \begingroup
    \renewcommand{\thanks}[1]{}
    \protected@xdef\thetitle{#2}
  \endgroup\endgroup
}
\def\thetitle{%
  Please supply a title
  \ClassWarning{dccpaper}{%
    Please supply a title in the preamble with \noexpand\title{}%
  }
}

\pretocmd{\date}{\begingroup\let\footnote\@gobble}{}{}%
\apptocmd{\date}{%
  \begingroup
    \renewcommand{\thanks}[1]{}
    \protected@xdef\thedate{#1}
  \endgroup\endgroup%
}{}{}
\date{20xx}

\newcommand*{\thevolume}{0}
\newcommand*{\volume}[1]{\renewcommand*{\thevolume}{#1}}
\newcommand*{\theissue}{0}
\newcommand*{\issue}[1]{\renewcommand*{\theissue}{#1}}
\newcommand*{\thesubno}{0}
\newcommand*{\subno}[1]{\renewcommand*{\thesubno}{#1}\fixspaces}
\newcommand*{\thedoi}{10.2218/ijdc.v\thevolume i\theissue .\thesubno}
\newcounter{lastpage}
\setcounter{lastpage}{0}
\newcommand{\dol@stpage}{%
  \if@filesw
    \addtocounter{page}{-1}%
    \immediate\write\@auxout%
      {\string\setcounter{lastpage}{\the\c@page}}%
    \stepcounter{page}%
  \fi
}
\AtBeginDocument{\AtEndDocument{\clearpage\dol@stpage}}

\def\dccp@dates{\emph{Draft from} \today}
\newcommand*{\submitted}[1]{%
  \def\dccp@dates{\emph{Submitted} #1}}
\newcommand*{\received}[1]{%
  \def\dccp@dates{\emph{Received} #1}}
\newcommand*{\revised}[1]{%
  \appto\dccp@dates{%
    \space\space\space\textbar\space\space\space
    \emph{Revision received} #1}%
  }
\newcommand*{\accepted}[1]{%
  \appto\dccp@dates{%
    \space\space\space\textbar\space\space\space
    \emph{Accepted} #1}%
  }
\let\dccp@conf=\empty
\newcommand*{\conference}[1]{%
  \renewcommand*{\dccp@conf}{An earlier version of this paper was presented at #1.}%
}

\newcommand{\FixTextHeight}{%
  \setlength\@tempdima{\textheight}%
  \addtolength\@tempdima{-\topskip}%
  \@tempcnta\@tempdima
  \@tempcntb\baselineskip
  \divide\@tempcnta\@tempcntb
  \setlength\@tempdimb{\baselineskip}%
  \multiply\@tempdimb\@tempcnta
  \advance\@tempdima-\@tempdimb
  \global\advance\footskip\@tempdima
  \multiply\@tempdima\tw@
  \ifdim\@tempdima>\baselineskip
    \addtolength\@tempdimb{\baselineskip}%
    \global\advance\footskip-\baselineskip
  \fi
  \addtolength\@tempdimb{\topskip}%
  \global\textheight\@tempdimb
}

\setlength{\textwidth}{150mm}
\setlength{\oddsidemargin}{30mm - \hoffset - 1in}
\setlength{\evensidemargin}{30mm - \hoffset - 1in}
\setlength{\marginparwidth}{30mm - 2\marginparsep}
\setlength{\topmargin}{15mm - \voffset - 1in}
\setlength{\headsep}{2\baselineskip}

\providecommand{\dccp@editorial}{Editorial}
\def\ps@title{%
  \def\@oddhead{%
    \begin{minipage}{\textwidth}%
      \centering
      \LARGE\bfseries\color{struct}%
      \ifx\dccp@type\dccp@editorial
        \dccp@publ@long
      \else
        \dccp@publ@short\space\space\textbar\space\space\emph{\dccp@type}%
      \fi
      \par
    \end{minipage}%
  }%
  \let\@evenhead=\@oddhead
  \let\TitleHead=\@oddhead
  \def\@oddfoot{%
    \begin{minipage}[b]{\textwidth}%
      \fontsize{9pt}{11pt}\selectfont
      \ifx\dccp@type\dccp@editorial
      \else
        {\centering\dccp@dates\par}
        \bigskip
        Correspondence should be addressed to \thecorrespondence\par
        \bigskip
      \fi
      \ifx\empty\dccp@conf
      \else
        \dccp@conf\par
        \bigskip
      \fi
      \dccp@publ@msg\par
      \bigskip
      \begin{minipage}[b]{\linewidth - 25mm}
      Copyright rests with the authors. This work is released under a Creative
      Commons Attribution 4.0 International Licence. For details please see
      \url{http://creativecommons.org/licenses/by/4.0/}%
      \end{minipage}\hfill
      \begin{minipage}[b]{19mm}
        \href{http://creativecommons.org/licenses/by/4.0/}%
          {\includegraphics[width=\hsize]{dccpaper-by}}%
      \end{minipage}
      \par
      \bigskip
      \makebox[0pt][l]{\parbox{0.4\hsize}{%
        \ifx\undefined\dccp@titlefoot@bib\else\dccp@titlefoot@bib\fi
      }}\hfill
      \makebox[0pt][c]{\normalsize\thepage}\hfill
      \makebox[0pt][r]{\parbox{0.4\hsize}{%
        \raggedleft\ifx\undefined\dccp@titlefoot@doi\else\dccp@titlefoot@doi\fi
      }}%
    \end{minipage}%
  }%
  \let\@evenfoot=\@oddfoot
  \let\TitleFoot=\@oddfoot
}
\pagestyle{title}
\AtBeginDocument{\thispagestyle{title}}

\def\ps@dccpaper{%
  \def\@oddhead{%
    \begin{minipage}{\textwidth}\frenchspacing
      {%
        \fontsize{9pt}{11pt}\selectfont
        \ifx\undefined\dccp@normhead@doi\else\dccp@normhead@doi\fi
      }\hfill
      {\MainAuthor}\space\space\space
      \textcolor{struct}{\textbar}\space\space\space
      \thepage\par
      \vskip6pt\color{struct}{\hrule height 1bp}\par
    \end{minipage}
  }%
  \def\@evenhead{%
    \begin{minipage}{\textwidth}
      \thepage\space\space\space
      \textcolor{struct}{\textbar}\space\space\space
      {\HeadTitle}\hfill
      {%
        \fontsize{9pt}{11pt}\selectfont
        \ifx\undefined\dccp@normhead@doi\else\dccp@normhead@doi\fi
      }\par
      \vskip6pt\color{struct}{\hrule height 1bp}\par
    \end{minipage}
  }%
  \let\NormalHead=\@oddhead
  \def\@oddfoot{\begin{minipage}[b]{\textwidth}
    \centering\bfseries\normalsize\color{struct}
    \ifx\dccp@type\dccp@editorial
      \dccp@publ@long
    \else
      \dccp@publ@short\space\space\textbar\space\space\emph{\dccp@type}%
    \fi
    \par
  \end{minipage}}%
  \let\@evenfoot=\@oddfoot
  \let\NormalFoot=\@oddfoot
}
\pagestyle{dccpaper}

\AtEndPreamble{
  \newsavebox{\dccp@firstpagehead}
  \sbox\dccp@firstpagehead{\normalfont\TitleHead}
  \newsavebox{\dccp@firstpagefoot}
  \sbox\dccp@firstpagefoot{\normalfont
    \def\email#1{#1}\def\url#1{#1}\def\href#1#2{#2}\TitleFoot}
  \newsavebox{\dccp@restpagehead}
  \sbox\dccp@restpagehead{\normalfont\NormalHead}
  \newsavebox{\dccp@restpagefoot}
  \sbox\dccp@restpagefoot{\normalfont\NormalFoot}
  \setlength{\headheight}{\ht\dccp@firstpagehead + \dp\dccp@firstpagehead}
  \setlength{\footskip}{%
    2\baselineskip + \ht\dccp@firstpagefoot + \dp\dccp@firstpagefoot
  }
  \setlength{\textheight}{%
    \paperheight
    - 30mm % 15mm top and bottom
    - \headheight
    - \headsep
    - \footskip
  }
  \def\dccp@resetgeometry{%
    \setlength{\headheight}{\ht\dccp@restpagehead + \dp\dccp@restpagehead}
    \global\headheight=\headheight
    \setlength{\footskip}{%
      2\baselineskip + \ht\dccp@restpagefoot
    }
    \global\footskip=\footskip
    \setlength{\textheight}{%
      \paperheight
      - 30mm % 15mm top and bottom
      - \headheight
      - \headsep
      - \footskip
    }
    \FixTextHeight
    \global\textheight=\textheight
  }
}

\RequirePackage{atbegshi}
\renewcommand{\maketitle}{%
  \null\nobreak\vspace*{-0.528\baselineskip}%
  \begingroup
    \centering
    {\Large\thetitle\par}
    \vspace{0.7\baselineskip}
    \AuthorBlock\par
    \vspace{1.7\baselineskip}
  \endgroup
  \AtBeginShipoutNext{\dccp@resetgeometry}%
}

\newenvironment{widequote}{%
  \list{}{%
    \setlength{\rightmargin}{2\parindent}%
    \setlength{\leftmargin}{2\parindent}%
  }%
  \flushleftright\item[]%
}{%
    \endlist
}
\def\afterabstract{}
\renewenvironment{abstract}{%
  \vskip1em%
  \begin{center}%
    {\bfseries\abstractname\vspace{-.5em}\vspace{\z@}}%
  \end{center}%
  \widequote\footnotesize
}{%
  \endwidequote\afterabstract\newpage
}

\RequirePackage{titlesec}
\titlespacing*{\section}{0pt}{0pt}{\baselineskip}
\titlespacing*{\subsection}{0pt}{0pt}{0.6\baselineskip}
\titlespacing{\subsubsection}{\parindent}{\baselineskip}{0pt}
\titlespacing{\paragraph}{\parindent}{\baselineskip}{0pt}
\titlespacing{\subparagraph}{\parindent}{\baselineskip}{0pt}
\newcounter{sectionpars}
\let\dccp@old@ep\everypar
\newtoks\everypar
\dccp@old@ep{\the\everypar\stepcounter{sectionpars}}
\titleformat{\section}
  [block]
  {%
    \vspace{2\baselineskip}%
    \nobreak
    \vspace*{-0.528\baselineskip}%
    \setcounter{sectionpars}{0}%
    \filcenter\normalfont\Large\bfseries
  }
  {\thesection}
  {1em}
  {}
\titleformat{\subsection}
  {%
    \ifnum\thesectionpars>2%
      \vspace{2\baselineskip}%
    \else
      \vspace{\baselineskip}%
    \fi\nobreak
    \vspace*{-0.6\baselineskip}%
    \normalfont\normalsize\bfseries
  }
  {\thesubsection}
  {1em}
  {}
\titleformat{\subsubsection}
  [block]
  {\normalfont\normalsize\bfseries}
  {\thesubsubsection}
  {1em}
  {}
\titleformat{\paragraph}
  [block]
  {\normalfont\normalsize\bfseries\itshape}
  {\thesubsubsection}
  {1em}
  {}
\titleformat{\subparagraph}
  [block]
  {\normalfont\normalsize\itshape}
  {\thesubsubsection}
  {1em}
  {}
\setcounter{secnumdepth}{0}

\RequirePackage{array,booktabs}
\renewcommand{\arraystretch}{1.25}

\RequirePackage
  [ format=hang
  , labelsep=period
  , font=small
  , labelfont=bf
  , figureposition=bottom
  , tableposition=top
  ]{caption}

\RequirePackage[hang,bottom]{footmisc}
\settowidth{\footnotemargin}{\footnotesize\textsuperscript{99}\space}
\renewcommand{\footnotelayout}{\raggedyright}
\AtBeginDocument{
  \let\dccp@footnote\footnote
  \def\dccp@next@token{\relax}%
  \def\dccp@supercomma{\textsuperscript{,}}%
  \IfFileExists{newtxtext.sty}%
    {\def\dccp@supercomma{\raisebox{-0.2ex}{\textsuperscript{,}}}}%
    {}

  \newcommand\dccp@check@for@footnote{%
    \ifx\footnote\dccp@next@token
      \dccp@supercomma
    \fi
  }

  \renewcommand\footnote[1]{%
    \dccp@footnote{#1}%
    \futurelet\dccp@next@token\dccp@check@for@footnote
  }
}

\topsep = \z@
\partopsep = \z@
\appto{\enumerate}{\itemsep = 0.5ex plus 0.25ex minus 0.25ex}
\appto{\itemize}{\itemsep = 0.5ex plus 0.25ex minus 0.25ex}

\AtBeginDocument{
  \@ifpackageloaded{biblatex}{%
    \defbibheading{bibliography}[\refname]{\section{#1}}%
    \DeclareFieldFormat{doi}{%
      \ifhyperref{%
        \href{https://doi.org/#1}{\nolinkurl{doi:#1}}%
      }{%
        \nolinkurl{doi:#1}%
      }%
    }
  }{%
    \@ifpackageloaded{apacite}{%
      \def\@ifauthorsunequalc@de#1{%
        \if@F@cite
          \@F@citefalse
        \else
          \if@Y@cite
              {\@BAY}%
          \fi
          {\@BBC}%
        \fi
        \edef\@cite@undefined{?}%
        \def\BBA{\@BBA}%
        \if@A@cite
          %%\hyper@natlinkstart{#1}% We remove this line...
          {\csname b@\@citeb\APAC@extra@b@citeb\endcsname}%
          %%\hyper@natlinkend% ...and this one.
          \if@Y@cite
              {\@BBAY}%
          \fi
        \fi
        \if@Y@cite
          \hyper@natlinkstart{#1}%
          {\csname Y@\@citeb\APAC@extra@b@citeb\endcsname}%
          \hyper@natlinkend
        \fi
        \let\BBA\relax
      }
      \AfterEndPreamble{%
        \@ifundefined{iflanguage}{%
          \relax
        }{%
          \edef\APAC@tmp{nohyphenation}%
          \ifx\languagename\APAC@tmp
          \else
            \edef\APAC@tmp{spanish}%
            \ifx\languagename\APAC@tmp
              \def\@ifauthorsunequalc@de#1{%
                \if@F@cite
                  \@F@citefalse
                \else
                  \if@Y@cite
                      {\@BAY}%
                  \fi
                  {\@BBC}%
                \fi
                \edef\@cite@undefined{?}%
                \def\BBA{\@BBA}%
                \@ifundefined{spanishe@\@citeb\APAC@extra@b@citeb}%
                  {}% skip
                  {{% Use `e' instead of `y' in Spanish
                  \global\let\oldBBA\BBA
                  \global\def\BBA{e\global\let\BBA\oldBBA}%
                  }}%
                \if@A@cite
                  %%\hyper@natlinkstart{#1}% We remove this line...
                  {\csname b@\@citeb\APAC@extra@b@citeb\endcsname}%
                  %%\hyper@natlinkend% ...and this one.
                  \if@Y@cite
                      {\@BBAY}%
                  \fi
                \fi
                \if@Y@cite
                  \hyper@natlinkstart{#1}%
                  {\csname Y@\@citeb\APAC@extra@b@citeb\endcsname}%
                  \hyper@natlinkend
                \fi
                \let\BBA\relax
              }%
            \fi
          \fi
        }%
        \urlstyle{APACrm}
       }%
      \newcommand{\doi}[1]{\href{https://doi.org/#1}{\nolinkurl{doi:#1}}}%
      \renewcommand{\doiprefix}{\unskip}%
    }{}%
  }%
  \ifx\undefined\bibitemsep
  \else
    \setlength{\bibitemsep}{1em plus 1ex minus 1ex}%
  \fi
}
\PassOptionsToPackage{numberedbib}{apacite}

\RequirePackage
  [ colorlinks=true
  , linkcolor=black
  , anchorcolor=black
  , citecolor=links
  , filecolor=black
  , menucolor=black
  , runcolor=black
  , urlcolor=links
  ]{hyperref}
\urlstyle{rm}
\newcommand*{\email}[1]{\href{mailto:#1}{#1}}
\AtBeginDocument{%
  \hypersetup
    { pdftitle={\thetitle}
    , pdfauthor={\dccp@author}
    , pdfsubject={\dccp@subject}
    }
  \@ifundefined{Url@force@Tilde}{\def\Url@force@Tilde{\relax}}{}%
  \def\url@apa@dot{\mathchar"2E }%
  \def\url@apa@comma{\mathchar"2C }%
  \def\url@apa@questionmark{\mathchar"3F }%
  \def\url@apa@exclamation{\mathchar"21 }%
  \def\url@apa@hyphen{\mathchar"2D }%
  \def\url@apa@underscore{\_}%
  \def\UrlBreaks{\do\@\do\\\do\|\do\;\do\>\do\]\do\)\do\'\do+\do\=\do\#}%
  \def\UrlBigBreaks{\do\/\do\:\do@url@hyp}%
  \def\UrlNoBreaks{\do\(\do\[\do\{\do\<}% \)}
  \def\UrlOrds{\do\*\do\~\do\'\do\"}%
  \def\UrlSpecials{%
    \do\.{\mathbin{}\url@apa@dot }%
    \do\,{\mathbin{}\url@apa@comma }%
    \do\-{\mathbin{}\url@apa@hyphen }%
    \do\?{\mathbin{}\url@apa@questionmark }%
    \do\!{\mathbin{}\url@apa@exclamation }%
    \do\_{\mathbin{}\url@apa@underscore }%
    \do\ {\Url@space}\do\%{\Url@percent}\do\^^M{\Url@space}%
    \Url@force@Tilde}%
  \def\Url@OTnonTT{\do\<{\langle}\do\>{\mathbin{\rangle}}\do
    \_{\mathbin{}\_}\do\|{\mid}\do\{{\lbrace}\do\}{\mathbin{\rbrace}}\do
    \\{\mathbin{\backslash}}\UrlTildeSpecial}
}

\begingroup
\catcode`\"=12
\catcode`\&=12
\catcode`\#=12
\catcode`\<=12
\catcode`\>=12
\catcode`\_=12
\AtBeginDocument{%
  \def\sp{\space\space\space}
  \long\gdef\cc@xmp@packet{%
<?xpacket begin='' id=''?>^^J%
<x:xmpmeta xmlns:x='adobe:ns:meta/'>^^J%
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>^^J%
\sp<rdf:Description rdf:about=''^^J%
\sp\sp xmlns:xapRights='http://ns.adobe.com/xap/1.0/rights/'>^^J%
\sp\sp<xapRights:Marked>True</xapRights:Marked>^^J%
\sp</rdf:Description>^^J%
\sp<rdf:Description rdf:about=''^^J%
\sp\sp xmlns:dc='http://purl.org/dc/elements/1.1/'>^^J%
\sp\sp<dc:rights>^^J%
\sp\sp\sp<rdf:Alt>^^J%
\sp\sp\sp\sp<rdf:li xml:lang='x-default'>This work is licensed under a Creative Commons Attribution 4.0 International Licence.</rdf:li>^^J%
\sp\sp\sp</rdf:Alt>^^J%
\sp\sp</dc:rights>^^J%
\sp</rdf:Description>^^J%
\sp<rdf:Description rdf:about=''^^J%
\sp\sp xmlns:cc='http://creativecommons.org/ns#'>^^J%
\sp\sp<cc:license rdf:resource='http://creativecommons.org/licenses/by/4.0/'/>^^J%
\sp</rdf:Description>^^J%
</rdf:RDF>^^J%
</x:xmpmeta>^^J%
<?xpacket end='r'?>^^J%
  }%
}
\endgroup
\newcommand*{\ccxmp@embed@packet@pdftex}{%
  \bgroup
    \pdfcompresslevel=0
    \immediate\pdfobj stream attr {%
      /Type /Metadata
      /Subtype /XML
    }{\cc@xmp@packet}%
    \pdfcatalog {/Metadata \the\pdflastobj\space 0 R}%
  \egroup
}
\newcommand*{\ccxmp@embed@packet@pdfmark}{%
  \pdfmark{%
    pdfmark=/NamespacePush
  }%
  \pdfmark{%
    pdfmark=/OBJ,
    Raw={/_objdef \string{ccxmp@packet\string} /type /stream}%
  }%
  \pdfmark{%
    pdfmark=/PUT,
    Raw={\string{ccxmp@packet\string}
      2 dict begin
        /Type /Metadata def
        /Subtype /XML def
        currentdict
      end
    }%
  }%
  \pdfmark{%
    pdfmark=/PUT,
    Raw={\string{ccxmp@packet\string} (\cc@xmp@packet)}%
  }%
  \pdfmark{%
    pdfmark=/Metadata,
    Raw={\string{Catalog\string} \string{ccxmp@packet\string}}%
  }%
  \pdfmark{%
    pdfmark=/NamespacePop
  }%
}
\def\ccxmp@count@spaces#1 {%
  \def\ccxmp@one@token{#1}%
  \ifx\ccxmp@one@token\@empty
    \advance\@tempcnta by -1
  \else
    \advance\@tempcnta by 1
    \expandafter\ccxmp@count@spaces
  \fi
}
\newcommand*{\ccxmp@count@non@spaces}[1]{%
  \def\ccxmp@one@token{#1}%
  \ifx\ccxmp@one@token\@empty
  \else
    \advance\@tempcnta by 1
    \expandafter\ccxmp@count@non@spaces
  \fi
}
\newcommand*{\ccxmp@string@len}[1]{%
  \@tempcnta=0
  \expandafter\ccxmp@count@spaces#1 {} %
  \expandafter\ccxmp@count@non@spaces#1{}%
}
\newcommand*{\ccxmp@embed@packet@dvipdfm}{%
  \ccxmp@string@len{\cc@xmp@packet}%
  \special{pdf: object @ccxmp@packet
    <<
      /Type /Metadata
      /Subtype /XML
      /Length \the\@tempcnta
    >>
    stream^^J\cc@xmp@packet endstream%
  }%
  \special{pdf: docview
    <<
      /Metadata @ccxmp@packet
    >>
  }%
}
\newcommand*{\ccxmp@embed@packet@xetex}{%
  \special{pdf:stream @ccxmp@packet (\cc@xmp@packet)
    <<
      /Type /Metadata
      /Subtype /XML
    >>
  }%
  \special{pdf:put @catalog
    <<
      /Metadata @ccxmp@packet
    >>
  }%
}
\AtBeginDocument{%
  \begingroup
  \def\ccxmp@driver{hpdftex}%
  \ifx\ccxmp@driver\Hy@driver
    \ccxmp@embed@packet@pdftex
  \else
    \def\ccxmp@driver{hdvipdfm}%
    \ifx\ccxmp@driver\Hy@driver
      \ccxmp@embed@packet@dvipdfm
    \else
      \def\ccxmp@driver{hxetex}%
      \ifx\ccxmp@driver\Hy@driver
        \ccxmp@embed@packet@xetex
      \else
        \@ifundefined{pdfmark}{}{%
          \ccxmp@embed@packet@pdfmark
        }%
      \fi
    \fi
  \fi
  \endgroup
}
%% 
%% Copyright (C) 2019 Digital Curation Centre, University of Edinburgh
%% <info@dcc.ac.uk>
%%
%% End of file `dccpaper-base.sty'.
