Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
3  
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
1  
Have a look at this question tex.stackexchange.com/q/1177/3240 –  Thorsten Jun 17 '11 at 10:03
    
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 1 '11 at 12:25
add comment

1 Answer

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}
share|improve this answer
3  
It's better to enclose the French part in the otherlanguage environment: \begin{otherlanguage}{french}\begin{abstract}...\end{abstract}\end{otherlanguag‌​e}, so the main language will be restored automatically. –  egreg Jun 17 '11 at 12:39
    
@egreg True, thanks. Edited my answer to fix this. –  N.N. Jun 17 '11 at 12:52
2  
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{abstrac‌​t} –  doncherry Jun 17 '11 at 18:52
    
@doncherry \begin{otherlanguage*} doesn't change the fixed words, so I'd prefer to use this environment rather than changing the order. –  egreg Nov 6 '12 at 11:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.