I have multi-lingual TeX document mostly in Russian but I also include some terms in English in brackets too to make the reader familiar with international terminology. For example the phrase
Два неотъемлемых свойства языка программирования - синтаксис (syntax) и семантика (semantics).
which simply means
Two attributes of a programming language are its syntax and semantics.
looks like
Два неотъемлемых свойства языка программирования --- \textit{синтаксис} (\textit{\selectlanguage{english}syntax\selectlanguage{russian}}) и \textit{семантика} (\textit{\selectlanguage{english}semantics\selectlanguage{russian}}).
Also I have \usepackage[english,russian]{babel}.
The code looks too verbose because I need to use \selectlanguage twice on each English word to make hyphenation work. Without this I get a couple of
Overfull \hbox ...
messages because TeX is not able to hyphen English words when they appear at the ends of the lines.
Is there any better solution?
In response to Alexey Malistov.
MacTeX distribution has a couple of language.dat files
- /usr/local/texlive/2009/texmf-dist/source/generic/babel
- /usr/local/texlive/2009/texmf-dist/doc/generic/babel
- /usr/local/texlive/2009/texmf/tex/generic/config
- /usr/local/texlive/2009/texmf-var/tex/generic/config
- /usr/local/texlive/2009/texmf-dist/tex/lambda/config
I'm not sure which one should I edit. Probably one of the first two. They are identical
% File : language.dat
% Purpose : specify which hypenation patterns to load
% while running iniTeX
=USenglish
american ushyphen.tex
=english
UKenglish ukhyphen.tex
=british
french frhyphen.tex
dutch nehyph2.tex
german dehypht.tex
ngerman dehyphn.tex
But which one?
Also there is no initexmf command. Googling around I found out that analogue is updmap-sys. But I'm not sure... I'm afraid to spoil my TeX installation. Please, give me the right direction.