6

In the elsarticle class, when you use the command \tnoteref, a star is placed at the end of the title and used as the symbol for the footnote, see the example below.

I would like to change that to something other than a star, say a dagger. Is there a way to do that by adding code to a .tex file's preamble?

    \documentclass{elsarticle}
    \begin{document}
    \begin{frontmatter}
    \title{This is a specimen title\tnoteref{t1}}
    \author{M. Author}
    \tnotetext[t1]{This document is a collaborative effort.}
    \end{frontmatter}
    \section{Paper Material}
    Some Text.
    \end{document}

Output:

enter image description here

2 Answers 2

5

Due to changes in elsarticle since this answer was first posted, the approach now depends on the package version.

For version 3.1 (January 2019)

Since version 1.2, the package replaced \ding{73} with $\star$ for title footnotes and changed its approach to handling the footnote index. Also, a new package option (doubleblind) was added and the title footnotes disabled if it is used.

The following is a reimplementation of the original "for fun" edit below that removes the two footnote limit and replaces the default symbol with the user-defined \tnotemarksymbol.

\documentclass{elsarticle}
\usepackage{etoolbox}
\usepackage{expl3}
\ExplSyntaxOn
\cs_new_eq:NN \Repeat \prg_replicate:nn
\ExplSyntaxOff
\makeatletter
\ifdoubleblind\else%The default behavior is to disable title footnotes for doubleblind reviews (the edit will fail if applied with the doubleblind option)
    \patchcmd{\tnotetext}{\ifcase\c@tnote\or$\star$\or$\star\star$\fi}{\Repeat{\the\c@tnote}{\tnotemarksymbol}}{}{\@latex@error{Failed to patch \string\tnotetext}}
    \patchcmd{\tnotemark}{\expandafter\ifcase\elsRef{\mytmark}\or$^{\star}$\or$^{,\star\star}$\fi}{\textsuperscript{\expandafter\ifnum\elsRef{\mytmark}>1,\fi\expandafter\Repeat\expandafter{\elsRef{\mytmark}}{\tnotemarksymbol}}}{}{\@latex@error{Failed to patch \string\tnotemark}}%
\fi
\makeatother
\newcommand{\tnotemarksymbol}{\dag}
\begin{document}
    \begin{frontmatter}
        \title{This is a specimen title\tnoteref{t1}\tnoteref{t2}\tnoteref{t3}\tnoteref{t4}}
        \author{M. Author}
        \tnotetext[t1]{This document is a collaborative effort.}
        \tnotetext[t2]{Another title note.}
        \tnotetext[t3]{One more title note.}
        \tnotetext[t4]{Yet another title note.}
    \end{frontmatter}
    \section{Paper Material}
    Some Text.
\end{document}

Original answer: For Version 1.2 and (possibly) 3.0

You can patch the \tnotemark and \tnotetext commands with etoolbox to replace the star (\ding{73}) with the dagger (\dag):

\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}\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}

result

Edit:

For fun, here is a generalization of the \tnotemark/\tnotetext system used by elsarticle for more than 2 notes. It uses expl3 (specifically this answer by Joseph Wright) to repeat the symbol defined by the command \tnotemarksymbol by the count associated with each note.

\documentclass{elsarticle}
\usepackage{etoolbox}
\usepackage{expl3}
\ExplSyntaxOn
    \cs_new_eq:NN \Repeat \prg_replicate:nn
\ExplSyntaxOff
\makeatletter
    \patchcmd{\tnotetext}{\ifcase\c@tnote\or\ding{73}\or\ding{73}\ding{73}\fi}{\Repeat{\the\c@tnote}{\tnotemarksymbol}}{}{\@latex@error{Failed to patch \string\tnotetext}}
    \patchcmd{\tnotemark}{\ifcase\tnotenum\or\ding{73}\or,\ding{73}\ding{73}\fi}{\ifnum\tnotenum>1,\fi\Repeat{\tnotenum}{\tnotemarksymbol}}{}{\@latex@error{Failed to patch \string\tnotemark}}
\makeatother
\newcommand{\tnotemarksymbol}{\dag}
\begin{document}
\begin{frontmatter}
\title{This is a specimen title\tnoteref{t1}\tnoteref{t2}\tnoteref{t3}\tnoteref{t4}}
\author{M. Author}
\tnotetext[t1]{This document is a collaborative effort.}
\tnotetext[t2]{Another title note.}
\tnotetext[t3]{One more title note.}
\tnotetext[t4]{Yet another title note.}
\end{frontmatter}
\section{Paper Material}
Some Text.
\end{document}

result

4
  • Hopefully you have only one \tnoteref...
    – Werner
    Dec 16, 2015 at 23:15
  • @Werner: Generalized to the apparent maximum of two (the native elsarticle doesn't add a symbol after the second \tnoteref).
    – Guho
    Dec 16, 2015 at 23:20
  • This solution worked perfectly until recently. Executing this code now throws the following error: "Argument of \@latex@error has an extra }. ...\space for \string\ding{73}\string\ding{73}}}"
    – AK16
    Jan 24, 2019 at 11:19
  • @AK16: I have added a workaround for the recent changes to elsarticle.
    – Guho
    Jan 24, 2019 at 22:43
3

elsarticle uses \ding{73} to place the notes inside the title, as is identified by the macros \tnoteref and \tnotetext inside elsarticle.dtx:

\def\tnotemark[#1]{\textsuperscript{\@for\@@tmark:=#1\do{%
      \edef\tnotenum{\@ifundefined{X@\@@tmark}{1}{\elsRef{\@@tmark}}}%
      \ifcase\tnotenum\or\ding{73}\or,\ding{73}\ding{73}\fi}}%
\def\tnotetext[#1]#2{\g@addto@macro\@tnotes{%
  \refstepcounter{tnote}\elsLabel{#1}%
   \def\thefootnote{\ifcase\c@tnote\or\ding{73}\or\ding{73}\ding{73}\fi}%
    \footnotetext{#2}}}

You can intervene here and condition on whether \ding{<num>} is supplied with 73 or otherwise:

enter image description here

\documentclass{elsarticle}

\let\oldding\ding% Make a copy of \ding called \oldding
% Update \ding to condition on 73 or otherwise
\renewcommand{\ding}[1]{\ifnum#1=73 $\star$\else\oldding{#1}\fi}

\begin{document}

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

\section{Paper Material}
Some Text.

\end{document}

This takes care of whether or not you use one or two \tnote...s inside \title (but removes the capability to use \ding{73} elsewhere).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .