summaryrefslogtreecommitdiff
path: root/Master/texmf/scripts
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-04-05 08:09:04 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-04-05 08:09:04 +0000
commit8ef0751fd296a6ef6bcb8b1f568bf4b3c36c1570 (patch)
tree41c5d5a67adf7603856f46d1eb20dc27b570d35b /Master/texmf/scripts
parent2ebb2c00777045cd4da1c1c46e82853e77e86ea2 (diff)
Dummy "search" routine for texdoc.
Fixed problem with srchtype selection. git-svn-id: svn://tug.org/texlive/trunk@17703 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts')
-rwxr-xr-xMaster/texmf/scripts/tetex/texdoctk.pl21
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) = @_;