Currently I am making a template file for our conference, in which we need to write author names in the header.
If the number of authors is two then list those authors in If the number of authors is more than two then this should produce, "first author et.al".
How to acheive this?
MWE:
\documentclass[a4paper,10pt]{article}
\usepackage{amsmath,amsfonts,amsthm,dsfont,amssymb,lipsum}
\usepackage[blocks]{authblk}
\newenvironment{keywords}{\noindent\textbf{Keywords:}}{}
\newenvironment{classification}{\noindent\textbf{AMS subject classifications.}}{}
\newcommand{\email}[1]{\texttt{\small #1}}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[C]{%
\ifodd\value{page}
\small\nouppercase\authors
\else
\small\nouppercase\shorttitle
\fi
}
\begin{document}
% % % % %--------------------------------------------------------------------
% % % % % Title of the Paper and Acknowledgement
% % % % %--------------------------------------------------------------------
\title{Your Title of the Paper
\thanks{Acknowledgement: The authors thanks the support of so and so project/funding \dots}
}
% % % % %--------------------------------------------------------------------
% % % % % Authors,, Affiliations and email ids
% % % % %--------------------------------------------------------------------
\author[1]{Author A\footnote{Presenting Author.}}
\author[2]{Author B}
\author[3]{Author C} % Author having same Affiliation that of Author A
\author[4]{Author D}
\affil[1]{Affiliation of Author A. \email{abcd@gmail.com}}
\affil[2] {Affiliation of Author B. \email{authorb@gmail.com}}
\affil[3] {Affiliation of Author C. \email{authorc@gmail.com}}
\affil[4]{Department of Statistics, Manipal University, Manipal, India. \email{authord@gmail.com}}
% % % % %--------------------------------------------------------------------
\date{(Received on , Accepted on )}
\newcommand\shorttitle{The Running title of the article(give a short title)}
\newcommand\authors{Authors on the Author A et.al.,}
\maketitle
\begin{abstract}
Your abstract goes here\dots The citation can be done using \verb|\cite{key}| and this will result the respective number in the reference list, Eg.\cite{einstein}.
\end{abstract}
\begin{keywords}
ginverse, drazin inverse, diffrential equation
\end{keywords}
\begin{classification}
13C10; 15A09; 15A24; 15B57
\end{classification}
\section{Introduction}
Use \verb|\section{}| command to type your sections. Here, goes your introduction or preliminaries...
\section{Your section title\dots}
\lipsum[1-20]
\begin{thebibliography}{100}
\bibitem{einstein}
Albert Einstein.
{\em Zur Elektrodynamik bewegter K{\"o}rper}.
Journal of Mathematics, 322(10):89--921, 1905.
\bibitem{impj} The Japan Reader {\em Imperial Japan 1800-1945} 1973:
Random House, N.Y.
\bibitem{norman} E. H. Norman {\em Japan's emergence as a modern
state} 1940: International Secretariat, Institute of Pacific
Relations.
\bibitem{fo} Bob Tadashi Wakabayashi {\em Anti-Foreignism and Western
Learning in Early-Modern Japan} 1986: Harvard University Press.
\end{thebibliography}
\end{document}


\AB@authors. – Keith Prussing Mar 24 '20 at 17:53! Undefined control sequence. <recently read> \@firstof@authlist. – LEo Dec 01 '20 at 15:05