There isn't generally a single answer for this. It all depends on the fonts and font tables that the font foundry provides and how they're mapped and installed in your TeX system. Let me try to explain.
[To make things less confusing, the answer that follows assumes your question is directed at LaTeX
scenarios, rather than XeTeX
, LuaTeX
etc. which provide different and somewhat simpler ways to approach this.]
Assuming that your fonts are properly installed in your texmf
directory stucture, and perhaps assuming outline (non-bitmap) fonts, you'll have several sets of fonts (let's say, "shapes" and/or "series") for each typeface. Depending on the particular typeface, i.e., depending on what the particular font foundry has provided, you will have shapes/series for regular, bold, italic, bold-italic as a minimum (although in some cases there might be less), and then possibly, old style nums, true caps, condensed, alternative weights etc (usually from 'Pro' or 'expert' collections).
Now, TeX can access the oldstyle nums provided in your fonts in several ways, depending on how the font has been created or (more accurately) how its mappings are laid out on your system. In cases where you have dedicated oldstyle font files, all TeX needs to do to switch from oldstyle figures to lining figures is to switch its tables pointing at them in its mappings. And all you need to do is specify what you want by selecting them. Here are some examples:
Font Family lining figures old style figures
----------------------------------------------------
Kepler Project jkpx jkpxosn
ADF Venturis yvt yvtj
Palatino pplx pplj
Adobe Sabon psb psbj
Adobe Minion Pro MinionPro MinionPro-OsF
To select, say, Palatino with lining figures as the default Roman font, write \renewcommand*\rmdefault{pplx}
in your document preamble, or \renewcommand*\rmdefault{pplj}
if you want Palatino with oldstyle nums. That's all that's happening underneath when you write \usepackage[osf]{mathpazo}
to load up Palatino with Pazo math fonts.
Alternatively, if you want to use Palatino with oldstyle nums at a particular place in your document, you might write \fontfamily{pplj}\selectfont
. If you do that while you're in a group (e.g., inside an inner {
and }
), you'll revert to the font that was in effect when you leave the group. As above, this is all that mathpazo
is doing for you when you write \oldstylenums{12345}
. I.e., mathpazo
includes the command (notice the group):
\renewcommand{\oldstylenums}[1]{{\fontfamily{pplj}\selectfont #1}}
Not too many font foundries give you this ease of access to old style figures (mostly because these extra sets make up their 'Pro' collections for which they charge more, or because it's extra work, or because oldstyle nums don't look so fantastic in that particular typeface).
However, as with GUST e-foundry, some font makers provide oldstyle figure glyphs outside the usual slots for these. In other words, you get the usual set of lining figures as well as oldstyle figures through symbol glyphs mappings (TS1 vs T1 encodings). If your mappings have been set up properly (e.g., by fontinst
or if someone has done this work for you), you can access lining figures in the usual way ('1', '2',...) and oldstyle figures through commands like \textzerooldstyle
, \textoneoldstyle
, etc. The trouble is, you can't easily switch in and out of lining and oldstyle figures just by selecting them as we saw in the Palatino example above. This is reason the fontaxes
approach (per Lev's and lockstep's suggestion) won't work - for Gyre Schola, it's looking for font definition qcsj
or qcs-OsF
and can't find either (qcs
is the base fontfamily name for Gyre Schola). However, without the fontaxes
package loaded, \oldstylenums
(defined in the textcomp
package) can access them. You can see how it does this by fooling around a little like this:
\documentclass{article}
\usepackage{tgschola} % or whatever
\usepackage{textcomp} % no real need to explicitly load textcomp in this case
\usepackage{fontenc} % to control your font encoding
\begin{document}
T1 font encoding:\par
\fontencoding{T1}\selectfont
01234567890\par % lining figures under T1 encoding, osf under TS1
\oldstylenums{01234567890}\par % forces TS1 encoding, so typeset osf regardless
abcdefghijABCDEFGHIJ\par % normal chars under T1 encoding, gobbledygook under TS1
\oldstylenums{abcdefghijABCDEFGHIJ} % forces TS1 encoding, so typeset symbols regardless
\vspace{\baselineskip}
TS1 font encoding:\par
\fontencoding{TS1}\selectfont
01234567890\par % lining figures under T1 encoding, osf under TS1
\oldstylenums{01234567890}\par % forces TS1 encoding, so typeset osf regardless
abcdefghijABCDEFGHIJ\par % normal chars under T1 encoding, gobbledygook under TS1
\oldstylenums{abcdefghijABCDEFGHIJ} % forces TS1 encoding, so typeset symbols regardless
\end{document}
If you do this, you'll quickly see that all that \oldstylenums
is doing is switching in and out of TS1 encoding. However, you can see by the nonsense that is printed when you try to typeset normal characters in TS1 font encoding that you mustn't select that encoding when wanting to typeset normal text! Thus, you have to somehow tell LaTeX
before entering and after leaving every block of oldstyle nums that this is what you want to do. I.e., you're back to using \oldstylenums
, although perhaps by some other name.
There is a third way, which is to set up a set of virtual fonts that assemble the oldstyle figures the font provides into the slots where the normal figures usually reside. This takes some expertise and probably shouldn't be entered lightly but is completely do-able if you have the patience and time to spare.
Based on the comments received, I've been able to answer my question.
See page 27 of the current manual for microtype. ! pdfTeX error (font
expansion): auto expansion is only possible with scalable fonts.
Automatic font expansion has been improved in pdfTeX 1.40, in that it
now not only works with Type 1 fonts but also with TrueType, OpenType
and even non- embedded fonts. The above error message indicates either
that you are trying to apply expansion to a bitmap (pk) font, which is
still not possible, or that the font isn’t found at all, e.g., because
of missing map entries. – cfr
And so the Computer Modern default is the culprit, since it couldn't have been expanded by the LaTeX Microtype package. Bookman and Newcent had worked only because they called up both a Roman alternative and a Sans alternative (my novel uses both). The other packages had failed because they only implemented their own Roman font, while using my TeX distributions default, Computer Modern in my case.
The solution is to set the default fonts in all my LaTeX Preamble templates (that I use with this machine) to Latin Modern, which has identical metrics, is designed to appear identical, but has [T1]fontenc encoding capabilities, which my Microtype package will handle. PdfLaTeX should not be crashing, even so, but since it does, this is the fix. For posterity and others that might have the same problem, here's the fix to the Preamble segment from the question:
%%%%%% novel project %%%%%%%%%
\documentclass{book}
\usepackage{microtype}
\usepackage[T1]{fontenc}
%%% % FIX: change to [T1]fontenc microtype expandable fonts % %%%
\renewcommand{\ttdefault}{lmtt} % FIX: default Computer Modern TT
% changed to Latin Modern TT (typewriter)
\renewcommand{\rmdefault}{lmr} % FIX: default Computer Modern Roman
% changed to Latin Modern Roman
\renewcommand{\sfdefault}{lmss} %FIX: default Computer Modern Sans Serif
% changed to Latin Modern Sans Serif
% % % % % % % % % % % % % % % % % % %
% % % % % PSFNSS2e font packages % % % % % % % %
% % % % % select one package % % % % % % %
% \usepackage{mathptmx} % Times font, default sans
% \usepackage{charter} % Bitstream's Charter font, default sans
% \usepackage{mathpazo} % Palatino font, default sans
% \usepackage{bookman} % Bookman font, Avant Garde sans
% \usepackage{utopia} % Utopia font, default sans
% \usepackage{chancery} % Zapf Chancery font, default sans
% \usepackage{newcent} % New Century Schoolbook font, Avant Garde sans
% % % SELECT NONE ABOVE TO USE Latin Modern new defaults % % % %
%%%%%%% END PREAMBLE %%%%%%%%%%%%%%%%
Best Answer
the ams document classes specify only computer modern fonts, all available as type 1. however, these fonts are based on
OT1
encoding, which is suboptimal for languages with accented letters.using the "latin modern" fonts (also type 1, and based on the
T1
encoding) instead usually produces good results with few significant differences in appearance.according to the documentation for the
aecompl
package, theae
fonts are "virtual" fonts built mostly from the (type 1)cm
fonts, except for a few characters that don't exist in thecm
complement. so, in most cases, the results should be equivalent to that from usingcm
fonts directly.however, given that the latin modern fonts are based on much the same model as
cm
, with the added advantage of having precomposed accented letters, i see no reason not to specify\usepackage{lmodern}
. i know of no conflicts with the ams document classes.