1

I've been banging my head for the past day and a half trying to figure this out. Page 63 of the Memoir Class manual recommends "for serious work" always using a handcrafted title page instead of the more restrictive \maketitle or \titlingpage environment. Following this suggestion, I've made a prototype handcrafted title page that I'm pretty happy with, but now I want to modify it to handle multiple authors. The authblk package does everything I need, so rather than reinvent the wheel, I'm trying to use it. But authblk and memoir don't play nicely together.

There are two serious problems:

  1. Authblk breaks memoir's \theauthor and \thedate commands: they become undefined control sequences. (They work without the authblk package.)
  2. Memoir breaks not only authblk's built-in \AB@authors command, but also the standard \@author command. (They work if the document class is article.) This is fatal because the handcrafted title page needs to access one or the other of these without using \maketitle.

In the code below, I've commented out the commands that don't work together and added comments explaining what happens when they are active. Can anyone suggest how to get around these problems?

\documentclass[]{memoir}
\usepackage{authblk}

\title{Anything Goes}
\renewcommand{\Affilfont}{\itshape}
\author{J.B. Smith}
\affil{Institute for Research\\Hamilton,Ontario}
\author{C.T. Appleton}
\author{P.R. Bailey}
\affil{NASA, Greenbelt, MD}

\begin{document}
\makeatletter

% This works as expected.
\maketitle

% But nothing here does.
% \theauthor % Throws an undefined control sequence error.
% \thedate % So does this.
%\@author % Creates a plethora of errors.
%\AB@authors % So does this.

\end{document}
  • If the two are not compatible, you should ask yourself: is hacking authblk to make it work with memoir a really a better, tidier, and/or easier-to-maintain solution than simply creating your own metadata commands? memoir does offer a lot of useful hooks as it is, and creating your own is not particularly tricky as it is. (Usually, these sorts of things are just put into unlined tabulars....) – jon Jan 11 '17 at 21:39
  • I agree with jon, here is if better to write your own interface. The fact that \theauthor no longer works is of course because authblk has overwritten the interface that defines it. \thedate has never been supported. That \@author does not work is because it is missing the environment it is being typeset inside. Let us go back a bit. What exactly are you trying to do here? It is not recommended to use the memoir class to prepare single articles in. Use the standard article class for that if the journal does not provide a template. – daleif Jan 12 '17 at 12:08

Your Answer

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

Browse other questions tagged or ask your own question.