I'd like to use the yhmath package (pdf documentation), but it requires the installation of new fonts. This is beyond my knowledge level, and I'd really appreciate some help.

I downloaded the CTAN files as zip, and also installed the package through the package manager on MiKTeX, but I don't know how to proceed to install the fonts required for the package.

MiKTeX 2.9 with pdflatex on Windows 7 64-bit

EDIT: Following Harish Kumar's link, and Speravir's advise; I created a new directory localtexmf and copied the .vf file to the folder suggested by Speravir. I did the same for the .pfa file. Then I added localtexmf to the Roots in the MiKTeX options, and refreshed the FNDB (as well as updated formats). However, when I run my code I still get the warning "Font shape 'OMX/yhex/m/n' undefined." Speravir suggested that it's a bug with MiKTeX, but is there a way to get around that in the meantime?

  • 1
    Will tug.org/fonts/fontinstall.html be useful? – user11232 Nov 10 '12 at 23:36
  • @HarishKumar: Without typo: mpm --install=yhmath (@Gal: That’s the command line call for the package installation). – Speravir Nov 11 '12 at 0:08
  • @HarishKumar mpm --instal=yhmath just prints that the package is already installed (I installed the package through the package manager earlier). My code doesn't produce any errors, just the warning message that a font shape is undefined... – Gal Nov 11 '12 at 0:32
  • @Gal: If yhmathalready was installed, it is strange then, that the font files aren’t installed (I don’t speak about the missing font file OMXyhex.fd). Regarding your edit: The file yhcmex10.tfm belongs to <localtexmf\fonts\tfm\public\yhmath and yhcmex10.vf to <localtexmf>\fonts\vf\public\yhmath. But the missing file has the extension .fd, and in my answer you can read, how to get around. – Speravir Nov 11 '12 at 0:54
  • I noticed just now, that in MiKTeX all MetaFont files are missing, too! I will edit my answer in a moment. – Speravir Nov 11 '12 at 1:04

Update: The following is obsolete. The missing file OMXyhex.fd was added on MiKTeX update from Dec 5 2012.

Actually I must confess, that “yhmath” works with some issues (see MikTeX 2.9 can not find font yrcmex10 of yhmath package). I also noticed, that on CTAN there are two yhmath.zip! The OP downloaded the other compared to me (link see below), and this is the one used in MiKTeX. So the problem seems to be a bug in yhmath!

I let stand the following for reference reasons.

I would consider the missing font file OMXyhex.fd and the missing whole bunch of MetaFont files as a bug. It should be filed in the MiKTeX bug tracker.

All other files are installed in a full MiKTeX installation. You can get them with the Package Manager. Compared with my TeX Live installation in MiKTeX the type1 file is called yhcmex.pfa, in TeX Live it is yhcmex.pfb, but these are only variants, cf. https://en.wikipedia.org/wiki/PostScript_fonts.

If you downloaded the source files in the ZIP file (link: http://mirror.ctan.org/macros/latex/contrib/yhmath.zip), you must extract first into a temporary folder and then execute tex yhmath.inson the command line:

C:\tempfolder\yhmath>tex yhmath.ins

which creates amongst some auxiliary files the font files, optionally followed by latex yhmath.dtx, which creates the documentation.

You could temporarily Create a local texmf tree in MiKTeX and put the virtual font file OMXyhex.fd into the folder <localtexmf>\tex\latex\yhmath. The MetaFont files with extension .mf belong into <localtexmf>\source\latex\yhmath\.

For further action see MikTeX 2.9 can not find font yrcmex10 of yhmath package.

  • localtexmf\fonts now has the three directories your indicated (type1, source, tfm, vf) with source->empty; tfm->yhcmex10, yrcmex10; type1->yhcmex.pfa; vf->yhcmex.vf; in the appropriate subfolders. In addition, I have \localtexmf\tex\... with the yhcmex.vf file. However, I don't have any other type of files except .ins and the .sty for the package (see CTAN). I'm still getting the same warning message. – Gal Nov 11 '12 at 1:34
  • Gal, the best is: Make an uninstall of yhmath, straightly followed by an re-installation. But because of the missing files it won't work. – Speravir Nov 11 '12 at 3:07
  • @Gal: See my edit, how to deal with the .dtx and .ins file. – Speravir Nov 11 '12 at 3:21
  • I uninstalled and then ran the .ins file, however I get error message "Cannot find yhmath.dtx ". If this is an insurmountable difficulty, it might be time to throw the towel. I'd really like to use yhmath, but in the meantime I'm making do with mtpro-lite... – Gal Nov 11 '12 at 6:35
  • 1
    If you’ve downloaded the yhmath.zip, then there must exist the yhmath.dtx! But anyway: For “MtPro Lite” see How to install MathTime Pro 2 fonts on MikTeX, though the description contains redundant points. – Speravir Nov 11 '12 at 15:22

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.