how to set two authors latex code example

Example 1: define multiple authors LateX

\documentclass[11pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}

\author{
  LastName1, FirstName1\\
  \texttt{[email protected]}
  \and
  LastName2, FirstName2\\
  \texttt{[email protected]}
}
\title{Usage of the \texttt{\textbackslash author} command}

\begin{document}
  \maketitle
\end{document}

Example 2: how to add authors in latex

\author[1]{Alice Smith}
\author[2]{Bob Jones}
\affil[1]{Department of Mathematics, University X}
\affil[2]{Department of Biology, University Y}

Tags:

Misc Example