编辑 documentclass{elsarticle} 的前言

编辑 documentclass{elsarticle} 的前言

在此处输入图片描述我一直在使用 Elsevier documentclass 来处理我的手稿。但我不喜欢前言将标题一直放在页面顶部。

我希望标题垂直居中,摘要(包含在两条黑线内)放在第二页。

那可能吗?

\documentclass{elsarticle}

 \usepackage{geometry}

 %% this is to get rid of the watermark
 % ------------------------------
 \makeatletter
 \def\ps@pprintTitle{%
  \let\@oddhead\@empty
  \let\@evenhead\@empty
  \def\@oddfoot{\reset@font\hfil\thepage\hfil}
  \let\@evenfoot\@oddfoot
 }
 \makeatother
 % ------------------------------

  \begin{document}

    \begin{frontmatter}
    
        \title {Title\tnoteref{t1}}
        \tnotetext[t1]{This is a note to the title}
        
        \author[1]{author1\corref{cor1}\fnref{fn1}}
        \ead{[email protected]}
        
        \author[3]{author2\fnref{fn2}}
        \ead{[email protected]}
        \author[3]{author3}
        \ead{[email protected]}
        \author[4]{author4}
        \ead{[email protected]}
        \author[1,2]{author5}
        \ead{[email protected]}
        \author[4]{author6}
        \ead{[email protected]}
        
        \cortext[cor1]{Corresponding author footnote}
        \fntext[fn1]{Footnote}
        \fntext[fn2]{Second footnote}
        
        \address[1]{University1}
        \address[2]{University1}
        \address[3]{University1}
        \address[4]{University1}
        
        \begin{abstract}
        
        this is the abstract
        
            \begin{keyword}
                keyword
            \end{keyword}
            
        \end{abstract}
        
    \end{frontmatter}
\end{document}

答案1

试试这个代码。它是 所用代码的简化版elsarticle.cls,可与 一起使用 \documentclass{elsarticle},并且易于自定义(字体、空格分隔、线条等)。

它将与选项1p3p5p(两列) 一起使用。后者将摘要放在一页上。

C

\documentclass{elsarticle}

\usepackage{kantlipsum}% ONLY for dummy text

\usepackage{showframe} % show the margins
\renewcommand*\ShowFrameColor{\color{red}}


%%*********************************************************
\makeatletter   
\def\ps@pprintTitle{%
\let\@oddhead\@empty
\let\@evenhead\@empty
\def\@oddfoot{\reset@font\hfil\thepage\hfil}
\let\@evenfoot\@oddfoot     
}   

\renewcommand{\maketitle}{%     added <<<<<<<<<<<<<<<<<<<<<<<<
    \renewcommand{\baselinestretch}{1}%
    \resetTitleCounters%
    \ifnum\jtype=5\onecolumn\fi%  option 5p
    \centering\null \vfil %centering
    \Large\@title\par\vspace{18pt}%
    \normalsize\elsauthors\par\vspace{10pt}%
    \footnotesize\itshape\elsaddress\par%
    \gdef\thefootnote{\arabic{footnote}}%
    \printFirstPageNotes%   footnotes and others    
    \clearpage% abstract and keys in next page  
    \ifnum\jtype=5\null\vfil\else\vspace*{-\topskip} \fi%   % no space on top
    \hrule\vspace{12pt}%
    \ifvoid\absbox\else\unvbox\absbox\par\vspace{10pt}\fi%
    \ifvoid\keybox\else\unvbox\keybox\par\vspace{10pt}\fi%
    \hrule\vspace{12pt}%    
     \ifnum\jtype=5\clearpage\twocolumn\fi %  option 5p
    }%
\makeatother    
%*********************************************************
    
\begin{document}

\begin{frontmatter}
    
    \title{Title of Your Manuscript\tnoteref{label1}}
    \tnotetext[label1]{This is a note to the title}
    
    \author[inst1]{Author One\corref{cor1}\fnref{label2}}
    \ead{email address}
    \ead[url]{home page}
    \fntext[label2]{This is a footnote}
    \cortext[cor1]{Test of the corresponding author footnote}
    
    \affiliation[inst1]{organization={Department One},
    addressline={Address One}, 
    city={City One},
    postcode={00000}, 
    state={State One},
    country={Country One}}
    
    \author[inst2]{Author Two}
    \author[inst1,inst2]{Author Three\fnref{label3}}
    \fntext[label3]{This is a another footnote}
    
    \affiliation[inst2]{organization={Department Two},
    addressline={Address Two}, 
    city={City Two},
    postcode={22222}, 
    state={State Two},
    country={Country Two}}
    
    \begin{abstract}
    \kant[9]
    \end{abstract}  

\end{frontmatter}   

\section{Sample Section 1}
\label{sec:sample1}

1. \kant[2-15]

\end{document}

埃

答案2

我假设这是处于预印本/预出版阶段;您还没有准备最终的出版文件。

不幸的是,elsarticle.cls似乎与包不兼容titling,所以你唯一的选择是从文档类(在本例中为)重新定义命令\pprintMaketitle

这是我所做的修改。我在文档类的原始定义中添加的行标有% ADDED BY ME。基本上,我只是添加了\vfill命令在标题/作者/所属机构之前和之后放置等量的空格,并\clearpage为摘要开始新的页面。

\documentclass{elsarticle}

 \usepackage{geometry}

 %% this is to get rid of the watermark
 % ------------------------------
 \makeatletter
 \def\ps@pprintTitle{%
  \let\@oddhead\@empty
  \let\@evenhead\@empty
  \def\@oddfoot{\reset@font\hfil\thepage\hfil}
  \let\@evenfoot\@oddfoot
 }

\long\def\pprintMaketitle{\clearpage
  \iflongmktitle\if@twocolumn\let\columnwidth=\textwidth\fi\fi
  \resetTitleCounters
  \def\baselinestretch{1}%
  \printFirstPageNotes
  \begin{\elsarticletitlealign}%
 \thispagestyle{pprintTitle}%
    \leavevmode\vfill % ADDED BY ME
   \def\baselinestretch{1}%
    \Large\@title\par\vskip18pt%
    \ifx\@elsarticlenewpageafter\newpage@after@title% %*%
      \newpage
    \fi%
    \ifdoubleblind
      \vspace*{2pc}
    \else
      \normalsize\elsauthors\par\vskip10pt
      \footnotesize\itshape\elsaddress\par\vskip36pt
    \fi
    \ifx\@elsarticlenewpageafter\newpage@after@author% %*%
      \newpage
    \fi%
    \vfill % ADDED BY ME
    \clearpage % ADDED BY ME
    \hrule\vskip12pt
    \ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi
    \ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi
    \hrule\vskip12pt
    \ifx\@elsarticlenewpageafter\newpage@after@abstract% %*%
      \newpage
    \fi%
    \end{\elsarticletitlealign}%
    \gdef\thefootnote{\arabic{footnote}}%
  }


 \makeatother
 % ------------------------------
      
  \begin{document}

   \begin{frontmatter}

        \title {Title\tnoteref{t1}}

        \tnotetext[t1]{This is a note to the title}
        
        \author[1]{author1\corref{cor1}\fnref{fn1}}
        \ead{[email protected]}
        
        \author[3]{author2\fnref{fn2}}
        \ead{[email protected]}
        \author[3]{author3}
        \ead{[email protected]}
        \author[4]{author4}
        \ead{[email protected]}
        \author[1,2]{author5}
        \ead{[email protected]}
        \author[4]{author6}
        \ead{[email protected]}
        
        \cortext[cor1]{Corresponding author footnote}
        \fntext[fn1]{Footnote}
        \fntext[fn2]{Second footnote}
        
        \address[1]{University1}
        \address[2]{University1}
        \address[3]{University1}
        \address[4]{University1}

    \begin{abstract}
        
        this is the abstract
        
            \begin{keyword}
                keyword
            \end{keyword}
            
        \end{abstract}

    \end{frontmatter}
\end{document}

重新定义必须被\makeatletterand包围,\makeatother但是由于您已经在使用其中一个,所以我只是将其插入到您的另一个重新定义之后。

修改后的 elsarticle 标题页

相关内容