\documentclass[$for(classoption)$$classoption$$sep$,$endfor$,$bibliographystyle$]{sagej}

\usepackage{moreverb,url,natbib, multirow, tabularx}
\usepackage[colorlinks,bookmarksopen,bookmarksnumbered,citecolor=red,urlcolor=red]{hyperref}

$if(longtable)$
\usepackage{longtable}
$endif$

% Pandoc citation processing
$if(csl-refs)$
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
% for Pandoc 2.8 to 2.10.1
\newenvironment{cslreferences}%
  {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
  \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
  {\par}
% For Pandoc 2.11+
\newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry spacing
 {% don't indent paragraphs
  \setlength{\parindent}{0pt}
  % turn on hanging indent if param 1 is 1
  \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
  % set entry spacing
  \ifnum #2 > 0
  \setlength{\parskip}{#2\baselineskip}
  \fi
 }%
 {}
\usepackage{calc} % for calculating minipage widths
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$

$for(header-includes)$
$header-includes$
$endfor$


\begin{document}

\title{$title$}

\runninghead{$runninghead$}

\author{$for(author)$$author.name$\affilnum{$author.num$}$sep$, $endfor$}

\affiliation{$for(address)$\affilnum{$address.num$}{$address.org$}$sep$\\$endfor$}

$if(corrauth)$
\corrauth{$corrauth$}
$endif$

$if(email)$
\email{$email$}
$endif$

$if(abstract)$
\begin{abstract}
$abstract$
\end{abstract}
$endif$

$if(keywords)$
\keywords{$keywords$}
$endif$

\maketitle

$body$

$if(bibliography)$
\bibliographystyle{$bibliographystyle$}
\bibliography{$bibliography$}
$endif$

$for(include-after)$
$include-after$

$endfor$

\end{document}
