tufte-latex 类、脚注和 LuaLaTeX 之间可能存在不兼容

tufte-latex 类、脚注和 LuaLaTeX 之间可能存在不兼容

tufte-handout我认为我遇到了 LuaLaTeX 和或类之间的不兼容性tufte-book。文档还应该包含脚注。

以下是 MWE:

\documentclass{tufte-handout} % Or tufte-book

\usepackage{fontspec}
 \defaultfontfeatures{Mapping=tex-text}
 \setmainfont{Lin Libertine O} % Or maybe any other font...

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua.\footnote{Lorem ipsum!}
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum.\footnote{Dolor si amet}

\end{document}

我正在使用 LuaTeX,版本 beta-0.70.1-2011062107 (rev 4277),即 TeXLive 2011 附带的版本。

如果没有脚注,上述 MWE 可以在 XeLaTeX 或 LuaLaTeX 下完美编译;它也可以在两个系统下使用标准article类进行编译而不会出现错误。

然而引入脚注tufte 类会产生错误。日志文件的相关部分是:

luaotfload | Updating the font names database:
luaotfload | Scanning TEXMF fonts...
luaotfload | Scanning OS fonts...
luaotfload | Font names database saved: %s 
: /Volumes/Users/michael/Library/texlive/2011basic/texmf-var/luatex-cache/generic/names/otfl-names.lua
luaotfload | define font: font with name pplr9t is not found
luaotfload | define font: unknown font pplr9t, loading aborted
! Font \OT1/pplx/m/n/10=pplr9t at 10pt not loadable: metric data not found or bad.
<to be read again> 
               relax 
l.10 ...olore magna aliqua.\footnote{Lorem ipsum!}
                                                   Ut enim ad
? 
luaotfload | define font: font with name pplr9t is not found
luaotfload | define font: unknown font pplr9t, loading aborted
! Font \OT1/pplx/m/n/7.6=pplr9t at 7.60001pt not loadable: metric data not found or bad.
<to be read again> 
                   relax 
l.10 ...olore magna aliqua.\footnote{Lorem ipsum!}
                                                   Ut enim ad
? X

(当然最后X是我放弃编译了)

这可能与类有关,而不是与 LuaLaTeX 有关,但我想知道我是否遗漏了某个设置(也许是在fontspec?)或者存在一些选项冲突。或者可能是错误。

答案1

tufte-common.def包含代码:

% If we're NOT using XeLaTeX and the `nofonts' class option was NOT provided,
% we should load the Palatino, Helvetica, and Bera Mono fonts (if they are
% installed.)

\ifthenelse{\boolean{@tufte@loadfonts}\AND\NOT\boolean{@tufte@xetex}}{%
  \IfFileExists{mathpazo.sty}{\RequirePackage[osf,sc]{mathpazo}}{}
  \IfFileExists{helvet.sty}{\RequirePackage[scaled=0.90]{helvet}}{}
  \IfFileExists{beramono.sty}{\RequirePackage[scaled=0.85]{beramono}}{}
  \RequirePackage[T1]{fontenc}
  \RequirePackage{textcomp}
}{}

这意味着 tufte 不知道 lualatex,因此无法加载mathpazo等等。所以我认为使用nofontsegreg 建议的选项是正确的方法。

但是您的错误表明 mathpazo 字体未完全安装。您的示例实际上并未使用它们,但 fontnote 触发了数学模式,因此 lualatex 尝试加载它们。您可能也会在使用 pdflatex 和此示例时遇到错误:

\documentclass{article} % Or tufte-book
\usepackage[osf,sc]{mathpazo}
\begin{document}
  abc\footnote{Lorem ipsum!}
\end{document}

答案2

这段评论太长了,所以我把它贴在这里。如果您使用\footnote而不是,那么早期版本的 Tufte 类有时会产生错误\sidenote。您的示例在我的计算机上完全编译,没有任何错误,并且安装相当新。我建议您更新您的发行版。

在此处输入图片描述

相关内容