Text FormattingNo italics with Linux Libertine?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
chremonides
Posts: 5
Joined: Fri Apr 20, 2012 12:23 pm

No italics with Linux Libertine?

Post by chremonides »

Hey,
I'm very new to this forum and to (Xe)LaTeX in general, so you have to bear with me if this is a stupid question. There are som basic features about TeX that I don't know much about.

I'm using Linux Libertine in Kile and it worked perfectly a couple of months ago, but now the italic command seems to be ignored. In other words, it compiles without problems but the italics aren't in the pdf.

Does anyone know what the problem is?

Code: Select all

\documentclass[a4paper,10pt]{article}
\usepackage{xunicode}
\usepackage{fontspec}
\usepackage{xltxtra}
\setromanfont[Mapping=tex-text]{Linux Libertine O}
% \setsansfont[Mapping=tex-text]{DejaVu Sans}
% \setmonofont[Mapping=tex-text]{DejaVu Sans Mono}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

No italics with Linux Libertine?

Post by cgnieder »

I have no problems with the code snippet you provided. This Infominimal working example

Code: Select all

\documentclass[a4paper,10pt]{article}
\usepackage{xunicode}
\usepackage{fontspec}
\usepackage{xltxtra}
\setromanfont[Mapping=tex-text]{Linux Libertine O}
\begin{document}
Text \emph{Text} \textbf{Text \textit{Text}}
\end{document}
gives exactly what's to be expected:
LLO-test.png
LLO-test.png (2.88 KiB) Viewed 8206 times
Regards
site moderator & package author
chremonides
Posts: 5
Joined: Fri Apr 20, 2012 12:23 pm

Re: No italics with Linux Libertine?

Post by chremonides »

That's what so strange. I get the first one twice and the third one twice.
\emph and \textit don't seem to work.

Maybe it's a problem with Texlive or Kile? I'm really at a loss here.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: No italics with Linux Libertine?

Post by Stefan Kottwitz »

That should not be a problem of the editor. Perhaps post your .log file here, as attachment to a post. There may be warnings or information regarding fonts.

Stefan
LaTeX.org admin
chremonides
Posts: 5
Joined: Fri Apr 20, 2012 12:23 pm

Re: No italics with Linux Libertine?

Post by chremonides »

Hmm, I can't seem to copy the log file in Kile (like I said, I'm very new to this).
How do you do that? I found it but it won't copy.

Anyway, there's a line about Linux Libertine:

"Package fontspec Info: Could not resolve font Linux Libertine O/I (it might not exist) on input line line 7."

Is that the problem?

Thanks for helping out a newbie!
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

No italics with Linux Libertine?

Post by cgnieder »

You don't need to copy your log file. In the folder where you have your tex-file (let's call it, say, file.tex) there should be (after at least on LaTeX or XeLaTeX run) also the file file.log. When you write a post here below the text field there's the button “Upload attachment” where you could upload the whole log-file as an attachment to your post which we then could download and have a look.

Regards
site moderator & package author
chremonides
Posts: 5
Joined: Fri Apr 20, 2012 12:23 pm

Re: No italics with Linux Libertine?

Post by chremonides »

Oh, of course. Sorry, I was trying get it from the Kile panel.

Here it is.
Attachments
Test.log
(12.26 KiB) Downloaded 436 times
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

No italics with Linux Libertine?

Post by cgnieder »

First thing I notice you use an old TeX Live (TeX Live 2009/Debian). The up to date version is TeX Live 2011. This also means you have some old versions of packages. For example: the version of fontspec you have is 2008/08/09 v1.18. Up to date is 2011/09/18 v2.2a.

Second thing I notice: this is not the log file for the Infominimal working example above! For example it does not load babel which is loaded by you, obviously.

So I would suggest to install TeX Live 2011. I'd think that this should resolve all the problems.
site moderator & package author
chremonides
Posts: 5
Joined: Fri Apr 20, 2012 12:23 pm

Re: No italics with Linux Libertine?

Post by chremonides »

Ok, I'll try that and get back as soon as possible. It seems that it's a bit of a trick to install Tex Live 2011, but I should be able to figure it out.

And you're right about babel - it was there to test some things in specific languages.
EmilioLazo
Posts: 15
Joined: Sat Jul 16, 2011 1:59 am

No italics with Linux Libertine?

Post by EmilioLazo »

I do have a similar issue after Debian did upgrade TexLive 2009 to TexLive 2011.

Slanted fonts appears as normal fonts in XeLaTeX (regardless the font I use) and some font shapes are not available in xelatex and also in pdflatex.

After upgrading to version 2011 of Debian's TexLive, some warnings appears when I compile a document with xelatex:

Code: Select all

\documentclass{article}
\usepackage{ifpdf,ifxetex}
\ifpdf
 \usepackage[utf8x]{inputenc}
\else
 \ifxetex
%  \usepackage{xunicode}
%  \usepackage{xltxtra}
  \usepackage{fontspec}
  \setromanfont[Mapping=tex-text]{Linux Libertine O}
 \fi
\fi

\begin{document}

{\sl TEST} \textsl{TEST}
\end{document}
This simple code can compiled with either XeLaTeX or pdfLaTeX engines. The result compiling with pdfLaTeX is both words "TEST" appears slanted but with XeLaTeX none of them appears slanted.

The following are extraits from compilation .log:
. Font family 'LinuxLibertineO(0)' created for font 'Linux Libertine O' with
. options [Mapping=tex-text].
.
. This font family consists of the following shapes:
.
. * 'normal' with NFSS spec.:
. <->"Linux Libertine O/ICU:script=latn;language=DFLT;mapping=tex-text;"
.
. * 'small caps' with NFSS spec.:
. <->"Linux Libertine O/ICU:script=latn;language=DFLT;mapping=tex-text;+smcp;"
.
. * 'bold' with NFSS spec.:
. <->"Linux Libertine O/B/ICU:script=latn;language=DFLT;mapping=tex-text;"
.
. * 'bold small caps' with NFSS spec.:
. <->"Linux Libertine
. O/B/ICU:script=latn;language=DFLT;mapping=tex-text;+smcp;"
.
. * 'italic' with NFSS spec.:
. <->"Linux Libertine O/I/ICU:script=latn;language=DFLT;mapping=tex-text;"
.
. * 'italic small caps' with NFSS spec.:
. <->"Linux Libertine
. O/I/ICU:script=latn;language=DFLT;mapping=tex-text;+smcp;"
.
. * 'bold italic' with NFSS spec.:
. <->"Linux Libertine O/BI/ICU:script=latn;language=DFLT;mapping=tex-text;"
There is no 'slanted' here. Log continues:
...
LaTeX Font Info: Encoding `OT1' has changed to `EU1' for symbol font
(Font) `operators' in the math version `normal' on input line 14.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) OT1/cmr/m/n --> EU1/LinuxLibertineO(0)/m/n on input lin
e 14.
LaTeX Font Info: Encoding `OT1' has changed to `EU1' for symbol font
(Font) `operators' in the math version `bold' on input line 14.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) OT1/cmr/bx/n --> EU1/LinuxLibertineO(0)/m/n on input li
ne 14.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) EU1/LinuxLibertineO(0)/m/n --> EU1/LinuxLibertineO(0)/m
...
LaTeX Font Warning: Font shape `EU1/LinuxLibertineO(0)/m/sl' undefined
(Font) using `EU1/LinuxLibertineO(0)/m/n' instead on input line 16
The last line tells us that there is no slanted font for Linux Libertine 0 and normal will be used instead, but if I change the font to Times New Roman and DejaVu Sans:
LaTeX Font Warning: Font shape `EU1/TimesNewRoman(0)/m/sl' undefined
(Font) using `EU1/TimesNewRoman(0)/m/n' instead on input line 16.
LaTeX Font Warning: Font shape `EU1/DejaVuSans(0)/m/sl' undefined
(Font) using `EU1/DejaVuSans(0)/m/n' instead on input line 16.
So, no slanted fonts in XeLaTeX. Why this happened after upgrading from 2009 to 2011 in Debian?

I don't have the problem the OP reports: italic fonts works for me compiling with both engines, but I do have another -related?- new issue after upgrading:

Adding

Code: Select all

\fontsize{15}{11}\selectfont
to somewhere and compiling with pdflatex, it warns because not available cmr font in 15pt: (also warns with 13pt font)
LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <15> not available
(Font) size <14.4> substituted on input line 15.
Post Reply