我希望使用微类型中的凸出和扩展,因为我喜欢它们的外观。我像往常一样使用 amsthm 和排版定理(使用\theoremstyle{plain}
)。启用微类型后,LaTeX 无法拆分某些行,因为行上的最后一项是斜体。我使用包含的示例时,有三次无法很好地拆分。
我有 microtype 2.5,并使用带有 Latin Modern Roman 的 lualatex。我有一个工作示例,尽管它不是非常简单。如果我删除更多对格式的辅助更改,则隐藏我怀疑是错误的问题。问题似乎与我使用带连字符的单词(如 Erdos-Hajnal)无关,因为换行失败也发生在其他行上,甚至在我的参考书目中也会出现问题,其中参考文本的某些部分是斜体。如果我删除该\usepackage{fontspec}
行,也会出现问题。如果我删除该行并使用 pdflatex 进行编译,则不会出现任何问题。
(相当)最小的例子:
\documentclass[a4paper,twoside]{scrartcl}
\usepackage[UKenglish]{babel}
\usepackage{amsmath,amsthm}
\usepackage{fontspec,blindtext}
\usepackage[babel,protrusion=true,expansion]{microtype}
\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]
\newtheorem{prop}[thm]{Proposition}
\newtheorem{conj}[thm]{Conjecture}
\begin{document}
\begin{conj}
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$.
\end{conj}
\begin{prop}
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.
\end{prop}
\begin{thm}
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.
\end{thm}
\blindtext
\end{document}
编辑:这显然与 amsmath 无关,重现类似斜体换行问题的一个简单方法是:
% !TEX TS-program = lualatex
\documentclass{scrartcl}
\usepackage{fontspec}
\usepackage[UKenglish,latin]{babel}
\usepackage{microtype}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
\textit{\lipsum[1-2]}
\end{document}
答案1
这确实是(正如 @yun 在他对这个问题的第一条评论中所怀疑的那样)存在luatex
负突出值的错误2.4 版和 2.5 版之间的相关差异microtype
不在于软件包本身,而在于 Latin Modern Roman 的配置文件,该文件现在还为斜体字体指定了负值(这是由 @Hendrik Vogt 在这个网站上建议的)。现在有几种可能性:
- 删除所有负值
mt-LatinModernRoman.cfg
, - 使用
xetex
代替luatex
, - 按下 Taco 的按钮,确认 bug 不是轻微但值得修复、希望和等待。
答案2
对我来说,在删除 fontspec 之后,XeLaTeX、LuaLaTeX 和 pdfLaTeX 这三个变体中似乎都可以正常工作。
为了正确调试这些问题,请使用\listfiles
并上传它们。此外microtype
,fontspec 有配置文件,因此您需要检查这些文件。
如果您使用,也可以在 babel 中lipsum
使用。latin
*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
fontenc.sty
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
fontspec.cfg
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
supp-pdf.mkii
mt-cmr.cfg 2009/11/09 v2.0 microtype config. file: Computer Modern Roman (
RS)