Text Formatting ⇒ Choose fonts for document structure?
-
- Posts: 50
- Joined: Sat May 23, 2009 10:13 pm
Choose fonts for document structure?
I was experimenting with fonts and some of their advanced features, but still have no clear idea of how to use them: how can particular font+features be chosen for \section text? For TOC? Page numbers? Bibliography?
For example, if I've set oldstyle numbers to be used by default, but don't want them to appear on \section texts or just TOC, inevitably they need to be set somehow specially.
Any links? Or, still better, is there some way for me to know where to find that out without much of search engine use?
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Choose fonts for document structure?
Such font attributes are set globally and I'm not aware of a solution that would allow to switch from old style to normal numbers in the document. For the sake of consistency this is not recommendable.karlisrepsons wrote:[…] For example, if I've set oldstyle numbers to be used by default, but don't want them to appear on \section texts or just TOC, inevitably they need to be set somehow specially. […]
Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Choose fonts for document structure?
Code: Select all
\usepackage{fontspec} % for using and definining fonts
\usepackage{titlesec} % to redefine title formatting
\usepackage{fancyhdr} % to redefine footers and headers
% font stuff
\defaultfontfeatures{Ligatures=Common,Mapping=tex-text}
\setmainfont[Numbers=OldStyle]{Warnock Pro}
\newfontfamily\mytitlefont[Numbers={Lining,SlashedZero}]{Warnock Pro}
% title stuff
\titleformat{\section}{\mytitlefont\Large}{\thesection}{.5em}{}
% footer stuff
\fancyfoot[LF]{\mytitlefont\footnotesize\thesection}
\fancyfoot[RF]{\mytitlefont\footnotesize\thepage}
Use titletoc to redefine toc formatting.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Choose fonts for document structure?
Headers and footers can also be customized with titlesec. So I would consider fancyhdr superfluous in this case. Unfortunately the font you suggested is commercial. If you have any solution with a free font I would be very interested in that.bdr wrote:[…] Read the documentation for fontspec, titlesec and fancyhdr for more info on their usage. I don't think it's a typographical error to use two different types of numbers; oldstyle numbers look great in running text, but not so great in titles and vice versa. […]
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Choose fonts for document structure?
-
- Posts: 50
- Joined: Sat May 23, 2009 10:13 pm
Re: Choose fonts for document structure?
After some days of searches and experiments I've found quite some. These seemed good:
Tex Gyre:
Bonum: Hmmmm... Good!
Heros: good!!
Other:
SIL:
Gentium (GenAI102.TTF, GenAR102.TTF, GenI102.TTF, GenR102.TTF) are fine, but
basic are missing some characters.
CharisSIL, DoulosSIL - fine.
Linux Libertine: good.
Lavoisier: great!!
Lido STF: meant for newspaper, I liked; however, is not really a free font.
Cardo.
There is also a free font review in [1]. You can obtain some good free fonts through [2,3,4]. And thanks for formatting suggestions, I'll see later!
If ligatures, slashed zero and oldstyle numbers along with kerning is what you need, you might be very well off with Linux Libertine!
[1] http://www.garzo.co.uk/documents/freefonts.pdf
[2] http://scripts.sil.org/cms/scripts/page ... tDownloads
[3] http://linuxlibertine.sourceforge.net
[4] http://www.gust.org.pl/projects/e-foundry/tex-gyre