[Tex/LaTex] How to add different affiliation contents for one author

affiliationfootnotestitles

The paper has two authors, and one is the corresponding author. How can I make the two authors have same affiliations, and add the email address to the corresponding author in the footnote. The footnote numbering symbol should be Arabic number and the corresponding author should have also have a * numbering symbol.
I am trying to use the below code, but it doesn't work. The second \thanks put a new numbering symbol directly upon the previous one.

\documentclass[a4paper,12pt]{article}
    \makeatletter
     \let\@fnsymbol\@arabic
    \makeatother
\begin{document}
\title{XX }
  \author1{XX \thanks{Address 1} \and  author 2\footnotemark[1*]\thanks{email}}
  \date{}

  \maketitle
  \end{document}

Best Answer

If you find a paper that looks the way you like, search for the LaTeX class offered by the corresponding journal/conference. These classes usually support what you want out of the box.

If you want to stay with the article class, you can do it like this.

\documentclass[a4paper,12pt]{article}
\usepackage{xpatch}
\makeatletter
\xpatchcmd\maketitle{\@fnsymbol}{\@arabic}{}{}
\xpatchcmd\maketitle{\rlap}{}{}{}
\newcommand\corrauth[1]%
  {\def\@thefnmark{*}\@footnotemark
   \protected@xdef\@thanks{\@thanks\protect \corrauthtext{#1}}%
  }
\newcommand\corrauthtext{\def\@thefnmark{*}\@footnotetext}
\makeatother
\begin{document}
\title{The Title}
\author
  {A.~U.~Thor\thanks{Address 1}
   \and
   A.~Uthor%
   \footnotemark[1]\textsuperscript{,}\corrauth{email}%
  }
\date{}
\maketitle
\end{document}

enter image description here enter image description here