2

I'm using Tex Live on Linux (Ubuntu). I have the MathTime Pro 2 (lite version) fonts installed, using the script I found here. I always used them with tex, pdftex or xetex and they worked correctly. But now, after switching to luatex (because I need some luatex specific features), I'm encountering some problems. Consider the following TeX file:

\input amstex
\input mtp2

$$\left(\matrix1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\0&0&0&1&0\\0&0&0&0&1\endmatrix\right)$$
$$\PARENS{\matrix1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\0&0&0&1&0\\0&0&0&0&1\endmatrix}$$

\bye

Typesetting with tex, pdftex or xetex I obtain

enter image description here

If I use luatex, instead I get

enter image description here

The same problem happens with the square root sign. What's going wrong? How can I properly use mtp2 with luatex?

User
  • 2,530
  • 1
  • 14
  • 25
  • 1
    probably related http://tex.stackexchange.com/questions/232109/lualatex-and-large-braces-with-mathtime-professional-2/232140#232140 – Ulrike Fischer Nov 01 '15 at 20:13
  • @UlrikeFischer Yes, it is the same problem! (Except the fact that here I'm using the plain format and there they use the latex format.) – User Nov 01 '15 at 20:22
  • 1
    wow you are using amstex still? :-) – David Carlisle Nov 01 '15 at 21:23
  • @David Carlisle. What's wrong with amstex? :) Is there a better macro set for mathematical typesetting compatible with plain tex? – User Nov 02 '15 at 16:51
  • Nothing exactly wrong, just rather unusual:-) essentially no one, not even the ams, have used it for decades (I think the ams use it internally for a few things, but not for author submissions) since plain tex is "basic macros" ie appendix B of the texbook for educational use, most people who are making documents use a format designed for document production, such as context or latex rather than plain. – David Carlisle Nov 02 '15 at 17:00
  • @David Carlisle. Doesn't the ams even use the amsmath latex package? Isn't it a port to latex of amstex? Yes, plain tex is "basic macros", but on top of it one can use more sophisticated macros, such as the ones in opmac.tex. This way one can have almost all the functionality he needs for document typesetting, without loosing the simplicity and power of the plain format. (At least, this is my modest opinion.) – User Nov 03 '15 at 15:13
  • 1
    @User Yes sure, of course they use amsmath. It is only loosely a port: the basic ideas came from amstex last century and it has been separately maintained since then, there is hardly any recognisable code in common now as amsmath is written to fit with latex font handling. As for using plain for real documents as opposed to small excercises, you are of course free to an opinion:-) – David Carlisle Nov 03 '15 at 15:47

1 Answers1

4

The same patch I proposed for the LuaLaTeX problem (LuaLatex and large braces with MathTime Professional 2) seems to give good results:

\input amstex
\input mtp2

\catcode`@=11
\def\PEX@#1{\setbox\Pbox@\vbox{$$\left.\vcenter{\copy\prePbox@}\right)$$}%
 \setbox\Pbox@\vbox{\unvbox\Pbox@\unskip\unpenalty
 \setbox\Pbox@\lastbox
 \setbox\Pbox@\hbox{\unhbox\Pbox@\setbox\Pbox@\lastbox
 \setbox\Pbox@\hbox{\unhbox\Pbox@\setbox\Pbox@\lastbox
 \setbox\z@\hbox{#1}%
 \ifdim\ht\Pbox@>\dp\z@\global\PEX@true\else
 \global\PEX@false\fi}}}}
\catcode`@=12

$$\left(\matrix1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\0&0&0&1&0\\0&0&0&0&1\endmatrix\right)$$
$$\PARENS{\matrix1&0&0&0&0\\0&1&0&0&0\\0&0&1&0&0\\0&0&0&1&0\\0&0&0&0&1\endmatrix}$$

\bye

enter image description here

egreg
  • 1,121,712