Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Would appreciate your help with the following code:

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

The problem is that the letters "fi" within the word "confidence" are typeset as a ligature without adhering to the \textbf command, see:

I'm using scrbook, anything else I should specify?

Thanks in advance!

Update: here is sample text with all the packages and the relevant definitions. As you can see, the problematic text is in the beginning, before the fill text.

\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}
share|improve this question
3  
What font are you using? –  egreg Jul 26 '12 at 16:18
1  
The visual font weight is entirely chosen by the font designer so this is an issue with the font you are using, unless you are using one of the modern tex engines that is faking bold?? Please edit the question to give a fill (small) document loading all packages needed to show the problem, and say what tex engine you are using (pdflatex, xelatex lualatex...) –  David Carlisle Jul 26 '12 at 16:20
3  
It would appear that you're using a font family which doesn't include a bold/italics weight/shape combination. Which font do you use, and which TeX engine do you employ (pdftex, xetex, or luatex)? Without some additional information, it's going to be difficult to provide specific advice on what you might do to fix the problem. In the short run (i.e., without knowing which font is being used), the only possible advice is to suppress the ligature manually by inserting something like \kern0pt between the f and the i in the word confidence. –  Mico Jul 26 '12 at 16:21
1  
It seems to be a bug in the fonts and should be reported. The font fxlbi-xl-8x that's called in the virtual font used for bold italic has only some characters bold face, contrary to its name. –  egreg Jul 26 '12 at 18:05
add comment

3 Answers

up vote 4 down vote accepted

Update: At least in TeX Live 2013, this bug doesn't exist anymore. So, if you are still affected, try updating your TeX installation.


Original post: Mico identified the problem. Here is a solution:

The Linux Libertine OTF fonts seem to have the ligatures in bold+italic. So you can simply use XeTeX or LuaTeX to use them:

% 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}

result (with xetex)

Instead of \setmainfont{Linux Libertine O} you can use \usepackage{libertineotf}, which will also set the sans and mono fonts to their matching counterparts.

share|improve this answer
1  
For some reason LuaTeX doesn't do the triple ligatures on my installation (it produces ffi instead of ), though it works with a different font. Maybe a font version problem. –  Caramdir Jul 26 '12 at 17:38
    
I can confirm that LuaTeX doesn't typeset the fl, ffi, and ffl glyphs correctly for the bold/italics weight/shape combination of the Linux Libertine O font. Fortunately, XeTeX doesn't have this problem. –  Mico Jul 26 '12 at 18:23
    
I think it's wroth mentioning, for the less expert readers, that switching to XeTeX, or in my case XeLaTeX isn't entirely straightforward. You might find that previously working code will require adjustments to the new typesetting. So check how many errors you get and think if it's worth all the debugging or if you'd rather change the font. –  Kiwile Jul 28 '12 at 11:38
    
+1 re. switching to XeTeX or Lualatex. I ran into this problem and have a fairly complex configuration that is not straightforward to migrate. I agree this is a "solution" (the only one at the moment, it seems) but the workaround below is actually more useful to me. –  Roly Aug 30 '13 at 13:30
1  
@Roly: Update your TeX installations. The Libertine bug seems to have been fixed. (Also LuaTeX now typesets ffi correctly (but not fl and ffl).) –  Caramdir Aug 30 '13 at 15:13
add comment

Below is a version of your example code that's pared down considerably, to focus on the essentials.

As far as I can tell, what you've encountered is a bug in the Libertine font family. The font's user guide does state that the bold/italics weight/shape combination exists. However, as the second line of the image below attests, the bold/italics combination is not yet implemented (correctly, that is) for any of the five f-ligature glyphs.

As the second definition shows, it is possible to suppress the ligature manually, e.g., by inserting {} between the characters f and i. The result is by no means perfect, but it's a lot better than having the font switch from bold-italics to italics and back to bold-italics all in one word, right?

enter image description here

\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}
share|improve this answer
    
The bug doesn't seem to exist in TL2013 anymore. –  Caramdir Aug 30 '13 at 15:15
    
@Caramdir - Thanks for pointing out that the bug described in the posting -- the missing ligatures in bold/italic -- is no longer present in the latest version of TeXLive. From (re)running the MWE, it would appear that there are no fl or ffl ligatures in bold-italic; instead, f{}l and ff{}l show up. Do you know if the absence of the fl and ffl ligatures is intentional? –  Mico Aug 30 '13 at 17:20
    
I don't know, but they are also missing when I compile my MWE above with LuaTeX. However they are present when compiling with XeTeX. –  Caramdir Aug 30 '13 at 18:54
add comment

The ligature glyphs in flxbi.pfb are not bold. Here are two workarounds: the bold slanted and semi-bold italic fonts have bold/semi-bold ligatures. Check out the pages titled fxl-b-sl and fxl-z-it in libertinetexte.pdf. (If you add a line \printText{fxl}{b}{it} to the source file, you'll get the non-bold ligatures; presumably the original developer forgot to test that combination.)

Bob Tennent

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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