Tx · LaTeX & TikZ

Fix “Font TU/lmr/m/n/10 … not loadable” in LaTeX

Published By the 9to5Science editorial team

At a glance

  1. 1. Check the engine

    The TU encoding usually indicates XeLaTeX or LuaLaTeX, often with fontspec.

  2. 2. Install Latin Modern

    Install the Latin Modern fonts and TeX files through your TeX distribution’s package manager.

  3. 3. Set the font appropriately

    Use fontspec with Unicode engines, or lmodern with pdfLaTeX; avoid mixing engine-specific font setup.

  4. 4. Refresh and test

    Update the font database if needed, then compile a minimal document to isolate the problem.

Advertisement

The message Font TU/lmr/m/n/10=[lmroman10-regular]:+tlig; at 10pt not loadable means LaTeX tried to select a Latin Modern Roman font and could not load it. The font name and TU encoding usually point to a document compiled with XeLaTeX or LuaLaTeX, often using fontspec.

In most cases, the fix is to install or repair the Latin Modern fonts in your TeX distribution and use the font setup appropriate for your engine.

What the message means

lmr is LaTeX’s abbreviation for Latin Modern Roman. The TU encoding is commonly used for Unicode fonts with XeLaTeX and LuaLaTeX. The +tlig part refers to TeX-style ligatures, a font feature that may be requested by fontspec.

The error does not usually mean that you need to download a file named exactly lmroman10-regular. That is an internal font name. The font files and TeX support files are normally installed as part of the Latin Modern package.

Install Latin Modern

Use the package manager for the TeX system that runs your document:

  • TeX Live: install the lm package. On Debian- or Ubuntu-based systems, the relevant TeX package is commonly named lmodern; use your distribution’s package manager if you installed TeX through the operating system.
  • MiKTeX: open MiKTeX Console and install or update the lm package. If automatic package installation is enabled, MiKTeX may offer to install it when you compile.
  • Overleaf: Latin Modern is normally available. If the error occurs there, check the selected compiler and any font declarations in the project before changing system fonts.

Names can differ between TeX distributions and operating-system packages. Install the package through the same TeX installation that your editor or build command uses; having fonts installed for a different TeX installation may not help.

Use the setup for your compiler

XeLaTeX or LuaLaTeX

For Unicode engines, load fontspec and select the font by its family name:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}

\begin{document}
Latin Modern Roman should load here.
\end{document}

Compile this example with XeLaTeX or LuaLaTeX, not pdfLaTeX. If it produces the same error, the problem is likely the installation or font lookup rather than the rest of your document.

pdfLaTeX

For pdfLaTeX, use the traditional font packages instead:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\begin{document}
Latin Modern should load here.
\end{document}

Compile this example with pdfLaTeX. The fontspec package is not for pdfLaTeX; it requires XeLaTeX or LuaLaTeX.

If installation did not fix it

First confirm which engine your editor actually runs. A project configured for XeLaTeX may still be launched with pdfLaTeX by a command-line build, or vice versa. Check the compiler setting and the first lines of the build log.

Then update the TeX filename database or font cache if your installation requires it. With TeX Live, mktexlsr refreshes the TeX filename database. For LuaLaTeX, refreshing the luaotfload font database can also help; the command is commonly luaotfload-tool --update. Run these tools for the TeX installation used to compile the file. On a managed service such as Overleaf, you generally cannot run these commands yourself.

If the minimal example compiles but your document does not, temporarily remove custom font declarations and font-related packages, then add them back one at a time. Look especially for \setmainfont, \newfontfamily, or packages that change the text font. This helps identify a conflicting font name or feature option.

Common mistakes

  • Mixing font setups: fontspec is for XeLaTeX and LuaLaTeX; fontenc and lmodern are common choices for pdfLaTeX.
  • Installing fonts in the wrong TeX installation: an editor may use a different TeX Live or MiKTeX installation from the one you updated.
  • Treating the internal name as a filename: install the Latin Modern package rather than searching for a standalone file called lmroman10-regular.
  • Changing unrelated document settings: options such as paper size or font size do not fix a missing font file.

If the error persists after installing Latin Modern and verifying the compiler, use the complete log to check which font loader is failing and whether another package or font declaration is selecting the unavailable font.

References

  1. The fontspec package documentation
  2. The Latin Modern fonts package

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.