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).
This a comparison of the logs after and before the changes.
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.
The class has some hard design flaws (contained in cas-common.sty
). I'm not sure whether it's a good idea to mess with the code of it, but the following patch should do:
EDIT: since there might be problems with unconditionally defining \bibsep
I've changed it to do that only if it isn't yet defined, and do that pretty late.
\documentclass[]{cas-dc}
\AddToHook{begindocument/before}{\ifdefined\bibsep\else\newlength\bibsep\fi} % class is broken...
\ExplSyntaxOn
\exp_args:NNno \exp_args:Nno \use:n { \cs_gset:Npn \__make_fig_caption:nn #1#2 }
{
\exp_after:wN \use_ii_i:nn \exp_after:wN
{ \__make_fig_caption:nn {#1} {#2} }
{ \dim_set:Nn \l_fig_width_dim \linewidth }
}
\exp_args:NNno \exp_args:Nno \use:n { \cs_gset:Npn \__make_tbl_caption:nn #1#2 }
{
\exp_after:wN \use_ii_i:nn \exp_after:wN
{ \__make_tbl_caption:nn {#1} {#2} }
{ \dim_set:Nn \l_tbl_width_dim \linewidth }
}
\ExplSyntaxOff
\usepackage{duckuments}
\begin{document}
\blindduck[all]
\begin{figure*}
\begin{minipage}[t]{0.48\linewidth}
\includegraphics[width=\linewidth]{example-image-duck}
\caption{Problems due to rivet aging\label{fig-problemofrivet}}
\end{minipage}
\hfill
\begin{minipage}[t]{0.48\linewidth}
\includegraphics[width=\linewidth]{example-image-duck}
\caption{Example of rivet replacement by the bolt\label{fig-rivetrepla}}
\end{minipage}
\end{figure*}
\blindduck[all]
\end{document}
Best Answer
The class
cas-sc.cls
redefines\maketitle
to execute\MaketitleBox
, which is defined as(Or variations thereof depending on some class options.) I have no knowledge of
expl3
whatsoever but I think I can safely guess that the first bit is\def
ining\baselinestrech
to 1. Since this doesn't occur in a group, the definition is global. Using\doublespacing
in the preamble will thus be useless. As long as you don't care about the title page, the rest of the document can be set to double spacing by issuing\doublespacing
after\maketitle
.