The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

TeX::Hyphen::Pattern - class for providing a collection of TeX hyphenation patterns for use with TeX::Hyphen.

VERSION

This is version 0.103. To prevent plugging in of incompatible modules the version of the pluggable modules must be the same as this module.

SYNOPSIS

    use TeX::Hyphen;
    use TeX::Hyphen::Pattern;

    $pat = TeX::Hyphen::Pattern->new();
    $pat->label('Sh_ltn'); # Serbocroatian hyphenation patterns
    $hyph = TeX::Hyphen->new($pat->filename);

DESCRIPTION

The TeX::Hyphen module parses TeX files containing hyphenation patterns for use with TeX based systems. This module includes TeX hyphenation files from CPAN and hyphenation patterns from OpenOffice and provides a single interface to use them in TeX::Hyphen.

http://tug.org/svn/texhyphen/trunk/hyph-utf8/tex/generic/hyph-utf8/patterns/
http://svn.services.openoffice.org/ooo/trunk/dictionaries/

SUBROUTINES/METHODS

TeX::Hyphen::Pattern->new();
TeX::Hyphen::Pattern->new(label => $label);

Constructs a new TeX::Hyphen::Pattern object.

$pattern->label($label);

Sets the label that determines the pattern to use. The label can be a simple language code, but since some languages can use multiple scripts with different hyphenation rules we talk about patterns and not just languages.

$pattern->available();

Returns a list of the available patterns.

$pattern->packaged();

Returns a list of the available patterns. (alias for available)

$pattern->filename();

Returns the name of a temporary file that TeX::Hyphen can read it's pattern from for the current label. Returns undef if no pattern language matching the label was found.

CONFIGURATION AND ENVIRONMENT

The script tools/build_catalog_from_ctan.pl was used to get the TeX patterns file from the source on the internet and include them in this module. After that the copyright messages were manually checked and inserted to make sure this distribution complies with them.

DEPENDENCIES

Moose =item Encode =item File::Temp =item Log::Log4perl =item Module::Pluggable =item Readonly =item Set::Scalar =item Test::More =item Test::NoWarnings

TeX::Hyphen is not a dependency of TeX::Hyphen::Pattern. You might want to use the patterns in another way, but this is mainly to prevent a circular dependency. Without TeX::Hyphen installed the patterns aren't tested for compatibility with TeX::Hyphen, so if you want to use TeX::Hyphen::Pattern with TeX::Hyphen it's safer to install TeX::Hyphen first so it can be used in the installation process of TeX::Hyphen::Pattern.

INCOMPATIBILITIES

    Not all available pattern files are parsed correctly by TeX::Hyphen. Versions up to and including 0.140 don't support utf8, so patterns using utf8 that are included in this package have a version number 0.00 to ignore them. Should you patch TeX::Hyphen yourself by inserting a binmode FILE, ":utf8"; you can change those version numbers to 0.103 to include them.

DIAGNOSTICS

This module uses Log::Log4perl for logging. It's a fatal error when the temporary file containing the pattern can't be written.

Can't write to file '%s', stopped %s

The temporary file created by File::Temp could not be written.

BUGS AND LIMITATIONS

  • Subtags aren't handled: en could pick en_US, en_UK or ena (when Apali would be available) and this is silently ignored, it just does a match on the string and picks what partly matches sorted, so using more exotic scripts this can go wrong badly.

  • Esperanto (TeX::Hyphen::Pattern::Eo.pm) fails for a known reason and is not included in the package. Should you need support for Esperanto write to tex-hyphen at tug.org.

  • Coptic (TeX::Hyphen::Pattern::Cop.pm) is a bit hard to test without a system that supports the fonts or encoding and is not included in the package.

  • Building the catalog creates conflicting files on file systems where En_us.pm and En_US.pm can't exist in the same directory (HFS+), so half of them are ignored.

  • After building the catalog the copyright notices were inserted manually to make sure the correct licensing was used.

    Please report any bugs or feature requests to bug-tex-hyphen-pattern@rt.cpan.org, or through the web interface at RT for rt.cpan.org.

AUTHOR

Roland van Ipenburg, <ipenburg@xs4all.nl>

LICENSE AND COPYRIGHT

Copyright 2018 by Roland van Ipenburg

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.

The included pattern files in lib/TeX/Hyphen/Pattern/ are licensed as stated in those files.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.