0

On Kubuntu 22.04, I installed manually the yhmath package. I downloaded the zip file, extracted and ran make in the package. It is now in the directory ~/texmf/tex/latex/yhmath. I ran texhash ~/texmf and it seems that pdflatex finds the style file.

But now the problem is that it says

kpathsea: Running mktextfm yhcmex10
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input yhcmex10
This is METAFONT, Version 2.71828182 (TeX Live 2022/dev/Debian) (preloaded base=mf)

kpathsea: Running mktexmf yhcmex10 ! I can't find file `yhcmex10'. <*> ...four; mag:=1; ; nonstopmode; input yhcmex10

Please type another input file name ! Emergency stop. <*> ...four; mag:=1; ; nonstopmode; input yhcmex10

Transcript written on mfput.log. grep: yhcmex10.log: No such file or directory mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input yhcmex10' failed to make yhcmex10.tfm. kpathsea: Appending font creation commands to missfont.log.

! Font OMX/yhex/m/n/9=yhcmex10 at 9.0pt not loadable: Metric (TFM) file not fou nd. <to be read again> relax l.194 \end{frame}

I see files yhcmex10.tfm and yrcmex10.tfm in the package's directory, but pdflatex doesn't seem to find them. How can I tell pdflatex where these .tfm files are located?

  • Why did you install it by hand? Which LaTeX installation are you using? The one from Debian or upstream? – daleif Sep 07 '23 at 08:22
  • 1
    If you are using the Debian TeXLive, just install texlive-science, there is almost no need to install stuff by hand these days. (I found the package name by using apt-file search yhmath.sty) – daleif Sep 07 '23 at 08:28
  • @daleif Thank you for this answer, it solved my problem punctually. If you post this as an answer, I'll upvote it. However, I leave the question open in case someone knows how to include tex fonts of manually installed packages. It seems that the documentation of basic things is very difficult to find for latex. For example I tried using tlmgr but it complains about my texlive version being too old and I won't try to change it just because of this. – Gribouillis Sep 07 '23 at 08:37
  • Fonts are complicated things, beside a sty there are often tfm, mf, vf, enc and map file that you must copy files into various folders and often you also need to activate a map file. That's why all tex systems offer installation support. Btw; tfm belong info fonts/tfm – Ulrike Fischer Sep 07 '23 at 08:56
  • @UlrikeFischer the yhmath packages contains files with suffix .fd .mf .cmap .tfm .vf .vpl .pfb .drv .dtx .ins .map .sty .600pk. I usually reside in the Python world, where installers have been polished to make package installation super simple, so it is difficult for me to understand why it is different for TeX/LaTeX packages. TeX is almost half a century old! – Gribouillis Sep 07 '23 at 09:39
  • I've found this link , where they try to explain in which directory should each type of file be moved. Clearly, an automated tool should do this, preferably a command line tool. – Gribouillis Sep 07 '23 at 09:55
  • 1
    There is an installer which makes package installation super easy, but you choose not to use it, so stop to complain – Ulrike Fischer Sep 07 '23 at 14:27
  • @UlrikeFischer It is not so, because tlmgr won't work with my Ubuntu texlive package and apt install texlive-science won't work with manual installation of latex packages that are not bundled in Ubuntu packages. I'm not complaining, I just miss a general solution. – Gribouillis Sep 07 '23 at 14:59
  • Unless you've changed it, texhash is irrelevant for your home tex directory. TeX doesn't use a database to find files in TEXMFHOME. – cfr Sep 14 '23 at 03:37
  • There are also extremely good reasons not to install fonts into your home directory. This should be done only in cases where no other option is available because it causes havoc later. – cfr Sep 14 '23 at 03:39
  • @cfr I appreciate your input, however I'm not currently able to understand why it causes havoc. I'll try to explore the documentation about texhash to understand what is relevant or not relevant for. – Gribouillis Sep 14 '23 at 05:20
  • @Gribouillis Please see https://tex.stackexchange.com/q/255709/. – cfr Sep 14 '23 at 11:23

1 Answers1

3

If you are using the texlive from Debian/Ubuntu it is split into many Debian packages. I usually use the tool apt-file to figure out which Debian package provide which programme or file. (remember to run sudo apt-file update once in a while). Here

apt-file search yhmath.sty

Responded that the Debian package/bundle texlive-science provides yhmath.sty then hopefully it also provides all the fonts.

Note that with Debian TeXLive you cannot use tlmgr to install anything! Debian wants you to install stuff through their package system, not via someoneelses.

If you use upstream TeXLive instead. Then you have the full tlmgr which can install package updates for the duration of the support for that particular TeXLive version.

Upstream TeXLive: https://tug.org/texlive/

Note that the Debian TeXLive is often behind on updates.

daleif
  • 54,450