I'm trying to get a minimal LaTeX working inside a Docker container to support some documentation generation. Currently this is what I have going:

RUN wget -qO- "https://github.com/yihui/tinytex/raw/master/tools/install-unx.sh" | sh
ENV PATH "$PATH:/root/.TinyTeX/bin/x86_64-linux"
RUN tlmgr install standalone preview ucs was newtx fontaxes xcolor dvisvgm psnfss symbol

Whenever I try to compile a document, I get the error message:

Font TS1/ntxtlf/m/n/12=ts1-qtmr at 12.0pt not loadable: Metric (TFM) file not found

Here's one example document. This is generated by a tool (m.css), which is why it's using way more packages than it needs to. Modifying the docker environment is easy, but modifying the actual document is very difficult.




Note that my end goal here is to get the smallest Docker image that works to compile documents similar to that. Yes, I can apt-get install texlive-full and everything will work, but I'd rather figure out the minimal set of fonts and packages needed.

More generally, is there a way to go from that error message to the name of the package I need and/or the fonts that are missing? TS1/ntxtlf/m/n/12=ts1-qtmr isn't very googleable.

1 Answer 1


TeX can not find ts1-qtmr.tfm

If you issue the command

tlmgr info ts1-qtmr.tfm

then amongst other things it reports

Packages containing files matching `ts1-qtmr.tfm':


  tlmgr install tex-gyre

would move things along.

  • Thanks! So basically take the last part of the message (12=ts1-qtmr), cut off the font size, add .tfm, then search that with tlmgr info? Is that a good general way to find the fonts? Mar 7, 2019 at 19:52
  • @RobertFraser it's a good way to find anything tex related, if you had \usepackage{wibble} and tex said it couldn't find wibble.sty then tlmgr info wibble.sty would reveal what texlive package contains that latex package. Mar 7, 2019 at 20:55
  • you don't need to add .tfm specifically, to see related entries including the target you could tlmgr info ts1-qtmr and also get the adjoining info for when you specify italics e.g. both texmf-dist/fonts/tfm/public/tex-gyre/ts1-qtmri.tfm and non italic forms are in tex-gyre beware do not shorten to ts1 there are hundreds for example try tlmgr info ts1-qtm
    – user170109
    Mar 7, 2019 at 22:30

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.