[Tex/LaTex] els-cas-templates no highlighting of author names

authorels-caselsarticle

I've been using the els-cas-templates LaTeX package by Elsevier. I will be submitting to an Elsevier journal, which allows this official package for submission. I have not touched any of the template files, nor do I want to. I am editing/building on Overleaf. I am using the cas-dc (double column) format, because it most resembles the journal I am submitting to.

I have looked at the documentation, and I can't figure out how to turn off highlighting of author names. Is it possible? The journal I am submitting to (Solar Energy) DOES NOT have highlighted author names.

Although I don't think providing the following example file code is actually useful (as the CTAN template clearly has a file that does this), I am providing this code as example of a "stripped down" main tex file that includes their cas-dc.cls file because it was requested in the comments:

\documentclass[a4paper,fleqn]{cas-dc}

\usepackage[authoryear]{natbib}
\usepackage{gensymb}
\usepackage{lipsum}

\bibliographystyle{cas-model2-names}

\begin{document}

\let\WriteBookmarks\relax
\def\floatpagepagefraction{1}
\def\textpagefraction{.001}

\shorttitle{Short title}
\shortauthors{J. Smith et~al.}

\title [mode = title]{Here is a title}                      

\author[1]{John Smith}
\cormark[1]
\ead{some@email.com}
\author[2]{John Doe}
\address[1]{School A}
\address[2]{School B}

\cortext[cor1]{Corresponding author.}

\begin{abstract}
\lipsum[1]
\end{abstract}

\begin{keywords}
some \sep keywords \sep here
\end{keywords}

\maketitle

\lipsum[1-10]

\bibliography{refs}
\end{document}

I also have another question about this template (ORCIDs), that I'd like to fix without touching the template code, if possible. I am not getting any official support from the package authors, having emailed them. I would rather not change their template for submission.

Best Answer

An easy solution is to explicitly set the author names in black.

MWE:

\documentclass[a4paper,fleqn,draft]{cas-dc}

\usepackage[authoryear]{natbib}
\usepackage{gensymb}
\usepackage{xpatch}
\usepackage{lipsum}

\bibliographystyle{cas-model2-names}

\begin{document}

\let\WriteBookmarks\relax
\def\floatpagepagefraction{1}
\def\textpagefraction{.001}

\shorttitle{Short title}
\shortauthors{J. Smith et~al.}

\title [mode = title]{Here is a title}                      

\author[1]{\color{black}John Smith}
\cormark[1]
\ead{some@email.com}
\author[2]{\color{black}John Doe}
\address[1]{School A}
\address[2]{School B}

\cortext[cor1]{Corresponding author.}

\begin{abstract}
\lipsum[1]
\end{abstract}

\begin{keywords}
some \sep keywords \sep here
\end{keywords}

\maketitle

\end{document}

Result:

enter image description here

A more involved solution (but conceptually maybe better) is to redefine the \author macro from within the main document. Unfortunately the macro is rather long, so this takes space in the document (I tried an xpatch solution but I could not make that work). The author first names are printed with color \l_stm_augroup_color_tl !50, so 50% of the default black (rendering as gray). Changing this to just \l_stm_augroup_color_tl renders the first names as black.

Code:

\documentclass[a4paper,fleqn,draft]{cas-dc}

\usepackage[authoryear]{natbib}
\usepackage{gensymb}
\usepackage{xpatch}
\usepackage{lipsum}

\makeatletter
\ExplSyntaxOn
\RenewDocumentCommand \author { O{} m O{} }
   {
     \ResetMarks
     \tl_if_blank:nTF { #3 } { }
       { \keys_set:nn { stm / author } { #3 } }
%
     \int_gincr:N \g_stm_au_int  
     \tex_gdef:D \theau@ { \int_use:N \g_stm_au_int }
%
     \seq_gput_right:Nn \g_stm_prelimsau_seq { #2 }
     \bool_if:NTF \l_stm_au_collab_bool
       { \seq_gput_right:cn { g_stm_clau\int_use:N \g_stm_augr_int _seq } }
       { \seq_gput_right:cn { g_stm_au\int_use:N \g_stm_augr_int _seq } }
       {          
         \int_gincr:N \g_stm_aau_int  
         \tex_gdef:D \theauthor {\int_use:N \g_stm_aau_int }
         \keys_set:nn { stm /author } { #3 }
         \tl_if_head_eq_catcode:nNTF { #1 } a
            { \processAffRef { #1 } }
            { \processAffNum { #1 } }
         \tl_if_empty:NF \l_stm_au_prefix
            { \l_stm_au_prefix_tl \c_space_token } 
         \str_if_eq:VnTF \l_stm_au_style_tl  { chinese }
            { %\msg_term:n {STYLE~T=\l_stm_au_style_tl........}
              \invparsename { #2 } 
              \textcolor{\l_stm_augroup_color_tl}{\surname}
              \no_break_space:
              \textcolor{\l_stm_augroup_color_tl}{\firstname}  %%% CHANGE HERE
            }
            { %\msg_term:n {STYLE~F=\l_stm_au_style_tl........}  
              \parsename { #2 } 
              \textcolor{\l_stm_augroup_color_tl}{\firstname} %%% AND HERE
              \no_break_space:
              \textcolor{\l_stm_augroup_color_tl}{\surname}
            }
        \tl_if_empty:NF \l_stm_au_suffix_tl
        { \c_space_token \l_stm_au_suffix_tl }
         \unskip
         \textsuperscript
         {
           \tl_if_blank:nTF { #1 }
           { \tex_def:D \sep{} }
           { {\itshape\listAff} \tex_def:D \sep{\unskip,} }
           \process@marks 
           \bool_if:NT \l_stm_au_deceased_bool 
           { \sep \maltese
             \tex_def:D \sep { \unksip, }
           }
         }
        \tl_if_empty:NF \l_stm_au_degree_tl
        { ,\c_space_token \l_stm_au_degree_tl }
        \tl_if_empty:NF \l_stm_au_role_tl
        { \c_space_token (\l_stm_au_role_tl) }
%
       \ResetMarks
      }
%
      \bool_if:NT \l_stm_au_deceased_bool 
       { 
        \seq_gput_right:Nn \g_stm_maltese_seq
         {
          \tex_def:D \thefootnote { \maltese }
          \footnotetext{Deceased~author.} 
         } 
       }
% various social media
      \tl_if_empty:NTF \l_stm_au_facebook_tl { }
        { 
          \wrAux { \token_to_str:N \facebookauthor
            { \l_stm_au_facebook_tl } { \exp_not:n {#2} } }
        }
      \tl_if_empty:NF \l_stm_au_twitter_tl
        { 
          \wrAux { \token_to_str:N \twitterauthor
            { \l_stm_au_twitter_tl } { \exp_not:n {#2} } }
        }
      \tl_if_empty:NF \l_stm_au_gplus_tl
        { 
          \wrAux { \token_to_str:N \gplusauthor
            { \l_stm_au_gplus_tl } { \exp_not:n {#2} } }
        }
      \tl_if_empty:NF \l_stm_au_linkedin_tl
        { 
          \wrAux { \token_to_str:N \linkedinauthor
            { \l_stm_au_linkedin_tl } { \exp_not:n {#2} } }
        }
      \tl_if_empty:NF \l_stm_au_orcid_tl
        { 
          \wrAux { \token_to_str:N \orcidauthor
            { \l_stm_au_orcid_tl } { \exp_not:n {#2} } }
        }
%
        \@eadauthor={#2}
        \pdfstringdef\__info_au: { #2 }
        \int_compare:nNnTF { \theau@ } < { 4 }
        { \xappto \infoauthors { \__info_au: , ~ } }
        {
          \int_compare:nNnTF { \theau@ } = { 4 }
          { \xappto \infoauthors { et~al. } }
          { }
        }        
    }
\ExplSyntaxOff
\makeatother

\bibliographystyle{cas-model2-names}

\begin{document}

\let\WriteBookmarks\relax
\def\floatpagepagefraction{1}
\def\textpagefraction{.001}

\shorttitle{Short title}
\shortauthors{J. Smith et~al.}

\title [mode = title]{Here is a title}                      

\author[1]{John Smith}
\cormark[1]
\ead{some@email.com}
\author[2]{John Doe}
\address[1]{School A}
\address[2]{School B}

\cortext[cor1]{Corresponding author.}

\begin{abstract}
\lipsum[1]
\end{abstract}

\begin{keywords}
some \sep keywords \sep here
\end{keywords}

\maketitle

\end{document}