如何删除 elsarticle 类中作者所属和摘要之间的垂直间距。谢谢
\documentclass[5p]{elsarticle}
\usepackage{times}
% use to remove rules (top and bottom lines) of Abstract"
\usepackage{xpatch}
\xpatchcmd{\MaketitleBox}{\hrule}{}{}{}% remove first horizontal rule (above abstract)
\xpatchcmd{\MaketitleBox}{\hrule}{}{}{}% remoce second horizonral rule (below keywords)
\begin{filecontents*}{mybibfile.bib}
\end{filecontents*}
\usepackage{lineno,hyperref}
%\journal{Journal of \LaTeX\ Templates}
\bibliographystyle{elsarticle-num}
%%%%%%%%%%%%%%%%%%%%%%%
% use to remove footer " preprint submitted to elsevier"
\makeatletter
\def\ps@pprintTitle{%
\let\@oddhead\@empty
\let\@evenhead\@empty
\def\@oddfoot{}%
\let\@evenfoot\@oddfoot}
\makeatother
\author{hariharan\corref{cor1}*}
\address{\normalfont{ Fukuoka, Japan\\
Email : hari.ac.jp }}
\title{My title My title My title My title My title My title My title }
\begin{document}
\begin{frontmatter}
\begin{abstract}
Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text Some Some text text
\end{abstract}
\end{frontmatter}
\section{Introduction}
Remove space between author affilioation and abstract in elsarticle class. Remove space between author affilioation and abstract in elsarticle class. Remove space between author affilioation and abstract in elsarticle class. Remove space between author affilioation and abstract in elsarticle class. Remove space between author affilioation and abstract in elsarticle class. Remove space between author affilioation and abstract in elsarticle class. Remove space between author affilioation and abstract in elsarticle class.
\end{document}
答案1
环境frontmatter
elsarticle
问题\maketitle
位于\end{frontmatter}
:
\newenvironment{frontmatter}
{} % \begin{frontmatter}
{\maketitle}% \end{frontmatter}
的设置\maketitle
取决于作为文档类选项传递的许多内容。但是,详细说明标题构造的信息包含在\MaketitleBox
:
\long\def\MaketitleBox{%
\resetTitleCounters
\def\baselinestretch{1}%
\begin{center}%
\def\baselinestretch{1}%
\Large\@title\par\vskip18pt
\normalsize\elsauthors\par\vskip10pt
\footnotesize\itshape\elsaddress\par\vskip36pt
\hrule\vskip12pt
\ifvoid\absbox\else\unvbox\absbox\par\vskip10pt\fi
\ifvoid\keybox\else\unvbox\keybox\par\vskip10pt\fi
\hrule\vskip12pt
\end{center}%
}
请注意,您已经\hrule
使用以下方法删除了这两个宏:xpatch
:
\xpatchcmd{\MaketitleBox}{\hrule}{}{}{}% remove first horizontal rule (above abstract)
\xpatchcmd{\MaketitleBox}{\hrule}{}{}{}% remoce second horizonral rule (below keywords)
但是,你在每个后面都留下了剩余的空间\vskip12pt
- 这些是标题/作者和摘要与摘要和正文之间的垂直空间。我们可以将您的补丁更改为
\xpatchcmd{\MaketitleBox}{\hrule\vskip12pt}{\vspace{-2\baselineskip}}{}{}% remove first horizontal rule (above abstract) + space
\xpatchcmd{\MaketitleBox}{\hrule}{}{}{}% remoce second horizonral rule (below keywords)
它用负跳过代替规则和垂直跳过。
原始输出:
更新的输出:
\documentclass[5p]{elsarticle}
\usepackage{times,lipsum}
% use to remove rules (top and bottom lines) of Abstract"
\usepackage{xpatch}
\xpatchcmd{\MaketitleBox}{\hrule\vskip12pt}{\vspace{-2\baselineskip}}{}{}% remove first horizontal rule (above abstract) + space
\xpatchcmd{\MaketitleBox}{\hrule}{}{}{}% remoce second horizonral rule (below keywords)
\usepackage{hyperref}
\author{An author\corref{cor1}*}
\address{An address \\
Email : [email protected]
}
\title{A title}
\begin{document}
\begin{frontmatter}
\begin{abstract}
\lipsum[1]
\end{abstract}
\end{frontmatter}
\section{Introduction}
\lipsum[2-5]
\end{document}
使用时会有额外的跳过keywords
,但这个问题没有涉及。但是,您也可以删除/更改这些。
答案2
我使用\vspace{-length}
地址后的命令完成了此操作。该命令添加了负垂直空间(即消除空间)。
\begin{document}
\begin{frontmatter}
\title{My title My title My title My title My title My title My title }
\author{hariharan\corref{cor1}*}
\address{\normalfont{ Fukuoka, Japan **\vspace{-0.5cm}**\\
}}
\begin{abstract}
Some text
\end{abstract}
\end{frontmatter}