amsart 课程中的两篇摘要

amsart 课程中的两篇摘要

我正在尝试将两篇摘要(一篇英文摘要,一篇西班牙文摘要)添加到一篇文章中,一个接一个。我尝试过:

\usepackage[spanish,english]{babel}

\selectlanguage{spanish}
\begin{abstract}
spanish abstract here
\end{abstract}

\selectlanguage{english}
\begin{abstract}
english abstract here
\end{abstract}

\maketitle

但它只显示其中一个摘要。此外,我还尝试了:

\usepackage[spanish]{babel}

\renewcommand{\abstractname}{Abstract}
\begin{abstract}
english abstract here
\end{abstract}

\begin{abstract}
spanish abstract here
\end{abstract}

\maketitle

但同样的情况发生了,我只能看到其中一个摘要

答案1

该类amsart没有提供多个抽象。但是,我们可以稍微扩展一下代码,并定义一个abstracts环境以及一个\abstractin用于指定语言的命令:

\documentclass{amsart}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish,english]{babel}

\makeatletter
\newenvironment{abstracts}{%
  \ifx\maketitle\relax
    \ClassWarning{\@classname}{Abstract should precede
      \protect\maketitle\space in AMS document classes; reported}%
  \fi
  \global\setbox\abstractbox=\vtop \bgroup
    \normalfont\Small
    \list{}{\labelwidth\z@
      \leftmargin3pc \rightmargin\leftmargin
      \listparindent\normalparindent \itemindent\z@
      \parsep\z@ \@plus\p@
      \let\fullwidthdisplay\relax
      \itemsep\medskipamount
    }%
}{%
  \endlist\egroup
  \ifx\@setabstract\relax \@setabstracta \fi
}

\newcommand{\abstractin}[1]{%
  \otherlanguage{#1}%
  \item[\hskip\labelsep\scshape\abstractname.]%
}
\makeatother

\begin{document}

\author{X Y}
\title{Z}

\begin{abstracts}
\abstractin{spanish}
spanish abstract here

\abstractin{english}
english abstract here
\end{abstracts}

\maketitle

\languagename % just to be sure

\end{document}

在此处输入图片描述

相关内容