aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/pages/srchkey.ht
blob: 7d62a3adf6ccb95bb5665824f2aa8f6dbfc4ed58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
% Copyright The Numerical Algorithms Group Limited 1991.
% Certain derivative-work portions Copyright (C) 1988 by Leslie Lamport.
% All rights reserved

%%  Using text from book now.

%%  \begin{page}{SearchStrings}{All about {\em Search Strings}}
%%  \newline Here is an \downlink{input area}{ugHyperInputPage}:
%%  \inputstring{filter}{35}{}\newline
%%  and here are some names of greek letters we will
%%  \lispdownlink{search}{(|htGreekSearch| '|\stringvalue{filter}|)}
%%  for:{\em
%%  \table{{alpha}{beta}{gamma}{delta}{epsilon}{zeta}{eta}{theta}{iota}{kappa}{lambda}
%%  {mu}{nu}{pi}}}
%%  \beginscroll
%%  A {\em search string} can be used to select entries from a list.
%%  For example, if you enter a search string into the input area above and
%%  then click on {\em search} above, \HyperName{} will select those greek letters
%%  indicated by the search string.
%%  \par
%%  Let's try it.
%%  The simplest search string is a word, e.g. {\em beta}. A word will only
%%  match an entry having exactly that spelling. Enter the word {\em beta} into the
%%  input area above then click on {\em search}. As you can see, {\em beta} matches
%%  only the single entry {\em beta}.
%%  \par
%%  Normally matching is insensitive to whether the alphabetic characters of your
%%  search string are in upper- or lower- case.
%%  Thus {\em Beta} and {\em BETA} will both match {\em beta}.
%%  \par
%%  You will very often want to use the "wildcard" {\em *} in your search string
%%  so as to match multiple entries in the list. The search key {\em *} will
%%  match every entry in the list. Try it!
%%  Enter {\em *} as your search string above then click on {\em search}.
%%  As you can see, the {\em *} matches every greek letter.
%%  \par
%%  You can also use {\em *} anywhere within a search string to match
%%  an arbitrary substring. Try {\em *eta} for example.
%%  It will match {\em beta}, {\em zeta}, {\em eta}, {\em theta}.
%%  In general, the wildcard matches any substring of zero or more arbitrary characters.
%%  \par
%%  You use any number of wildcards in a search string as long as they are not
%%  adjacent. Thus {\em *e*} will match {\em beta}, {\em delta}, {\em epsilon}, and others, that is, any word containing the letter {\em e}.
%%  Also {\em z*a} will match only {\em zeta}, that is, only words
%%  beginning with {\em z} and ending with {\em a}.
%%  Finally, {\em *a*a*} will match {\em alpha}, {\em gamma}, in general, all
%%  words which have at least two {\em a}'s their name.
%%  \horizontalline
%%  For more information, see:\newline
%%  \downlink{Logical Searches}{LogicalSearches}\tab{17}Using {\em and}, {\em or}, and {\em not} in search strings
%%  \newline
%%  %\downlink{Searching Text}{SearchingText}\tab{17}Using search keys to search text
%%  %\newline
%%  %\downlink{Some Details}{SearchOptions}\tab{17}Conventions and options you should know
%%  \endscroll
%%  \end{page}
%%
%%  \begin{page}{LogicalSearches}{Logical Searches}
%%  \newline Here is an \downlink{input area}{ugHyperInputPage}:
%%  \inputstring{filter}{35}{}\newline
%%  and here are some names of greek letters we will
%%  \lispdownlink{search}{(|htGreekSearch| '|\stringvalue{filter}|)}
%%  for:{\em
%%  \table{{alpha}{beta}{gamma}{delta}{epsilon}{zeta}{eta}{theta}{iota}{kappa}{lambda}
%%  {mu}{nu}{pi}}}
%%  \beginscroll
%%  For more complicated searches, you can use
%%  {\em and}, {\em or}, and {\em not} with basic search strings.
%%  Just write logical expressions using these three operators just like
%%  in the \Language{} language.
%%  For example, {\em alpha or beta} will match the first two greek letters,
%%  {\em *a* and *p*} will match all greek letters which have both an
%%  {\em a} and an {\em p}, and
%%  {\em not alpha} will match all the greek letters but {\em alpha}.
%%  \par
%%  Use parentheses for grouping.
%%  For example, {\em *a* and (not *p*)} will match the greek letters that
%%  contain the letter {\em a} but no letter {\em p}. Get the idea?
%%  \par
%%  There is no limit to how complex your logical expression can be.
%%  For example {\em a* or b* or c* or d* or e* and (not *a*)} is ok!
%%  \endscroll
%%  \end{page}
%%
%%  \begin{page}{SearchingText}{SearchingText}
%%  Here is an \downlink{input area}{ugHyperInputPage}:
%%  \inputstring{filter}{35}{}\newline
%%  and here are two lines of text we will
%%  \lispdownlink{search}{(|htTextSearch| '|\stringvalue{filter}|)}:\indent{2}
%%  \table{
%%  {{\em Fruit flies} *like* a {\em banana with cauliflower ears.}}
%%  {{\em Sneak Sears Silas with Savings Snatch}}
%%  }\indent{0}
%%
%%  \beginscroll
%%  Up until now, you have only learned how search strings match single
%%  words.
%%  Search strings can also be used to search text, e.g. the documentation
%%  for the library and \HyperName pages.
%%  Here the conventions are a bit different.
%%  \par
%%  If the search string is a word containing no wildcard {\em *},
%%  it will only match text containing that identical word.
%%  For example, the search string {\em ears} will match the
%%  first line (with {\em ears})
%%  but not the second line (with {\em Sears}).
%%  \par
%%  If the search string is a word containing {\em *} at its beginning
%%  or end, it will match a string with arbitrary characters at the beginning
%%  or end, respectively.
%%  For example, the search string {\em *ears} will match both the
%%  first line with {\em ears} and the second with {\em Sears}.
%%  \par
%%  As usual, you can use \downlink{and, or, not}{LogicalSearches} in your
%%  search string. For example, {\em *ears and sa*} will only match the
%%  second line with {\em Sears} and {\em Savings}.
%%  \par
%%  If your search string needs to contain a {\em *}, the words {\em and},
%%  {\em or}, or {\em not}, precede the first character of these special strings
%%  with  an underscore
%%  ({\em _}) (the escape character).
%%  Thus {\em _*like_*} and {\em _and} will match the first line.
%%  The search string {\em _**} (meaning any word beginning with {\em *}) will also
%%  match the first line.
%%  \par
%%  Your search string can also have two or more words.
%%  For example, {\em califlower ears} will match the first line.
%%  If the phrase contains an {\em and}, {\em or} or {\em not},
%%  be sure to place an underscore before the first character.
%%  For example {\em bananas and califlower} and {\em bananas _and califlower} have
%%  quite different meanings!
%%  \par
%%  Search strings however will not match adjacent words formatted differently.
%%  For example, {\em a banana} will not match the first line since "banana"
%%  is in italics and "a" is not.
%%  \horizontalline
%%  %See Also:
%%  %\newline
%%  %\downlink{Some Details}{SearchOptions}\tab{17}Conventions and options you should know
%%  \endscroll
%%  \end{page}