NAME

TeX::Hyphen -- hyphenate words using TeX's patterns

SYNOPSIS

use TeX::Hyphen;
my $hyp = new TeX::Hyphen "hyphen.tex";
my $word = "representation";
my @points = $hyp->hyphenate($word);
print $hyp->visualize($word), "\n";

DESCRIPTION

Constructor TeX::Hyphen::new creates a new Hyphen object and loads the file with patterns into memory. Then you can ask it for hyphenation of a word.

Method TeX::Hyphen::hyphenate returns list of places where the word can be divided, TeX::Hyphen::visualize can be used to show them. The example above should give rep-re-sen-ta-tion.

Variables $TeX::Hyphen::LEFTMIN and $TeX::Hyphen::RIGHTMIN can be used to restrict minimal starting and ending substring where it is not possible to hyphenate. They both default to 2 but should be changed to match the paratemers used to generate the patterns.

Variable $TeX::Hyphen::DEBUG will tell on standard error output the alocation of buckets.

The file with hyphenation patterns may contain \' and \v accents, used in Czech language.

CHANGES

0.04 Wed Apr 9 15:41:32 MET DST 1997

Hash lookup made faster.

Method TeX::Hyphen::visualize only takes one argument, it calls hyphenate.

0.03 Sun Feb 16 13:55:26 MET 1997

Hash lookup made faster.

Original name Hyphen chaged to TeX::Hyphen.

BUGS

It takes rather long to load the file and create the hash in memory, but probably never will be fixed.

VERSION

0.04

SEE ALSO

perl(1).

AUTHOR

(c) 1997 Jan Pazdziora, adelton@fi.muni.cz

at Faculty of Informatics, Masaryk University, Brno