0

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?

SRel
  • 1,313
  • 1
    (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 04 '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 04 '18 at 20:31
  • Yes, use polyglossia. It allows "other language" and this is very well described in the documentation. – TeXnician Sep 04 '18 at 20:33
  • @TeXnician Would you like to convert your comment into an answer? – samcarter_is_at_topanswers.xyz Sep 13 '18 at 09:15
  • @TeXnician Thanks a lot! One unanswered question less :) – samcarter_is_at_topanswers.xyz Sep 13 '18 at 09:22

1 Answers1

1

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.

captions

\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}
TeXnician
  • 33,589