# How do I get the author list to wrap when using authblk with titling?

I am writing a document that compiles a collection of abstracts, and so I want to use \maketitle repeatedly. I'm using the titling package along with authblk to get multiple author affiliations, following the answer to this question: Package clash between authblk and titling

But when I have a long list of authors I don't get a line break and the author list is off-center and in the margins. Is there something in the \myinput function that is breaking my line break?

\begin{filecontents}{FirstFile.tex}
\title{First File}
\author[2]{B. Second\thanks{B@Second}}
\author[1]{A. Gonzales\thanks{A@Gonzales}}
\author[1]{C. Robin}
\author[2]{W. Pooh}
\author[1]{E.E. Yore}
\author[1,2]{C. Dosch}

\affil[1]{Test A}
\affil[2]{Test B}

\Content{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ornare ante nec tellus varius, nec mattis felis pretium. Ut auctor lectus at blandit dictum.}
\end{filecontents}

\documentclass{article}
\usepackage{titling}
\usepackage{authblk}
\renewcommand\Authfont{\bfseries}
\renewcommand\Affilfont{\rmfamily\slshape\small}
\makeatletter

\newcommand{\Content}[1]{\def\@Content{#1}}
\pretitle{\begin{center}\Large\bfseries}
\posttitle{\par\end{center}\vspace{\baselineskip}}
\newcommand*\myinput[1]{% convenience command
\input{#1}%
\maketitle
\@Content
\clearpage
\renewcommand\AB@affillist{}%
\renewcommand\AB@authlist{}%
\setcounter{affil}{0}%
\setcounter{authors}{0}%
\emptythanks}
\def\maketitle{\AB@maketitle}% modified from authblk.sty
\makeatother
\date{}

\begin{document}
\myinput{FirstFile}
\end{document}