Files
cs-paper-template/config/acm.tex
T
Ali Hariri 3b47b09b27 Added commands to add authors and affiliations (#1)
* Added commands to automatically insert authors regardless of style

* Updated README and automated adding authors
2023-01-18 22:12:51 +01:00

83 lines
2.2 KiB
TeX

%=============================%
% DO NOT MODIFY THIS FILE %
%=============================%
\ifx\varDocClass\undefined
\def \varDocClass{acmart}
\fi
\ifx\varKeyvals\undefined
\def \varKeyvals{sigconf}
\fi
\def\insertAuthors{}
\makeatletter
\newcommand{\addAuthor}[2]{
\g@addto@macro\insertAuthors{\author{#1}}
\@for\varRef:={#2}\do{
\expandafter\g@addto@macro\expandafter\insertAuthors\expandafter{\expandafter\getInst\expandafter{\varRef}}
}
\g@addto@macro\insertAuthors{ }
}
\newcommand{\addInst}[2]{\expandafter\gdef\csname my@inst@#1\endcsname{#2}}
\newcommand{\getInst}[1]{\csname my@inst@#1\endcsname}
\newcounter{instId}
\newcommand{\addInstitution}[4]{
\stepcounter{instId}
\addInst{\theinstId}{
\affiliation{
\institution{#1}
\city{#2}
\country{#3}
}
\email{#4}
}
}
\makeatother
\newcommand{\addAbstract}[1]{\def\varAbstract{#1}}
\newcommand{\addTitle}[1]{\def\varTitle{#1}}
\newcommand{\addKeywords}[1]{\def\varKeywords{#1}}
\def\insertRunningHeads{}
\newcommand{\setRunningHeads}[1]{
\def\insertRunningHeads{\renewcommand{\shortauthors}{#1}}
}
\newcommand{\insertTopmatter}{
\title{\varTitle}
\insertAuthors
\insertRunningHeads
\begin{abstract}
\varAbstract
\end{abstract}
\keywords{\varKeywords}
\maketitle
}
\newcommand{\setBibStyle}{\bibliographystyle{bibliography/ACM-Reference-Format}}
%% \BibTeX command to typeset BibTeX logo in the docs
\AtBeginDocument{%
\providecommand\BibTeX{{%
\normalfont B\kern-0.5em{\scshape i\kern-0.25em b}\kern-0.8em\TeX}}}
%% Rights management information. This information is sent to you
%% when you complete the rights form. These commands have SAMPLE
%% values in them; it is your responsibility as an author to replace
%% the commands and values with those provided to you when you
%% complete the rights form.
%\setcopyright{acmcopyright}
%\copyrightyear{2018}
%\acmYear{2018}
%\acmDOI{10.1145/1122445.1122456}
%% These commands are for a PROCEEDINGS abstract or paper.
%\acmConference[Woodstock '18]{Woodstock '18: ACM Symposium on Neural
% Gaze Detection}{June 03--05, 2018}{Woodstock, NY}
%\acmBooktitle{Woodstock '18: ACM Symposium on Neural Gaze Detection,
% June 03--05, 2018, Woodstock, NY}
%\acmPrice{15.00}
%\acmISBN{978-1-4503-XXXX-X/18/06}