[tex-k] mktexpk and Knuth

Karl Berry karl at freefriends.org
Wed Apr 27 00:07:20 CEST 2005

Knuth also sent the following report (to the TUG board) regarding dvips
-D being used without -mode and resulting painfully obscure error
message (for which I think I may take the original blame :).

As it happens, Thomas added a definition for 1200 in mktexpk at my
request, since we use that resolution for TUGboat.  That's fine, but of
course the basic problem remains.

As I recall, the reason I said the vague "a config file" is that the
mode can be set in several ways, and different ways might be best in
different circumstances:
- the -mode option on the command line
- config.ps in the local directory with the document,
- or ~/.dvipsrc
- or set the DVIPSRC environment variable to an arbitrary filename
(any others?)

I can easily amend the dvips documentation to make this clearer, and the
error message could include a resulting url.

That's fine, however, going beyond that, I wonder about mktexpk simply
synthesizing an smode with the right resolution, at least if the
requested dpi is >600, and using that (along with a warning), instead of
forcing the user to figure out what to do -- which, as we see here, is
not trivial (and is very annoying).  At high resolutions, the mode makes
little difference, and anyone who really needs the right mode will
presumably get to the point of setting it up anyway.

The synthesized mode would set the generic blacker = fillin = 0 and
o_correction = 1.

Thomas, Olaf, anyone else, wdyt?


Date: Fri, 1 Apr 2005 22:38:14 -0800
Subject: note from Don Knuth


Here's why I'm writing: Standard TeX installations come with
the program "mktexpk", which has a list of standard resolutions
for which the user doesn't need to supply a mode hint.

When making new versions of The Art of Computer Programming last
year, I found that the old Linotronic typesetters (resolution 1270
or 2540 dpi) are now typically replaced in the printing industry
by machines with resolution 1200 or 2400 dpi. But when I say
  dvips -D1200 foo
I get the message
  "Can't guess mode for 1200 dpi devices.
   Use a config file, or update me."

The message comes from the program/script "mktexpk", which has a
list of common resolutions and corresponding modes. If the requested
resolution doesn't appear on that list, you get the message above.

Obviously the message is not especially user-friendly. [It tells
me to use a "config file"; but after an hour of searching I'm
unable to figure out what I should put into texmf.cnf or config.ps
or any other arcane "config file" so that I can get a 1200 dpi
device added to the list of known resolutions. It also says
"or update me"; but the file is write-protected and most users
won't have the knowledge or the password allowing them to change it.]

I did update my copy of mktexpk, but I suggest that in future
distributions the additional line
  1200) MODE=cgnszz;;
be added in the obvious place. [And that a more helpful message
be given.]

Cordially, Don Knuth

More information about the tex-k mailing list