# How to reset the author list?

I am using titling package and authblk to manage multiple articles in a single file. Below is the code for example

\documentclass[11pt,openany]{article}
\usepackage{amsmath,amsfonts,amsthm,dsfont,amssymb,csquotes}
\usepackage{titling}

\usepackage[blocks]{authblk}

\usepackage{geometry}
\geometry{
includefoot
}

\geometry{
%   paper=a4paper, % Change to letterpaper for US letter
paperheight=25cm,paperwidth=18cm,
inner=1cm, % Inner margin
outer=2cm, % Outer margin
bindingoffset=1cm, % Binding offset
top=1cm, % Top margin
bottom=1cm, % Bottom margin
%   showframe,% show how the type block is set on the page
}

\makeatletter
\newcommand\@acceptedon{}
\newcommand\@uniqueid{}
\newcommand\@category{}
\setlength{\droptitle}{-5cm}

\def\@maketitle{%
\begin{minipage}{.5\textwidth}
%       \raggedright
$\begin{array}{lcl} \text{Unique Id} & :& \@uniqueid \\ \text{Category} & : & \@category \\ \end{array}$
\end{minipage}
\begin{minipage}{.5\textwidth}
\raggedleft
Accepted on : \@acceptedon
\end{minipage}
\vskip 1.5em%
\begin{center}%
\let \footnote \thanks
{\LARGE \@title \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1em%
%{\large \@date}%
\end{center}%
\par
\vskip 1.5em}
\makeatother

\begin{document}

%%%%%%%---------First Article-------------

\title{First Article}

\author[]{Author A}

\affil[]{Affiliation of Author A}

\uniqueid {17ICLAA034} \category{Invited Speaker }

\maketitle

\begin{abstract}
Abstract goes here...
\end{abstract}

%%%%%%%---------Second Article-------------

\title{Second Article}

\author[]{\underline{Author B}}

\affil[]{Affiliation of author B. }

\uniqueid {17ICLAA087} \category{Invited Speaker }

\maketitle

\begin{abstract}
Abstract goes here...
\end{abstract}

\end{document}


## What I want?

• Need to reset the authors list for each article.
• Have to remove the pagebreaks.

Current output:

PS: The solution given in this question was not working for me.

• I'll have a look later. But to repeat myself: you are not using the package. – Johannes_B Nov 14 '17 at 8:45
• oh!!!! I will try to resolve myself and if i succeed i will surely add as an answer or comment here...@Johannes_B – David Nov 14 '17 at 9:23
• Are you relyig on the features of the authblk package? – Johannes_B Nov 15 '17 at 17:36
• authblk is an aged package with no updates for more than a decade. This doesn't mean it is deprecated or outdated, but perhaps there are alternatives? Besides that, openany is no useful option for article and \def\@authors{} will reset the author list – user31729 Nov 15 '17 at 22:17
• @Johannes_B Not really. I am looking for a solution which solves my issue. Any solution is fine. – David Nov 16 '17 at 6:00

I focused on resetting the author list of authblk package.

The list of authors is stored in \AB@authors which can be reset manually by defining it to be empty before each new title of an article is used.

Another way is to grab the \author definition, use a \RenewDocumentCommand and check whether the number of authors is 0, then redefine \AB@authors, then use the original \author inside.

\@maketitle sets the author and affil counter values to 0 at its end.

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{dsfont}
\usepackage{amssymb}
\usepackage{csquotes}
\usepackage{titling}
\usepackage{letltxmacro}
\usepackage{xparse}
\usepackage[blocks]{authblk}

\usepackage{geometry}
\geometry{
includefoot
}

\geometry{
%   paper=a4paper, % Change to letterpaper for US letter
paperheight=25cm,paperwidth=18cm,
inner=1cm, % Inner margin
outer=2cm, % Outer margin
bindingoffset=1cm, % Binding offset
top=1cm, % Top margin
bottom=1cm, % Bottom margin
%   showframe,% show how the type block is set on the page
}

\makeatletter
\LetLtxMacro\@uthorfrom@uthblk\author

\RenewDocumentCommand{\author}{+o+m}{%
\ifnum0=\value{authors}%
\def\AB@authors{}%
\fi
\IfValueTF{#1}{%
\@uthorfrom@uthblk[#1]{#2}%
}{%
\@uthorfrom@uthblk{#2}%
}%
}

\newcommand\@acceptedon{}
\newcommand\@uniqueid{}
\newcommand\@category{}
\setlength{\droptitle}{-5cm}

\def\@maketitle{%
\begin{minipage}{.5\textwidth}
% \raggedright
$\begin{array}{lcl} \text{Unique Id} & :& \@uniqueid \\ \text{Category} & : & \@category \\ \end{array}$
\end{minipage}
\begin{minipage}{.5\textwidth}
\raggedleft
Accepted on : \@acceptedon
\end{minipage}
\vskip 1.5em%
\begin{center}%
\let \footnote \thanks
{\LARGE \@title \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\@author%
\end{tabular}\par}%
\vskip 1em%
% {\large \@date}%
\end{center}%
\par
\vskip 1.5em%
% reset counters for possible next \author macro
\setcounter{authors}{0}%
\setcounter{affil}{0}%
}
\makeatother

\begin{document}

%%%%%%%---------First Article-------------

\title{First Article}

\author[]{Author A}

\affil[]{Affiliation of Author A}

\uniqueid {17ICLAA034} \category{Invited Speaker }

\maketitle

\begin{abstract}
Abstract goes here...
\end{abstract}

%%%%%%%---------Second Article-------------

\title{Second Article}

\author[]{\underline{Author B}}

\affil[]{Affiliation of author B. }

\uniqueid {17ICLAA087} \category{Invited Speaker }

\makeatletter
\makeatother
\maketitle

\begin{abstract}
Abstract goes here...
\end{abstract}

\end{document}