LaTeX forum ⇒ Theses, Books, Title pagesHow do I change Lagrande Orange to use only Unicode fonts? Topic is solved

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Posts: 9
Joined: Wed Sep 13, 2017 10:31 am

How do I change Lagrande Orange to use only Unicode fonts?

Postby AntonVargas » Fri Sep 15, 2017 4:23 am

I'm using the Lagrande Orange book template, and I need to use Unicode fonts for everything. I've figured out how to do this for specifically designated text:

\newfontfamily\unifont[]{Unicode Font Here}

But I need to change the default body, heading and math fonts to Unicode, too.

In structure.tex, the fonts are defined with the following code:

\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols from the Sym­bol, Chancery and Com­puter Modern fonts
\usepackage{avant} % Use the Avantgarde (T1) font for headings

I can change the default encoding and font easily enough:

\setmainfont[Mapping=tex-text]{Doulos SIL}

The problem is, I can't figure out how Avantgarde is applied to headings, which I also need to change. "Avant" doesn't appear anywhere else in either file of the template. Can anyone tell me how to do this?

User avatar
Stefan Kottwitz
Site Admin
Posts: 9705
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat Sep 16, 2017 4:39 am

Hi Anton,

welcome to the forum!

It seems you changed from the pdfLaTeX way (fontenc, specific LaTeX packages such as avant, pag font) to XeLaTeX (fontspec). That's a good choice when new fonts are needed.

How about

\setmainfont{TeX Gyre Adventor}

Adventor should be an Avantgarde clone, for trade mark reasons it cannot have the same name.

Stefan admin

Posts: 9
Joined: Wed Sep 13, 2017 10:31 am

Postby AntonVargas » Sat Sep 16, 2017 10:13 am

Thanks so much for your answer, Stefan.

Your suggestion allows me to use TeX Gyre Adventor (or any other font, in theory) as the single font for the entire document. That's a step forward!

The problem I'm having is a bit different, though -- the default Lagrande Orange template defines two different font sets, one for the headings (Avant) and one for the body (Mathptmx, which is a mix of Adobe Times Roman, Chancery and Computer Modern, according to the in-line comment). And I want to do the same -- that is, define one font for headings and a different font everything else, but with Unicode fonts (using LuaLaTeX/XeLaTeX).

Unfortunately, I'm a LaTeX noob, and though I've read through the template and structure.txt, I cannot find how the header font is defined. In the original template, it's done with...


And nothing else, as far as I can tell. How does the (La)TeX engine know to use Avant just for headings? And how do I do the same?

Posts: 9
Joined: Wed Sep 13, 2017 10:31 am

Postby AntonVargas » Sun Sep 17, 2017 6:25 am

After much searching and even more trial and error, I've found what appears to be the solution. The template doesn't assign fonts to different elements, but rather font classes (or "families"; not sure about the proper term). So body text is set to serif, headers to sans, etc., with commands like this:


So using XeTeX/LuaTeX and fontspec to select fonts, you use code like the following to define what specific fonts are mapped to serif, sans serif and monospace:

\setmainfont[]{Doulos SIL}   % Main font, typically serif.
\setsansfont[]{TeX Gyre Adventor} % Heading and title font, typically sans.
\setmonofont[]{Liberation Mono} % Monospace font, typically for code.

Return to “Theses, Books, Title pages”

Who is online

Users browsing this forum: No registered users and 5 guests