old-www/LDP/LG/issue23/tkman.html

172 lines
7.9 KiB
HTML

<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Reading Manual Pages in Style Issue 23</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0020F0"
ALINK="#FF0000" >
<!--endcut ============================================================-->
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center><h1>TkMan</h1></center>
<center>
<h4><a href="mailto: layers@marktwain.net">by Larry Ayers</a></h4>
</center>
<p><hr><p>
<center><h3>Introduction</h3></center>
<p>The traditional form of unix documentation is the manual-page system, which
uses the <b>man</b> command in conjunction with the <b>Groff</b> text
formatter to display manual pages (with your default pager) on a terminal
screen. This system is rather long in the tooth, but is still in widespread
use because it both works well and doesn't require a windowing system. The
man-page directory structure (with a directory corresponding to each directory
of executables) is pretty well standardized, ensuring that when new software
is installed the corresponding man-page(s) have a place waiting for them in
the hierarchy.
<p>For the past couple of years Thomas Phelps, of the University of California
at Berkeley, has been writing and rewriting a Tcl/Tk based man-page reader
called TkMan. As John Ousterhout has released the successive versions of Tcl
and Tk TkMan has been updated to make use of the expanded capabilities of the
two toolkits. Soon after the release of Tcl/Tk 8.0 this past August, TkMan
2.0 was released; it's a major release with several new features, thus this
review.
<center><h3>Features and Capabilities</h3></center>
<p>TkMan is a super-charged reader which can access and search
your man-pages in a variety of useful ways, and then display them in a
nicely-formatted and very configurable fashion. Here is a sampling of what
TkMan can do:
<ul>
<li>Any man-page mentioned in another page serves as a hyper-text
link, giving man-page reading something of the flavor of
HTML browsing.
<li>The section headers of a page can be collapsed into an outline, making
it easy to get a feel for the contents and organization of the page.
<li>Hyper-linked listings of each category of man-page (such as <b>User
Commands</b> or <b>Games</b>), as well as a listing of new and recently
added pages.
<li>A listing of often-accessed pages can be created, and "virtual volumes"
of pages can be set up, if you'd like to have several scattered pages
accessible as a new volume or category.
<li>Integration with the <i>apropos</i> and <i>whatis</i> commands.
<li>There is an entry field in the main window which allows you to enter
text-strings or regular expressions and search for them in the displayed
page.
<li>If you have the <b>Glimpse</b> indexing and search facility installed,
TkMan can use its services for powerful searches of man-page text.
<li>If you are either bored or in the mood for a little aleatory learning,
there is a menu-button which will cause a random man-page to be displayed.
<li>When starting up, TkMan reports on any faults it finds in your man-page
and man-path set-up.
<li>Configurable display colors and fonts.
</ul>
<p>It is all too easy to end up with superfluous copies of man-pages on a
Linux system. If your man-pages are gzipped, an upgrade to a new version of a
program will install the new page, but the new one won't over-write the old
because the old one has the <i>.gz</i> suffix, and thus the filename is
different. TkMan offers a means of keeping track of duplicate man-pages; wnen
a page is displayed, the title of the page in the menu-bar will have drop-down
entries showing the paths of any other pages with the same name. Selecting
one of these will load the page, and if it's an older version or just an exact
duplicate it can be deleted. Here's a screenshot of a typical window:<br>
<p>
<img alt="TkMan Screenshot" src="./gx/ayers/tkman.gif">
<p>This screenshot shows a man-page in its "folded" state; the right-pointing
triangles are sections with hidden text. A mouse-click will expand them.
<hr>
<center><h3>Installation</h3></center>
<p>The latest version of TkMan relies on Tcl8.0 and Tk8.0, so if you want to
try it out this may be a good time to upgrade. Recent versions of Tcl/Tk
compile easily "out-of-the-box", so this shouldn't present too much of a
problem. Unfortunately, especially if you've recently compiled and installed
the 8.0 versions (and deleted the source), TkMan needs one patch to be applied
to one of the Tk8.0 source files in order to function. The Tk source then
needs to be recompiled. Thomas Phelps attempted to convince the Tk developers
to include his patch in the distribution, but was unsuccessful. The patch
adds outlining to the Tk text display functions. I've run several other
applications which rely on Tk8.0 and the patch so far hasn't caused any
problems.
<p>TkMan also depends on the services provided by PolyglotMan (formerly Rman),
also written by Thomas Phelps. PolyglotMan is a separate program which can
reverse-compile or translate man-pages from their native Nroff or Groff format
to a variety of other formats, such as HTML, SGML, LaTeX, TkMan's native
format, and the Perl pod format, among others. This should be compiled and
installed first, as the TkMan makefile needs to contain PolyglotMan's path.
<p>TkMan is entirely a Tcl/Tk program, so it doesn't need to be compiled. The
makefile instead rewrites several of the Tcl files, adapting them to your
system's paths, before copying them to (by default) /usr/local. The makefile
is well-commented and easy to adapt to your system.
<center><h3>Availability</h3></center>
<p>The current versions of both TkMan and PolyglotMan can be downloaded from
the home <a href="ftp://ftp.cs.Berkeley.EDU/ucb/people/phelps/tcltk">site</a>.
<hr>
<center><h3>Observations</h3></center>
<p>TkMan isn't the sort of man-page reader you'd want to fire up just to check
the syntax of a command, but if you're needing to refer to several man-pages
in a session it can be a great convenience. A history of pages you have
viewed is stored as you work, and it can be accessed from a dynamically
updated drop-down menu. The overview of all man-pages in a section can
be interesting, too. It's easy to forget just how many of these pages there
are, and sometimes just seeing the title of a program or command in the
listing can spark curiousity. It's easy to get in the habit of using
just a small subset of a command's capabilities; several times I've noticed a
page listed for a command I've used frequently but never thought to
investigate. Even more times I've seen listings for programs I long ago
deleted!
<p>There are probably more features in TkMan than most people will ever use,
but this increases the odds that the one which suits you is included. This
seems to be a very high-quality program, and it will run on just about any
flavor of unix out there.
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Larry Ayers<BR>
Published in Issue 23 of <i>Linux Gazette</i>, December 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
LT="[ FRONT PAGE ]"></A>
<A HREF="./cftp.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./flower/page1.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->