September 1, 2012

Abstract Language

Today a friend asked me how to create a German and a separated English abstract in LaTeX. Sure, you would say: Just write one abstract in German and the other one in English, where is the problem? Well that was not the problem. The problem was that LaTeX did always print "Zusammenfassung" (which is the German word for "Abstract") for both, the German and English version when using the abstract command:
\begin{abstract}
Long story short, it's very easy to use another language for all your commands - in case the requested language is installed.
\begin{abstract} Das ist meine Kurz- oder Zusammenfassung auf Deutsch... \end{abstract} \begin{otherlanguage}{english} \begin{abstract} This is my abstract written in English... \end{abstract} \end{otherlanguage}
Last make sure you defined you languages correctly in your main document as shown below
\usepackage[english,ngerman]{babel}
You see, only one additional command is necessary to accomplish this task.

No comments:

Post a Comment