# Multiple authors' affiliations

I am using Texmaker 5.0.2 to write a paper. I have multiple authors' affiliations I tried to solve it as the following:

\documentclass{cai}
\usepackage{graphicx}
\usepackage{blindtext}
\usepackage{enumitem}
\usepackage{arabtex}
\usepackage{utf8}
\usepackage{float}
\usepackage{wrapfig}
\page{1}

\begin{document}
\label{firstpage}

\title{title}

\author
{$^1$ first\surname {Author}, $^2$ Second\surname {Author}, $^3$ Third \surname {Author}, $^4$ Fourth\surname {Author}}

\affiliation{$^1^$, $^3$ First University\\
$^2$ Second University\\
$^4$ Third University\\
}

\email{$^1$ first@first.org, $^2$ second@second.com,\\\hspace{13mm}  $^3$ third@third.org,
$^4$ fourth@foueth.com}

\maketitle


but when I build it I get the following error

"! Missing $inserted.<inserted text>$ \maketitle"


Maybe it is due to the special characters ($,^). Any help? I appreciate any help you provide. • Welcome to TeX.SX! Superscripts are supposed to appear in math-mode only, that's why TeX says that there's a missing $. Replacing ^1 by $^1$ should make the error go away. But many journal classes have built-in macros to provide the author's affiliations, so you shouldn't need to resort to $^1$. Please provide us a minimal working example (MWE) including the \documentclass{} you are using so we can tell you the best way to do that. – Phelype Oleinik May 11 '18 at 14:20
• @PhelypeOleinik have a look I provide the piece of code which I think the error in it. thanks – Ali Alnader May 11 '18 at 15:19

This cai document class you are using defines the \author, \affiliation, and \email macros such that you call it once for each author, like this:

\documentclass{cai}
\usepackage{graphicx}
\usepackage{blindtext}
\usepackage{enumitem}
\usepackage{arabtex}
\usepackage{utf8}
\usepackage{float}
\usepackage{wrapfig}
\page{1}

\begin{document}
\label{firstpage}

\title{title}

\author{First \surname{Author}}
\affiliation{First University}
\email{first@first.org}

\author{Second \surname{Author}}
\affiliation{Second University}
\email{second@second.com}

\author{Third \surname{Author}}
\affiliation{First University}
\email{third@third.com}

\author{Fourth \surname{Author}}
\affiliation{Third University}
\email{fourth@fourth.com}