Hi,
I'm using XeTeX and want to have Arial font for my titles (chapter, section, subsection) to the body text of Georgia. I can do this in plain LaTeX by using sectsty. But how do I get it to work in XeTeX, please?
Thanks,
eNino
Text Formatting ⇒ Different Font for Headings to Body Font
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Different Font for Headings to Body Font
In each case I would prefer titlesec to sectsty because it is much more capable. It manages not only the formatting of headings. The below code works fine for me.
Thorsten
Code: Select all
\documentclass[11pt]{report}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{geometry}
\usepackage[raggedright,bf,sf]{titlesec}
\usepackage{lipsum}
\setmainfont[Ligatures=TeX]{Georgia}
\setsansfont[Ligatures=TeX]{Arial}
\setmainlanguage{english}
\begin{document}
\chapter{Foo}
\lipsum[1]
\section{Bar}
\lipsum[2]
\end{document}
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10