[comp.windows.x] xtroff 4.10 available for anonymous ftp

moraes@cs.toronto.EDU (Mark Moraes) (06/06/91)

A new version of xtroff is now available for anonymous ftp from
export.lcs.mit.edu:/contrib/xtroff.tar.Z
ftp.cs.toronto.edu:/pub/X/xtroff.tar.Z

-rw-r--r--  1 moraes     343419 Jun  5 13:09 xtroff.tar.Z

There have been enough changes since patchlevel 9 (sometime last year)
that it isn't worth putting out context diffs.  As you can tell from
the CHANGES.Pat10 file enclosed here, there have been some major
improvements -- notable among them are the ability to preview output
from Chris Lewis' psroff (which makes it possible to use xtroff with
the old CAT troff shipped with SunOS, for instance), GNU groff (with
certain limitations) and better support for Berkeley ditroffs. See the
-trofftype option and TroffType resource.

It's been seen to compile and work on SunOS[34].x, RISCos4.51, and
Irix3.3.2.

For those who don't have access to anon. ftp, this version should be
in comp.sources.x soon.

Enjoy.
	Mark.
---
CHANGES.Pat10

- removed all SunView code and ifdefs -- makes this distribution much
  smaller and simpler.  About time.

- removed dev{psc,X11} as well as devsun; they're not needed
  with the special character drawing code and the fontMap.

- can now read negative numbers, should ditroff ever make the
  mistake of generating them.  fixed bug in '#' comment parsing.
  it can now read output from Chris Lewis' troff2dt/psroff.

- change draw_fraction to use a line instead of character 0244. - dac

- set font size before drawing generated ligatures. - dac

- generate \(em character internally. - dac

- add or change translations for "en ~ ^ hy pl eq cm"
  note that the translations are not correct for "~ ^" since these
  characters do not exist in the X11 character set. - dac

- turn off scrollbars if "-full" is specified.

- fix problem in psfd that gives an extra line of garbage at the
  top of the page.

- fixed bug in XtStuff/Imakefile, reported by everyone who runs
  a system without DIRENT :-(

- simple emulation of \(dg (dagger) and \(dd (double dagger) - dac

- -nopixmap option added, so it can work on GraphOn X terminals,
  which otherwise get amazingly confused.

- documentation update. With any luck, it's a bit clearer now, and
  better approximates the code.  READMEs sorted out and cleaned
  up, added notes on using Chris Lewis' psroff and GNU groff.

- fix from John Sellens <jmsellens@watdragon.waterloo.edu> to arc.c for
  systems that left M_PI out of math.h

- line numbers are now more accurate, makes it easier to spot errors
  in ditroff input.

- fix from Rob Tulloh <robtu@isc.com> to deal with text that has a
  ligature as the first pair of characters.

- added -F option to specify a font directory.  Now one can use different
  font families or test xtroff with other fonts.

- errors go to stderr for now, otherwise multiple errors overwrite each other
  in Minibuf.  Time for a popup text widget.

- changed debugging from ifdefs to if() statements controlled by a
  command line option. (-debug)  Makes life considerably simpler for
  maintainers.

- fix from Tim Roper <timr@labtam.labtam.oz.au> for 1bit backing pixmap
  even on colour X servers to reduce server memory used.

- fixes from Andreas Stolcke <stolcke@icsi.berkeley.edu> to improve
  fraction positioning, emulate \(em with --, fix line segment
  character positioning to abut properly (see tests/stolcke.test).
  Now the troff manual looks much better.

- Fixes from Rob Tulloh to fix bugs in the gamma release and make this
  work on an RS6000.

- Fix from Johnny Amanatides for DWB3.0.

- added isascii() before all ctype macro calls to make xtroff react
  better to binary input.

- added the -trofftype option and resource to choose betweek ditroff,
  Berkeley ditroff and GNU groff at run-time.  Added groff support.

- fixed some bugs in initializing allocated memory; these caused special
  characters not to be drawn or "Bad Font in VirtualLoadFont" errors.

- reversevideo now works.

- fraction drawing improved, now restores font size after fractions

- fixes from Yuan Liu <liu@cs.UMD.EDU>

 > 1. Description: If the font position is changed in page n (via .fp in troff,
 >         and "x font i FN" in the dit file) then they stay changed when you go
 >         back to pages before n. E.g. if font position 2 was I in page 1, and
 >         it is changed to HO in page 3, then when you go back to page 1, all the
 >         text that was in font I will now be displayed in font HO.
 > 
 >    Fix: At the beginning of each page, right after the "p<number>" command is
 >         detected, write all the current font positions to the temp file in the
 >         form of "x font i Fi" so that if the program every comes back to the
 >         page, the font positions will be loaded correctly.
 >         A side-effect of this fix is that a temp file will be used even if the
 >         program is reading from a file and not a command.
 > 
 > 2. Description: The "print current page" command does not work right. For one
 >         thing, due to the above bug, some text may be printed in the wrong
 >         font. A more serious problem is that when troff encounters a font change
 >         command similar to "\fH text \fP", it will temporarily puts H in font
 >         position 0 (x font 0 H) and then issues a f0 command. If this font
 >         change should persist over page boundary, then it means that the
 >         command "x font 0 H" does not appear in the new page, and therefore
 >         when the program attempts to print the new page, font position 0 would
 >         not have been loaded and hence when the dit-to-printer program
 >         encounters the "f0" command, it dumps core.
 >         A more minor problem of "print current page" is that there is an extra
 >         "p<number>" at the end of the page being sent to the printer, this
 >         causes an extra blank page to be printed.
 > 
 >    Fix: The fix to Bug 1 takes care of the font 0 problem. To fix the extra
 >         page problem, the OutputPage routine is modified so that it doesn't
 >         output the "p<number>".
 > 
 > The following are not really bugs. They are just some "improvements" that I
 > made.
 > 1. Description: When using X11 internal fonts, i.e. setting font bits using the
 >         fontMap resources, if the document uses some fonts outside of the 10
 >         built-in fonts (in the array name_font), e.g. HO, then the program will
 >         complain about font desc file not found even if the font is set in the
 >         fontMap resource.
 > 
 >    Change: In readX11fontfile, whenever a mapping for a font is read, it is
 >         checked to see if the description for the font is already in the
 >         FontInformation of the typesetter, if not then a dummy Font struct is
 >         assumed to be the description of the font and is inserted into
 >         FontInformation. This works because of the changes implemented in the
 >         next item.
 > 
 > 2. Description: Whenever there is a change in font position (x font i FN), the
 >         description file for the font must be read again.
 > 
 >    Change: Keeps the FontInformation table static, i.e. once a description
 >         file is read, it would not be read again. Add an intermediate array
 >         called RealPosition between FontPosition and FontInformation to serve
 >         as a redirection table. The RealPosition array contains the position of
 >         each font in FontInformation. When a change in font position is
 >         required, look up the entry in RealPosition that corresponds to the
 >         font, and point the entry in FontPoisition to that position. To cut
 >         down the overhead somewhat, a new global variable, realposition, is
 >         added which essentially replace the function of the global variable,
 >         font.
 > 
 > 3. Other minor changes include: filled in some entries of the various _chtab
 >    arrays so that we get less of the "Unknown input character ???" messages.
 >    For those symbols not in the X11 adobe fonts, used something that looks
 >    similar. Added a line in ShowPage so that when it is skipping ahead, for
 >    example from a command "go to page 10", it will actually display "Skipping
 >    Page i" for EACH of the intervening pages.
 > 
 >
 > 4.  Description: Because xlsfonts is case-insensitive, the current xtroff
 >         implementation changes all troff font names to lower case. This
 >         causes problems when ther are font names that contains both lower
 >         and upper case.  For example, at our site, we have the following
 >         imagen fonts specified in the DESC.out file:
 >         R,I,B,Rs,Bi,TT,SC,sR,sI,sB,m,S,SY,SB. The last three are special
 >         fonts. sB and SB would both be mapped to sb and causes problem.
 > 
 >    Fix: Do not change the case of the font names recorded in the Typesetter
 >         font table. When searching for the font bits using xlsfonts, maps
 >         each upper case letter to the character '#' followed by the
 >         corresponding lower case letter. So, e.g. size 10 of the font sB
 >         would correspond to the X font "devip.s#b.10.120", while size 10 of
 >         font SB is "devip.#s#b.10.120".

- remember location BEFORE the pN command to make Print Page and Print
  Document easier, save current font positions in memory when trofftype
  is berkeley (see Yuan's 1st fix) so that this fix doesn't mess up
  non-berkeley ditroffs

moraes@cs.toronto.edu (Mark Moraes) (06/08/91)

Two warnings:

- the tests/dotests script uses "troff" to process some of the tests.
Those who don't call ditroff on their systems will have to change this
for the tests to run.

- if you get a lot of complaints about missing special characters or
some of the tests look weird, please make sure you don't have a devX11
file from an older version of xtroff kicking around.  Try -F /dev/null
or something for testing, remove devX11 when you install it.

	Mark.