This question already has an answer here:

I wish to use protrusion and expansion from microtype as I like the look you get with them. I use amsthm and typeset theorems in italic as usual (with \theoremstyle{plain}). With microtype enabled, LaTeX fails to break some lines where the last item on the line is something in italic. I get three failures to break nicely with my included example.

I have microtype 2.5 and use lualatex with Latin Modern Roman. I have a working example, though it's not very minimal. If I remove much more the ancillary changes to formatting hide the problem I suspect is a bug. The issue doesn't seem to be with the fact I'm using hyphenated words like Erdos-Hajnal, since the line break failure also occurs on other lines, and problems even occur in my bibliography where some portions of the reference text are in italics. The problem also occurs for me if I remove the \usepackage{fontspec} line. If I remove that line and compile with pdflatex there are no problems.

(Fairly) Minimal Example:




For all graphs $H$ there is an $\epsilon > 0$ such that for all sufficiently large $n$, and for all $G\in\mathcal{G}^n$ either $H$ is an induced subgraph of $G$, or $G$ contains a homogeneous set of size at least $n^\epsilon$.

A short dummy paragraph. 

Let $\epsilon_2=\delta\epsilon_1$, where $\delta<1/(2k+1)$. Then there exists $n_0$ such that all graphs on $n\geq n_0$ vertices which do not contain homogeneous sets of size $n^{\epsilon_2}$ have $H$ as an induced subgraph. That is, $H$ has the Erd\H{o}s-Hajnal property.

Let the graphs $H$ and $F$ have the Erd\H{o}s-Hajnal property, and let $V(H) = \{v_1,\dotsc,v_k\}$. Then $H(F, v_2,\dotsc, v_k)$ obtained by substituting $v_1$ for $F$ also has the Erd\H{o}s-Hajnal property.

EDIT: this is clearly nothing to do with amsmath, and a simple way to reproduce a similar italic-linebreaking problem is with:

% !TEX TS-program = lualatex

marked as duplicate by Joseph Wright Dec 6 '13 at 8:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    I've done some more searching and this may be a similar problem to tex.stackexchange.com/questions/28733, though I'm underqualified to make that link! – yun Mar 26 '13 at 20:09
  • 1
    Did you try XeLaTeX? Seems to work fine, however LuaLaTeX on my computer is perfect. – Yiannis Lazarides Mar 26 '13 at 20:13
  • @NilsL That's what I get; and it is a problem. Try adding an upright lipsum paragraph to the end of the document, you'll see plenty of correct-length lines. The three extra-long ones in my MWE then stand out. – yun Mar 26 '13 at 20:15
  • Gents update your distribution. Perfect with LuaLaTeX – Yiannis Lazarides Mar 26 '13 at 20:17
  • I updated today and have `This is LuaTeX, Version beta-0.70.2-2012062819 (TeX Live 2012)' in my logs. To be clear, the screenshot Nils L linked too is the wrong behaviour. There are no problems with XeLaTeX (provided you disable expansion). It is still wrong with my LuaLaTeX even without expansion. – yun Mar 26 '13 at 20:21

This is indeed (as @yun suspected in his/her first comment to the question) again the bug in luatex with negative protrusion values. The relevant difference between version 2.4 and 2.5 of microtype is not in the package itself but in the configuration file for Latin Modern Roman, which now specifies also negative values for the italics font (which was suggested by @Hendrik Vogt on this site). Now, there are several possibilities:

  • delete all negative values from mt-LatinModernRoman.cfg,
  • use xetex instead of luatex,
  • press Taco that the bug is not of minor severity but deserves fixing, and hope and wait.
  • that would explain why everything worked fine with any other font I tested the MWE with... – Nils L Mar 27 '13 at 7:00
  • Thanks Robert, I'll try xetex. I hope that the bug is fixed in due course. There's always a chance I'll get time to look at it... – yun Mar 27 '13 at 11:09

Seems to work fine for me in all three variants XeLaTeX, LuaLaTeX and pdfLaTeX with fontspec removed.

enter image description here

To debug properly these problems, use \listfiles and upload them. Also microtype and fontspec have config files, so you need to check these.

If you use lipsum also use latin in babel.

 *File List*
scrartcl.cls    2012/07/29 v3.11b KOMA-Script document class (article)
scrkbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-dependent ba
sics and keyval usage)
 scrbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-independent 
basics and keyval usage)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
scrlfile.sty    2012/06/15 v3.12 KOMA-Script package (loading files)
tocbasic.sty    2012/04/04 v3.10b KOMA-Script package (handling toc-files)
scrsize11pt.clo    2012/07/29 v3.11b KOMA-Script font size class option (11pt)
typearea.sty    2012/07/29 v3.11b KOMA-Script package (type area)
   babel.sty    2008/07/08 v3.8m The Babel package
 bblopts.cfg    2006/07/31 v1.0 MiKTeX 'babel' configuration
   latin.ldf    2008/07/06 v2.0l Latin support from the babel system
 english.ldf    2005/03/30 v3.3o English support from the babel system
 amsmath.sty    2013/01/14 v2.14 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
  amsthm.sty    2004/08/06 v2.20
  lipsum.sty    2011/04/14 v1.2 150 paragraphs of Lorem Ipsum dummy text
fontspec.sty    2013/02/25 v2.3 Font selection for XeLaTeX and LuaLaTeX
   expl3.sty    2012/12/21 v4390 L3 Experimental code bundle wrapper
 l3names.sty    2012/12/07 v4346 L3 Namespace for primitives
l3bootstrap.sty    2012/07/16 v3991 L3 Experimental bootstrap code
  luatex.sty    2010/03/09 v0.4 LuaTeX basic definition package (HO)
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
luatex-loader.sty    2010/03/09 v0.4 Lua module loader (HO)
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
l3basics.sty    2012/11/24 v4339 L3 Basic definitions
 l3expan.sty    2012/08/28 v4149 L3 Argument expansion
    l3tl.sty    2012/11/24 v4339 L3 Token lists
   l3seq.sty    2012/11/24 v4339 L3 Sequences and stacks
   l3int.sty    2012/09/26 v4237 L3 Integers
 l3quark.sty    2012/11/04 v4268 L3 Quarks
   l3prg.sty    2012/11/24 v4339 L3 Control structures
 l3clist.sty    2012/11/24 v4339 L3 Comma separated lists
 l3token.sty    2012/12/20 v4384 L3 Experimental token manipulation
  l3prop.sty    2012/09/09 v4212 L3 Property lists
   l3msg.sty    2012/09/09 v4212 L3 Messages
  l3file.sty    2012/12/20 v4377 L3 File and I/O operations
  l3skip.sty    2012/11/04 v4260 L3 Dimensions and skips
  l3keys.sty    2012/11/02 v4256 L3 Experimental key-value interfaces
    l3fp.sty    2012/11/10 v4305 L3 Floating points
   l3box.sty    2012/12/08 v4347 L3 Experimental boxes
l3coffins.sty    2012/09/09 v4212 L3 Coffin code layer
 l3color.sty    2012/08/29 v4156 L3 Experimental color support
l3luatex.sty    2012/08/03 v4049 L3 Experimental LuaTeX-specific functions
l3candidates.sty    2012/12/20 v4383 L3 Experimental additions to l3kernel
  xparse.sty    2012/12/21 v4390 L3 Experimental document command parser
luaotfload.sty    2012/03/27 v1.26 OpenType layout system
luatexbase.sty    2010/10/06 v0.3 Module utilities for LuaTeX
luatexbase-compat.sty    2010/10/10 v0.3 Compatibility tools for LuaTeX
luatexbase-loader.sty    2010/10/10 v0.3 Lua module loader for LuaTeX
luatexbase-regs.sty    2010/10/10 v0.3 Registers allocation for LuaTeX
luatexbase-attr.sty    2011/05/21 v0.31 Attributes allocation for LuaTeX
luatexbase-cctb.sty    2010/10/10 v0.3 Catcodetable allocation for LuaTeX
luatexbase-mcb.sty    2010/10/10 v0.3 Callback management for LuaTeX
luatexbase-modutils.sty    2010/10/10 v0.3 Module utilities for LuaTeX
fontspec-patches.sty    2013/02/25 v2.3 Font selection for XeLaTeX and LuaLaTeX

fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX
fontspec-luatex.sty    2013/02/25 v2.3 Font selection for XeLaTeX and LuaLaTeX
  eu2enc.def    2010/05/27 v0.1h Experimental Unicode font encodings
  eu2lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
xunicode.sty    2011/09/09 v0.981 provides access to latin accents and many oth
er characters in Unicode lower plane
 eu2lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
microtype.sty    2010/01/10 v2.4 Micro-typography with pdfTeX (RS)
microtype.cfg    2010/01/10 v2.4 microtype main configuration file (RS)
   t3cmr.fd    2001/12/31 TIPA font definitions
  mt-cmr.cfg    2009/11/09 v2.0 microtype config. file: Computer Modern Roman (
  • It seems the difference is microtype's version: you have 2010/01/10 v2.4 while the OP uses 2.5. I can reproduce the issue with microtype 2013/03/13 v2.5 – clemens Mar 26 '13 at 20:45
  • @NilsL There is a difference on microtype I am on a much older distribution so it is probably a bug. – Yiannis Lazarides Mar 26 '13 at 20:46
  • okay... looks like something Robert should know about. – Nils L Mar 26 '13 at 20:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.