[Tex/LaTex] MikTeX 2.9 can not find font yrcmex10 of yhmath package

fontsinstallingmiktexyhmath

This is a follow-up to Installing fonts for yhmath on MiKTeX 2.9 .

Compiling a document, TeXnicCenter with MiKTeX could not make use of the yrcmex10 font in the yhmath package.

I downloaded yhmath, ran latex yhmath.ins, and created yhmath.map by copying another map file; then I put my files on a root C:\localtexmf, added the root to MiKTeX, edited updmap.cfg, updated maps, refreshed Database; but the tests keep failing.

My root is structured as follows:

\localtexmf\tex\latex\yhmath has yhmath.sty and OMXyhex.fd
\localtexmf\fonts has five subdirectories:

  • \map\dvips\yhmath with yhmath.map
  • \source\public\yhmath with .mf files
  • \tfm\public\yhmath with yhcmex10.tfm and yrcmex10.tfm
  • \type1\public\yhmath with yhcmex.pfa (its name is NOT yhcmex10.pfa)
  • \vf\public\yhmath with yhcmex10.vf

yhmath.map has the only line

yrcmex10 Yhcmex <yhcmex.pfa

Am I wrong somewhere?

Best Answer

Update: Obsolete since Dec 5 2012.


Problem solved.

As yhmath.ins didn't generate any .map file, I previously created yhmath.map with Wordpad, which proved to be a mistake: I only obtained a .txt file named yhmath.map.

So I pasted a file .map whatever into \localtexmf\fonts\map\dvips\yhmath, changed it with Wordpad, saved it being careful not to change its format, and renamed as yhmath.map. Then I ran initexmf --mkmaps, and kpsewhich could find yhmath.map.

Still MikTex couldn't find yrcmex10.tfm.

I eventually discovered that running initexmf --edit-config-file updmap edited updmap.cfg located in \AppData\Roaming\MikTex\2.9\miktx\config\ directory, while I actually wanted to edit the homonym file in \Program Files\MikTex 2.9\miktex\config\. So I copied the file in \AppData\[...] and pasted to \Program Files\[...].

Ran initexmf --mkmaps again. Ran testfont.tex and found the font yrcmex10.tfm was avaliable to MikTex.

There is still a minor issue. Creating a .ps or a .dvi with Texniccenter works fine. A .pdf will contain some wrong characters, due to the fact that the embodied font yhcmex10.tfm is not avaliable to extract.

Here is a Minimal Working Example

\documentclass{report}
\usepackage{yhmath}
\begin{document}
$\wideparen{ab} \widetriangle{ab} \widering{ab}$
\end{document}

example output with MiKTeX and TeX Live

Image added by Speravir