使用cas-dc
文档类,我尝试在两个词的文档中的摘要和关键词之前突出显示文章的重点。就像这张图片显示的一样。
我正在使用 elseviers 网站上提供的模板并使用以下代码:
\begin{highlights}
\item Research highlights item 1
\item Research highlights item 2
\item Research highlights item 3
\end{highlights}
查看内部cas-common.sty
我可以找到以下代码:
\RequirePackage{moreverb}
\tex_gdef:D \abstractname { A\,B\,S\,T\,R\,A\,C\,T }
\tl_new:N \l_stm_abs_title_tl
\box_new:N \g_stm_abs_box
\NewDocumentEnvironment { Abstract } { o }
{
% \global\setbox \g_stm_abs_box = \vtop \bgroup
% \hsize = .65 \textwidth \parindent \z@
\group_begin:
\IfNoValueTF { #1 } { }
{ \tex_gdef:D \abstractname { #1 } }
\parindent \z@
\box_if_empty:NTF \g_stm_key_box
{ \leftskip = .35 \textwidth }
{
\dim_gset:Nn \l_tmpa_dim { \box_ht:N \g_stm_key_box }
\dim_gadd:Nn \l_tmpa_dim { \box_dp:N \g_stm_key_box }
\leftskip .35\textwidth
\hspace*{-.35 \textwidth }
\noindent\hbox_to_wd:nn { \z@ } { \box \g_stm_key_box }
\skip_vertical:n { - \l_tmpa_dim }
}
\noindent \abstractname \par
\skip_vertical:n { -4pt}
\noindent \rule{.65\textwidth}{.2pt}\par \footnotesize
\ignorespaces \everypar { \parindent=1.5em }
}
{ \par \group_end: }
\NewDocumentEnvironment { PrelimsAbstract } { O{} }
{\parindent=0pt
{ \fontsize{14pt}{16pt}\selectfont #1 }\par
\vskip12pt
{ \fontsize{12pt}{14pt}\bfseries\selectfont\casprelimstitle } \par
\vskip6pt
\seq_use:Nn \g_stm_prelimsau_seq { , }
\vskip12pt
\par
}
{}
\RenewDocumentEnvironment { abstract } { o }
{
\IfNoValueTF { #1 } { }
{ \tex_gdef:D \abstracttitle { #1 } }
\verbatimwrite{\jobname.abs}
}
{ \endverbatimwrite }
\newbox\casgrabsbox
\newbox\cashlsbox
\newbool { usecasgrabsbox }
\newbool { usecashlsbox }
\DeclareDocumentEnvironment { graphicalabstract } { O{Graphical~Abstract} }
{
\global \booltrue { usecasgrabsbox }
\global\setbox\casgrabsbox=\vbox\bgroup
\begin{PrelimsAbstract}[#1]
\noindent \ignorespaces
}
{
\end{PrelimsAbstract}
\egroup
}
\NewDocumentEnvironment { highlights } { O{Highlights} }
{
\global \booltrue { usecashlsbox }
\global\setbox\cashlsbox=\vbox\bgroup
\begin{PrelimsAbstract}[#1]
\noindent \ignorespaces
\begin{itemize}
}
{
\end{itemize}
\end{PrelimsAbstract}
\egroup
}
\NewDocumentCommand \dashrule { O{.4pt} m m }
{
\color{black!50}
\skip_vertical:n { #2 }
\noindent \rule { \linewidth } { #1}
\normalcolor \skip_vertical:n { #3 }
}
然而我似乎无法解决这个问题。
\documentclass[a4paper,fleqn]{cas-doublec}
\usepackage[authoryear]{natbib}
\begin{document}
\title [mode = title]{title}
\author[1]{\color{black}First Author}[role=Researcher,
orcid=N/A]
\author[1]{\color{black}D}[%
role=Supervisor]
\begin{highlights}
\item Research highlights item 1
\item Research highlights item 2
\item Research highlights item 3
\end{highlights}
\begin{abstract}
abstract
\end{abstract}
\begin{keywords}
keywords
\end{keywords}
\maketitle
\end{document}
最小工作示例