summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/findhyph
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-11-13 23:37:35 +0000
committerKarl Berry <karl@freefriends.org>2012-11-13 23:37:35 +0000
commitafd388d14d28be512667a80ac70a542c3dadef8c (patch)
treed880ad33e65c9cb39cfbdaeada9773f7fced0e2e /Master/texmf-dist/scripts/findhyph
parent4776da14c604f45e9c7a51a4efb48e9e97ec3dd1 (diff)
sync, missed some findhyph
git-svn-id: svn://tug.org/texlive/trunk@28254 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/findhyph')
-rwxr-xr-xMaster/texmf-dist/scripts/findhyph/findhyph40
1 files changed, 27 insertions, 13 deletions
diff --git a/Master/texmf-dist/scripts/findhyph/findhyph b/Master/texmf-dist/scripts/findhyph/findhyph
index 66fa67d999a..e66f55a8db2 100755
--- a/Master/texmf-dist/scripts/findhyph/findhyph
+++ b/Master/texmf-dist/scripts/findhyph/findhyph
@@ -6,7 +6,7 @@ $opt_l = 'kKsSvVzZoOuUiIA'; # defaults for Slovak and Czech
$opt_c = $opt_f = $opt_h = $opt_v = 0;
getopts('cfphvl:');
-$version_msg = "findhyph version 3.0\n";
+$version_msg = "findhyph version 3.1\n";
$help_msg = "\nUsage: findhyph [options] <yourtexfile.log>\n" .
"\n" .
"Options: -c display hyphenated words in context\n" .
@@ -163,16 +163,22 @@ sub do_hyph {
for $i (1..$max_break-1) {
if (defined $USED[$i]) {
if ($search_hyphens) { # hyphenated words
- if ($act_text =~ /(\S+\@$i\@\S+)/) { # only hyphenated words match
- $out_text = $1;
+ if ($act_text =~ /(\S+)(\@$i\@)(\S+)/) { # only hyphenated words match
+ $out_pre = $1;
+ $out_post = $3;
+ if (substr($out_pre,-1) ne "-") { # hyphenated ligatures
+ $out_pre_A = substr($out_pre,0,rindex($out_pre,"-"));
+ $out_pre_B = substr($out_pre,rindex($out_pre,"-")+1);
+ $out_pre = $out_pre_A;
+ $out_post = $out_pre_B.$out_post;
+ }
if ($opt_c) {
- $context_before = $context_after = "";
- if ($act_text =~ /(\S+)\s+\S+\@$i\@/) {$context_before = $1;}
- if ($act_text =~ /\@$i\@\S+\s+(\S+)/) {$context_after = $1;}
- $out_text = "$context_before $out_text $context_after";
+ if ($act_text =~ /(\S+)\s+\S+\@$i\@/) {$out_pre = "$1 $out_pre";}
+ if ($act_text =~ /\@$i\@\S+\s+(\S+)/) {$out_post = "$out_post $1";}
}
- $out_text =~ s/-//g;
- $out_text =~ s/\@$i\@/-/g;
+ $out_pre =~ s/-//g;
+ $out_post =~ s/-//g;
+ $out_text = "$out_pre-$out_post";
$out_text =~ s/\@\d+\@//g; # very narrow columns
print O1 "$out_text\n";
$write_hyph_page = 1;
@@ -183,10 +189,8 @@ sub do_hyph {
$out_text = $1;
if ($out_text =~ /^[$opt_l]$/) {
if ($opt_c) {
- $context_before = $context_after = "";
- if($act_text =~ /(\S+) \S \@$i\@/) {$context_before = $1;}
- if($act_text =~ /\@$i\@ ?(\S+)/) {$context_after = $1;}
- $out_text = "$context_before $out_text $context_after";
+ if($act_text =~ /(\S+) \S \@$i\@/) {$out_text = "$1 $out_text";}
+ if($act_text =~ /\@$i\@ ?(\S+)/) {$out_text = "$out_text $1";}
$out_text =~ s/-//g;
$out_text =~ s/\@\d+\@//g; # very narrow columns
}
@@ -348,6 +352,16 @@ for identifying the issue)
=back
+=head4 3.1 (2012-11-03)
+
+=over 4
+
+=item *
+
+fixed displaying of hyphenated ligatures (bug reported by Karel Horak)
+
+=back
+
=head1 LICENSE
This program is free software; you can redistribute it and/or modify