[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug fix for mathtime.sty version 2 (1995/03/07)



We are in the final days of completing the typesetting of a complex
book, and this morning, I uncovered, and fixed, an error in
mathtime.sty, version 2 (1995/03/07), which is present in the June
1996 LaTeX2e distribution as

% ls -l latex2e/unpacked/mathtime.sty
-rw-rw-r--   1 beebe        8320 Dec 19  1995 latex2e/unpacked/mathtime.sty

The error appears in an earlier version of this file on our system too
(the one that came with the original version of the MathTime purchased
from Y&Y in October 1992).

Briefly, a couple of days ago, I switched from times.sty to
mathtime.sty, and was surprised to see a number of new overfull boxes
appear.  While fixing them this morning, I noticed that a line that
was previously correct was now overfull, and the cause appeared to be
an initial \boldmath $D$.  In the previous printing of the book with
times.sty, that D began the line; with mathtime.sty, it was preceded
by a small amount of space, which caused the line to be overfull.

Examination of mathtime.sty revealed the problem:  it says

\def\boldmath{\@nomath\unboldmath
...
\mathcode`\+="202B
  \mathversion{bold}
}

Notice that there is a missing percent on the last item in the
definition, which results in \boldmath getting a single space into the
end of its definition.

I've changed my personal copy of mathtime.sty (known as xmathtime.sty)
to read

\def\boldmath{\@nomath\unboldmath
...
\mathcode`\+="202B
\mathversion{bold}%
}

A similar error appears in the definition of \unboldmath:

\def\unboldmath{\@nomath\boldmath
...
\mathcode`\+="2243
  \mathversion{normal}
}

This should be changed to 

\def\unboldmath{\@nomath\boldmath
...
\mathcode`\+="2243
\mathversion{normal}%
}

Here is a small test file to demonstrate the error:

% -*-latex-*-
\documentclass[]{article}
\usepackage{mathtime}
\def\slug{\vrule width 3pt depth 0pt height 10pt}
\begin{document}
\slug\boldmath $D$\slug
\end{document}

The output of dv2dt on the .dvi file from this file says:

...
sr 655360 196608
r3 163840
fd1 18 10421504624 655360 655360 0 7 'cmmib10'
,,,

When I change mathtime to xmathtime (my patched version) in this test
file, and run LaTeX2e again, dv2dt then produces

...
sr 655360 196608
fd1 18 10421504624 655360 655360 0 7 'cmmib10'
...

The unwanted move-right command, r3 163840, has disappeared.

========================================================================
Nelson H. F. Beebe                  Tel: +1 801 581 5254
Center for Scientific Computing     FAX: +1 801 581 4148
Department of Mathematics, 105 JWB  Internet: beebe@math.utah.edu
University of Utah                  URL: http://www.math.utah.edu/~beebe
Salt Lake City, UT 84112, USA
========================================================================