58

I have a document written in British English and I am using \usepackage[british]{babel} in the preamble; however, this same document also has an abstract written in a different language, whose hyphenation is of course all wrong.

Is there any way to specify something akin to \usepackage[british]{babel}, but just inside a chapter?

Corentin
  • 9,981
Anto
  • 581
  • 4
    The package allows to activate another language within the document by commands like \selectlanguage{…} or \foreignlanguage{…}{short text}. – Thorsten Donig Jun 17 '11 at 10:02
  • 2
    Have a look at this question http://tex.stackexchange.com/q/1177/3240 – Thorsten Jun 17 '11 at 10:03
  • 2
    Welcome to tex.sx! You can format the LaTeX code by enclosing it in ``, e.g. \LaTeX. – N.N. Jun 17 '11 at 10:26
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count. This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). – N.N. Jul 01 '11 at 12:25

1 Answers1

93

Just load the other languages you need with the babel package putting the main language last and then you switch between the languages via \begin{otherlanguage} ... \end{otherlanguage}, \selectlanguage{language} or \foreignlanguage{language}{text} (like Thorsten Donig and egreg suggested). Here is an example:

\documentclass{article}

\usepackage[french,british]{babel}

\begin{document}

\begin{otherlanguage}{french}
\begin{abstract}
...
\end{abstract}
\end{otherlanguage}

\tableofcontents% This is just to show that the the ToC title is in British

\end{document}
N.N.
  • 36,163
  • 4
    Note that this will change the automatic LaTeX labels, too, i.e. instead of "Abstract" it'll say "Résumé". To get the English title, switch the order in which the environments are begun: \begin{abstract}\begin{otherlanguage}{french}...\end{otherlanguage}\end{abstract} – doncherry Jun 17 '11 at 18:52
  • 7
    @doncherry \begin{otherlanguage*} doesn't change the fixed words, so I'd prefer to use this environment rather than changing the order. – egreg Nov 06 '12 at 11:56