There are really two questions here: how to define the interface and how to implement it. I'll only tackle the former, because the implementation would require several hours' work.
First you have to decide whether using non standard commands, say \Title
and \Author
instead of \title
and \author
. There are many classes around and different realizations. For instance, the standard classes (article
, report
and book
) allow for only one \author
command, others want that different authors go in distinct \author
commands (amsart
does this).
I'll assume you go with \title
and multiple \author
commands for maximum flexibility. The best approach is, in my opinion, using a key-value syntax.
A document always has a title, and sometimes a short title for the header or a subtitle. I would do it like
\title[
subtitle=A subtitle,
short-title=A short title
]{The very long title of this document}
rather than providing a bunch of commands such as \subtitle
and \shorttitle
: in this way all the data are in one place. Similarly for author information:
\author[
affiliation=University of Someplace,
affiliation-secondary=Institute of Silly Investigations,
address=42, Hidden Road, Someplace,
email=abigail.uthor@someplace.xy,
email-current=a.uthor@giggle.com,
abbreviated-name=A. Uthor,
thanks=Research grant 1234567890,
]{Abigail Uthor}
\author[
key=writer,
corresponding,
affiliation=University of Nowhere,
email=winfried.riter@nowhere.nw,
long-name=Winfried Riter,
]{W. Riter}
\author[
share=writer,
email=brutus.c.dull@stanford.edu,
]{B. C. Dull}
Note that I used several keys that can be used or not by your class. For instance, key=writer
could make it possible to share affiliation information between two or more authors. The more detailed and classified is the information, the easier will be to implement a set of commands that process it.
Talking of user interface, something like \AtBeginDocument{\maketitleandabstract}
is surely not something document authors should be supposed to type. This will be done by the class; the classical approach with \maketitle
can be used too.
I'm also keen towards placing this information after \begin{document}
. If you do it in this way, you can free yourself from the burden of adding the \maketitle
command: just define a articledata
environment, whose end automatically issues \maketitle
. So
\documentclass{myclass}
<packages>
<definitions>
\begin{document}
\begin{articledata}
\title[...]{...}
\author[...]{...}
\author[...]{...}
\abstract{
this is the abstract
}
\keywords{
a list of keywords
}
\end{articledata}
<paper starts here>
\end{document}
With a simple switch you can warn that commands such as \author
, \title
, \abstract
and so on must go in the articledata
environment (or issue an error message). It will be also easy to provide a package with a compatibility
option that redefines the commands and the environment so that the document becomes compatible with article
.
Best Answer
According to the installation and user's guide
I suggest downgrading the error to a warning. This will finish the compilation with the warnings in the log file.
Add this code after
\documentclass[options]{acmart}
in your document.This code allows you to test the functionality.