Author – Change Author Affiliation Symbols to Numbers in Rmarkdown Rticles

achemsoaffiliationauthorrmarkdown

For a manuscript I wrote using the rticles package in Rmarkdown, I am asked by the journal to change the reference to author affiliations from superscript symbols to superscript numbers.

So in the following, I would like the symbols to become numbers:

enter image description here

The rticles template I use is the "acs" template, which uses the documentclass "achemso". I guess I have to make a change in the "achemso" template, but I have no idea where to find this file and how to change it. Is it possible to change this in the YAML? Is there anyone who could help out with this?

Thanks in advance!

Best Answer

UPDATE

This example was done using achemso-demo.tex.

All authors with an e-mail address are automatically marked with a star.

c

\documentclass[journal=jacsat,manuscript=article]{achemso}

\usepackage{chemformula} % Formula subscripts using \ch{}
\usepackage[T1]{fontenc} % Use modern font encodings

\newcommand*\mycommand[1]{\texttt{\emph{#1}}}

%%%%%%% added <<<<<<<<<<<<<<<<
\usepackage{etoolbox}% needed for the patch  <<<

\makeatletter
\renewcommand*{\acs@author@fnsymbol@symbol}[1]{% Use numbers instead of symbols, * is for email
    \ifcase #1 *\or
    1\or
    2\or
    3\or
    4\or
    5\or
    6\or
    7\or
    8\or
    9\or
    10
    \fi
}
        
\renewcommand*\acs@contact@details{% addd * before  E-mail
    {\sffamily *\,E-mail: \acs@email@list }%
    \acs@number@list
}           

\patchcmd{\acs@address@list@auxii}% superscript for numbers in affiliations
{\acs@author@fnsymbol{\acs@affil@marker@cnt}}
{\textsuperscript{\acs@author@fnsymbol{\acs@affil@marker@cnt}}}
{}{}

\patchcmd{\acs@address@list@auxii}% superscript for numbers in affiliations
{{\acs@author@fnsymbol{\acs@affil@marker@cnt}\@nameuse{@altaffil@\@roman\@tempcnta}\par}}
{{\textsuperscript{\acs@author@fnsymbol{\acs@affil@marker@cnt}}\@nameuse{@altaffil@\@roman\@tempcnta}\par}}
{}{}        

\makeatother    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\author{Andrew N. Other}
\altaffiliation{A shared footnote}
\author{Fred T. Secondauthor}
\altaffiliation{Current address: Some other place, Othert\"own,
    Germany}
\author{I. Ken Groupleader}
\altaffiliation{A shared footnote}
\email{[email protected]}
\phone{+123 (0)123 4445556}
\fax{+123 (0)123 4445557}
\affiliation[Unknown University]
{Department of Chemistry, Unknown University, Unknown Town}
\alsoaffiliation[Second University]
{Department of Chemistry, Second University, Nearby Town}
\author{Susanne K. Laborator}
\email{[email protected]}
\affiliation[BigPharma]
{Lead Discovery, BigPharma, Big Town, USA}
\author{Kay T. Finally}
\affiliation[Unknown University]
{Department of Chemistry, Unknown University, Unknown Town}
\alsoaffiliation[Second University]
{Department of Chemistry, Second University, Nearby Town}



\title[An \textsf{achemso} demo]
  {A demonstration of the \textsf{achemso} \LaTeX\
   class}


\abbreviations{IR,NMR,UV}
\keywords{American Chemical Society, \LaTeX}

\begin{document}    

\begin{abstract}
  This is an example document for the \textsf{achemso} document
  class, intended for submissions to the American Chemical Society
  for publication. The class is based on the standard \LaTeXe\
  \textsf{report} file, and does not seek to reproduce the appearance
  of a published paper.

  This is an abstract for the \textsf{achemso} document class
  demonstration document.  An abstract is only allowed for certain
  manuscript types.  The selection of \texttt{journal} and
  \texttt{manuscript} will determine if an abstract is valid.  If
  not, the class will issue an appropriate error.
\end{abstract}  

\section{Introduction}
This is a paragraph of text to fill the introduction of the
demonstration file.  The demonstration file attempts to show the
modifications of the standard \LaTeX\ macros that are implemented by
the \textsf{achemso} class.  These are mainly concerned with content,
as opposed to appearance.   

\end{document}