diff options
Diffstat (limited to 'Master/texmf/scripts/tetex')
-rwxr-xr-x | Master/texmf/scripts/tetex/texdoctk.pl | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/Master/texmf/scripts/tetex/texdoctk.pl b/Master/texmf/scripts/tetex/texdoctk.pl index 58764ac6181..6f4673d3781 100755 --- a/Master/texmf/scripts/tetex/texdoctk.pl +++ b/Master/texmf/scripts/tetex/texdoctk.pl @@ -815,10 +815,22 @@ sub srchtd { my ($string) = @_; my @res; my $idx = -1; # dummy index for @packname, @topic and @keywords - $packname[-1][0] = "texdoc"; - $topic[-1][0] = "Find documentation in TeX Live"; - $doc[-1][0] = "texdoc/texdoc.pdf"; - return (-1, 0); + my $tdout = `texdoc -M -l $string`; + if ($?) { + &popmsg(0,"texdoc failed, sorry: $!\n". + "Please report this problem on the texlive mailing list.\n"); + return; + } else { + my $i = 0; + for my $line (split /\n/, $tdout) { + my @fields = split /\t/, $line; + $doc[$idx][$i] = $fields[2]; + $topic[$idx][$i] = basename($fields[2]); + $packname[$idx][$i] = "no package name"; + push @res, ($idx, $i++); + } + return @res; + } } # search a string in @packname, @topic and @keywords |