summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/universa/uni.sty
blob: da8261531dd818bf1dbcdc43d67edfd1995ce8d2 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
%%
%% This is file `uni.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% universa.dtx  (with options: `package')
%% 
%% Copyright (C) 1998 Christian Holm.
%% 
%% This file is NOT the source for universal, because almost all
%% comments have been stripped from it.  It is NOT the preferred
%% form of universal for making modifications to it.
%% 
%% Therefore you can NOT redistribute and/or modify THIS file.
%% You can however redistribute the complete source (universa.dtx
%% and universa.ins) and/or modify it under the terms of the GNU
%% General Public License as published by the Free Software
%% Foundation; either version 2, or (at your option) any later
%% version.
%% 
%% The universal font and package is distributed in the hope that
%% it will be useful, but WITHOUT ANY WARRANTY; without even the
%% implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
%% PURPOSE.  See the GNU General Public License for more details.
%% 
%% You should have received a copy of the GNU General Public
%% License along with this package; if not, write to the
%%   Free Software Foundation, Inc.,
%%   675 Mass Ave, Cambridge,
%%   MA 02139, USA.
%% 
%% See the file universa.dtx for further comments and documentation.
%% 
\def\unifileversion{v2.1}
\def\unifiledate{2019/08/26}
\ProvidesPackage{uni}[\unifiledate\space\unifileversion\space universal
                          package.]
\newif\if@uni\@unifalse
\newif\ifstri@t\stri@tfalse
\newif\ifdef@ult\def@ultfalse
\newif\ifm@dium\m@diumfalse
\DeclareOption{strict}{\stri@ttrue}
\DeclareOption{default}{\def@ulttrue}
\DeclareOption{medium}{\m@diumtrue}
\DeclareOption{bold}{\m@diumfalse}
\ExecuteOptions{medium}
\ProcessOptions\relax

\newcommand{\uni@init}{\@unitrue}
\DeclareRobustCommand{\Declare@Uni}[1]{%
  \edef\temp@{\expandafter\@gobble\string#1}
  \edef\temp@a{\csname uni@\temp@\endcsname}
  \@ifundefined{\temp@}{%
    \edef\temp@c{{%
        \noexpand\if@uni\noexpand\aftergroup\temp@a\noexpand%
        \else\noexpand\UniError{\noexpand#1}\noexpand\fi}}}{%
    \edef\temp@b{\csname no@uni@\temp@\endcsname}
    \edef\temp@c{{%
      \noexpand\if@uni\noexpand\aftergroup\temp@a\noexpand%
      \else\noexpand\aftergroup\temp@b\noexpand\fi}}
    \expandafter\let\temp@b#1}}
\DeclareRobustCommand{\DeclareUniChar}[2]{%
  \Declare@Uni{#1}
  \expandafter\chardef\temp@a=#2
  \let#1\temp@c}
\def\DeclareUniCommand#1{%
  \@ifnextchar[{\DeclareUni@xarg#1}{\DeclareUni@narg#1}}
\def\DeclareUni@xarg#1[#2]#3{%
  \Declare@Uni{#1}
  \expandafter\DeclareRobustCommand\temp@a[#2]{#3}
  \let#1\temp@c}
\def\DeclareUni@narg#1#2{%
  \Declare@Uni{#1}
  \expandafter\DeclareRobustCommand\temp@a{#2}
  \let#1\temp@c}
\@onlypreamble\DeclareUniChar\relax
\@onlypreamble\DeclareUniCommand\relax
\DeclareRobustCommand{\UniError}[1]{%
  \PackageError{uni}{%
    Command \string#1 not defined outside universal font.}{%
    Correct your source file, so that \string#1 doesn't appear^^J%
    ouside of universal font, then run LaTeX again.^^J%
    Prepare your self for some gastly output.}}

\DeclareUniChar{\bausquare}{"00}
\DeclareUniChar{\baucircle}{"01}
\DeclareUniChar{\bautriangle}{"02}
\DeclareUniChar{\bauhead}{"03}
\DeclareUniChar{\bauforms}{"04}
\DeclareUniChar{\dh}{"05}
\DeclareUniChar{\ng}{"06}
\DeclareUniChar{\th}{"07}
\DeclareUniChar{\varQ}{"08}
\DeclareUniChar{\NG}{"09}
\DeclareUniChar{\TH}{"0A}
\DeclareUniChar{\textogonek}{"0B}
\DeclareUniChar{\textbraceleft}{"0C}
\DeclareUniChar{\textbraceright}{"0D}
\DeclareUniChar{\textsection}{"0E}
\DeclareUniChar{\textbar}{"0F}
\DeclareUniChar{\guilsinglleft}{"22}
\DeclareUniChar{\guilsinglright}{"5C}
\DeclareUniChar{\quotesinglbase}{"2C}
\DeclareUniCommand{\quotedblbase}{\char"2C\kern-.3em\char"2C}
\DeclareUniCommand{\textquotedblleft}{``}
\DeclareUniCommand{\textquotedblright}{''}
\DeclareUniCommand{\guillemoleft}{\char"22\char"22}
\DeclareUniCommand{\guillemoright}{\char"5C\char"5C}
\DeclareUniCommand{\DH}{\raise.5ex\hbox{\char"2D}\kern-.5em D}
\DeclareUniCommand{\DJ}{\raise.5ex\hbox{\char"2D}\kern-.5em D}
\DeclareUniCommand{\dj}{\raise.75ex\hbox{\char"2D}\kern-1em d}
\DeclareUniCommand{\textunderscore}{\lower.5ex\hbox{\char"7B}}
\DeclareUniCommand{\k}[1]{%
    \leavevmode\setbox\z@\hbox{#1}\ifdim\ht\z@=1ex\accent11 #1%
    \else{\ooalign{\unhbox\z@\crcr\hidewidth\char11\hidewidth}}\fi}

\DeclareRobustCommand\unifamily{%
  \not@math@alphabet\unifamily\relax%
  \fontfamily\unifamilydefault\selectfont}
\newcommand{\unifamilydefault}{uni}

\ifm@dium
  \let\uniseries\relax
  \let\uniseriesdefault\relax
\else
  \DeclareRobustCommand\uniseries{%
    \not@math@alphabet\uniseries\relax%
    \fontseries\uniseriesdefault\selectfont}
  \newcommand{\uniseriesdefault}{b}
\fi

\ifstri@t
  \DeclareRobustCommand\unishape{%
    \not@math@alphabet\unishape\relax%
    \fontseries\unishapedefault\selectfont}
  \newcommand{\unishapedefault}{st}
\else
  \let\unishape\relax
  \let\unishapedefault\relax
\fi
\DeclareRobustCommand\stshape{%
  \not@math@alphabet\stshape\relax%
  \fontshape\stdefault\selectfont}
\newcommand{\stdefault}{st}

\DeclareTextFontCommand{\textuni}{%
  \uni@init\unifamily\uniseries\unishape}
\ifstri@t
\else
  \DeclareTextFontCommand{\textunirm}{%
    \uni@init\unifamily\mdseries\upshape}
  \DeclareTextFontCommand{\textunibf}{%
    \uni@init\unifamily\bfseries\upshape}
  \DeclareTextFontCommand{\textunisl}{%
    \uni@init\unifamily\mdseries\slshape}
  \DeclareTextFontCommand{\textunisc}{%
    \uni@init\unifamily\mdseries\scshape}
  \DeclareTextFontCommand{\textunist}{%
    \uni@init\unifamily\mdseries\stshape}
  \DeclareTextFontCommand{\textunibsl}{%
    \uni@init\unifamily\bfseries\slshape}
  \DeclareTextFontCommand{\textunibsc}{%
    \uni@init\unifamily\bfseries\scshape}
  \DeclareTextFontCommand{\textunibst}{%
    \uni@init\unifamily\bfseries\stshape}
\fi

\DeclareOldFontCommand{\uni}{%
  \uni@init\unifamily\uniseries\unishape}{}
\ifstri@t
\else
  \DeclareOldFontCommand{\unirm}{%
    \uni@init\unifamily\mdseries\upshape}{}
  \DeclareOldFontCommand{\unibf}{%
    \uni@init\unifamily\bfseries\upshape}{}
  \DeclareOldFontCommand{\unisl}{%
    \uni@init\unifamily\mdseries\slshape}{}
  \DeclareOldFontCommand{\unisc}{%
    \uni@init\unifamily\mdseries\scshape}{}
  \DeclareOldFontCommand{\unist}{%
    \uni@init\unifamily\mdseries\stshape}{}
  \DeclareOldFontCommand{\unibsl}{%
    \uni@init\unifamily\bfseries\slshape}{}
  \DeclareOldFontCommand{\unibsc}{%
    \uni@init\unifamily\bfseries\scshape}{}
  \DeclareOldFontCommand{\unibst}{%
    \uni@init\unifamily\bfseries\stshape}{}
\fi

\ifdef@ult
  \renewcommand{\familydefault}{uni}
  \ifm@dium\renewcommand{\seriesdefault}{m}
  \else\renewcommand{\seriesdefault}{b}\fi
  \renewcommand{\itdefault}{sl}
  \DeclareRobustCommand\cmrfamily{%
    \not@math@alphabet\cmrfamily\relax%
    \fontencoding\cmrenc\fontfamily\cmrdefault\selectfont}
  \newcommand{\cmrdefault}{cmr}
  \newcommand{\cmrenc}{OT1}
  \DeclareTextFontCommand{\textcmr}{\cmrfamily}
  \DeclareOldFontCommand{\cmr}{\cmrfamily}{}
\fi


\endinput
%%
%% End of file `uni.sty'.