Skip to content

Instantly share code, notes, and snippets.

@phluks
Last active Dec 13, 2015
Embed
What would you like to do?
Forsøg på dansk orddeling med TeX::Hyphen::Pattern
#!/usr/bin/perl
use warnings;
use v5.10;
# Remember to save as utf8!
use utf8;
use TeX::Hyphen;
use TeX::Hyphen::Pattern;
use open ":locale";
$pat = TeX::Hyphen::Pattern->new();
$pat->label('da_DK');
# Changing left/rightmin does not seem to help
#$hyph = TeX::Hyphen->new(file => $pat->filename, leftmin => 2, rightmin => 2);
$hyph = TeX::Hyphen->new(file => $pat->filename);
say "køreskole: "
. $hyph->visualize("køreskole"); # køreskole: køresko-le
say "wonderwoman: "
. $hyph->visualize("wonderwoman"); # wonderwoman: won-derwo-man
say "katedralskole: "
. $hyph->visualize("katedralskole"); # katedralskole: ka-ted-ralsko-le
@phluks
Copy link
Author

phluks commented Feb 19, 2013

I am not amused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment