4

I am trying to use Minion Pro together with XeLatex and KOMA-script, setting a PhD thesis for a friend of mine.

The usage of KOMA-script obviously speaks against the use of \setmainfont. However, the use of \addtokomafont doesn't work the way I try.

\addtokomafont{\normalfont}{Minion Pro}

I have two questions:

  • will \normalfont change also the font of headings and so on?
  • 'Minion Pro' as used with \setmainfont might not to work with \addtokomafont... How to find the name to be used?

I am working on a Mac and the Minion Pro fonts are installed and activated.

Since I just started to get things ready, the preamble is very minimalistic still.

\documentclass[a5paper]{scrreprt}
\KOMAoptions{twoside=true}
\addtokomafont{\normalfont}{Minion Pro}
\addtokomafont{disposition}{\rmfamily}

\begin{document}
\chapter{Test}
Here will be your text.
\end{document}
Henri Menke
  • 109,596
TomGeo
  • 143
  • 5
  • 1
    Welcome! Sorry, but why do you think you shouldn't use \setmainfont with KOMA? – cfr Oct 11 '15 at 13:16
  • Because, when I tried (obvioulsy the wrong way) it wasn't working. But @Thérèse came around with two great examples on how to use it. – TomGeo Oct 12 '15 at 11:59

1 Answers1

5

fontspec plays well with KOMA-Script. Here’s an example:

\documentclass[a5paper]{scrreprt}
\KOMAoptions{twoside=true}
\usepackage{fontspec}
\setmainfont{Minion Pro}[
  Numbers={OldStyle,Proportional}]
\setkomafont{disposition}{\normalfont}
% or
% \addtokomafont{disposition}{\normalfont}
% or, for bold headings,
% \addtokomafont{disposition}{\rmfamily}
\begin{document}
\chapter{Test}
Here will be your text.
\end{document}

To change the fonts used in the headings, you need to use \setkomafont{disposition}{...} or \addtokomafont{disposition}{...}. And as lockstep explains here, \normalfont gives you what’s used by default for the body of the document; in your case, because of the choice you’ve made with \setmainfont, that’s Minion Pro in the regular weight. If you want Minion Pro in bold weight, \addtokomafont{disposition}{\rmfamily} gives you what’s used by default for headings (bold sans), except that they’ll no longer use a sans but rather the roman family you’ve chosen.

If you want headings in something other than the default bold sans or the main font, use whatever font-switch name you assign to the font with fontspec’s \newfontface command. For example (a perfectly tasteless example),

\documentclass[a5paper]{scrreprt}
\KOMAoptions{twoside=true}
\usepackage{fontspec}
\setmainfont{Minion Pro}[
  Numbers={OldStyle,Proportional}]
\newfontface\chancery{TeX Gyre Chorus}
\setkomafont{disposition}{\chancery}
% or
% \addtokomafont{disposition}{\chancery}
\begin{document}
\chapter{Test}
Here will be your text.
\end{document}
Thérèse
  • 12,679
  • thanks a lot for your fast and great help. Works like a charm and I learned again a bit more! – TomGeo Oct 12 '15 at 12:00