0

I'm trying to add affiliation to the author but I got an error the document class is \def\year{2019}\relax %File: formatting-instruction.tex \documentclass[a4paper]{article} \usepackage{aaai19}

and the code that I'm using for adding authors is the following

\author{Hazem Samoaa}
\affiliation{%
\institution{Chalmers University of Technology}
\city{Gothenburg} 
 \state{Sweden} 
 }
 \email{samoaa@chalmers.se}

and the error is explained in the following snipping enter image description here

and I want the authors to be presented asenter image description here the following

However this forum is related to aaai19, so the sty file is illustrated as the following

    \def\year{2019}
%
%Filename: aaai19.sty
%
\typeout{Conference Style for AAAI for LaTeX 2e -- version for the AAAI-19 conference}
% WARNING: IF YOU ARE USING THIS STYLE SHEET FOR AN AAAI PUBLICATION, YOU
% MAY NOT MODIFY IT FOR ANY REASON. MODIFICATIONS (IN YOUR SOURCE 
% OR IN THIS STYLE SHEET WILL RESULT IN REJECTION OF YOUR PAPER).
%
% WARNING: This style is NOT guaranteed to work. It is provided in the
% hope that it might make the preparation of papers easier, but this style
% file is provided "as is" without warranty of any kind, either express or
% implied, including but not limited to the implied warranties of
% merchantability, fitness for a particular purpose, or noninfringement.
% You use this style file at your own risk. Standard disclaimers apply.
% There are undoubtably bugs in this style. If you would like to submit
% bug fixes, improvements, etc. please let us know. Please use the contact form
% at www.aaai.org.
% 
% Do not use this file unless you are an experienced LaTeX user. 
%
%
% PHYSICAL PAGE LAYOUT
\setlength\topmargin{-0.25in} \setlength\oddsidemargin{-0.25in}
\setlength\textheight{9.0in} \setlength\textwidth{7.0in}
\setlength\columnsep{0.375in} \newlength\titlebox \setlength\titlebox{2.25in}
\setlength\headheight{0pt}  \setlength\headsep{0pt}
%\setlength\footheight{0pt}  \setlength\footskip{0pt}
\thispagestyle{empty} \pagestyle{empty}
\flushbottom \twocolumn \sloppy
% We're never going to need a table of contents, so just flush it to
% save space --- suggested by drstrip@sandia-2
\def\addcontentsline#1#2#3{}
% gf: PRINT COPYRIGHT NOTICE
\def\copyright@year{\number\year}
\def\copyright@text{Copyright \copyright\space \copyright@year,
Association for the Advancement of Artificial Intelligence (www.aaai.org).
All rights reserved.}
\def\copyright@on{F}
%\def\nocopyright{\gdef\copyright@on{}} % Copyright notice is required for AAAI-20 papers.
\def\copyrighttext#1{\gdef\copyright@on{T}\gdef\copyright@text{#1}}
\def\copyrightyear#1{\gdef\copyright@on{T}\gdef\copyright@year{#1}}
% gf: End changes for copyright notice (used in \maketitle, below)
% Title stuff, taken from deproc.
\def\maketitle{\par
\begingroup % to make the footnote style local to the title
\def\thefootnote{\fnsymbol{footnote}}
% gf: Don't see why we'd want the footnotemark to be 0pt wide
%\def\@makefnmark{\hbox to 0pt{$^{\@thefnmark}$\hss}}
\twocolumn[\@maketitle] \@thanks
\endgroup
% gf: Insert copyright slug unless turned off
\if T\copyright@on\insert\footins{\noindent\footnotesize\copyright@text}\fi
% gf: And now back to your regular programming
\setcounter{footnote}{0}
\let\maketitle\relax \let\@maketitle\relax
\gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}
\def\@maketitle{\vbox to \titlebox{\hsize\textwidth
%%% AAAI changed: 03/05/2010
%%\linewidth\hsize \vskip 0.625in minus 0.125in \centering
\linewidth\hsize \vskip 0.625in minus 0.125in \centering
%%% END changed
{\LARGE\bf \@title \par} \vskip 0.2in plus 1fil minus 0.1in
{\def\and{\unskip\enspace{\rm and}\enspace}%
\def\And{\end{tabular}\hss \egroup \hskip 1in plus 2fil 
 \hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\Large\bf}%
\def\AND{\end{tabular}\hss\egroup \hfil\hfil\egroup
\vskip 0.25in plus 1fil minus 0.125in
% hg: Changed Large to normalsize on next line
 \hbox to \linewidth\bgroup\normalsize \hfil\hfil
\hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\Large\bf}
\hbox to \linewidth\bgroup\normalsize \hfil\hfil
\hbox to 0pt\bgroup\hss \begin{tabular}[t]{c}\Large\bf\@author 
\end{tabular}\hss\egroup
\hfil\hfil\egroup}
\vskip 0.3in plus 2fil minus 0.1in
}}
\renewenvironment{abstract}{\centerline{\bf
Abstract}\vspace{0.5ex}\begin{quote}\small}{\par\end{quote}\vskip 1ex}
% jsp added:
\def\pubnote#1{\thispagestyle{myheadings}
\pagestyle{myheadings}
\markboth{#1}{#1}
\setlength\headheight{10pt}  \setlength\headsep{10pt}
}
% SECTIONS with less space
\def\section{\@startsection {section}{1}{\z@}{-2.0ex plus
-0.5ex minus -.2ex}{3pt plus 2pt minus 1pt}{\Large\bf\centering}}
\def\subsection{\@startsection{subsection}{2}{\z@}{-2.0ex plus
-0.5ex minus -.2ex}{3pt plus 2pt minus 1pt}{\large\bf\raggedright}}
\def\subsubsection{\@startsection{subparagraph}{3}{\z@}{-6pt plus
%%% DIEGO changed: 29/11/2009
%% 2pt minus 1pt}{-1em}{\normalsize\bf}}
-2pt minus -1pt}{-1em}{\normalsize\bf}}
%%% END changed
\setcounter{secnumdepth}{0}
% add period to section (but not subsection) numbers, reduce space after
%\renewcommand{\thesection}
%   {\arabic{section}.\hskip-0.6em}
%\renewcommand{\thesubsection}
%   {\arabic{section}.\arabic{subsection}\hskip-0.6em}
% FOOTNOTES
\footnotesep 6.65pt %
\skip\footins 9pt plus 4pt minus 2pt
\def\footnoterule{\kern-3pt \hrule width 5pc \kern 2.6pt }
\setcounter{footnote}{0}
% LISTS AND PARAGRAPHS
\parindent 10pt
\topsep 4pt plus 1pt minus 2pt
\partopsep 1pt plus 0.5pt minus 0.5pt
\itemsep 2pt plus 1pt minus 0.5pt
\parsep 2pt plus 1pt minus 0.5pt
\leftmargin 10pt \leftmargini\leftmargin \leftmarginii 10pt
\leftmarginiii 5pt \leftmarginiv 5pt \leftmarginv 5pt \leftmarginvi 5pt
\labelwidth\leftmargini\advance\labelwidth-\labelsep \labelsep 5pt
\def\@listi{\leftmargin\leftmargini}
\def\@listii{\leftmargin\leftmarginii
\labelwidth\leftmarginii\advance\labelwidth-\labelsep
\topsep 2pt plus 1pt minus 0.5pt
\parsep 1pt plus 0.5pt minus 0.5pt
\itemsep \parsep}
\def\@listiii{\leftmargin\leftmarginiii
\labelwidth\leftmarginiii\advance\labelwidth-\labelsep
\topsep 1pt plus 0.5pt minus 0.5pt 
\parsep \z@ \partopsep 0.5pt plus 0pt minus 0.5pt
\itemsep \topsep}
\def\@listiv{\leftmargin\leftmarginiv
\labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
\def\@listv{\leftmargin\leftmarginv
\labelwidth\leftmarginv\advance\labelwidth-\labelsep}
\def\@listvi{\leftmargin\leftmarginvi
\labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
\abovedisplayskip 7pt plus2pt minus5pt%
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip 0pt plus3pt% 
\belowdisplayshortskip 4pt plus3pt minus3pt%
% Less leading in most fonts (due to the narrow columns)
% The choices were between 1-pt and 1.5-pt leading
\def\normalsize{\@setfontsize\normalsize\@xpt{11}}   % 10 point on 11
\def\small{\@setfontsize\small\@ixpt{10}}    % 9 point on 10
\def\footnotesize{\@setfontsize\footnotesize\@ixpt{10}}  % 9 point on 10
\def\scriptsize{\@setfontsize\scriptsize\@viipt{10}}  % 7 point on 8
\def\tiny{\@setfontsize\tiny\@vipt{7}}    % 6 point on 7
\def\large{\@setfontsize\large\@xipt{12}}    % 11 point on 12
\def\Large{\@setfontsize\Large\@xiipt{14}}    % 12 point on 14
\def\LARGE{\@setfontsize\LARGE\@xivpt{16}}    % 14 point on 16
\def\huge{\@setfontsize\huge\@xviipt{20}}    % 17 point on 20
\def\Huge{\@setfontsize\Huge\@xxpt{23}}    % 20 point on 23
%%%% named style for aaai, included here for ease of use
% This section implements citations for the ``named'' bibliography style,
% modified for AAAI use.
% This file can be modified and used in other conferences as long
% as credit to the authors and supporting agencies is retained, this notice
% is not changed, and further modification or reuse is not restricted.
% The ``named'' bibliography style creates citations with labels like
% \citeauthoryear{author-info}{year}
% these labels are processed by the following commands:
% \cite{keylist}
%  which produces citations with both author and year,
%  enclosed in square brackets
% \shortcite{keylist}
%  which produces citations with year only,
%  enclosed in square brackets
% \citeauthor{key}
%  which produces the author information only
% \citeyear{key}
%  which produces the year information only
\def\leftcite{(}\def\rightcite{)}
\def\cite{\def\citeauthoryear##1##2{\def\@thisauthor{##1}%
\ifx \@lastauthor \@thisauthor \relax \else##1 \fi ##2}\@icite}
\def\shortcite{\def\citeauthoryear##1##2{##2}\@icite}
\def\citeauthor{\def\citeauthoryear##1##2{##1}\@nbcite}
\def\citeyear{\def\citeauthoryear##1##2{##2}\@nbcite}
% internal macro for citations with () and with breaks between citations
% used in \cite and \shortcite
\def\@icite{\leavevmode\def\@citeseppen{-1000}%
\def\@cite##1##2{\leftcite\nobreak\hskip 0in{##1\if@tempswa , ##2\fi}\rightcite}%
\@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
% internal macro for citations without [] and with no breaks
% used in \citeauthor and \citeyear
\def\@nbcite{\leavevmode\def\@citeseppen{1000}%
\def\@cite##1##2{{##1\if@tempswa , ##2\fi}}%
\@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
% don't box citations, separate with ; and a space
% also, make the penalty between citations a parameter, 
% it may be a good place to break
\def\@citex[#1]#2{%
\def\@lastauthor{}\def\@citea{}%
\@cite{\@for\@citeb:=#2\do
{\@citea\def\@citea{;\penalty\@citeseppen\ }%
\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
\@ifundefined{b@\@citeb}{\def\@thisauthor{}{\bf ?}\@warning
{Citation `\@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}\let\@lastauthor\@thisauthor}}{#1}}
%Ignore the key when generating the Reference section.
\def\@lbibitem[#1]#2{\item\if@filesw 
{ \def\protect##1{\string ##1\space}\immediate
\write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
\def\thebibliography#1{\section*{References\@mkboth
{REFERENCES}{REFERENCES}}\list
{}{\labelwidth 0in\leftmargin\labelwidth
%%% DIEGO removed
%%\advance\leftmargin\labelsep
%%% END removed
%%% DIEGO changed
\itemsep .011in % original
%%\itemsep -.0125in % reduced space between bib entries
%%% END changed
}
\def\newblock{\hskip .11em plus .33em minus .07em}
\sloppy\clubpenalty4000\widowpenalty4000
\sfcode`\.=1000\relax}
\let\endthebibliography=\endlist
%\def\@newcite[1]{\citeauthor{#1}\shortcite{#1}}
\newcommand{\newcite}[1]{\citeauthor{#1} \shortcite{#1}}
3
  • Hope aaai19.sty is not the standard one, isn' it?
    – MadyYuvi
    Feb 14 '20 at 10:59
  • @MadyYuvi no it's just the conference tag
    – Peter
    Feb 14 '20 at 11:00
  • In the above code I could not find a definition for \affiliation. It is found in things like IEEEtran, apa6 and revtex4. Feb 14 '20 at 16:02
3

Please try with the below:

\documentclass[a4paper]{article} 

\title{Title}

\author{Hazem Samoaa\\
Chalmers University of Technology\\
Gothenburg\\
Sweden\\
samoaa@chalmers.se
\and
Barbara\\
DIBRIS\\
Genova\\
mail id
}

\begin{document}

\maketitle
\end{document}

PS: I removed \uspackage{aaai19} as I don't have that one...

10
  • When I remove \uspackage{aaai19} it works, but unfortunately, this package is mandatory for the conference, I have to use the conference forum @MadyYuvi
    – Peter
    Feb 14 '20 at 11:15
  • 1
    Then please post that particular .sty file or share the file location for checking...
    – MadyYuvi
    Feb 14 '20 at 11:17
  • Okay, I will add the code of aaai19.sty to the post, please follow @MadyYuvi
    – Peter
    Feb 14 '20 at 11:23
  • 1
    If you have github, then place it there and share the link
    – MadyYuvi
    Feb 14 '20 at 11:31
  • 1
    In that particular .sty file, \@maketitle was redefined, please remove tags from from the line 58 to 77, then check...
    – MadyYuvi
    Feb 14 '20 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.