Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical Supply Distributor100,000+ medical supplies. 48-hour critical dispatch.Ships from 8 regional U.S. hubs. Net-30 terms for verified institutional accounts.Shop lac.us CodeCASRAIlac.us

LaTeX microtype Package: Usage, Options and Fixes

The LaTeX microtype package explained: default behaviour, engine support, options, microtypesetup scoping and fixes for common conflicts.

Written and maintained by CASRAI Editorial Board

Last updated

Quick answer: the LaTeX microtype package improves the look of justified text by adding character protrusion, font expansion and optional tracking, kerning and spacing controls. Loading it with \usepackage{microtype} in the preamble is, per the package manual, sufficient in most cases. This page is for researchers who write papers, theses and reports in LaTeX and want to know what the package does, which options matter, which features work in which engine, and why it sometimes misbehaves. The package is not related to the JavaScript project of the same name on GitHub.

What the microtype package is used for in research writing

Thesis and journal templates typically set text justified, which leaves visible gaps or tight lines when a paragraph cannot break cleanly. microtype gives LaTeX the micro-typographic controls described in its user manual (version 3.2d, 2026/03/01): character protrusion (letting punctuation and letter edges hang slightly into the margin so the edge looks straight), font expansion (stretching or shrinking glyphs by a small amount to even out line spacing), tracking (letterspacing), plus kerning and interword-spacing adjustments. It is maintained by Robert Schlicht and distributed under the LaTeX Project Public License 1.3c.

Install or access (official source only)

The package is published on CTAN at ctan.org/pkg/microtype, and the CTAN page lists the current release as 3.2d, dated 2026-03-01. The source repository and bug tracker are at github.com/schlcht/microtype. The manual is at mirrors.ctan.org/macros/latex/contrib/microtype/microtype.pdf.

Step by step: enabling microtype

  1. Load the package. Add \usepackage{microtype} to the preamble. The manual states this is sufficient in most cases.
  2. Load language packages first. If you use babel or polyglossia, load them before microtype.
  3. Compile with a supported engine. Use pdfLaTeX, LuaLaTeX or XeLaTeX (see the engine table below). The DVIoutput option is deprecated; the manual says to call latex or dvilualatex instead.
  4. Adjust only if needed. Pass options when loading, for example \usepackage[protrusion=allmath,tracking=smallcaps]{microtype}, or change them later with \microtypesetup{key=value}.
  5. Check the log file. The package writes information about the settings it applies to the .log file, and problems that are not fatal are reported as warnings.

What loading with no options actually enables

By default protrusion is always enabled. Font expansion is disabled only where the font cannot be expanded automatically: pdfTeX older than 1.20, DVI mode and plain TeX. According to the manual, these three lines are equivalent:

\usepackage{microtype}
\usepackage[protrusion=true,expansion]{microtype}
\usepackage[activate={true,nocompatibility}]{microtype}

The activate option switches protrusion and expansion together. Because the adjustments change how lines are broken, line breaks and page breaks may differ from a document compiled without the package. Passing compatibility to protrusion or expansion keeps the original pagination, but the manual says the result is typographically suboptimal; the default is nocompatibility. If a manuscript has fixed page references or a layout-sensitive template, expect re-flowed text after adding the package.

Which features work in which engine

Feature pdfTeX LuaTeX XeTeX
Character protrusion Yes Yes Yes
Font expansion Yes Yes No
Disabling ligatures Yes Yes No
Interword spacing and kerning Yes No No
Letterspacing (tracking) Yes Yes Yes

Source: CTAN package page and user manual, read 2026-11-08. If you need the interword spacing or kerning features, you must use pdfTeX; the manual says they are not available with LuaTeX.

Key options and defaults

Option Default Note from the manual
protrusion enabled The factor option defaults to 1000; 500 halves the protrusion.
expansion enabled where fonts allow Not recommended above about 2%.
tracking false The letterspace option defaults to 50 (thousandths of an em).
kerning false Makes sense only in special cases.
spacing false Still considered experimental.
DVIoutput false Deprecated.

Turning features on and off with \microtypesetup

In the preamble, \microtypesetup{key=value} accepts all options except config. In the document body it accepts only expansion, protrusion, activate (true, false, compatibility, nocompatibility), tracking, kerning, spacing and patch/nopatch, and it cannot take font-set names. For example, \microtypesetup{expansion=false} turns expansion off from that point.

Letterspacing and disabling ligatures

Define a tracking amount with \SetTracking[...]{set}{amount}, where the amount is in thousandths of 1 em, then apply it to short text with \textls{...}. The manual’s example sets \textls{stealing sheep} with a tracking value of 160, that is 0.16 em. Ligatures are not controlled by a package option; they are disabled with the \DisableLigatures command, for example \DisableLigatures{encoding = T1, family = tt* }.

Output and how to read it

The visible output is a document whose right margin looks more even, with fewer loose lines. The effects are small by design, so compare the same page with and without the package, and look in the .log file for the settings that were applied and any warnings. Expect different line breaks after enabling it, as described above. Related typesetting topics on this site include spacing in LaTeX, using Helvetica in LaTeX and changing fonts in Beamer.

Troubleshooting

  • Language settings ignored or odd spacing. Load babel or polyglossia before microtype.
  • Font set not applied. The predefined font sets apply only to encodings that have configurations. Other encodings (the manual names LGR and T2B) are not covered and need your own font set.
  • Protrusion looks wrong in italics. The manual advises using settings that match your font, and there are no default protrusion settings for italics.
  • Too much expansion. Do not expand by more than 2%. Stretch limits above 20 need a trained eye; up to 4% is mentioned for Multiple Master fonts.
  • Kerning adds odd space before punctuation. Kerning should be used only if the language tradition warrants it; in English it can add confusing extra space before punctuation.
  • fontspec conflict. Do not combine \newfontfeature{Microtype}{protrusion=default;expansion=default} from fontspec with microtype; it overrides the package.
  • The spacing option causes side effects. It is experimental and the manual notes side effects, especially with ragged2e.
  • CJK text with pdfTeX. There are no character-specific settings; only non-selected expansion works.
  • Package clashes. The manual states microtype works with all packages except pdfcprot. Report persistent bugs through the repository listed above.

Free alternatives

Need Alternative Source
Letterspacing only (also usable in plain TeX) The letterspace package microtype manual, section 1

The manual names no other alternative for protrusion or expansion, so for those features microtype is the package to use. If you are weighing a different typesetting system entirely, see Typst and web-based LaTeX editors.

FAQ

What is microtype in LaTeX?

A package that adds micro-typographic features, mainly character protrusion and font expansion, to improve justified text. Load it with \usepackage{microtype}.

Do I need options with microtype?

Usually not. The manual says the plain load is sufficient in most cases, and it enables protrusion by default and expansion wherever the font supports it.

Why did my page breaks change after adding microtype?

Protrusion and expansion alter line widths, so line and page breaks can differ. The compatibility setting preserves the original breaks at some typographic cost.

Does microtype work with XeLaTeX?

Partly. Protrusion and letterspacing work in XeTeX; font expansion, ligature disabling, interword spacing and kerning do not, per the CTAN page.

How do I turn microtype off for part of a document?

Use \microtypesetup{protrusion=false,expansion=false} in the body, or activate=false to switch off both together.

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about LaTeX microtype Package: Usage, Options and Fixes

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →