9

The following code

\documentclass{article}

\usepackage{amsmath}
\usepackage[lite]{mtpro2}

\begin{document}

\morphedbraces

\begin{equation*}
  \left\{ \right\} \left\{ \vbox to 20pt{} \right\} \left\{ \vbox to 30pt{} \right\}
  \left\{ \vbox to 40pt{} \right\}
\end{equation*}    
\end{document}

gives me this:

Bug in MathTime Pro2

The bug is triggered by \morphedbraces (uncomment it, and everything is fine).

Is there a way to fix this?

Update

PcTex finally confirmed that this is a bug. Some updated files did not make it into their package. Updated packages will be posted on their website soon.

mafp
  • 19,096
  • 5
    Since you know it is a bug, you should report it to the package maintainer. It was agreed (link) that bug reports are not so good questions for this site. – yo' Dec 18 '12 at 15:42
  • @tohecz This is more of Case 3 that is discussed in the answer you linked, i.e., I am asking for a workaround. – mafp Dec 18 '12 at 15:48
  • What is the version of your package? The one on CTAN specifically mentions fixing such a bug :\ProvidesPackage{mtpro2} [2009/4/27 v2.3 MathTimePro II - added arc accents MathTimePro II - fixed rbrace problem with straightbraces and morphedbraces options – Andrew Swann Dec 18 '12 at 16:01
  • @AndrewSwann This is exactly the version I have. – mafp Dec 18 '12 at 16:03
  • @mafp I changed the title; you ask for a workaround, don't you? Maybe it all reduces to a language problem. But I recommend avoiding "want": nobody here is paid for giving help. – egreg Dec 18 '12 at 19:03
  • @AndrewSwann The problem was apparently fixed in the package (.sty), but not in the metric file. :( – egreg Dec 18 '12 at 19:05
  • @egreg You are right, I did not mean "want" as in "to demand", but as in "to wish", or "to need". Sorry if someone understood that differently. – mafp Dec 18 '12 at 19:35
  • @Speravir I did so. A fix is a workaround, right? Next time, read more carefully ;-) – mafp Dec 19 '12 at 01:22

1 Answers1

14

There are a couple of problems in the metric file used for the extended symbols, mt2exa.tfm. A NEXTLARGER command points to an incorrect character and another one is missing.

So this is definitely a bug; please, report it to the maintainers of the MTPro package and remember to announce when the bug is solved by adding the information to your question.

Workaround

If you are on a Unix system, create a work directory, say ~/fixmt2; I assume a Bash shell.

cd ~/fixmt2
tftopl mt2exa > mt2exa.pl
nano mt2exa.pl

(use the editor you wish, instead of nano)

Find the string CHARACTER O 266 and change

(CHARACTER O 266
   (CHARWD R 0.646)
   (CHARHT R 0.6615)
   )

into

(CHARACTER O 266
   (CHARWD R 0.646)
   (CHARHT R 0.6615)
   (NEXTLARGER O 270)
   )

In the next entry

(CHARACTER O 267
   (CHARWD R 0.646)
   (CHARHT R 0.6615)
   (NEXTLARGER O 270)
   )

change 270 into 271 to obtain

(CHARACTER O 267
   (CHARWD R 0.646)
   (CHARHT R 0.6615)
   (NEXTLARGER O 271)
   )

Save the file and exit the text editor. Now run the shell command

kpsewhich mt2exa.tfm

that will answer something like

/usr/local/texlive/2012/../texmf-local/fonts/tfm/pctex/mtpro2/mt2exa.tfm

Issue

sudo mv /usr/local/texlive/2012/../texmf-local/fonts/tfm/pctex/mtpro2/mt2exa.tfm{,~}

so as to save a copy of the old tfm file (use the location you get for the file). Then do

pltotf mt2exa

and

sudo mv mt2exa.tfm /usr/local/texlive/2012/../texmf-local/fonts/tfm/pctex/mtpro2/

Now, running your file through LaTeX should give

enter image description here

egreg
  • 1,121,712
  • 4
    Wow, this is a remarkably good fix! I've never used the morphedbraces option of the mtpro2 package before, but I've run your fix/workaround on my copy of the package, just so that I have it handy if and when I have a need for this option. – Mico Dec 18 '12 at 19:11
  • Great solution! Works perfectly. I sent a message to PCTex, informing them about the problem (and including a link back here to sx.tx). – mafp Dec 18 '12 at 20:27
  • has anyone mailed pctex, inc? a link to this answer would probably help them to get the package mended rather quickly. – wasteofspace Dec 19 '12 at 11:46
  • @wasteofspace: mafp did and has already got a response, see the edit in the question. About CTAN they seem to have said nothing. – Speravir Dec 21 '12 at 23:09