TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. – Kurt Nov 10 '12 at 23:10
Will tug.org/fonts/fontinstall.html be useful? – Harish Kumar Nov 10 '12 at 23:36
What exactly is the problem? In the documentations is something said to install the font. You have to change the map file. Then don't forget with MiKTeX to refresh the file name data base (Start-MikTeX-Maintanance-Settings-General-Refresh FNDB). – Kurt Nov 10 '12 at 23:42
@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
up vote 3 down vote accepted

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.

share|improve this answer
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
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 posting your answer, you agree to the privacy policy and terms of service.

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