I believe I have all the correct versions of the software at hand and installed (v. 2.5 of microtype and .9998 of XeTeX) to get protrusion to work with XeTeX on my Ubuntu system but I keep getting an error when compiling. Here's the MWE:


But when I attempt to compile with xelatex microtest.tex I get:

This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012/Debian)
restricted \write18 enabled.
entering extended mode
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation,     lo
Document Class: book 2007/10/19 v1.4h Standard LaTeX document class

! LaTeX Error: File `microtype-xetex.def' not found.

I have microtype-xetex.def installed in /usr/share/texlive/texmf-dist-tex/latex/microtype:

letterspace.sty       mt-bch.cfg        mt-eus.cfg               mt-ppl.cfg
microtype.cfg         mt-blg.cfg        mt-LatinModernRoman.cfg  mt-ptm.cfg
microtype.lua         mt-CharisSIL.cfg  mt-msa.cfg               mt-ugm.cfg
microtype-luatex.def  mt-cmr.cfg        mt-msb.cfg               mt-zpeu.cfg
microtype-pdftex.def  mt-euf.cfg        mt-mvs.cfg
microtype.sty         mt-eur.cfg        mt-pad.cfg
microtype-xetex.def   mt-euroitc.cfg    mt-pmn.cfg

I've copied those files over to other spots but I keep getting the same error. Is there perhaps some kind of install script I was supposed to run or compile? All I did was copy the extracted files I downloaded to this directory (replacing the microtype files that were already there).

  • 3
    Welcome to TeX.sx! Did you issue sudo texhash?
    – egreg
    Feb 9, 2013 at 23:11
  • That was it exactly. I had no idea. Thank you very much.
    – bfootdav
    Feb 9, 2013 at 23:15
  • @bfootdav how did you install microtype v 2.5? Mar 28, 2013 at 23:08

1 Answer 1


The TeX systems relies on a cache for finding files, in order to reduce search time in its huge directories.

The main trees all have at their top level a file named ls-R that contains a tree representation of the subdirectories and their contents.

When a new file is installed in a directory in the main tree, the cache needs to be updated by

sudo texhash

However, it's not a good idea to modify the directories in the main tree because they might be restored during an update and you'd end up with an unstable TeX system.

All TeX distributions maintain a "local" tree, which you can find the location of with the shell command

kpsewhich -var-value TEXMFLOCAL

On my machine it is


You can create the relevant subtree with

sudo mkdir -p $(kpsewhich -var-value TEXMFLOCAL)/tex/latex/microtype

and then copy the files belonging to the microtype package in the created directory by

sudo cp * $(kpsewhich -var-value TEXMFLOCAL)/tex/latex/microtype

assuming you are in a work directory containing the downloaded file. A new

sudo texhash

will enable you to work with microtype version 2.5 without touching the original, since the "local" tree is looked at before the main tree.

  • Thank you for the explanation. I have now installed the microtype package in the appropriate local directory and everything is working perfectly.
    – bfootdav
    Feb 9, 2013 at 23:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .