summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/newtxtt/newtxtt.sty
blob: 082d8257064c7cee713876a9d82259eb9732a653 (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
\NeedsTeXFormat{LaTeX2e}
\def\filedate{2014/07/17}
\def\fileversion{1.02}
\ProvidesPackage{newtxtt}[\filedate\space v\fileversion]
\message{`newtxtt' v\fileversion, \filedate\space Typewriter text macros based on txfonts (msharpe)}

\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
\DeclareEncodingSubset{TS1}{newtxtt}{0}
\DeclareEncodingSubset{TS1}{newtxttz}{0}
\renewcommand*{\ttdefault}{newtxtt}
\newcommand*{\ttzdefault}{newtxttz}

\edef\newtxtt@fig{a}
\IfFileExists{xkeyval.sty}{
    \RequirePackage{xkeyval}
	\define@choicekey*+{newtxtt.sty}{zerostyle}[\val\nr]{a,b,c,d}[a]{%
		\ifcase\nr\relax
			\edef\newtxtt@fig{a}
		\or
			\edef\newtxtt@fig{b}
		\or
			\edef\newtxtt@fig{c}
		\or
			\edef\newtxtt@fig{d}
		\fi
	}{%
		\PackageWarning{newtxtt}{Option zerostyle must be one of a,b,c,d. Using `a'.}%
	}
    \newcommand*{\newtxtt@scale}{1}
    \DeclareOptionX{scale}{\renewcommand*{\newtxtt@scale}{##1}}
    \DeclareOptionX{scaled}{\renewcommand*{\newtxtt@scale}{##1}}
    \DeclareOptionX{nomono}{\let\ttdefault\ttzdefault}
}{
    \let\DeclareOptionX\DeclareOption
    \let\ExecuteOptionsX\ExecuteOptions
    \let\ProcessOptionsX\ProcessOptions
}
\ProcessOptionsX<newtxtt.sty>
\DeclareRobustCommand\ttzfamily
        {\not@math@alphabet\ttzfamily\mathtt
         \fontfamily\ttzdefault\selectfont}
\DeclareOldFontCommand{\ttz}{\normalfont\ttzfamily}{\mathtt}
\DeclareTextFontCommand{\textttz}{\ttzfamily}

\endinput