~ubuntu-branches/ubuntu/raring/texlive-extra/raring

« back to all changes in this revision

Viewing changes to texmf-dist/doc/fonts/newtx/newtxdoc.tex

  • Committer: Package Import Robot
  • Author(s): Norbert Preining
  • Date: 2012-05-16 08:22:07 UTC
  • mfrom: (1.1.12) (3.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20120516082207-41ox35jj1qsu46a7
Tags: 2012.20120516-1
* new upstream snapshot based on TL2012 tlpretest
* switch to xz compression for orig and deb (Closes: #672428)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
\documentclass[11pt]{article}
 
2
\usepackage[margin=1in]{geometry} 
 
3
\usepackage[parfill]{parskip}% Begin paragraphs with an empty line rather than an indent
 
4
%SetFonts
 
5
\usepackage{graphicx}
 
6
% libertine text and newtxmath
 
7
\usepackage{libertine}
 
8
\usepackage[TS1,T1]{fontenc}
 
9
\usepackage{textcomp}
 
10
\usepackage[scaled=.85]{beramono}
 
11
\usepackage{amsmath}
 
12
\usepackage[libertine]{newtxmath}
 
13
\renewcommand*{\rmdefault}{fxlj} %old-style figures in text, not math
 
14
\def\libertine{\fontfamily{fxlj}\selectfont}
 
15
\usepackage[bb=boondox,frak=boondox,scr=boondoxo]{mathalfa}
 
16
\usepackage{bm}
 
17
%SetFonts
 
18
\title{New TX font package}
 
19
\author{Michael Sharpe}
 
20
\date{\today}  % Activate to display a given date or no date
 
21
 
 
22
\begin{document}
 
23
\maketitle
 
24
\section{Introduction}
 
25
The {\tt txfonts} package by Young Ryu has been available for over ten years but has been corrected very little since its introduction. It is meant to be a complete text and math package with roman text font provided by Times or a Times clone, sans serif based on a \textsf{Helvetica} clone, typewriter faces, plus math symbol fonts whose math italic letters are from a Times Italic clone. The additional glyphs, whether taken from free sources or designed by him, are generally of high quality, but the accompanying metrics are not, making the math inconsistently spaced, but so cramped that neighboring symbols  collide not infrequently.
 
26
 
 
27
The goal of this new project is use his glyphs along with a few additions and with completely reworked metrics which are generally looser, but not as loose as Computer Modern math, to make a math package that works with not only Times, but also with fonts that are intermediate in weight between Computer Modern and Times. The free font Linux Libertine is one particular target, as it is of nearly the same x-height as Computer Modern, but, not being a \emph{modern} font, it does not have a high contrast ratio, and so appears  denser than Computer Modern but not as much so as Times. It is meant as a replacement for Times, but  differs from it in many characteristics, more similar to MinionPro than Times, and provides a better range of variants than Times---three weights (regular, semi-bold and bold) rather than just two, and has expert features in all weights: old-style figures, more extensive and more interesting ligatures,  and  small caps. In my opinion, material typeset in Linux Libertine looks better than the corresponding material typeset in Times. This seems especially true on the screen.
 
28
 
 
29
As a rough measure of weight in math mode, the default line width in Computer Modern math is 40{\tt em}, in MathTime Pro 2, it is 46{\tt em}, and in txfonts, the value is 56{\tt em}. (The Times default line width as estimated from the thickness of each line segment is its = sign is 65{\tt em}. Unlike \textsf{txfonts}, Mathtime Pro 2 geometric glyphs are not of uniform thickness, so a comparison based on just this number is somewhat misleading.)
 
30
 
 
31
The new version makes the following changes:
 
32
\begin{itemize}
 
33
\item
 
34
the new package is split into separate text and math packages that do not need to be used in conjunction;
 
35
\item both text and math packages offer options not present in the original package, described below, including the option to use \textsf{libertine} Latin and Greek letters to replace \textsf{Times};
 
36
\item wide accent glyphs have been corrected (they should have zero depth) so that they no longer collide with the underlying glyph;
 
37
\item for those who do not like the integral in \textsf{txfonts}, an emboldened version of the Computer Modern integral is made available, matching the weight of the \textsf{txfonts} symbols;
 
38
\item an upright partial derivative symbol has been added, named \verb|\uppartial|;
 
39
\item there is now an option to get braces more pleasing to older eyes;
 
40
\item macros have been added to bring the calls to Greek symbols more into conformity with \textsc{psnfss} and Mathtime Pro~2;
 
41
\item problems using \textsc{ams} macro packages before \textsf{txfonts} are settled;
 
42
\item The problem with the {\tt ogonek} accent  and tabular environments (bad definition of \verb|\k|) is fixed;
 
43
\item The default encoding for \textsf{newtxtext} is now T$1$, but support is offered also for OT$1$ and LY$1$. As some add-on packages are available only in T$1$, that seems the best current choice.
 
44
\end{itemize}
 
45
\section{Text mode options}
 
46
The text mode environment invoked by
 
47
\begin{verbatim}
 
48
\usepackage{newtxtext}
 
49
\end{verbatim}
 
50
has two options: you may write
 
51
\begin{verbatim}
 
52
\usepackage[scaled=.93]{netxtext}
 
53
\end{verbatim}
 
54
to load the roman and typewriter text fonts at 93\% of normal size, and the sans serif (\textsf{Helvetica} clone) at scale $0.9*0.93$. This is not of much utility if the package is used with the math package {\tt newtxmath} to which it is already matched, but may be with other math packages. The option \texttt{osf} instructs the text fonts to use old-style figures \oldstylenums{1234567890} rather than the default lining figures $1234567890$.
 
55
\section{Math mode options}
 
56
The package invoked by
 
57
\begin{verbatim}
 
58
\usepackage{newtxmath}
 
59
\end{verbatim}
 
60
loads the math part of the {\tt txfonts} (with revised metrics and additional glyphs) and should be loaded \emph{after} the text font and its encoding have been specified, as it uses the text font settings to define how operators, numbers, math accents, \verb|\mathrm|, \verb|\mathbf| etc.\ are rendered. You should also load a Typewriter font so as not to generate mysterious error messages about \textsf{metafont} trying to generate \texttt{ectt10}. The package offers a number of options.
 
61
\begin{itemize}
 
62
\item {\tt varg} causes the math italic letters \verb|g,v,w,y| to be replaced by versions which are more distinctive---eg, useful for distinguishing math italic \verb|v| from \verb|\nu|;
 
63
\item {\tt libertine} loads different versions of math italic and bold math italic based on \textsf{Libertine} rather than \textsf{Times}---the {\tt varg} option is disabled in this case, as the equivalent variant forms are made available by default;
 
64
\item
 
65
{\tt cmintegrals} instructs \textsf{newtxmath} to load a thicker version of the Computer Modern integral in place of the \textsf{newtxmath} default---the txfonts integral (identical to the integral in the Wolfram fonts), which is not to everyone's taste---a consequence is that none of the special forms of \textsf{txfonts} integrals are available;
 
66
\item the combination
 
67
\begin{verbatim}
 
68
\usepackage{amsmath}% loads amstext, amsbsy, amsopn but not amssymb
 
69
\usepackage{newtxmath}
 
70
\end{verbatim}
 
71
causes no error, unlike the same combination with {\tt txfonts}, but does nothing significant. (Recall that {\tt amsmath} is loaded automatically if you use an \textsc{ams} document class such as {\tt amsart} or {\tt amsbook}, as is {\tt amsthm}.) The integrals are as defined in {\tt txfonts}. On the other hand,
 
72
\begin{verbatim}
 
73
\usepackage{amsmath}
 
74
\usepackage[cmintegrals]{newtxmath}
 
75
\end{verbatim}
 
76
allows you to use the forms \verb|\iint|, \verb|\iiint|, \verb|\iiiint| and \verb|\idotsint| defined in {\tt amsmath}, but using the pumped-up Computer Modern integral loaded by {\tt newtxmath}. 
 
77
\item {\tt amssymbols} (the default) and {\tt noamssymbols} determine whether the {\tt txfonts} versions of the \textsc{ams} symbols ({\tt msam}, {\tt msbm}) are loaded---if so, they override previous settings in {\tt amsmath}.
 
78
\item {\tt uprightGreek} and {\tt slantedGreek} determine the form of Greek alphabet loaded---the default is {\tt uprightGreek}, which loads upright uppercase and slanted lowercase Greek symbols, as is customary in Anglo-American mathematical typesetting. With the option {\tt slantedGreek}, which you might want to use if you cared about ISO standards, all Greek symbols are slanted. No matter which is set, \verb|\Gammaup| (or \verb|\upGamma|) gives you upright \verb|\Gamma|, etc.
 
79
\item The option {\tt cmbraces} instructs {\tt newtxmath} to ignore the brace collections from {\tt txfonts}, substituting a collection based on thickened versions of the Computer Modern braces, which I find much easier to distinguish from other delimiters. This works quite well in regular weight but looks a bit clunky in bold.
 
80
\end{itemize}
 
81
\textsc{Example 1:}
 
82
\begin{verbatim}
 
83
\usepackage{newtxtext} % T1, lining figures so math uses lf
 
84
\usepackage{textcomp} % required for special glyphs
 
85
\usepackage{amsmath}
 
86
\usepackage[varg,cmintegrals,cmbraces]{newtxmath}
 
87
\usepackage{bm} % load after all math to give access to bold math
 
88
\renewcommand{\rmdefault}{ntxrj} %old-style figures in text, not in math
 
89
\end{verbatim}
 
90
\textsc{Example 2:}
 
91
\begin{verbatim}
 
92
\usepackage[nf]{libertine} % a bit lighter than Times--no osf in math
 
93
\usepackage[T1]{fontenc} %the only LaTeX encoding that works with libertine
 
94
\usepackage{textcomp} % required to get special symbols
 
95
\usepackage[scaled=.85]{beramono}% a typewriter font must be defined
 
96
\usepackage{amsmath}
 
97
\usepackage[varg,cmintegrals,cmbraces]{newtxmath}
 
98
\renewcommand*{\rmdefault}{fxlj} %old-style figures in text, not math
 
99
\def\libertine{\fontfamily{fxlj}\selectfont}
 
100
\usepackage[bb=boondox,frak=boondox,scr=boondoxo]{mathalfa}
 
101
\usepackage{bm}% load after all math to give access to bold math
 
102
\end{verbatim}
 
103
\textsc{Example 3:}
 
104
\begin{verbatim}
 
105
\usepackage[nf]{libertine} % a bit lighter than Times--no osf in math
 
106
\usepackage[T1]{fontenc} %the only LaTeX encoding that works with libertine
 
107
\usepackage{textcomp} % required to get special symbols
 
108
\usepackage[scaled=.85]{beramono}% a typewriter font must be defined
 
109
\usepackage{amsmath}
 
110
\usepackage[libertine,cmintegrals,cmbraces]{newtxmath}
 
111
\renewcommand*{\rmdefault}{fxlj} %old-style figures in text, not math
 
112
\def\libertine{\fontfamily{fxlj}\selectfont}
 
113
\usepackage[bb=boondox,frak=boondox,scr=rsfso]{mathalfa}
 
114
\usepackage{bm}% load after all math to give access to bold math
 
115
\end{verbatim}
 
116
 
 
117
\textbf{Caution:} In encodings {\tt T1} and {\tt LY1}, the macro \verb|\mathrm| does not produce what you might expect for Greek letters, due to the difference between those encodings and {\tt OT1}. But what were you expecting with \verb|\mathrm{Gamma}| anyway? In {\tt T1} and {\tt LY1}, you'll get a math accent.
 
118
\section{Bold math fonts}\label{sec:boldmath}
 
119
Every math font in the {\tt txfonts} package, and in the {\tt newtx} package, is accompanied by a bold version. Some usage examples are given below. Generally, one may use either \verb|\boldmath| to change an entire formula to bold, or \verb|\boldsymbol| to change one symbol, but the spacing generally works better after loading the {\tt bm} package and using the \verb|\bm| macro.
 
120
 
 
121
The text glyphs dotlessi (\verb|\i|) and dotlessj (\verb|\j|) are rarely needed in actual text---in many fonts, roman dotlessi is very similar to the numeral 1. They are however sometimes needed to build special math glyphs. The following table shows how to generate the mathematical forms of dotlessi and dotlessj. I illustrate with only dotlessi---dotlessj is entirely analogous.
 
122
 
 
123
\begin{center}
 
124
  \begin{tabular}{@{} llll @{}}
 
125
    \hline
 
126
    Type & Weight & Command & Result \\ 
 
127
    \hline
 
128
    Math Italic & Regular & \verb|$\hat{\imath}$| & $\hat{\imath}$ \\ 
 
129
    Math Italic & Bold & \verb|$\bm{\hat{\imath}}$| & $\bm{\hat{\imath}}$ \\ 
 
130
    Roman & Regular & \verb|$\hat{\textrm{\i}}$| & $\hat{\textrm{\i}}$\\ 
 
131
    Roman & Bold & \verb|$\bm{\hat{\textbf{\i}}}$| & $\bm{\hat{\textbf{\i}}}$\\ 
 
132
    \hline
 
133
  \end{tabular}
 
134
\end{center}
 
135
\newcommand{\xyvec}[2]{\ensuremath{#1\bm{\textbf{\i}}#2\bm{\textbf{\j}}}}
 
136
 
 
137
In math, bold roman characters are often used to indicate vector quantities, and for this one uses constructions like 
 
138
\begin{itemize}
 
139
\item
 
140
\verb|$\mathbf{x}$| produces $\mathbf{x}$;
 
141
\item
 
142
\verb|$\bm{\mathrm{x}}$| produces $\bm{\mathrm{x}}$ (same as previous but may offer improved spacing);
 
143
\item
 
144
\verb|$\bm{x}$| produces $\bm{x}$ (not roman);
 
145
\item
 
146
\verb|$\bm{\hat{\mathbf{x}}}$| produces $\bm{\hat{\mathbf{x}}}$ (with a bold accent);
 
147
\item \verb|$\bm{\dot{x}}$| produces $\bm{\dot{x}}$ (bold but not roman);
 
148
\item the macro definition
 
149
\begin{verbatim}
 
150
\newcommand{\xyvec}[2]{\ensuremath{#1\bm{\textbf{\i}}#2\bm{\textbf{\j}}}}
 
151
\end{verbatim}
 
152
allows you to write \verb|\xyvec{x}{+y}| to output $\xyvec{x}{+y}$;
 
153
\item \verb|$\bm{\Gamma}$| produces $\bm{\Gamma}$ (bold Gamma);
 
154
\item \verb|$\bm{\hat{\Gamma}}$| produces $\bm{\hat{\Gamma}}$ (bold Gamma with bold accent).
 
155
\end{itemize}
 
156
(The last two assume that you have effectively set the option {\tt uprightGreek}---the default.)
 
157
 
 
158
\section{Samples from free Times and Libertine packages}
 
159
\textsc{TXFONTS:}\\
 
160
\begin{verbatim}
 
161
\usepackage{txfonts}
 
162
\end{verbatim}
 
163
\[\includegraphics{sample-tx-crop}\]
 
164
\begin{itemize}
 
165
\item
 
166
Complete match between text and math size and weight;
 
167
\item first formula much too cramped;
 
168
\item upper limit of integral much too close to integral sign;
 
169
\item square on $t$ in integrand comes very close to colliding with it.\end{itemize}
 
170
 
 
171
\vspace{1pc}
 
172
\textsc{NEWTXFONTS:}\\
 
173
\begin{verbatim}
 
174
\usepackage{newtxtext}
 
175
\usepackage{newtxmath}
 
176
\end{verbatim}
 
177
\[\includegraphics{sample-ntx-crop}\]
 
178
\begin{itemize}
 
179
\item
 
180
Complete match between text and math size and weight;
 
181
\item first formula much less cramped;
 
182
\item upper limit of integral not too close to integral sign;
 
183
\item square not too close to $t$ in exponent.
 
184
\end{itemize}
 
185
 
 
186
\vspace{1pc}
 
187
\textsc{MathTimePro2:}\\
 
188
\begin{verbatim}
 
189
\usepackage{newtxtext}
 
190
\usepackage[lite]{mtpro2}
 
191
\end{verbatim}
 
192
\[\includegraphics{sample-mtp-crop}\]
 
193
\begin{itemize}
 
194
\item
 
195
Complete match between text and math size and weight;
 
196
\item first formula quite spread out;
 
197
\item upper limit of integral not too close to integral sign;
 
198
\item plenty of space between square and $t$ in exponent.
 
199
\end{itemize}
 
200
 
 
201
\vspace{1pc}
 
202
\textsc{Libertine and MathTimePro2:}\\
 
203
\begin{verbatim}
 
204
\usepackage{libertine}
 
205
\usepackage[lite]{mtpro2}
 
206
\end{verbatim}
 
207
\[\includegraphics{sample-libmtp-crop}\]
 
208
\begin{itemize}
 
209
\item
 
210
Mismatch of weight between text and math;
 
211
\item first formula quite spread out;
 
212
\item upper limit of integral not too close to integral sign;
 
213
\item plenty of space between square and $t$ in exponent.
 
214
\end{itemize}
 
215
 
 
216
\vspace{1pc}
 
217
\textsc{Libertine and newtxmath:}\\
 
218
\begin{verbatim}
 
219
\usepackage{libertine}
 
220
\usepackage[libertine]{newtxmath}
 
221
\end{verbatim}
 
222
\[\includegraphics{sample-lib-crop}\]
 
223
\begin{itemize}
 
224
\item
 
225
Very good match between text and math in size and weight;
 
226
\item first formula not cramped;
 
227
\item upper limit of integral not too close to integral sign;
 
228
\item space between square and $t$ in exponent.
 
229
\end{itemize}
 
230
 
 
231
\vspace{1pc}
 
232
\textsc{Mathptmx:}\\
 
233
\begin{verbatim}
 
234
\usepackage{mathptmx}
 
235
\end{verbatim}
 
236
\[\includegraphics{sample-ptmx-crop}\]
 
237
\begin{itemize}
 
238
\item
 
239
Good match between text and math size and weight, though the summation symbol (from the system {\tt symbol} font) is too small and too dark;
 
240
\item first formula well spread;
 
241
\item upper limit of integral not too close to integral sign;
 
242
\item space between square and $t$ in exponent;
 
243
\item there are no upright Greek lowercase letters in this package;
 
244
\item the package lacks a number of amenities that are present in other packages.
 
245
\end{itemize}
 
246
\section{Items installed} As well as a collection of virtual fonts, font definition files and the central {\tt newtxtext.sty} and {\tt newtxmath.sty} files, the package contains one map file {\tt ntx.map} that must be enabled for the package to function correctly. It contains the following items. The two {\tt fxl*.pfb} files to which they refer are part of the Libertine-Legacy collection that is part of \TeX\ Live. The map file {\tt libertine.map} must not have been disabled. The other {\tt.pfb} files are either part of the \textsf{txfonts} or are fonts derived from them or from the \textsf{Computer Modern} fonts in some manner.
 
247
\begin{verbatim}
 
248
ntxexmods NTXEXMODS <ntxexmods.pfb
 
249
ntxbexmods NTXBEXMODS <ntxbexmods.pfb
 
250
ntxexb NTXEXB <ntxexb.pfb
 
251
ntxbexb NTXBEXB <ntxbexb.pfb
 
252
rtxmio rtxmi " -.167 SlantFont " <rtxmi.pfb
 
253
rtxbmio rtxbmi " -.167 SlantFont " <rtxbmi.pfb
 
254
rfxlri-alt LinLibertineI " LibertineAltEncoding ReEncodeFont " 
 
255
 <[libertinealt.enc <fxlri.pfb
 
256
rfxlbi-alt LinLibertineBI " LibertineAltEncoding ReEncodeFont " 
 
257
 <[libertinealt.enc <fxlbi.pfb
 
258
\end{verbatim}
 
259
The font files {\tt ntxexmods.pfb} and {\tt ntxbexmods.pfb} were derived from {\tt cmex10.pfb} by FontForgery, thickening the Computer Modern braces to match the weight of the \textsf{txfonts} braces. The pair {\tt ntxexb.pfb} and {ntxbexb.pfb} were similarly derived from {\tt cmsy7.pfb} and {\tt cmex10.pfb} to produce more braces and matching integral signs based on Computer Modern. The {\tt.tfm} files {rtx[b]mio.tfm} are simply unslanted versions of {\tt rtxmi}, from which we construct upright partial derivative symbols.
 
260
The last two entries provide us with a way to access custom-encoded versions of {\tt fxlri.pfb} and {\tt fxlbi.map} in order to access to some of the unencoded alternate glyphs---eg, Greek letters, {\tt J.alt} and {\tt v.alt}. 
 
261
 
 
262
\end{document}  
 
 
b'\\ No newline at end of file'