summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/fonts/txuprcal/txuprcal-doc.tex
blob: 00cd7e83df835b664c9ecf7d81b3b133f057ee34 (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
56
57
58
59
60
61
62
63
64
65
66
% !TEX TS-program = pdflatexmk
\documentclass[11pt]{article}
\pdfmapfile{+TXUprCal.map}
%SetFonts
% newtxtext+newtxmath
\usepackage{newtxtext} %loads helv for ss, txtt for tt
\usepackage{amsmath}
\usepackage[bigdelims]{newtxmath}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
%SetFonts
\usepackage[margin=1.4in]{geometry} 
%\geometry{landscape}                % Activate for for rotated page geometry
\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{url}\usepackage{graphicx}
\DeclareRobustCommand{\Qupr}{%
\text{{\usefont{U}{txuprcal}{m}{n}Q\/}}}

\usepackage{hyperref}
\title{TX Upright Calligraphic}
\author{Michael Sharpe\\
msharpe at ucsd dot edu}
\date{}

\begin{document}
\maketitle
The {\tt pfb} files in this package are taken from the the upper-case glyphs in the TX symbols fonts, made upright and reworked to appear appropriately shaped. 
From these, using {\tt afm2tfm} and {\tt fontinst}, two {\tt tfm} files were produced:
\begin{verbatim}
txUprCal-Bold.tfm
txUprCal-Regular.tfm
\end{verbatim}

There are two ways to use these. The traditional method is based on  {\tt.sty} and {\tt.fd} files: {\tt txuprcal.sty} and {\tt utxuprcal.fd}. For example,
\begin{verbatim}
\usepackage[scaled=.95]{txuprcal}
\end{verbatim}
redefines the output from \verb|\mathcal| and \verb|\mathbcal| to come from {\tt TXUprCal-Regular} and {\tt TXUprCal-Bold} respectively, scaled to 95\% of normal size.

The second method uses a different interface not depending on the {\tt.sty} and {\tt.fd} files at all. The package \textsf{mathalfa	} permits you to say
\begin{verbatim}
\usepackage[cal=txuprcal,calscaled=.95]{mathalfa}
\end{verbatim}
to accomplish the same effect as the above.

See the \textsf{mathalfa} documentation for font samples of these and many other math alphabets.


Because using it in the ways described above adds an extra math family, it may be desirable to load it not as a math font but as a text font that is used as a fake math font. This can be desirable if only a few glyphs are used, all of which can be tweaked and given their own macro names.

Here is an incomplete example. The {\tt fd} file for this package is {\tt utxuprcal.fd}. Therefore
\begin{verbatim}
\DeclareRobustCommand{\Qupr}{%
\text{{\usefont{U}{txuprcal}{m}{n}Q\/}}}
\end{verbatim}
used within a math fragment makes \verb|Qupr| render as the letter Q in regular weight from TXUprCal. The \verb|\/| in its definition is not necessary, but should be followed for other letters which may have an italic correction, without which the glyph would not render correctly. Not having the attributes of a glyph from a math font, you may have to tweak accent placement as well as subscript and superscript placement. However, the definition does size correctly in formulas. Because the shapes are upright, there should be not be serious problems with subscripts and superscripts, though you may occasionally need to add an \verb|\mkern| to correct a horizontal position. It is usually best to place subscripts and superscripts on an empty character immediately following. For example:

\verb|$\skew1\hat{\Qupr}{}^p_n}$|:$\quad \skew1\hat{\Qupr}{}^p_n$\\
\verb|$\frac{\Qupr+\sqrt{2\pi}}{\Qupr+1}$|:$\quad \frac{\Qupr+\sqrt{2\pi}}{\Qupr+1}$\\

If you need to scale the text font {\tt txuprcal}, give a numeric scale value to \verb|\TXUprCalScale|> For example:
\begin{verbatim}
\def\TXUprCalScale{1.02}
\end{verbatim}

\end{document}