Problem: New METAFONT font; installing in a package

Kenneth Beesley <[email protected]> Mon, 7 Apr 2003 22:45:22 +0200
Newsgroups gmane.comp.tex.metafont
Message-ID <[email protected]>
RE:  New METAFONT font; installing it via a package
[involves NFSS, new font encoding, tracing a font-loading problem]
(I'm using TeXShop 1.28 (pdflatex) on a TiBook running OS X 10.2.4. In 
general,
everything is working for me.)

I'm having some difficulty loading my new METAFONT font, called
Desalph, via a _package_.  I'd be very grateful for any help from people
who know NFSS, font encodings, and packages better than I do.

I've tried to write a new package called desalph.sty on the model of
the tipa.sty package that allows you to load and use the International 
Phonetic
Alphabet.  So just as you indicate  \usepackage{tipa}
to be able to use IPA in your documents I want to be able to indicate
\usepackage{desalph}
to use the Deseret Alphabet in my documents.  I've tried to follow the
model of the tipa.sty code as much as possible, but I'm doing something 
slightly
wrong and don't know how to trace it.  It may well have to do with 
loading a new
font encoding.   tipa.sty uses the T3 font encoding, which it loads (in 
tipa.sty) with
a command like

	\RequirePackage[T3, \f@encoding]{fontenc}

(tipa.sty has encoding options that complicate the code.)
This command causes the t3enc.def file to be loaded.  The Deseret 
Alphabet is
a phonemic alphabet for English, so I based the encoding as closely as 
possible
on T3, which allows me to use most of the same inputting shortcuts.  
The  Desalph
font uses my own LDA encoding, defined in ldaenc.def, and my desalph.sty
file has a command

         \RequirePackage[LDA, \f@encoding]{fontenc}

It _may_ be here that something is going wrong.

Here's the runtime behavior.  The start of a typical sample .tex file
looks like this:

\documentclass[a4paper,12pt]{article}

\usepackage[infoshow]{tracefnt}
\usepackage{graphics}
\usepackage{rotating}
\usepackage{alltt}
\usepackage{times}
\usepackage{desalph}
\usepackage{latexsym}

\pagestyle{empty}
\renewcommand{\abstractname}{Document Identification}

\begin{abstract}[Letter: Orson Pratt, Sen. (in SLC) to D.O. Calder (in 
New York City),
1 June 1868.]
\end{abstract}

\begin{document}
....
\end{document}

When I typeset the document using TeXShop (or calling pdflatex 
directly)  the loading of
packages goes well until \usepackage{desalph}, at which time TeXShop 
stops and prints
	!Missing = inserted for \ifnum.
and waits for me to enter Tex Input:

Question:  can anyone help me understand what that means?

Here's the screen display starting from the (successful) loading of 
times.sty

(/usr/local/teTeX/share/texmf.tetex/tex/latex/psnfss/times.sty)
/Users/beesley/Library/texmf/tex/latex/desalph/desalph.sty
(/usr/local/teTeX/share/texmf.tetex/tex/latex/base/fontenc.sty
(/Users/beesley/Library/texmf/tex/latex/desalph/ldaenc.def)
(/usr/local/teTeX/share/texmf/tetex/tex/latex/base/ot1enc.def

LaTeX Font Info:  Redeclaring font encoding OT1 on input line 38.

)))
!Missing = inserted for \ifnum.
<to be read again>
                     -
l.9 \usepackage
                  {latexsym}
?
Tex Input:

It's at this point that TeXShop/pdflatex stops and asks for "TeX 
Input", which I don't
understand.  If I just enter a newline, then it somehow continues to 
load the
package latexsym and prints out

LaTeX Font Info:  Overwriting symbol font 'lasy' in verion 'bold'
(Font)   U/lasy/m/n -->U/lasy/b/n on input line 42.

!LaTeX Error: Missing \begin{document}

at which point it stops again, asking for "TeX Input:"  If I enter 
another newline,
then typesetting continues and my document comes out perfectly.  So 
everything
seems to be working, except that processing always stops twice during 
typesetting,
forcing me to respond with newlines to get it going again.  Very 
annoying.

Here's the information in the .log file.

(/usr/local/teTeX/share/texmf.tetex/tex/latex/psnfss/times.sty
Package: times 2002/09/08 PSNFSS-v9.0a (SPQR)
)
(/Users/beesley/Library/texmf/tex/latex/desalph/desalph.sty
Package: desalph 2003-03-31 DESALPH version 0.2

(/usr/local/teTeX/share/texmf.tetex/tex/latex/base/fontenc.sty
Package: fontenc 2001/06/05 v1.94 Standard LaTeX package

(/Users/beesley/Library/texmf/tex/latex/desalph/ldaenc.def
File: ldaenc.def 2003-03-31 DESALPH font-definition file
)
(/usr/local/teTeX/share/texmf.tetex/tex/latex/base/ot1enc.def
File: ot1enc.def 2001/06/05 v1.94 Standard LaTeX file


LaTeX Font Info:    Redeclaring font encoding OT1 on input line 38.

)))
! Missing = inserted for \ifnum.
<to be read again>
                    -
l.9 \usepackage
                {latexsym}
?

Can anyone give me a clue as to what is going wrong and how to fix it?

Thanking you in anticipation.

Ken
[email protected]