如何删除 elsarticle.cls 中 tnoteref 中的逗号?

如何删除 elsarticle.cls 中 tnoteref 中的逗号?

在此处输入图片描述如何在这个修改后的elsarticle类中删除连续脚注符号之间的逗号?

\documentclass{elsarticle}
\usepackage{etoolbox}
\makeatletter
    %replace first instance (first tnote)
    \patchcmd{\tnotemark}{\ding{73}}{\dag}{}{\@latex@error{Failed to path \string\tnotemark\space for \string\ding{73}}}
    %replace second instance (second tnote)
    \patchcmd{\tnotemark}{\ding{73}\ding{73}}{\dag\dag}{}{\@latex@error{Failed to path \string\tnotemark\space for \string\ding{73}\string\ding{73}}}
    %replace first instance (first tnote)
    \patchcmd{\tnotetext}{\ding{73}}{\dag}{}{\@latex@error{Failed to path \string\tnotetext\space for \string\ding{73}}}
    %replace second instance (second tnote)
    \patchcmd{\tnotetext}{\ding{73}\ding{73}}{\dag\dag}{}{\@latex@error{Failed to path \string\tnotetext\space for \string\ding{73}\string\ding{73}}}
\makeatother
\begin{document}
\begin{frontmatter}
\title{This is a specimen title\tnoteref{t1}}
\author{M. Author\tnoteref{t2}}
\tnotetext[t1]{This document is a collaborative effort.}
\tnotetext[t2]{Another title note.}
\end{frontmatter}
\section{Paper Material}
Some Text.
\end{document}

答案1

我不确定你为什么要这么做。但是,逗号就在\ding{73}\ding{73}in之前\tnotemark,因此用 替换它\,很容易。

\documentclass{elsarticle}
\usepackage{etoolbox}

%replace first instance (first tnote)
\patchcmd{\tnotemark}
  {\ding{73}}
  {\dag}
  {}{}
%replace second instance (second tnote)
\patchcmd{\tnotemark}
  {,\ding{73}\ding{73}}
  {\,\dag\dag}
  {}{}
%replace first instance (first tnote)
\patchcmd{\tnotetext}
  {\ding{73}}{\dag}
  {}{}
%replace second instance (second tnote)
\patchcmd{\tnotetext}
  {\ding{73}\ding{73}}
  {\dag\dag}
  {}{}

\begin{document}

\begin{frontmatter}
\title{This is a specimen title\tnoteref{t1}\tnoteref{t2}}
\author{M. Author}
\tnotetext[t1]{This document is a collaborative effort.}
\tnotetext[t2]{Another title note.}
\end{frontmatter}

\section{Paper Material}
Some Text.

\end{document}

在此处输入图片描述

关于注释也存在一些误解。其中一种elsarticle误解是区分标题注释和作者注释。前者使用\tnoteref\tnotetext,后者使用\fnref\fntext。标题注释用符号标记,作者注释用数字标记。您可以避免使用逗号,并用您拥有的补丁替换标题注释符号。

\tnoteref也可以滥用作者注释,但这是错误的,因为你最多只能得到两个注释。\,如果你想这样做,只需在上面的补丁中删除即可。

\documentclass{elsarticle}
\usepackage{etoolbox}

%replace first instance (first tnote)
\patchcmd{\tnotemark}
  {\ding{73}}
  {\dag}
  {}{}
%replace second instance (second tnote)
\patchcmd{\tnotemark}
  {,\ding{73}\ding{73}}
  {\dag\dag}
  {}{}
%replace first instance (first tnote)
\patchcmd{\tnotetext}
  {\ding{73}}{\dag}
  {}{}
%replace second instance (second tnote)
\patchcmd{\tnotetext}
  {\ding{73}\ding{73}}
  {\dag\dag}
  {}{}

\begin{document}

\begin{frontmatter}
\title{This is a specimen title\tnoteref{t1}}
\author{M. Author\tnoteref{t2}}
\tnotetext[t1]{Title note.}
\tnotetext[t2]{Author note.}
\end{frontmatter}

\section{Paper Material}
Some Text.

\end{document}

如果您的提交因不符合标准而被拒绝,请不要责怪我或本网站。

在此处输入图片描述

答案2

在我看来,删除逗号是没有意义的,因为这会导致出现三个相同符号的序列,看起来像对脚注的单一引用。

如果你真的想要它,只需替换第二个补丁命令

%replace second instance (second tnote)
\patchcmd{\tnotemark}{\ding{73}\ding{73}}{\dag\dag}{}{\@latex@error{Failed to path \string\tnotemark\space for \string\ding{73}\string\ding{73}}}

经过

%replace second instance (second tnote)
\patchcmd{\tnotemark}{,\ding{73}\ding{73}}{\dag\dag}{}{\@latex@error{Failed to path \string\tnotemark\space for \string\ding{73}\string\ding{73}}}

相关内容