![自定义宽度的摘要](https://linux22.com/image/331851/%E8%87%AA%E5%AE%9A%E4%B9%89%E5%AE%BD%E5%BA%A6%E7%9A%84%E6%91%98%E8%A6%81.png)
我正在写一份报告,其中页边距已指定为\usepackage[left=3cm,right=3cm,top=4cm,bottom=3cm]{geometry}
。但对于一个特定部分(即摘要),我希望左右边距各为 5 厘米。为此,我\newgeometry{left=5cm,right=5cm}
在该部分的开头和\restoregeometry
结尾使用了该边距。这样可以获得新的边距,但此部分的内容将打印在新的空白页上。
我想将此部分与其他部分打印在同一页上。我该怎么做?
\usepackage[utf8]{inputenc}
...
\usepackage[left=3cm,right=3cm,top=4cm,bottom=3cm]{geometry}
\begin{document}
% ABSTRACT
\section*{\centering {Abstract}}
\newgeometry{left=5cm,right=5cm}
Neutron is considered as a fundamental subatomic particle. But it was not
until 1932 that its existence was known. In 1932, James Chadwick observed
interactions between radiation and matter which could not be explained on
the basis of known particles or radiations. He proposed the neutron
hypothesis which could successfully explain all observations without
violating energy conservation. This paper discusses the discovery of
neutron by Chadwick and its acceptance of a fundamental sub-particle of
atom.
\restoregeometry
...
\end{document}
答案1
我不会尝试改变几何形状,而只是适应不同边距的摘要。
\documentclass{article}
\usepackage[left=3cm,right=3cm,top=4cm,bottom=3cm]{geometry}
\usepackage{lipsum}
\title{Discovery if neutron by James Chadwick}
\author{Blah Blah}
\begin{document}
\maketitle
\begin{abstract}
\centering\begin{minipage}{\dimexpr\paperwidth-10cm}
\lipsum[1]
\end{minipage}
\end{abstract}
\bigskip
Neutron is considered as a fundamental subatomic particle. But it was not
until 1932 that its existence was known. In 1932, James Chadwick observed
interactions between radiation and matter which could not be explained on
the basis of known particles or radiations. He proposed the neutron
hypothesis which could successfully explain all observations without
violating energy conservation. This paper discusses the discovery of
neutron by Chadwick and its acceptance of a fundamental sub-particle of
atom.
\end{document}
对于未定义环境的类abstract
,可以按如下所示进行操作(或者,在下面的代码中,将\textbf{Abstract}\par\medskip
其替换\section*{\centering Abstract}
为代码中提供的 OP)
\documentclass{article}
\usepackage[left=3cm,right=3cm,top=4cm,bottom=3cm]{geometry}
\usepackage{lipsum}
\title{Discovery if neutron by James Chadwick}
\author{Blah Blah}
\begin{document}
\maketitle
\begingroup
\centering\small
\textbf{Abstract}\par\medskip
\begin{minipage}{\dimexpr\paperwidth-10cm}
\lipsum[1]
\end{minipage}
\par\endgroup
\bigskip\noindent
Neutron is considered as a fundamental subatomic particle. But it was not
until 1932 that its existence was known. In 1932, James Chadwick observed
interactions between radiation and matter which could not be explained on
the basis of known particles or radiations. He proposed the neutron
hypothesis which could successfully explain all observations without
violating energy conservation. This paper discusses the discovery of
neutron by Chadwick and its acceptance of a fundamental sub-particle of
atom.
\end{document}
答案2
另一个解决方案是使用更改页面包裹 :
\documentclass{article}
\usepackage[left=3cm,right=3cm,top=4cm,bottom=3cm]{geometry}
\usepackage{lipsum}
\usepackage{changepage}
\title{Discovery if neutron by James Chadwick}
\author{Blah Blah}
\begin{document}
\maketitle
\begingroup
\centering\small
\textbf{Abstract}\par\medskip
\begin{adjustwidth}{1cm}{2cm}
\lipsum[1]
\end{adjustwidth}
\par\endgroup
\bigskip\noindent
Neutron is considered as a fundamental subatomic particle. But it was not
until 1932 that its existence was known. In 1932, James Chadwick observed
interactions between radiation and matter which could not be explained on
the basis of known particles or radiations. He proposed the neutron
hypothesis which could successfully explain all observations without
violating energy conservation. This paper discusses the discovery of
neutron by Chadwick and its acceptance of a fundamental sub-particle of
atom.
\end{document}
答案3
这里是另一个使用简单解决方案的方案,list
就像标准abstract
环境一样。该解决方案与类的选择无关,并且只应在单列设置中使用(考虑到您的设计准则,这是用例)。
\documentclass{article}
\usepackage{microtype}
\usepackage[margin=3cm]{geometry}
\usepackage{lipsum}
\providecommand\abstractname{Abstract}
\def\abstract{}
\def\endabstract{}
\renewenvironment{abstract}{%
\centering\small
\textbf\abstractname
\list{}{\leftmargin2cm \rightmargin\leftmargin}
\item\relax
}{%
\endlist \par\bigskip
}
\title{Discovery if neutron by James Chadwick}
\author{Blah Blah}
\begin{document}
\maketitle
\begin{abstract}
Neutron is considered as a fundamental subatomic particle.
But it was not until 1932 that its existence was known.
In 1932, James Chadwick observed interactions between radiation
and matter which could not be explained on the basis of known particles or radiations.
He proposed the neutron hypothesis which could successfully explain all observations
without violating energy conservation. This paper discusses the discovery of
neutron by Chadwick and its acceptance of a fundamental sub-particle of atom.
\end{abstract}
\section{Introduction}
\lipsum
\end{document}