5

I'm required to include a phone number with a corresponding author on the title page of a paper. The achemso package uses \phone{} to do this. The documentation states (on pg. 5)

The class will recognise the optional information \fax and \phone, which will be printed along with the lead authors e-mail address. Note that this information is only used for authors who have an e-mail address supplied.

The MWE given by the documentation is the following:

\author{Second Bloke}
\email{second.bloke@some.place}
\phone{+xxx (0)yyy zzzzzz}
\fax{+xxx (0)yyy wwwwww}
\affiliation[University of Sometown]
{University of Somewhere, Sometown, USA}

My problem is this. I include \email{} and \phone{} but only the email will be displayed. It isn't until I include \fax{} that the the phone number will appear. Unfortunately, the fax number will also appear.

My question is, can I simply display an email and phone number without printing the fax number?

Here is my MWE:

\documentclass[journal=jpcafh]{achemso}
\setkeys{acs}{email=true}

\title{MWE: A Minimum Working Example}

\author{The Mighty Jingles}
\affiliation[Curbstompers Anonymous]
{123 Road St., City, State, 45678 USA}

\author{QuickyBaby}
\email{quickfingers@email.com}
\phone{+1 (555) 867-5309}
%\fax{+1 (555) 867-5310}
\affiliation[Curbstompers Anonymous]
{123 Road St., City, State, 45678 USA}

\begin{document}

\end{document}

Note: Uncommenting the fax line will get the phone to appear.

I'm compiling with latex -> dvips -> ps2pdf.

LordStryker
  • 1,036

1 Answers1

6

I don't know whether this behaviour is a feature or a bug in achemso.cls, but the culprit is in these lines

\renewcommand*\acs@number@list{%
  \begingroup
    \acs@number@list@aux@i{phone}%
    \let\@tempb\@tempa
    \acs@number@list@aux@i{fax}%
    \ifx\@tempa\@empty\else
      \ifx\@tempb\@empty\else
        \protected@edef\@tempa{%
          \@tempb.\space\@tempa
        }%
      \fi
    \fi
    \ifx\@tempa\@empty\else
      \par
      \@tempa
    \fi
  \endgroup
}

Commenting out the first \ifx (and its associated \fi), gives the desired result:

\documentclass[journal=jpcafh]{achemso}
\setkeys{acs}{email=true}

\makeatletter
\renewcommand*\acs@number@list{%
  \begingroup
    \acs@number@list@aux@i{phone}%
    \let\@tempb\@tempa
    \acs@number@list@aux@i{fax}%
    %\ifx\@tempa\@empty\else
      \ifx\@tempb\@empty\else
        \protected@edef\@tempa{%
          \@tempb.\space\@tempa
        }%
      \fi
    %\fi
    \ifx\@tempa\@empty\else
      \par
      \@tempa
    \fi
  \endgroup
}
\makeatother

\title{MWE: A Minimum Working Example}
\author{The Mighty Jingles}
\affiliation[Curbstompers Anonymous]
{123 Road St., City, State, 45678 USA}

\author{QuickyBaby}
\email{quickfingers@email.com}
\phone{+1 (555) 867-5309}
%\fax{+1 (555) 867-5310}
\affiliation[Curbstompers Anonymous]
{123 Road St., City, State, 45678 USA}

\begin{document}

\end{document}

enter image description here

Gonzalo Medina
  • 505,128
  • Just to note, there is an offending period following the phone number. I'm OKAY with that but someone else who comes along may not be. Change \@tempb.\space\@tempa to \@tempb\space\@tempa. – LordStryker Apr 03 '14 at 17:43