{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 2001.02.10.
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@aq.org
http://www.aq.org/~js/
Copyright
The library is copyright © 1992-2001 by Jay Sekora, but may be freely redistributed under the conditions at the top of the file.
Overview
::jstools::view_url - display the document pointed to by a World Wide Web URL
::jstools::view_man - display a Unix manual page
::jstools::view_url
Usage
	::jstools::view_url url
Argument
	url is the URL of the web document to display
Examples
	::jstools::view_url http://www.aq.org/~js/
	::jstools::view_url ftp://ftp.example.net/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.
::jstools::view_man
Usage
	::jstools::view_man manpage
Argument
	manpage is the name of the manual page to display
Example
	::jstools::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
Other procedures in the library 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.
Bugs and Misfeatures
· ::jstools::view_man isn't as useful in my documents any more now that (1) Tcl/Tk is cross-platform (not just Unix), and (2) I'm writing documents on the assumption that they'll be viewed mostly via HTML.
· As implied above, ::jstools::view_man is basically Unix-specific.
· I don't think anybody's using Mosaic anymore. :-)
· I don't know how to manipulate web browsers remotely under Windows or MacOS.
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.  [When I wrote that sentence, there weren't Tk-based web browsers.  Now there are.  Maybe I'll revisit this.]
} {{{list:level:1 {41.0 45.0 46.0 49.0}} {jhtml:anchor:anchorname {19.0 20.0 29.0 30.0}} {jdoc:anchor:anchorname {2.0 3.0 6.0 7.0 9.0 10.0 16.0 17.0 19.0 20.0 29.0 30.0 38.0 39.0}} {jdoc:xref:link {3.55 3.62 3.120 3.134 8.173 8.194 8.202 8.219 8.223 8.244 17.0 17.19 18.0 18.19}} {jdoc:xref:manpage {8.89 8.96 37.253 37.257 37.383 37.386}} {richtext:font:roman {3.0 3.4 3.16 3.55 3.62 5.24 5.36 6.0 8.0 8.20 8.32 8.65 8.74 8.89 8.96 8.177 8.184 8.206 8.211 8.223 8.244 9.0 11.0 12.0 12.9 13.0 13.22 14.0 15.0 16.0 17.19 18.0 18.19 19.0 21.0 21.1 21.24 22.0 23.0 23.1 23.4 24.0 25.0 25.1 25.43 26.1 26.57 27.0 28.0 28.90 28.93 29.0 31.0 31.1 31.28 32.0 33.0 33.1 33.8 34.0 35.0 35.1 35.26 36.0 37.0 37.103 37.110 37.253 37.257 37.322 37.329 37.383 37.386 38.0 39.0 40.0 41.0 41.2 41.21 42.20 42.39 45.0 46.0 48.108 48.112 48.117 48.122 48.176 48.186 48.191 48.202 49.0}} {richtext:font:italic {21.21 21.24 23.1 23.4 28.90 28.93 31.21 31.28 33.1 33.8 37.103 37.110}} {richtext:font:bold {3.4 3.16 3.55 3.62 5.24 5.36 8.20 8.32 8.177 8.184}} {richtext:font:bolditalic {8.206 8.211 8.223 8.244}} {richtext:font:typewriter {8.65 8.74 8.89 8.96 12.0 12.9 13.0 13.22 17.0 17.19 18.0 18.19 21.1 21.21 25.1 25.43 26.1 26.57 31.1 31.21 35.1 35.26 37.253 37.257 37.322 37.329 37.383 37.386 41.2 41.21 42.20 42.39 48.108 48.112 48.117 48.122 48.176 48.186 48.191 48.202}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {2.0 3.0 6.0 7.0 9.0 10.0 16.0 17.0 19.0 20.0 29.0 30.0 38.0 39.0 40.0 41.0 45.0 46.0}} {richtext:font:heading2 {7.0 8.0 10.0 11.0 14.0 15.0 20.0 21.0 22.0 23.0 24.0 25.0 27.0 28.0 30.0 31.0 32.0 33.0 34.0 35.0 36.0 37.0}} {{} {9.0 15.0}} {jdoc:link:jstools.jdoc {3.55 3.62}} {jdoc:manpage:tclvars {8.89 8.96}} {jdoc:link:jslibraries.jdoc#Usage {8.202 8.219}} {jdoc:link:jslibraries.jdoc {8.223 8.244}} {jdoc:anchorname:Credits_and_Copyright {9.0 10.0}} {jdoc:anchorname:Introduction {2.0 3.0}} {jdoc:anchorname:Usage {6.0 7.0}} {jdoc:link:jslibraries.tcl {8.173 8.194}} {jdoc:anchorname:Overview {16.0 17.0}} {jdoc:link:http://www.w3.org/ {3.120 3.134}} {jdoc:manpage:man {37.383 37.386}} {jdoc:anchorname:Other_Procedures {38.0 39.0}} {jdoc:anchorname:j:view_url {19.0 20.0}} {jdoc:manpage:send {37.253 37.257}} {jdoc:anchorname:j:view_man {29.0 30.0}} {list:1:ul {41.0 45.0 46.0 49.0}} {jdoc:link:#::jstools::view_url {17.0 17.19}} {jdoc:link:#::jstools::view_man {18.0 18.19}} {jhtml:anchorname:::jstools::view_url {19.0 20.0}} {jhtml:anchorname:::jstools::view_man {29.0 30.0}} {special:list_item:1 {41.0 41.1 42.0 42.1 43.0 43.1 44.0 44.1 46.0 46.1 47.0 47.1 48.0 48.1}}} {{del_from 49.0} {convert:place:42.20 42.20} {convert:place:45.0 47.0} {convert:place:28.0 28.0} {convert:place:45.1 47.1} {convert:place:12.0 12.0} {convert:place:8.74 8.74} {convert:place:8.173 8.173} {convert:place:26.57 26.57} {convert:place:33.0 33.0} {convert:place:31.21 31.21} {convert:place:33.1 33.1} {convert:place:8.177 8.177} {convert:place:16.0 16.0} {convert:place:37.383 37.383} {convert:place:37.0 37.0} {current 39.224} {convert:place:37.386 37.386} {convert:place:21.0 21.0} {convert:place:5.24 5.24} {convert:place:21.1 21.1} {matchend 49.0} {convert:place:12.9 12.9} {convert:place:8.184 8.184} {convert:place:42.0 42.0} {convert:place:33.8 33.8} {convert:place:31.28 31.28} {convert:place:42.1 42.1} {convert:place:25.0 25.0} {convert:place:25.1 25.1} {convert:place:8.0 8.0} {convert:place:37.322 37.322} {convert:place:8.89 8.89} {convert:place:46.0 48.0} {convert:place:42.39 42.39} {convert:place:3.16 3.16} {convert:place:8.20 8.20} {convert:place:46.1 48.1} {convert:place:30.0 30.0} {convert:place:29.0 29.0} {convert:place:28.90 28.90} {convert:place:8.202 8.202} {convert:place:13.0 13.0} {convert:place:8.194 8.194} {convert:place:28.93 28.93} {convert:place:5.36 5.36} {convert:place:8.96 8.96} {convert:place:34.0 34.0} {convert:place:8.206 8.206} {convert:place:37.329 37.329} {convert:place:17.0 17.0} {convert:place:1.0 1.0} {convert:place:17.19 17.19} {convert:place:38.0 38.0} {convert:place:8.211 8.211} {convert:place:22.0 22.0} {convert:place:37.253 37.253} {convert:place:8.32 8.32} {convert:place:25.43 25.43} {convert:place:37.103 37.103} {convert:place:43.0 45.0} {convert:place:37.257 37.257} {convert:place:9.0 9.0} {convert:place:26.1 26.1} {convert:place:10.0 10.0} {convert:place:47.0 49.0} {anchor 44.60} {insert_save 44.78} {convert:place:31.0 31.0} {convert:place:37.110 37.110} {convert:place:8.219 8.219} {convert:place:14.0 14.0} {convert:place:31.1 31.1} {insert 44.60} {convert:place:21.21 21.21} {convert:place:8.223 8.223} {del_to 49.0} {convert:place:35.0 35.0} {convert:place:41.21 41.21} {convert:place:46.176 48.176} {convert:place:18.0 18.0} {convert:place:21.24 21.24} {convert:place:35.1 35.1} {convert:place:2.0 2.0} {convert:place:46.108 48.108} {convert:place:39.0 39.0} {convert:place:40.0 40.0} {convert:place:23.0 23.0} {convert:place:6.0 6.0} {convert:place:23.1 23.1} {convert:place:46.112 48.112} {convert:place:3.120 3.120} {convert:place:44.0 46.0} {abbrevstart 44.72} {convert:place:35.26 35.26} {convert:place:23.4 23.4} {convert:place:27.0 27.0} {convert:place:46.186 48.186} {convert:place:44.1 46.1} {convert:place:11.0 11.0} {convert:place:18.19 18.19} {matchstart 49.0} {emacs_mark 49.0} {convert:place:46.117 48.117} {convert:place:48.0 50.0} {convert:place:3.55 3.55} {convert:place:32.0 32.0} {convert:place:46.191 48.191} {convert:place:15.0 15.0} {convert:place:46.202 48.202} {convert:place:46.122 48.122} {convert:place:13.22 13.22} {abbrevend 44.78} {convert:place:36.0 36.0} {convert:place:8.244 8.244} {convert:place:19.0 19.0} {convert:place:20.0 20.0} {convert:place:8.65 8.65} {convert:place:3.62 3.62} {convert:place:3.0 3.0} {convert:place:3.134 3.134} {convert:place:41.0 41.0} {convert:place:24.0 24.0} {convert:place:41.1 41.1} {convert:place:3.4 3.4} {convert:place:41.2 41.2} {convert:place:7.0 7.0}}} {{body_alink #ff0000} {body_vlink #000080} {body_link #0000ff} {body_text #000000} {body_bgcolor #ffffff}}