# Change the name of document elements like 'Figure' or 'Abstract' twice

This is a bit of a continued question looking at here

I am using the memoir package which implemented the abstact package directly. As I use polygesia instead of babel, to rename the predefined name of the abstract I have to use the command

\addto{\captionsgerman}{\renewcommand{\abstractname}{newName}}


instead of just

\renewcommand{\abstractname}{newName}


So far so good. As I write in german with polygesia set to german without the modification above latex uses 'Zusammenfassung' as the default name. Using the mod above in the preamble is working. However, I have to write two abstracts, one in german and one in english. To distinguish both of them I have to use two different abstract titles, so:

• Abstract - deutsch
• Abstract - english

But I can only use one of them in this way;

\addto{\captionsgerman}{\renewcommand{\abstractname}{Abstract - deutsch}}


Using this in the preamble and doing this in my abstract page did not work:

\begin{abstract}
<<text>> \\
\textbf{Stichworte:} ...
\end{abstract}

\addto{\captionsgerman}{\renewcommand{\abstractname}{Abstract - english}}

\begin{abstract}
<<text>> \\
\textbf{Keywords:} ...
\end{abstract}


Does anyone have an idea?

• (1) You should use -- instead of -. (2) Why do you want to add it to the German captions for the English abstract? I would suggest to switch to English language beforehand and adding the redefinition to the English captions instead. – TeXnician Sep 4 '18 at 20:28
• the rest of the document is written in german, so i set polyglossia to german in the preamble. because of this latex replace 'abstract' with 'zusammenfassung. do you know how can i easily change my langua inside the document and then swapp back? I will have a look at the polyglossia documentation thanks for your hint this could solve my problem – SRel Sep 4 '18 at 20:31
• Yes, use polyglossia. It allows "other language" and this is very well described in the documentation. – TeXnician Sep 4 '18 at 20:33
• @TeXnician Would you like to convert your comment into an answer? – user36296 Sep 13 '18 at 9:15
• @TeXnician Thanks a lot! One unanswered question less :) – user36296 Sep 13 '18 at 9:22

## 1 Answer

So you use polyglossia to manage two languages. You should exploit this and simply define the English text for English text (furthermore changing your hyphen to a proper dash). This is beneficial as you should switch to the English language regardless of the caption approach to get correct hyphenation.

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{german}
\setotherlanguage{english}
\addto{\captionsenglish}{\renewcommand{\abstractname}{Abstract -- english}}

\begin{document}
\begin{abstract}
text\\
\textbf{Stichworte:} ...
\end{abstract}

\begin{english}
\begin{abstract}
text\\
\textbf{Keywords:} ...
\end{abstract}
\end{english}
\end{document}