summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/substitutefont/substitutefont-test.tex
blob: 0d32eb18ce8383f92b9738dd192abfa43f3c57e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
\documentclass[a4paper]{article}
\usepackage{fixltx2e} % LaTeX patches, \textsubscript
\usepackage[T1,OT1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{parskip}

\title{Simple substitutefont test}
\author{Günter Milde}

% Combine "Latin Modern" fonts for OT1 and Bookman for T1.
\usepackage{substitutefont}
\usepackage{lmodern}
% Substitution also works for fonts that exist in the specified encoding:
\substitutefont{T1}{lmr}{pbk}

% \addto\extrasgerman{\fontencoding{T1}\selectfont}
% \addto\noextrasgerman{\fontencoding{\encodingdefault}\selectfont}

\begin{document}

\maketitle

This document is a test that should work with any standard basic LaTeX
installation. For real use cases, see the test documents setting up matching
Latin and Greek or Cyrillic fonts.

Some text in \encodingdefault{} encoding, the font is Latin Modern:
Résumé of Nathan Söderblom.

% (Defining the substitution in the document body is possible (but not
% recommended) if it is done before the first use of a font in the specified
% encoding.)
% \substitutefont{T1}{lmr}{pbk}

\fontencoding{T1}\selectfont

Some text in T1 encoding, the font is Bookmark: Résumé of Nathan Söderblom%
\footnote{Compare the result of drag-and-drop or text search for words with
accented characters for OT1 and T1 encoded text.}

\fontencoding{OT1}\selectfont

Back to OT1 and Latin Modern.

% The following substitution definition is ignored, because T1 fonts are
% already set up:
\substitutefont{T1}{lmr}{pag}



\fontencoding{T1}\selectfont

Some more text in T1 encoding and Bookmark.

\end{document}