# Changing two abstract names in same document

I have a LaTeX document with two abstracts (in two different languages)

I would like to change the 'abstract' to another title.

I cannot use \renewcommand{\abstractname}{Example} because I need to define two different abstract names.

Can this be done somehow?

\usepackage{abstract}
\begin{abstract}
\renewcommand{\abstractname}{Example}
cdsvsdavsa
\end{abstract}
\pagebreak
\begin{abstract}
\renewcommand{\abstractname}{Example2}
cdsvsdavsa
\end{abstract}

• use \renewcommand{\abstractname}{Example}  after the first abstract. – David Carlisle Jun 9 '15 at 11:41
• I tried but it did not change the name – vdsvds Jun 9 '15 at 11:41
• It always helps if you supply an example code, the details depend on the class file's definition of \abstract. (I removed the latex3 tag as I assume your class is not using latex3 code) – David Carlisle Jun 9 '15 at 11:43
• please see my edit – vdsvds Jun 9 '15 at 11:45
• Please make example complete documents that people can run, see my answer, also you need to put the redefinition after the first abstract but before (not inside) the second. – David Carlisle Jun 9 '15 at 11:49

The following example uses package babel to add support for different languages. The example uses english as main language and adds a abstract in ngerman. Environment abstract uses \abstractname, which is automatically redefined for different languages. Also switching the language sets the correct hyphenation patterns for the language.

\documentclass{article}
\usepackage[ngerman, english]{babel}

\begin{document}
\begin{abstract}
Abstract in English.
\end{abstract}

\begin{otherlanguage}{ngerman}
\begin{abstract}
Zusammenfassung in deutscher Sprache.
\end{abstract}
\end{otherlanguage}
\end{document}


\documentclass{article}
\usepackage{abstract}
\begin{document}

\renewcommand{\abstractname}{Example}
\begin{abstract}
cdsvsdavsa
\end{abstract}
\pagebreak
\renewcommand{\abstractname}{Example2}
\begin{abstract}
cdsvsdavsa
\end{abstract}

\end{document}