Text Formattingitalics in different font

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Laurentius
Posts: 132
Joined: Wed Feb 11, 2009 11:38 pm

italics in different font

Post by Laurentius »

Is it possible to make the italics of font A be the font B?

(in XeLaTeX)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: italics in different font

Post by Stefan Kottwitz »

What exactly do you mean, and for which purpose? Of course you may use a roman font and a different italic font.

Stefan
LaTeX.org admin
Laurentius
Posts: 132
Joined: Wed Feb 11, 2009 11:38 pm

italics in different font

Post by Laurentius »

The problem is that I am using a computer at the university where I am not allowed to install fonts. (I use a portable MiKTeX.) So I have to refer directly to font files, with, e.g.

Code: Select all

\setmainfont[Numbers=Lowercase, Mapping=tex-text]{[caslon.otf]}
But now, \emph doesn't work. Redefining \it is cumbersome and gives no italic correction.
Last edited by Stefan Kottwitz on Tue Feb 21, 2012 6:03 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

italics in different font

Post by Stefan Kottwitz »

You can use the ItalicFont option for configuring a specific italic font, such as:

Code: Select all

\setmainfont[
    ItalicFont={Font name of an italic font},
    BoldFont={Font name of a bold font}, 
    BoldItalicFont={Font name of a bold italic font}
  ]{A font name}
Stefan
LaTeX.org admin
Laurentius
Posts: 132
Joined: Wed Feb 11, 2009 11:38 pm

Re: italics in different font

Post by Laurentius »

Great! Thank you!
Post Reply