diff options
Diffstat (limited to 'Master/texmf')
-rwxr-xr-x | Master/texmf/scripts/tetex/texdoctk.pl | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Master/texmf/scripts/tetex/texdoctk.pl b/Master/texmf/scripts/tetex/texdoctk.pl index f0512882ba7..58764ac6181 100755 --- a/Master/texmf/scripts/tetex/texdoctk.pl +++ b/Master/texmf/scripts/tetex/texdoctk.pl @@ -274,7 +274,8 @@ sub tpslct { push @lbitems,$topic[$srchitems[$j]][$srchitems[$k]]; push @lbdocs,$doc[$srchitems[$j]][$srchitems[$k]]; } - $wtitle="Search results for $spec_wtitle"; + $wtitle = ($srchtype ? "File" : "Database") + . " search results for $spec_wtitle"; } # toplevel window of category $opt with two frames my $tpwin=$main->Toplevel(-title=>$wtitle); @@ -770,6 +771,7 @@ sub mksrch { $srchtype = $type; } } else { + $srchtype = $type; # get the search string $srchentry=$cmdframe->Entry(-cursor=>'xterm', -font=>$deffont, @@ -791,7 +793,11 @@ sub srchstr { $main->configure(-cursor=>'watch'); $string=$srchentry->get(); # search - @reslist = &srchdb($string); + if ($srchtype == 0) { + @reslist = &srchdb($string); + } else { + @reslist = &srchtd($string); + } # destroy entry widget and show results destroy $srchentry; $srchflag=0; @@ -804,6 +810,17 @@ sub srchstr { $main->configure(-cursor=>$defcursor); } +# search using texdoc +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); +} + # search a string in @packname, @topic and @keywords sub srchdb { my ($string) = @_; |