In this question ( see Old question ) you talked about how to line up two figures with minipage in Elsevier cas-dc class. I had the same problem. I tried adding this patch, and now the code works correctly! However, this leads to a new error: "LaTeX Error: Command \bibsep already defined" ... How can I fix this? Thank you
This is a part of my code (I cannot put more for privacy reasons but at least the error appears):
\documentclass[a4paper,fleqn]{cas-dc}
\AddToHook{begindocument/before}{\ifdefined\bibsep\else\newlength\bibsep\fi} % class might be 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{natbib}
\usepackage{duckuments}
% If the frontmatter runs over more than one page
% use the longmktitle option.
%\documentclass[a4paper,fleqn,longmktitle]{cas-dc}
%\usepackage[numbers]{natbib}
%\usepackage[authoryear]{natbib}
\usepackage[authoryear,longnamesfirst]{natbib}
\usepackage{subcaption}
%%%Author macros
\def\tsc#1{\csdef{#1}{\textsc{\lowercase{#1}}\xspace}}
\tsc{WGM}
\tsc{QE}
%%%
\begin{document}
\let\WriteBookmarks\relax
\def\floatpagepagefraction{1}
\def\textpagefraction{.001}
% Short title
\shorttitle{...}
% Short author
\shortauthors{...}
% Main title of the paper
\title [mode = title]{....}
% Title footnote mark
% eg: \tnotemark[1]
\tnotemark[]
% First author
%
% Options: Use if required
% eg: \author[1,3]{Author Name}[type=editor,
% style=chinese,
% auid=000,
% bioid=1,
% prefix=Sir,
% orcid=0000-0000-0000-0000,
% facebook=<facebook id>,
% twitter=<twitter id>,
% linkedin=<linkedin id>,
% gplus=<gplus id>]
\author[1]{...}[]
% Corresponding author indication
\cormark[1]
% Footnote of the first author
\fnmark[]
% Email id of the first author
\ead{...}
% Address/affiliation
\affiliation[a]{
organization={University}}
\author[1]{...}[
]
% Footnote of the second author
\fnmark[]
% Corresponding author text
\cortext[1]{Corresponding author}
% For a title note without a number/mark
%\nonumnote{}
% Here goes the abstract
\begin{abstract}
...
\end{abstract}
% Keywords
% Each keyword is seperated by \sep
\begin{keywords}
...
\end{keywords}
\maketitle
% Main text
\section*{Appendix A}
\label{appendixA}
\renewcommand{\thefigure}{A.\arabic{figure}}
\setcounter{figure}{0}
\begin{figure*}
\centering
\begin{minipage}[t]{0.43\textwidth}
\centering
\includegraphics[width=\textwidth]{Figure Appendix/imageA.4.png}
\caption{....}
\end{minipage}
\qquad
\begin{minipage}[t]{0.43\textwidth}
\centering
\includegraphics[width=\textwidth]{Figure Appendix/imageA.5.png}
\caption{....}
\end{minipage}
\end{figure*}
\end{document}
cas-dc
document class version2021/05/11, 2.3
) I am not able to replicate the issue you say you've encountered when running the code in the answer you provided a link to.