将 Rmarkdown 文章中的作者隶属符号更改为数字

将 Rmarkdown 文章中的作者隶属符号更改为数字

对于我使用 Rmarkdown 中的 rticles 包撰写的手稿,期刊要求我将作者所属关系的引用从上标符号更改为上标数字。

因此,接下来我希望符号变成数字:

在此处输入图片描述

我使用的文章模板是“acs”模板,它使用 documentclass“achemso”。我想我必须在“achemso”模板中做出更改,但我不知道在哪里可以找到这个文件以及如何更改它。是否可以在 YAML 中更改它?有谁可以帮忙吗?

提前致谢!

答案1

更新

本示例是使用 完成的achemso-demo.tex

所有有电子邮件地址的作者都会自动被标记星号。

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}

相关内容