如何刪除 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之一區分了標題註釋和作者註釋。前者使用\tnoterefand \tnotetext,後者使用\fnrefand \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}}}

相關內容