通过 Overleaf 使用 PdfLaTeX:\maketitle 时出错

通过 Overleaf 使用 PdfLaTeX:\maketitle 时出错

这是一个解决了使用 Overleaf 时 ELSEVIER 模板出现问题,可从以下网址下载https://www.ctan.org/pkg/els-cas-templates/.添加后出现六个错误:

\maketitle

错误:

在此处输入图片描述 在此处输入图片描述

下面显示了一个最小示例,您可以使用 Overleaf 来检查。

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

%\usepackage[numbers]{natbib}
%\usepackage[authoryear]{natbib}
\usepackage[authoryear,longnamesfirst]{natbib}
\usepackage{amssymb} % Add
\usepackage{bbding} % Add
\usepackage{color} % Add

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

\shorttitle{US}    
\shortauthors{Z}  
\title [mode = title]{US}  

% -------------------------------- Authors -------------------------------- %

\author[a]{Z}[style=chinese]

% Corresponding author indication
\cormark[<corr mark no>]

% Footnote of the first author
\fnmark[<footnote mark no>]

% Email id of the first author
\ead{A}

% URL of the first author
% \ead[url]{<URL>}

% Credit authorship
\credit{A}

% Address/affiliation
\affiliation[a]{organization={A},
            addressline={A}, 
            % city={},
            % citysep={}, % Uncomment if no comma needed between city and postcode
            postcode={A}, 
            % state={},
            country={A}}

\author[a]{A}[style=chinese]

% Footnote of the second author
\fnmark[*]

% Email id of the second author
\ead{A}

% Credit authorship
\credit{A}

% Corresponding author text
\cortext[1]{Corresponding author}

% -------------------------------- Abstract -------------------------------- %

\begin{abstract}
A
\end{abstract}

% -------------------------------- Keywords -------------------------------- %

\begin{keywords}
\sep A
\end{keywords}

% -------------------------------- Introduction -------------------------------- %

\maketitle

\section{Introduction}\label{1}

A

% -------------------------------- Biography -------------------------------- %

\end{document}

提前感谢大家!祝大家有美好的一天!

答案1

您必须填写占位符

\cormark[<corr mark no>]

\fnmark[<footnote mark no>]

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

%\usepackage[numbers]{natbib}
%\usepackage[authoryear]{natbib}
\usepackage[authoryear,longnamesfirst]{natbib}
\usepackage{amssymb} % Add
\usepackage{bbding} % Add
\usepackage{color} % Add

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

\shorttitle{US}    
\shortauthors{Z}  
\title [mode = title]{US}  

% -------------------------------- Authors -------------------------------- %

\author[a]{Z}[style=chinese]

% Corresponding author indication
\cormark[1]

% Footnote of the first author
\fnmark[1]

% Email id of the first author
\ead{A}

% URL of the first author
% \ead[url]{<URL>}

% Credit authorship
\credit{A}

% Address/affiliation
\affiliation[a]{organization={A},
            addressline={A}, 
            % city={},
            % citysep={}, % Uncomment if no comma needed between city and postcode
            postcode={A}, 
            % state={},
            country={A}}

\author[a]{A}[style=chinese]

% Footnote of the second author
\fnmark[*]

% Email id of the second author
\ead{A}

% Credit authorship
\credit{A}

% Corresponding author text
\cortext[1]{Corresponding author}

% -------------------------------- Abstract -------------------------------- %

\begin{abstract}
A
\end{abstract}

% -------------------------------- Keywords -------------------------------- %

\begin{keywords}
\sep A
\end{keywords}

% -------------------------------- Introduction -------------------------------- %

\maketitle

\section{Introduction}\label{1}

A

% -------------------------------- Biography -------------------------------- %

\end{document}

相关内容