4

I'm writing a new font (in Metafont) and am working on the OMX-encoded math font. I've properly defined the parts of the extensible parentheses and included the fairly straightforward ligature programs for the TFM:

extensible oct"060": oct"060",0,oct"100",oct"102";
extensible oct"061": oct"061",0,oct"101",oct"103";

I'm pretty confident that the TFM file correctly reflects these ligature programs, as shown in the output of tftopl:

(CHARACTER C 0
    (CHARWD R 0.63999)
    (CHARHT R 2.4)
    (CHARDP R 0.800001)
    (VARCHAR
    (TOP C 0)
        (BOT O 100)
        (REP C B)
        )
    )
(CHARACTER C 1
    (CHARWD R 0.63999)
    (CHARHT R 2.4)
    (CHARDP R 0.800001)
    (VARCHAR
        (TOP C 1)
        (BOT C A)
        (REP C C)
        )
    )

I've also written a LaTeX package file that, as far as I can tell from fntguide.pdf, should enable the extensible characters. Follows is a MWE, which isn't really helpful because the font files aren't available, but for whatever it's worth:

\documentclass{article} 
\DeclareMathVersion{drmmath}
\DeclareFontFamily{OMX}{drm}{}
\DeclareFontShape{OMX}{drm}{m}{n}{ <-> drmomx10 }{}
\DeclareSymbolFont{drmmathomx}{OMX}{drm}{m}{n}
\SetSymbolFont{drmmathomx}{drmmath}{OMX}{drm}{m}{n}
\DeclareMathDelimiter{(}{\mathopen}{operators}{"28}
    {drmmathomx}{"00}
\DeclareMathDelimiter{)}{\mathclose}{operators}{"29}
    {drmmathomx}{"01}
\mathversion{drmmath}
\begin{document}

$$\left(\frac{%
    \frac{x^4}{2a\vartheta^{-\gamma}}
    }{\frac{\xi_4^\kappa}{\frac{37\alpha^4 +
    b}{\frac{3}{4}y^a}}}
    \right)$$

$$\left(\frac{2}{3}\right)$$

$$\left(2\right)$$

\end{document}

If I change "drmmathomx" to "largesymbols", the extensions work; however, if I don't, they don't. The glyphs are coming from the proper font; but they're not extending. I've scoured the available literature as best as I could and honestly have no idea what's failing to work here. Any assistance in this esoteric issue would be greatly appreciated.

1
  • 2
    this is just a guess based on long-ago and ill-remembered metafont attempts. i think that "largesymbols" plugs into the extra font parameters that are present only in the "math extension" fonts. if this attribute isn't made clear, the necessary information isn't available to tex to use it. (if someone has a better memory, or time to check the metafont books, please don't hesitate to give a "real" answer.) Jul 15, 2014 at 19:55

1 Answer 1

1

For anyone else who might be struggling with a similar problem, I managed to plumb some other font files and discovered the problem.

It appears that I had everything right, except that in the ligtables for the OMX font I did not instruct Metafont to associate the appropriate symbols together. So the relevant ligtable entries now look like this:

charlist oct"000" : oct"020" : oct"022" : oct"040" : oct"060";
charlist oct"001" : oct"021" : oct"023" : oct"041" : oct"061";
extensible oct"060": oct"060",0,oct"100",oct"102";
extensible oct"061": oct"061",0,oct"101",oct"103";

In the OMX encoding (which I'm duping because...well, because it's what Knuth did, and if it can be bettered I'm not enough of a mathematician to do it), the charlist directives associate the open and close parens together; the extensible directives then tell Metafont what to do when it gets to oct"060" and oct"061", which are the top parts of the extensible parens.

So now it works, and my headache is over. Embarrassed that it was something so ridiculously simple.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.