连字符、粗斜体组合、Libertine 字体不正确

连字符、粗斜体组合、Libertine 字体不正确

非常感谢您对以下代码的帮助:

\begin{definition}
The \textbf{confidence interval (CI)} for ...
\end{definition}

问题在于,“confidence”一词中的字母“fi”被排版为连字,而没有遵循 \textbf 命令,请参阅:

我正在使用 scrbook,还需要指定什么吗?

提前致谢!

更新:这是包含所有包和相关定义的示例文本。如您所见,有问题的文本位于开头,在填充文本之前。

\documentclass[twoside,12pt,a4paper,pointlessnumbers,headsepline,idxtotoc]{scrbook}

\usepackage{blindtext}

\usepackage{array,epsfig,amssymb, amsbsy, amsxtra,amsmath}
\usepackage{comment}
\usepackage{graphicx}
\usepackage{bm} %Access bold symbols in maths mode
\usepackage{longtable} %Support for tables longer than a page
\usepackage{multicol} %Intermix single and multiple columns
\usepackage{epsf} %basic eps graphics
\usepackage{float} %Improved interface for floating objects
\usepackage[usenames,dvipsnames]{color}


\usepackage{listings}
\usepackage{alltt} %A verbatim environment other commands, and environments can appear within
\usepackage[latin1]{inputenc} %Control input encoding

%\usepackage{harvard}
\usepackage[authoryear,round]{natbib} %Bibliography style with author-year and numbered references
\usepackage{url} %Verbatim with URL-sensitive line breaks

%package for changing the chapter headings to arial
\usepackage[T1]{fontenc} 
\usepackage{libertine} 

\addtokomafont{pagenumber}{\small\sffamily} % set page number font to sf 

%package for shaded boxes
%\usepackage{color}
%\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{framed,color}
\definecolor{shadecolor}{gray}{0.9}

%% Following package and definitions are for changing \ref to links and PDF features
\usepackage[
    pdfpagemode=UseOutlines,            % enable TOC PDF feature
    pdfdisplaydoctitle=true             % PDF has document title instead of file name
]{hyperref}

\definecolor{LinkColor}{rgb}{0,0,0.5}
\definecolor{ListingBackground}{rgb}{0.9,0.9,0.9}

% Colors for Links 
\hypersetup{
    colorlinks=true,                % Enable colored links (without frame)
linkcolor=LinkColor,            % set color.
citecolor=LinkColor,            % set color.
filecolor=LinkColor,            % set color.
menucolor=LinkColor,        % set color.
urlcolor=LinkColor,         % set color for URLs.
bookmarksnumbered=true  % Headline numbering in FOC
}

\usepackage{nomencl}
\renewcommand{\nomname}{Symbols and Notations}

\def\definitionname{DEFINITION}
\newtheorem{definition}{\definitionname}[chapter]

%Index
\usepackage{makeidx}

\begin{document}

\mainmatter

\begin{definition}
The \textbf{confidence interval (CI)} for...\end{definition}

\Blindtext

\backmatter

\end{document}

答案1

更新:至少在 TeX Live 2013 中,这个错误不再存在。因此,如果您仍然受到影响,请尝试更新您的 TeX 安装。


原帖:Mico 发现了问题。以下是解决方案:

Linux Libertine OTF 字体似乎有粗体+斜体的连字。因此,您可以简单地使用 XeTeX 或 LuaTeX 来使用它们:

% compile with xelatex or lualatex
\documentclass{scrbook}
\usepackage{fontspec} % no inputenc (always UTF8) and fontenc needed!
\setmainfont{Linux Libertine O} 

\begin{document}
\bfseries\itshape fit fly off difficult baffle
\end{document}

结果(使用 xetex)

您还\setmainfont{Linux Libertine O}可以使用\usepackage{libertineotf},它也会将无字体和单色字体设置为匹配的字体。

答案2

下面是示例代码的一个版本,它被大大精简,以突出基本要素。

据我所知,您遇到的问题是 Libertine 字体系列中的一个错误。该字体的用户指南确实指出粗体/斜体粗细/形状组合是存在的。但是,如下图第二行所示,粗体/斜体组合尚未实现(也就是说,正确实现)任何五个 f 连字符。

如第二个定义所示,可以手动抑制连字,例如,通过{}在字符f和之间插入i。结果绝不完美,但它比在一个单词中字体从粗斜体切换为斜体再切换回粗斜体要好得多,对吧?

在此处输入图片描述

\documentclass{scrbook}
\usepackage[T1]{fontenc} 
\usepackage{libertine} 

\def\definitionname{DEFINITION}
\newtheorem{definition}{\definitionname}[chapter]

\begin{document}

\begin{definition}[Ligature not suppressed]
The {\bfseries confidence interval (CI)} for...
\end{definition}

\noindent
{\bfseries\itshape fit fly off difficult baffle}

\begin{definition}[Ligature suppressed]
The {\bfseries conf{}idence interval (CI)} for...
\end{definition}

\end{document}

答案3

flxbi.pfb 中的连字符不是粗体。这里有两个解决方法:粗体斜体和半粗体斜体字体有粗体/半粗体连字符。查看 libertinetexte.pdf 中标题为 fxl-b-sl 和 fxl-z-it 的页面。(如果您在源文件中添加一行 \printText{fxl}{b}{it},您将获得非粗体连字符;大概是原始开发人员忘记测试该组合了。)

鲍勃坦能特

相关内容