<H3>Smart Usage</H3>

<H4>Other WWW commands</H4>

<P>In the preceding section, you have learnt the basic commands of the
World-Wide Web, to access information by following links or by
searching for keywords. But other commands are available to facilitate
your navigation through the realm of information.
<P>At the prompt level, you may type any of the following commands.
They can all be abbreviated, and case is not significant. We will also
recall the commands you already know.

<H5>Basic commands</H5>
<DL>
<DT>Number
<DD>A number by itself selects a reference from within the displayed
text and follows the corresponding link, i.e. displays the document
referred to.
<DT>K (Keyword)
<DD>The letter K introduces a list of keywords that you want to search
for. This command is only available on indexed documents. This is
reminded in the command prompt. Note that you can also supply keywords
directly (without a leading K), provided that they don't match a
command. For instance, you may type either `K BLOGGS' or `BLOGGS' to
look for your friend Joe Bloggs, but if you want to know more about
lists, you must type `K LIST'.
<DT>H (Help)
<DD>Display a summary of these commands, and also the hypertext address
of the document you are reading, so you can quote a reference to it.
<DT>Q (Quit) or E (Exit)
<DD>Leave WWW for now.
</DL>

<H5>Retrieving previously seen documents</H5>
<DL>
<DT>R (Recall)
<DD>The WWW browser remembers all the documents you have looked up in
a session. The Recall command displays a numbered list of the documents
you have visited. To select one, type the Recall command followed by
the number associated with the document you want, for instance `R 2'.
Note that this new display of a previously visited node will be
remembered at the end of the recall list.
<DT>B (Back)
<DD>Go back to the document you were reading before. This will erase
the current document from the recall list. You can back up indefinitely.
<DT>HO (Home)
<DD>Go back to the first document you were reading (in general the
Home Page). This will not erase the recall list. It is faster than
backing up several times.
</DL>

<H5>Viewing the current document</H5>
<DL>
<DT>Top
<DD>Return to the top of the currently displayed document. (Sorry, you
can't go back one page at a time. This feature will be added soon.)
<DT>List
<DD>Display a numbered list of the references encountered so far in
the current document, giving the titles (or addresses) of the linked
documents. To jump there, type the corresponding number by itself.
</DL>

<H4>Command line syntax</H4>

<P>WWW can be invoked from the shell. The syntax is :
<XMP>		www [options]  [docaddress [keywords]]

</XMP>
<P>With no arguments, the <XPH>www</XPH> shell command starts browsing
from the system default page, /usr/local/lib/WWW/default.html (for
systems other than Unix, see the Installation section).
<P>Options should be specified before other arguments. Currently options
available are :
<DL>
<DT>-n 
<DD>Non-interactive mode. Outputs the formatted document to the standard
output, then exits. Pages are delimited with form feed (FF) characters.
the page length depends on the -p option. This is useful to print a
document when you know its address.
<DT>-pn
<DD> where n is a number, specifies the page length. Without a number,
makes the page length infinite. Default is 24. 
<DT>-v
<DD> Verbose mode: Gives a running commentary on the program's attempts
to read data in various ways. If present, the next argument is the
hypertext address of the document at which you want to start browsing.
You may want to define an alias for www followed by name of your favourite
index.
<DT>-na
<DD> Hides anchor positions in the text. Useful, when printing out
the document.
<DT>-a format
<DD> Specifies the printf -style format string to be used when
printing references. Must contain the two characters "%d" where the
numbers should occur. Be sure to escape or quote any special characters
you use. For example under unix, with ^[ standing for ESCape:
</DL>

<XMP>				www -a \<%d\>
				www -a " (Type %d)"
				www -a "^[[1m[%d]^[[m"

</XMP>Any further command line arguments are taken as keywords. The first
argument must refer to an index in this case. The index is searched
for entries matching the keywords, and a list of matching entries
is displayed.

<H4>Shortcuts</H4>

To save having always to go through the www default page, you can
use a shortcut to get to an index. On cernvax for example, the following
shell commands are predefined:
<DL>
<DT>yellow
<DD> The CERN yellow pages telephone directory.
<DT>xfind
<DD> The CERN computer center documentation keyword index
<DT>vmnews
<DD> The CERN computer centre news service: all news articles, in
reverse chronological order.
</DL>
You can search an index which has a shortcut command by giving the
keywords as parameters, eg
<XMP>			yellow taxes


</XMP>
To make your own shortcuts, you can define your own commands. On unix
(with csh), use an alias. On Unix,
<XMP>			alias z www address

</XMP>
On VMS,
<XMP>			$ Z :== 'WWW' """address"""

</XMP>
where address is the hypertext address of the document you want to
jump into. You can find the hypertext address of a node from the LIST
command or the RECALL command when you are in www. (For nodes with
titles, the RECALL command shows you that instead).<P>
An alternative method uses a shell script.<P>

Under unix, you can set up your own www command using an alias, even
if you do not have system privileges.<P>
The commands below are for the C shell (csh). If you are using the
korn shell, you will replace the space between the name and value
of an alias with an equals "=" sign.<P>
To define the www command, simply make an alias to the executable
file (www) in the directory in which you have put it.
<XMP>			alias www /path/path/path/Implementaion/machine/www

</XMP>
If you want to make a special command to point directly to a particular
hypertext document, then you must find its hypertext address. You
then define an alias giving that address as a first parameter to "www".
<XMP>			alias xfind www http://crnvmc/FIND/pub+user\?

</XMP>
Note the backslash (\) used to prevent the question mark (here part
of the address of the FIND index) from being interpreted by the shell.

<H4>Customising www</H4>

As the line mode browseris installed, it comes with a default copy
of the CERN home page, frozen at the time when the distribution was
made. That page has (right at the bottom) a link back to the current
version.<P>
You can customise www to start at a page of your choice. You can write
your own page, or use someone else's. All you have to do is to set
the environment variable WWW_HOME to the www address of your preferred
home page. (When you are using www, you can see what an address looks
like by typing help when you are reading a document - it tells you
the address of that node).<P>
"Environment variable" is a unix term. On VMS you should use a logical
name. Under VM/CMS, set the globalv "WWW_HOME" in the table "CENV",
with a command like
<XMP> GLOBALV SELECT CENV SET WWW_HOME http://info.cern.ch/junk.html 

</XMP>
You can also customise www by defining your own "www" command to invoke
www with certain command line optionsset, such as the page length.
See making shortcut commandsfor how to make aliases.<P>

<H3>Installing WWW</H3>

This section describes how to install the line mode browser. First of all,
<UL>
<LI>If you have a VAX/VMS machine, then see the special instuctions for
VMS.
<LI>If you have not already got hold of the files, see the section on
getting them.
</UL>The browser has already been ported to VAX/Ultrix (using cc or gcc
compilers), DECStation/ultrix, VAX/VMS (read the special instructions),
 Sun4, IBM RS6000, and Apollo_m68k, VM/CMS and MVS. If your machine
is not one of these, see the section on porting. If it is, then
find the relevant subdirectory of LineMode/Implementation.

<H4>Compiling</H4>
This will not be necessary if there is already a copy of the executable
for your machine in the subdirectory.
<UL>
<LI>Check the directory definitions in the Makfile in that subdirectory,
and change them if necessary. If the file www does not exist, type
"make". See the definition of the macros in the file Implementation/CommonMakefile.
</UL>

<H4>Installing</H4>
<UL>
<LI>Become superuser (su root). (If you can't do this, set up your own
private www command using aliases, and use a custom home page).
<LI>Type "make install". Two soft links will be made from system directories
into the WWW directory tree. These will be to a copy of the executable
in a "Works" subdirectory of your machine subdirectory.
</UL>You must now check that the default "Home" page works, and customise
it if it is not what you want. The default home page refers explictly
to certain information which we know about. You may wish to add more.

<H4>Installation under VMS</H4>

To install under VMS, get the files WWW.EXE and SETUP.COM from sources
described below. To set up the commands, put the command
<XMP>			$ @[...]SETUP

</XMP>
into your LOGIN.COM, or the system SYLOGIN.COM. This command file
assumes you have left all the distributed files in the same directory
as itself.

<H4>Home page</H4>
Under VMS, the home page may be defined using the logical name WWW_HOME.
You should define this to be the full address of the document which
you want to be displayed when www is invoked without parameters. For
example,
<XMP>        $ DEFINE/SYSTEM WWW_HOME "file://myvax/sys$library/default.html"

</XMP>
Note that the www address you must set it to is still in unix-like
format (with slashes instead of :: : [.])Users may of course override
the system logical name with their own. If no logical name is defined,
the VMS browser will default to picking up the default page from our
server, document http://info.cern.ch./default.html.

<H4>Availability</H4>
Versions are available for any of the following implementations of
TCP/IP which you may have installed on your system: Digital's UCX,
Wollongongs's WIN/TCP, or SRI's Multinet. If you are on HEPnet, the
versions are currently (August 91) available in directories as follows:
<DL>
<DT>Wollongong WIN_TCP
<DD> none - mail me if interested.
<DT>Multinet
<DD> vxcrna::disk$oc1:[timbl.www.multinet.works]
<DT>Digital's UCX
<DD> vxcrna::disk$oc1:[timbl.www.ucx.works]
<DT>CMU TCP
<DD> none - mail me if interested.
</DL>
If you are not on HEPnet, but can pick up and unwrap the tar file
from the general distribution, then you will find executables in
the WWW/LineMode/Implementation/vms directory, as files www_ucx.exe
or www_multinet.exe. Pick one and rename it to www.exe

<H4>Note (CERN)</H4>
If you are at CERN, you may want to pick up the default page and online
documentation from cernvax. This machine is known (for reasons of
history and name length limit) on decnet as PRIAM. You must therefore:
<XMP>			$ DEFINE/SYSTEM CERNVAX PRIAM::


</XMP>
