Text FormattingFont packages order

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

Font packages order

Post by thomasb »

Is there any particular order for ae, lmodern, babel, fourier and fontenc :

Code: Select all

\usepackage{ae,lmodern}
\usepackage[english]{babel}
\usepackage{fourier}
%\usepackage[utf8]{inputenc} % not mandatory
\usepackage[T1]{fontenc}
?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Font packages order

Post by Johannes_B »

ae is obsolete for twenty years or something.
fourier is a font package changing the document font.
lmodern does the same, it gives a different font.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

Font packages order

Post by thomasb »

Does the declaration need to be in a particular order ?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Font packages order

Post by Johannes_B »

No, not really.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Font packages order

Post by Ijon Tichy »

Combination of ae and lmodern doesn't make much sense. You should remove ae. If you want a combination of Latin Modern Sans Serif and Latin Modern Typewriter with Adobe Utopis, then loading fourier after lmodern ist correct. If you want Latin Modern Roman with Latin Modern Sans Serif and Latin Modern Typewriter (which would make sense), you should remove fourier. If you don't want Latin Modern but only Adobe Utopia, loading lmodern wouldn't make much sense.

babel isn't a font package, so it doesn't really matter, if you load it before or after a font package. With exotic languages there could be an influence of the font encoding to babel. But in such case babel should either change the encoding or warn. English es not an exotic language. ;)

And the order of comment lines usually doesn't influence anything. So you can place them usually wherever you want, even before \documentclass.

To give a better answer, I would need a better question. :shock:
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
thomasb
Posts: 134
Joined: Thu Aug 03, 2017 10:54 am

Font packages order

Post by thomasb »

Ijon Tichy wrote:And the order of comment lines usually doesn't influence anything. So you can place them usually wherever you want, even before \documentclass.
In case I would use \usepackage[utf8]{inputenc}, would the order matter with respect to \usepackage[T1]{fontenc} ?
Post Reply