Article Title : Answerbook Creation Date : 07/01/93 Message ID : JGRNSQ Last Update : Expiration Rules : unknown Location : NCD-Articles/Host_Systems/Sun ================================================================= Answerbook on X11 (announcement) - comp.windows.x #4534 In article <1993Jun16.113127.2517@cs.few.eur.nl>, pk@cs.few.eur.nl (Paul Kranenburg) writes: A preliminary version of an Answerbook navigator and viewer usable on non-xnews servers is available at `ftp.cs.few.eur.nl:~/pub/unix/ab.tar.Z'. You will need Sun's XView toolkit, a Ghostscript interpreter and an installed Answerbook. The interface between this navigator and Ghostscript uses the same communication channel as Ghostview. In fact, the Ghostview widget has been bashed until it looked like an XView class (it may not prove too hard to turn this whole program into a genuine Xt intrinsics application again). Some utilities are included to add your own books to an existing Answerbook hierarchy. These can be found in the `utils' directory after unpacking. -pk Here is an excerpt of the README file. --------------------------------------------------------------------------- This directory contains a Sun Answerbook compatible navigator and viewer that can be used to consult the Answerbook Postscript documents on a plain X server. The navigator and viewer are a single program based on the XView toolkit. The GNU ghostscript interpreter is used as a Postscript engine. Communication between the viewer and ghostscript follows `ghostview' protocol. In fact, the Ghostview widget is used as a base to implement an XView `GSCANVAS' object, which is a subclass of the XView CANVAS object with the special purpose of rendering postscript code. USAGE Of cause you should have a properly installed Answerbook. Xnav expects the environment variable BOOKINFO to be set to a bookinfo file. If this variable is not set, /etc/bookinfo is used. Start xnav with a collection Id as an argument. For release 1.4 of Sun's answerbook, this would be `SUNWab_1_4'. The resource "Psview.Interpreter" determines the pathname of the ghostscript interpreter. The default is "gs" (implying that it should be in $PATH). See the manual page for other resources used by xnav. KNOWN PROBLEMS o The viewer currently relies on retained canvases. On servers that do/can not support this, things can get very slow. o The GSCANVAS interface is not mature. In particular, the GSCANVAS_SENDPS and GSCANVAS_PSTOX attributes need rethinking. o Searching and bookmarks are not implemented. o Printing (directly from xnav) is not implemented. o The viewer part knows next to nothing about the Answerbook structure (unlike Sun's docviewer). This prevents `walking through' a book past the end of a Postscript file. o Sun's docviewer appears to automatically rotate some files (notably those of the AB TOUR) by 90 degrees. I can find no clue for this in PS files themselves. For now these oddballs are displayed sideways in xnav. o The Palatino fount used in most Answerbook documents does not have the prettiest of looks when rendered by ghostscript. ---- utils README ---- ANSWERBOOK UTILITIES. dbgen and dbascii are two complementary Answerbook utility programs. dbascii is used to decompile a Answerbook DBM file into an ascii format that describes the document structure of a given (Answer) book. The file can be edited to change the layout of the book but, more importantly, additional books can be inserted at some place in the hierarchy. See ascii.xtoc.sample for an example how to re-integrate the X Window books that went missing between release 1.3 and 1.4 of Sun's Answerbook into Answerbook 1.4. (in addition to this, the bookinfo file should also be updated, so that navigators and viewers can look for the actual Postscript docs in the proper directory, see bookinfo.sample for this). dbgen undertakes the opposite job of generating the DBM files from an ascii representation of the document structure. It takes as arguments a book-identifier which goes into the DBM file and the basename of the desired DBM files (basename gets augmented by .dir and .pag suffixes). So dbgen SUNWab_1_4a SUNWab_1_4a < ascii.xtoc.new would generate the files `SUNWab_1_4a.dir' and `SUNWab_1_4a.pag', and running `navigator SUNWab_1_4a' would enable you to view the documents added to the new `ascii.xtoc.new' file. When making changes or additions to an "ascii.xtoc" file, be sure to keep the part of `id = ' lines unique at all times, since these are used as DBM keys when accessing navigation information. NOTES Both dbgen and dbascii are descendents of some initial hackery with the AB index format, and never fully recovered from that. `dbgen' is based on a simple recursive descent parser and got a bit dented over time. YACC would probably be better.