如何將摘要和摘要上方和下方的線條居中

如何將摘要和摘要上方和下方的線條居中

我想做以下事情:

  1. 我需要摘要上方一行,摘要下方另一行。線條的寬度應等於摘要的寬度。線條不應大於摘要的寬度。
  2. 在輸出的 pdf 檔案中,我在摘要部分第一行的中心看到了「摘要」一詞。我需要它像“ Abstract. Each chapter should be preceded by an abstract .......”一樣開頭,摘要和摘要文字位於摘要的同一第一行,沒有縮排。

微量元素:

\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{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

\renewenvironment{abstract}
{\begin{quote}
\noindent \rule{\linewidth}{.5pt}\par{\bfseries \abstractname.}}
{\medskip\noindent \rule{\linewidth}{.5pt}
\end{quote}
}


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

相關內容