Packages Packages Introduction
New Commands
Page 1 Page 2
Fancyhdr
Quotchap
Page 1 Page 2
Todonotes
Geometry
Page 1 Page 2
Hyperref Babel Xcolor
Beamer
Page 1 Page 2 Page 3
"Top 5" useful packages "Top 3" styling packages
The babel package
This pack­age man­ages cul­tur­ally-de­ter­mined ty­po­graph­i­cal (and other) rules for a wide range of lan­guages. A doc­u­ment may se­lect a sin­gle lan­guage to be sup­ported, or it may se­lect sev­eral, in which case the doc­u­ment may switch from one lan­guage to an­other in a va­ri­ety of ways. Ba­bel uses con­tributed con­fig­u­ra­tion files that pro­vide the de­tail of what has to be done for each lan­guage. In­cluded is also a set of ini files for about 200 lan­guages..

How to implement babel
At the beginning of your LaTeX document, where the other packages are listed, simply add the following code:
CODE
\usepackage[a-language-of-your-choice]{babel}

You can add a second language, by simply adding the following code:
CODE
\usepackage[languageA,languageB]{babel}

with this code, the last language in the option list will be active (i.e. languageB), and you can use the command:
CODE
\selectlanguage{languageA}

to change the active language (when the document begins, with \begin{document}, the main language is automatically selected). You can also add short pieces of text in another language using the command
CODE
\foreignlanguage{languageB}{Text in another language}

Babel also offers various environments for entering larger pieces of text in another language:
CODE
\begin{otherlanguage}{languageB}


Text in language B. This environment switches all language-related definitions, like the language specific names for figures, tables etc. to the other language. \end{otherlanguage}

The starred version of this environment typesets the main text according to the rules of the other language, but keeps the language specific string for ancillary things like figures, in the main language of the document. The environment hyphenrules switches only the hyphenation patterns used; it can also be used to disallow hyphenation by using the language name 'nohyphenation' (but note sotherlanguage* is preferred).