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 am currently writing a book in Italian using LyX and I use

\usepackage[italian]{babel}

in the preamble. However, I need to write a chapter of this book in a different language. How can I change the hyphenation only for this chapter to English?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Insert an ERT using \selectlanguage{english} and revert back using the inverse. From the babel documentation (section 1 The user interface, p 4):

When a user wants to switch from one language to another he can do so using the macro \selectlanguage. This macro takes the language, defined previously by a language definition file, as its argument. It calls several macros that should be defined in the language definition files to activate the special definitions for the language chosen.

share|improve this answer
    
What is an ERT? –  Mariano Suárez-Alvarez Feb 17 '13 at 4:14
    
@MarianoSuárez-Alvarez: In LyX this is referred to as "Evil Red Text" that inserted in the Wysiwyg LyX editor to include any LaTeX code. –  Werner Feb 17 '13 at 4:25
    
Nowadays with LyX 2.0.x, ERT is called "TeX code" and the button on the toolbar looks like the "TEX" logo of this site. (A little inconsistent that hovering over such a "TeX code" field displays "ERT".) –  e-birk Feb 17 '13 at 13:19

babel supports changing the hyphenrules

\documentclass[openany]{book}
\usepackage[english,italian]{babel}

\begin{document}
\chapter{Chiao}
foo

\begin{hyphenrules}{english}
\chapter{Hello}
bar
\end{hyphenrules}

\chapter{Italiano}
baz
\end{document}

you can insert the two command lines into LyX with Ctrl-L also called ERT (Evil Red Text)

share|improve this answer
    
If the language es english, hyphenrules is ok, but in general the right environment is otherlanguage*. –  Javier Bezos Feb 17 '13 at 18:47

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.