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.

Is it possible to make \hyphenation{ } only in one chapter or small text? Not the whole text but only in small pieces of text.

Maybe it is possible to make a new language and use different hyphenations. In old form of languages and citations or in artificial languages.

share|improve this question
1  
Are you looking to limit the scope of hyphenation break points (set up via a \hyphenation command) to a certain part of your document, or are you looking to disable/enable hyphenation entirely for the parts in question? –  Mico Apr 19 '13 at 15:15
    
limit in part of text. but limits in few pieces of text. limit the part of the text, but not only one but several different parts of the text the same kind of another hyphenations. turn on/off my own hyphenations in small diferent part of documents –  jak Apr 19 '13 at 15:38
    
a simple experiment seems to me to show that the effect of \hyphenation commands is remains whatever you do; you can set it inside a group (or even inside a box) and it will still be there after the group or box closes. i would invent a new "language" with its own hyphenation, but that's a pretty heavy undertaking. –  wasteofspace Apr 19 '13 at 15:46
    
what i can use my previous hyphenation in next/other pages? –  jak Apr 19 '13 at 15:51
    
You are supposed to be able to have several hyphenation patterns loaded and switch between them using \setlanguage. I know that Luatex allows you to manipulate the patterns in each language during processing. I'll leave details to someone who knows something substantial about how to actually do this. –  Charles Stewart Apr 19 '13 at 16:05
show 3 more comments

1 Answer

In TeX hyphenation of text is dependent on the language in force, which technically is the current value of the integer register \language. Technically hyphenation rules are loaded by selecting the language (setting the register to some number representing it) and then loading a set of hyphenation patterns via the \pattern command. This is one of the commands that in traditional TeX can only be used while format generation is possible, so normally the languages are already predefined in the format that is loaded at start.

On top of those base rules one can use the \hyphenation command which alters the rules of the "current" language, i.e., in a multi-language document one first have to switch to the right language and then give the desired \hyphenation execptions. From that point on they stay available for this language, so whenever the language is select they will be used.

So to cut the long story short: yes you need to prepare several languages (with identical patterns) then add the desired \hyphenation exceptions to some of them and then switch between them as needed. The Babel system has a method of providing new languages but this is not daily user stuff, so you will need to dig a bit to see how this works.

share|improve this answer
    
ok I start new question tex.stackexchange.com/questions/109779/… –  jak Apr 20 '13 at 17:26
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.