4

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?

Speravir
  • 19,491
Gal
  • 177
  • 1
    Will http://www.tug.org/fonts/fontinstall.html be useful? –  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 00: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 00: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 00: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 01:04
  • @Speravir I don't really know if it's related but in the MiKTeX options under the tab Formats, there are all sorts of keys, including metafonts. – Gal Nov 11 '12 at 01:44
  • I know, as long as in the row “Attributes” for the line “Metafonts” there is an empty entry, i.e. not an “exclude”, everything is fine. – Speravir Nov 11 '12 at 02:55

1 Answers1

3

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.

Speravir
  • 19,491
  • 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 01: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 03:07
  • @Gal: See my edit, how to deal with the .dtx and .ins file. – Speravir Nov 11 '12 at 03: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 06: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
  • @speravir: "the" is not the word -- there are 2 yhmath.zip files on ctan. the distributions (including miktex, fwiw) seem to get this right, taking the font stuff from ctan:fonts/ymath/ and macros from ctan:macros/latex/contrib/yhmath; it's the latter that contains the .dtx and .ins files. this situation isn't great, but it's what the author sent us (on two separate dates). there is, i agree, some value in rationalising this situation, but there's the tiresome shortage of hours in the day. (and i've two macro programming jobs in backlog, too.) – wasteofspace Nov 29 '12 at 00:20
  • @wasteofspace: (misusing the comment system) Please see yrcmex10 problem AFTER December 5, 2012. The file yrcmex10.mf is NOT part of both ZIP files and is NOT created on compiling the yhmath.ins. Could you add this manually from the packed TeX Live file http://mirror.ctan.org/systems/texlive/tlnet/archive/yhmath.tar.xz , where it belongs, to the other MF font files, please? And in the respective ZIP file, as well? – Speravir Dec 15 '12 at 22:30