[comp.text.tex] Letter.sty and the new font selection scheme

gustav@tharr.UUCP (Paul Moore) (11/26/90)

I remember hearing somewhere that "letter.sty" did not work correctly
under the new Mittelbach & Schopf font selection scheme. Unfortunately,
I can neither remember what the problem was, nor how to fix it. I have,
however, managed to get errors which I assume are caused by this.

Specifically, the following document (I know it's not the right way to
use the letter style, but it demonstrates the problem...) fails to work,
with the attached log as a result.

------------------------------ test.tex ------------------------------
\documentstyle{letter} % Currently, LaTeX has oldlfont as the default...
\begin{document}
This is a {\bf test} of ``oldlfont.sty''.
\end{document}

------------------------------ test.log ------------------------------
[...]
LaTeX error.  See LaTeX manual for explanation.
              Type  H <return>  for immediate help.
! Can be used only in preamble.
\@latexerr ...mmediate help.}\errmessage {#1}
                                             
\mathbf ->\set@alpha 
                     \mathbf \@tempc \mv@normal \@tempe \@tempc \mv@bold \@t...
l.3 This is a {\bf
                   test} of ``oldlfont.sty''.
[...]

----------------------------------------------------------------------

Change the "letter" to "article" makes things work fine. So it appears
that \bf (and presumably other such, like \tt...) does not work with
letter.sty.

Could some kind soul post the required changes to letter.sty to make it
work properly (or explain what the problem is, and why it can't be
solved)?

Many thanks,
Gustav.
-- 
------------------------------------------------------------------------------
Really: Paul Moore, 10, Mulberry Rise, Firdale Park, Northwich, ENGLAND
E-Mail: pmoore@cix.compulink.co.uk (better than my tharr address given above)
"I hadda documentation once, but I drink a big-a glass of warm-a salty water
 anna it went away like-a dat" (Duke Leonardi, Cerebus 'Church & State')
------------------------------------------------------------------------------
    <-- tharr *free* public access to Usenet in the UK 0234 261804 -->

ajcd@cs.edinburgh.ac.uk (Angus Duggan) (11/27/90)

In article <1452@tharr.UUCP>, gustav@tharr.UUCP (Paul Moore) writes:
> I remember hearing somewhere that "letter.sty" did not work correctly
> under the new Mittelbach & Schopf font selection scheme. Unfortunately,
> I can neither remember what the problem was, nor how to fix it. I have,
> however, managed to get errors which I assume are caused by this.
... 
> Could some kind soul post the required changes to letter.sty to make it
> work properly (or explain what the problem is, and why it can't be
> solved)?

The problem with letter.sty is that it re-defines \document (called by
\begin{document}). The new font selection scheme also re-defines \document, but
the letter style change overrides this definition. Here is a patch which
should fix the problem:

*** OldTeX/TeX82/tex82/LaTeX/LaTeXmacros/letter.sty	Fri Feb 26 22:57:43 1988
--- TeX3.0/inputs/letter.sty	Wed Aug 15 18:47:05 1990
***************
*** 202,221 ****
  \def\fromlocation{}
  \def\telephone#1{\def\telephonenum{#1}}
  \def\telephonenum{}
  \def\document{\endgroup
!  \@colht\textheight \@colroom\textheight \vsize\textheight
!  \columnwidth\textwidth \@clubpenalty\clubpenalty
!  \if@twocolumn \advance\columnwidth -\columnsep 
!  \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue 
!  \fi
!  \hsize\columnwidth \linewidth\hsize
!  \begingroup\@floatplacement\@dblfloatplacement\endgroup
!  \if@filesw \immediate\openout\@mainaux=\jobname.aux
!  \immediate\write\@mainaux{\string\startlabels\string\@startlabels}\fi
!  \def\do##1{\let ##1\@notprerr}
!  \@preamblecmds
!  \let\do\noexpand 
!  \@normalsize\everypar{}}
  \def\enddocument{\@checkend{document}\newpage\begingroup 
  \if@filesw \immediate\closeout\@mainaux 
  \makeatletter\input \jobname.aux\clearpage
--- 208,245 ----
  \def\fromlocation{}
  \def\telephone#1{\def\telephonenum{#1}}
  \def\telephonenum{}
+ %\def\document{\endgroup
+ % \@colht\textheight \@colroom\textheight \vsize\textheight
+ % \columnwidth\textwidth \@clubpenalty\clubpenalty
+ % \if@twocolumn \advance\columnwidth -\columnsep 
+ % \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue 
+ % \fi
+ % \hsize\columnwidth \linewidth\hsize
+ % \begingroup\@floatplacement\@dblfloatplacement\endgroup
+ % \if@filesw \immediate\openout\@mainaux=\jobname.aux
+ % \immediate\write\@mainaux{\string\startlabels\string\@startlabels}\fi
+ % \def\do##1{\let ##1\@notprerr}
+ % \@preamblecmds
+ % \let\do\noexpand 
+ % \@normalsize\everypar{}}
+ 
+ % \document for new font selection scheme. AJCD 15 Aug 90.
  \def\document{\endgroup
!   \@colht\textheight  \@colroom\textheight \vsize\textheight
!    \columnwidth\textwidth \@clubpenalty\clubpenalty
!    \if@twocolumn \advance\columnwidth -\columnsep
!       \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue
!    \fi
!   \hsize\columnwidth \linewidth\hsize
!   \begingroup\@floatplacement\@dblfloatplacement\endgroup
!   \if@filesw \immediate\openout\@mainaux=\jobname.aux
!     \immediate\write\@mainaux{\string\startlabels\string\@startlabels}\fi
!   \process@table
!   \def\do##1{\let ##1\@notprerr}%
!   \@preamblecmds
!   \let\do\noexpand
!   \@normalsize\everypar{}}
! 
  \def\enddocument{\@checkend{document}\newpage\begingroup 
  \if@filesw \immediate\closeout\@mainaux 
  \makeatletter\input \jobname.aux\clearpage


> 
> Many thanks,
> Gustav.
> -- 
Nae probs,
        Angus.
-- 
Angus Duggan, Department of Computer Science,	| I'm pink, therefore I'm Spam.
University of Edinburgh, JCMB,			| JANET:  ajcd@uk.ac.ed.lfcs
The King's Buildings, Mayfield Road,		| VOICE:  (UK) 031 650 5126
Edinburgh, EH9 3JZ, Scotland.	| OR:  ajcd%lfcs.ed.ac.uk@nsfnet-relay.ac.uk