这实际上是两个问题合二为一。请考虑以下示例文件:
\documentclass[a4paper]{article}
\usepackage{fontspec}
%
\defaultfontfeatures{Ligatures=TeX,Numbers=OldStyle,Scale=MatchLowercase}
\setmainfont[SmallCapsFont={Linux Libertine Capitals O}]{Linux Libertine O}
\setsansfont[SmallCapsFont={Linux Biolinum Capitals O}]{Linux Biolinum O}
%
\begin{document}
\begin{sffamily}
\noindent Linux Biolinum sans serif text followed by {\scshape Sans serif Small Caps text.} {\scshape Small Caps disappear when diacritics are used like a macron above a in anāchron: note the small letter for the ā instead of a Small Caps version.}
\end{sffamily}
\medskip
\noindent Linux Libertine serif text followed by {\scshape Sans serif Small Caps text.} {\scshape Small Caps disappear when diacritics are used like a macron above a in anāchron: note the small letter for the ā instead of a Small Caps version.}
\end{document}
它编译xelatex
但不与lualatex.
我的fontspec
包给出
\ProvidesPackage{fontspec} [2011/09/18 v2.2a Advanced font selection for XeLaTeX/LuaLaTeX]
安装是基于 64 位每日更新的 TeX Live 2011 安装。
我lualatex
收到此错误:
! Improper `at' size (0.0pt), replaced by 10pt.
<to be read again>
relax
l.10 ...inum sans serif text followed by {\scshape
Sans serif Small Caps tex...
问题1:为什么使用lualatex编译文件失败?
问题 2:PDF 输出中没有带长音符号的小型大写字母“a”。我刚刚还注意到不是tt
小型大写字母。
我已经在 Linux Libertine 项目页面上报告了此行为,但由于没有收到回复,我想确保这不是我的使用错误。
谢谢。
答案1
您的文档无法在我的系统上使用 XeLaTeX 编译,因此我无法比较 LuaLaTeX 和 XeLaTeX。
代码中有一个小问题,但我不是这方面的专家:
\setmainfont[SmallCapsFont={Linux Libertine Capitals O}]{Linux Libertine O}
对于 OpenType 字体,小写字母包含在主字体中。因此没有理由明确提及不同的字体。Linux Libertine 至少内置了它们。然后Linux Libertine Capitals O
我的系统上没有字体,我不认为我已经明确删除了它们。
据我所知,Linux Libertine 的字体中没有小写字母 ā。因此无法显示它。(不过你可以伪造它。)
这里不存在小 tt 的问题,所以我也无法对此发表评论。但我猜正确的答案是 Herbert 所评论的:
为什么不直接使用
\usepackage{libertineotf}
?它可以完成所有字体设置。
\documentclass[a4paper]{article}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX,Numbers=OldStyle}% ,Scale=MatchLowercase} bug in current Biolinum
\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}
\begin{document}
\noindent Linux Libertine serif text followed by {\scshape Sans serif Small Caps text.} {\scshape Small Caps disappear when diacritics are used like a macron above a in anāchron: note the small letter for the ā instead of a Small Caps version.}
\medskip
\sffamily
\noindent Linux Biolinum sans serif text followed by {\scshape Sans serif Small Caps text.} {\scshape Small Caps disappear when diacritics are used like a macron above a in anāchron: note the small letter for the ā instead of a Small Caps version.}
\end{document}
给出:
答案2
\documentclass[a4paper]{article}
\usepackage{fontspec}
\usepackage[libertine={Ligatures=TeX,RawFeature=+onum},
biolinum={Ligatures=TeX,RawFeature=+onum}]{libertineotf}
\begin{document}
\sffamily
\noindent Linux Biolinum sans serif text followed by \Lsmcp{Sans serif Small Caps text.} \Lsmcp{Small Caps disappear when diacritics are used like a macron above a in anāchron: note the small letter for the ā instead of a Small Caps version.}
0123456
\medskip\rmfamily
\noindent Linux Libertine serif text followed by \Lsmcp{Sans serif Small Caps text.} \Lsmcp{Small Caps disappear when diacritics are used like a macron above a in anāchron: note the small letter for the ā instead of a Small Caps version.}
0123456
\end{document}