{jviewers.tcl

Introduction
The jviewers.tcl library is distributed as part of the jstools package.  It consists of procedures to manage display of World Wide Web documents and Unix manual pages to the user, honouring hir preferences for what tools to use.

This document describes jviewers.tcl version 4.0/4.0.

Usage
Accessing the Library
In order to use the jviewers.tcl library, it must be in your Tcl auto_path, described in tclvars(n).  Information about how to arrange that, and other conventions common to the jstools libraries, is in the Usage section of The jstools Libraries.

Credits and Copyright
Author
Jay Sekora 
js@calumet.org
http://shore.net/~js/

Copyright
The library is copyright © 1992-1995 by Jay Sekora, but may be freely redistributed under the conditions at the top of the file.

Overview
Public Procedures
j:view_url - display the document pointed to by a World Wide Web URL
j:view_man - display a Unix manual page

Other Procedures
j:view_url:mosaic - display a URL with Mosaic
j:view_url:netscape - display a URL with Netscape
j:view_url:arena- display a URL with Arena
j:view_url:lynx - display a URL with lynx(1) running in an xterm(1X11)
j:view_man:builtin -display a manual page with man(1) and ul(1)
j:view_man:tkman -display a manual page with Tom Phelps' TkMan
j:view_man:man -display a manual page with man(1) running in an xterm(1X11)

j:view_url
Usage
	j:view_url url
Argument
	url is the URL of the Web document to display
Examples
	j:view_url http://shore.net/~js/
	j:view_url ftp://ftp.aud.alcatel.com/pub/tcl/README

Description
This procedure invokes the user's chosen Web browser to display the document indicated by url.  The exact mechanism whereby this happens may vary from browser to browser.

j:view_man
Usage
	j:view_man manpage
Argument
	manpage is the name of the manual page to display
Example
	j:view_man xauth

Description
This procedure invokes the users chosen method for viewing Unix manual pages to display the page named manpage.  The exact mechanism whereby this happens may vary depending on the mechanism chosen.  (For instance, for TkMan, it may involve using the Tk send(n) command to communicate with a running copy of TkMan; for the builtin method it involves displaying the filtered output of man(1) in a window.)

Other Procedures
These procedures implement the interface to particular Web browsers or manual­page viewers a user may choose.  You shouldn't call them directly in your code - doing so would defeat the purpose of allowing the user to set viewer preferences.

Future Directions
* There need to be more choices, and also a mechanism for the user to specify tools I haven't foreseen.

* This concept might be extended to display of other sorts of information.

* It might be appropriate to let the user specify different tools for different URL access mechanisms (e.g. ftp: vs. http:) or (more likely) different kinds of documents (e.g. image/jpeg vs. audio/basic).  This is unlikely, though, since it would probably require implementing something like a Web browser in Tcl and duplicating lots of functionality that already exists in other tools.

} {{{jdoc:xref:link {4.55 4.62 4.120 4.134 10.173 10.194 10.202 10.219 10.223 10.244 23.0 23.10 24.0 24.10 27.0 27.17 27.39 27.45 28.0 28.19 28.41 28.49 29.0 29.16 29.37 29.42 30.0 30.15 31.0 31.18 32.0 32.16 32.57 32.62 33.0 33.14}} {jdoc:xref:manpage {10.89 10.96 30.37 30.41 30.59 30.64 31.47 31.50 31.58 31.60 33.43 33.46 33.64 33.69 56.253 56.257 56.383 56.386}} {jdoc:anchor:anchorname {3.0 4.0 8.0 9.0 12.0 13.0 21.0 22.0 35.0 36.0 47.0 48.0 58.0 59.0}} {richtext:font:roman {2.0 3.0 4.0 4.4 4.16 4.55 4.62 6.24 6.36 8.0 10.0 10.20 10.32 10.65 10.74 10.89 10.96 10.177 10.184 10.206 10.211 10.223 10.244 12.0 14.0 15.0 15.14 16.0 16.21 18.0 19.0 21.0 23.10 24.0 24.10 26.0 27.17 28.0 28.19 29.0 29.16 30.0 30.15 30.37 30.41 30.59 30.64 31.0 31.18 31.47 31.50 31.58 31.60 31.63 32.16 33.0 33.14 33.43 33.46 33.64 33.69 35.0 37.0 37.1 37.15 38.0 39.0 39.1 39.4 40.0 41.0 41.1 41.33 42.1 42.52 44.0 45.0 45.90 45.93 47.0 49.0 49.1 49.19 50.0 51.0 51.1 51.8 52.0 53.0 53.1 53.17 55.0 56.0 56.103 56.110 56.253 56.257 56.322 56.329 56.383 56.386 58.0 59.0 61.0 62.0 66.108 66.112 66.117 66.122 66.176 66.186 66.191 66.202 67.0}} {richtext:font:italic {37.12 37.15 39.1 39.4 45.90 45.93 49.12 49.19 51.1 51.8 56.103 56.110}} {richtext:font:bold {4.4 4.16 4.55 4.62 6.24 6.36 10.20 10.32 10.177 10.184}} {richtext:font:bolditalic {10.206 10.211 10.223 10.244}} {richtext:font:typewriter {10.65 10.74 10.89 10.96 15.0 15.14 16.0 16.21 23.0 23.10 24.0 24.10 27.0 27.17 28.0 28.19 29.0 29.16 30.0 30.15 30.37 30.41 30.59 30.64 31.0 31.18 31.47 31.50 31.58 31.60 31.63 32.16 33.0 33.14 33.43 33.46 33.64 33.69 37.1 37.12 41.1 41.33 42.1 42.52 49.1 49.12 53.1 53.17 56.253 56.257 56.322 56.329 56.383 56.386 66.108 66.112 66.117 66.122 66.176 66.186 66.191 66.202}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {3.0 4.0 8.0 9.0 12.0 13.0 21.0 22.0 35.0 36.0 47.0 48.0 58.0 59.0 61.0 62.0}} {richtext:font:heading2 {9.0 10.0 13.0 14.0 18.0 19.0 22.0 23.0 26.0 27.0 36.0 37.0 38.0 39.0 40.0 41.0 44.0 45.0 48.0 49.0 50.0 51.0 52.0 53.0 55.0 56.0}} {{} {11.0 19.0 22.0 22.1 22.8 23.0 60.0 61.0}} {jdoc:link:jstools.jdoc {4.55 4.62}} {jdoc:manpage:tclvars {10.89 10.96}} {jdoc:link:jslibraries.jdoc#Usage {10.202 10.219}} {jdoc:link:jslibraries.jdoc {10.223 10.244}} {jdoc:anchorname:Credits_and_Copyright {12.0 13.0}} {jdoc:anchorname:Introduction {3.0 4.0}} {jdoc:anchorname:Usage {8.0 9.0}} {jdoc:link:jslibraries.tcl {10.173 10.194}} {jdoc:anchorname:Overview {21.0 22.0}} {jdoc:link:http://www.w3.org/ {4.120 4.134}} {jdoc:link:#j:view_url {23.0 23.10}} {jdoc:link:#j:view_man {24.0 24.10}} {jdoc:manpage:man {31.47 31.50 33.43 33.46 56.383 56.386}} {jdoc:manpage:ul {31.58 31.60}} {jdoc:manpage:lynx {30.37 30.41}} {jdoc:manpage:xterm {30.59 30.64 33.64 33.69}} {jdoc:link:http://www.w3.org/pub/WWW/Arena/ {29.37 29.42}} {jdoc:link:#Other_Procedures {27.0 27.17 28.0 28.19 29.0 29.16 30.0 30.15 31.0 31.18 32.0 32.16 33.0 33.14}} {jdoc:anchorname:Other_Procedures {58.0 59.0}} {jdoc:anchorname:j:view_url {35.0 36.0}} {jdoc:manpage:send {56.253 56.257}} {jdoc:anchorname:j:view_man {47.0 48.0}} {jdoc:link:http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/ {27.39 27.45}} {jdoc:link:http://www.netscape.com/ {28.41 28.49}} {jdoc:link:http://http.cs.berkeley.edu/~phelps/ {32.57 32.62}}} {{del_from 67.0} {matchend 67.0} {abbrevstart 32.49} {abbrevend 32.57} {insert 1.0} {del_to 67.0} {matchstart 67.0} {anchor 1.0} {emacs_mark 67.0} {current 1.0}}}