5

I'm trying to compile the Elsevier CAS double column template which is provided at:

http://mirrors.ctan.org/macros/latex/contrib/els-cas-templates.zip

When I compile with pdfLatex on Overleaf, I get the following warning with respect to the \maketitle call

Package hyperref Warning: Ignoring empty anchor on input line 15.

What is the reason for this warning and how can it be fixed?

Below is a highly reduced version of the template .tex file cas-dc-template.tex:

\documentclass[a4paper,fleqn]{cas-dc}
\usepackage[numbers]{natbib}
\begin{document}
\shorttitle{Silly Walks}  
\shortauthors{Smith et~al.}
\title[ mode = title ] {Silly Walks and their Place in Modern Society}
\author{Steve Johnson}
\ead{[email protected]}
\author{John Stevenson}
\ead{[email protected]}
\address{Ministry of Silly Walks, High Pressure Silly Walk Testing Facility, London, England}
\begin{abstract}
This is the abstract
\end{abstract}
\maketitle
\section{Introduction}
This is the intro with ref \cite{Fortunato2010} and \cite{NewmanGirvan2004} and \cite{Vehlowetal2013}.
\bibliographystyle{cas-model2-names}
\bibliography{cas-refs}
\end{document}

The full CAS template is also available as a ready-to-go Overleaf template here:

https://www.overleaf.com/latex/templates/elseviers-cas-latex-double-column-template/hhzpymgjmxfk

1 Answer 1

6

To make the compilation possible and the warning disappear I made two thing:

1- I put the directory thumbnails/ that comes with the distribution (.zip), but is not installed!, in the same directory of the LaTeX document.

2- In the file cas-dc.cls I moved the package hyperref to the end of the file, after geometry.

%
% Page geometry
%
\usepackage[%
   paperwidth=210mm,
   paperheight=280mm,
   vmargin={19.5mm,18.2mm},
   hmargin={18.1mm,18.1mm},
   headsep=12pt,
   footskip=12pt,
   columnsep=18pt
]{geometry}

\RequirePackage[colorlinks]{hyperref}
\colorlet{scolor}{black}
\colorlet{hscolor}{DarkSlateGrey}
\hypersetup{%
  pdftitle={\csuse{__short_title:}},
  pdfauthor={\csuse{__short_authors:}},
  pdfcreator={LaTeX3; cas-sc.cls; hyperref.sty},
  pdfproducer={pdfTeX;},
  linkcolor={hscolor},
  urlcolor={hscolor},
  citecolor={hscolor},
  filecolor={hscolor},
  menucolor={hscolor},
 }

\endinput
  
%
% End of class 'cas-sc'
%

Then I got the Silly Walks including the email icon. (I also commented the lines after Introduction).

out2

This a comparison of the logs after and before the changes.

logi

So this is the fix. It seems that the reason for the warning is that the class does not follow the recommendation to load hyperref as the last package.

4
  • 2
    worked like a charm, and was very simple. thanks! Commented Dec 15, 2020 at 21:21
  • 3
    Perhaps you could report the issue to Elsevier. "Bugs, feature requests, suggestions and comments may be mailed to [email protected]" Commented Dec 16, 2020 at 12:48
  • This solution worked for me as well. The answer is clear and solve the problem. Congratulations and thank you for the help. Commented Feb 7, 2021 at 11:24
  • I am still not able to run it, could you please share the files directly? Commented Feb 28, 2023 at 18:16

You must log in to answer this question.

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