摘要上方和下方的线条

摘要上方和下方的线条

我需要在摘要上方写一行,在摘要下方写另一行。行宽应等于摘要的宽度。行宽不应大于摘要的宽度,摘要标题必须居中。

\documentclass{article}
\usepackage{abstract,lipsum}
\usepackage[paperwidth=7.25in, paperheight=9.5in,bindingoffset=.75in] 
{geometry}
\begin{document}
\title{Contribution Title}
\author{Name of First Author and Name of Second Author}
\maketitle
\begin{abstract}
\rule{\textwidth}{.5pt}
Each chapter should be preceded by an abstract (10--15 lines long) that 
summarizes the content. The abstract will appear  and be available with 
unrestricted access. This allows unregistered users to read the abstract as 
a teaser for the complete chapter. As a general rule the abstracts will not 
appear in the printed version of your book unless it is the style of your 
particular book or that of the series to which your book belongs.
\rule{\textwidth}{.5pt}
\end{abstract}
\section{introduction}
\lipsum*[2]
\end{document}

答案1

最简单的方法是重新定义abstract环境:

\documentclass{article}
\usepackage[
  paperwidth=7.25in,
  paperheight=9.5in,
  bindingoffset=.75in,
  heightrounded,
]{geometry}

\usepackage{lipsum}

\renewenvironment{abstract}
 {\quotation\small\noindent\rule{\linewidth}{.5pt}\par\smallskip
  {\centering\bfseries\abstractname\par}\medskip}
 {\par\noindent\rule{\linewidth}{.5pt}\endquotation}

\begin{document}

\title{Contribution Title}
\author{Name of First Author and Name of Second Author}
\maketitle

\begin{abstract}
Each chapter should be preceded by an abstract (10--15 lines long) that 
summarizes the content. The abstract will appear  and be available with 
unrestricted access. This allows unregistered users to read the abstract as 
a teaser for the complete chapter. As a general rule the abstracts will not 
appear in the printed version of your book unless it is the style of your 
particular book or that of the series to which your book belongs.
\end{abstract}

\section{introduction}
\lipsum*[2]

\end{document}

在此处输入图片描述

相关内容