Re: hyphenation in non-English languages
It works with etex too if you use I made changes to texinfo.tex and all the txi-??.tex files to implement this. Thanks very much for the suggestion and code. karl
Re: hyphenation in non-English languages
Do you want to? Will have a look, but I can't promise anything due to time constraints. To get some basic non-English hyphenation support, almost nothing has to be changed if you use the current TeXLive. Here I demonstrate what to do for German. . The basic trick is to process the texinfo file with `eplain' instead of `tex'. With TeXLive, this gives access to all configured hyphenation patterns. `bplain' would do the same, but there is (currently) no soft link to the `tex' binary. . In txi-de.tex, add the following lines at the very beginning: \makeatletter \global\lefthyphenmin 2 \global\righthyphenmin 2 [EMAIL PROTECTED] \makeatother That's it. Add, for example, the following at the beginning of your texinfo file: @documentlanguage de @documentencoding UTF-8 Other languages can be handled similarly. You can use any input encoding -- since texinfo has hardcoded support for CM fonts only, words with accented letters aren't hyphenated anyway. A minor problem is that there is no `pdfeplain' command in TeXLive yet, but this is very easy to fix. How shall we proceed? Werner
Re: hyphenation in non-English languages
Hi Werner, On Do, 02 Okt 2008, Werner LEMBERG wrote: . The basic trick is to process the texinfo file with `eplain' instead of `tex'. With TeXLive, this gives access to all configured hyphenation patterns. `bplain' would do the same, but there is (currently) no soft link to the `tex' binary. What is bplain, we can add it ... Other languages can be handled similarly. You can use any input encoding -- since texinfo has hardcoded support for CM fonts only, words with accented letters aren't hyphenated anyway. Hmm, that is not the best option. Any way around that? A minor problem is that there is no `pdfeplain' command in TeXLive yet, but this is very easy to fix. That is the easiest thing to fix. Karl will answer. Best wishes Norbert --- Dr. Norbert Preining [EMAIL PROTECTED]Vienna University of Technology Debian Developer [EMAIL PROTECTED] Debian TeX Group gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 --- What was the self-sacrifice? I jettisoned half of a much loved and I think irreplaceable pair of shoes. Why was that self-sacrifice? Because they were mine! said Ford crossly. I think we have different value systems. Well mine's better. That's according to your... oh never mind. --- Douglas Adams, The Hitchhikers Guide to the Galaxy
Re: hyphenation in non-English languages
(I think this has nothing to do with Texinfo, but for TeX Live purposes ...) `bplain' would do the same, but there is (currently) no soft link to the `tex' binary. (Norbert, bplain = babel plain) Would it useful to have? Although there is a bplain.ini file, I see no sign that there was ever a bplain executable. Not sure it would mean much to add it now, since evidently no one is using it.
Re: hyphenation in non-English languages
. The basic trick is to process the texinfo file with `eplain' Wouldn't it work with etex? I don't see that any eplain-specific features are being used. (\makeat*er being trivial, as we all know.) texi2dvi already uses etex (or pdf[e]tex) when they are present. So in this case, I don't think there is anything special to do. Which is excellent news :). . In txi-de.tex, add the following lines at the very beginning: Very nice! It did not occur to me that we could make use of txi-de.tex, but it makes sense. I can work on this. Is there a simple table somewhere of the correct \{left,right}hyphenmin values? I don't relish digging into all the babel files. since texinfo has hardcoded support for CM fonts only, words with accented letters aren't hyphenated anyway. FYI, Oleg has been working on real support for other encodings and other fonts for some time. As you can imagine, it is highly nontrivial. Thanks much, karl
Re: hyphenation in non-English languages
. The basic trick is to process the texinfo file with `eplain' Wouldn't it work with etex? No. As outlined in babel.pdf, plain.tex must not be modified, thus there are only US-English hyphenation patterns available. Is there a simple table somewhere of the correct \{left,right}hyphenmin values? I don't relish digging into all the babel files. I'm not aware of such a list. FYI, Oleg has been working on real support for other encodings and other fonts for some time. I know. As you can imagine, it is highly nontrivial. But as soon as such a code is there, it shouldn't be cause much problems to adapt it for hyphenation patterns also. Werner
Re: hyphenation in non-English languages
On Do, 02 Okt 2008, Karl Berry wrote: Is there a simple table somewhere of the correct \{left,right}hyphenmin values? I don't relish digging into all the babel files. grep lefthyphenmin Master/tlpkg/tlpsrc/* ?? We added all that is known there for exactely that purpose. In fact it is generated from the hyph-utf8 package, and Mojca/Arthur have collected that. Best wishes Norbert --- Dr. Norbert Preining [EMAIL PROTECTED]Vienna University of Technology Debian Developer [EMAIL PROTECTED] Debian TeX Group gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094 --- MALIBU (n.) The height by which the top of a wave exceeds the height to which you have rolled up your trousers. --- Douglas Adams, The Meaning of Liff
Re: hyphenation in non-English languages
No. As outlined in babel.pdf, plain.tex must not be modified, thus there are only US-English hyphenation patterns available. Not so. etex loads all the patterns (and plain.tex remains unmodified, of course). This was a change in 2008, although it could have been done earlier. It is tex which only has Knuth's US ENglish. karl
Re: hyphenation in non-English languages
Wouldn't it work with etex? No. As outlined in babel.pdf, plain.tex must not be modified, thus there are only US-English hyphenation patterns available. Sorry, my mistake. It works with etex too if you use this snippet instead of the previous one: [EMAIL PROTECTED] \global\lefthyphenmin 2 \global\righthyphenmin 2 [EMAIL PROTECTED] [EMAIL PROTECTED] So the fix to get some basic hyphenation is really trivial. Werner
Re: hyphenation in non-English languages
any chance that this gets implemented on the TeX side? It would be very nice. Basically, it should be just an interface to the plain TeX implementation of Babel, right? I don't know. All we really have to do is set \language. Do we need Babel for that? Now that etex (in TL'08) is dumped with all available languages, it seems like it should be plausible. The necessity of dumping a format had been mentally blocking me. Has someone worked on this already? No. Do you want to? Thanks, Karl
Re: hyphenation in non-English languages
Basically, it should be just an interface to the plain TeX implementation of Babel, right? I don't know. All we really have to do is set \language. Do we need Babel for that? Well \language expects a number, doesn't it? Using Babel, we can use a string instead... Has someone worked on this already? No. Do you want to? Will have a look, but I can't promise anything due to time constraints. Werner
Re: hyphenation in non-English languages
Well \language expects a number, doesn't it? Yes. Using Babel, we can use a string instead... Clearly we have to map from the existing @documentlanguage strings in Texinfo to the numbers that were dumped in the .fmt file for the various languages. If Babel can help us do that, and not induce new compatibility problems along the way, fine. Or if we write some homegrown mapping, also fine. I have never actually looked into how we can get the language names back out. karl