summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ccfonts/ccfonts.dtx
blob: 5135d128aca4e3d1c469584acbe7e5900f880597 (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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
%\CheckSum{146}
%
% \iffalse meta comment
%
% Copyright (c) Walter Schmidt 1997--2000
%
% This program may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.2
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.2 or later is part of all distributions of LaTeX
% version 1999/12/01 or later.
%
% This program consists of the files ccfonts.dtx, cc.fdd and
% ccfonts.ins.
%
% \fi
%
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
%<*driver>
\ProvidesFile{ccfonts.drv}
%</driver>
%<package>\ProvidesPackage{ccfonts}
           [2020/03/25 v1.2 (WaS)]
%
%<*driver>
\documentclass[11pt]{ltxdoc}
\usepackage{mflogo,url}
\CodelineNumbered
\begin{document}
 \DocInput{ccfonts.dtx}
\end{document}
%</driver>
% \fi
%
% \GetFileInfo{ccfonts.drv}
% \DeleteShortVerb{\|}
% \MakeShortVerb{\+}
%
% \title{The \LaTeXe{} package \texttt{ccfonts}}
% \author{Walter Schmidt\thanks{\texttt{walter.schmidt@arcormail.de}}}
% \date{(\fileversion{} -- \filedate)}
% \maketitle
% \tableofcontents
%
% \section{Prerequisites}
% In order to make use of the package +ccfonts+, the following fonts
% and +.fd+ files are required:
% \begin{itemize}
% \item The Concrete text fonts with traditional encoding
%   (CTAN: \path{fonts/concrete/})
% \item The Concrete text fonts with European encoding
%   (CTAN: \path{fonts/ecc/})
% \item The mathematical Concrete fonts
%   (CTAN: \path{fonts/concmath/})
% \item The +.fd+ files for the traditional and mathematical
%   Concrete fonts (CTAN: \path{macros/latex/contrib/supported/concmath/})
% \item The +.fd+ files for the European Concrete fonts,
%   which are distributed and installed in conjunction
%   with the +ccfonts+ package
% \end{itemize}
% On CTAN the fonts are available in \MF{} format.
% The Concrete typefaces are also provided in Type1 format from
% Micropress Inc, see
% \path{<http://www.micropress-inc.com>}.
%
%
% \section{Using the package}
% The \LaTeX{} macro package +ccfonts+
% supports typesetting with the font family `Concrete'.
% Loading this package through
% \begin{verse}
% +\usepackage{ccfonts}+
% \end{verse}
% will effect the following:
% \begin{itemize}
% \item The default roman font family is changed to \texttt{ccr},
% i.e.\ Concrete.
% \item The default leading (+\baselineskip+) for the font sizes 8--12\,pt
% is increased slightly.
% \item The `Concrete' fonts are used in math mode, too.
% \item The packages +amsfonts+ or +amssymb+, if loaded  additionally,
% will use the Concrete versions of the AMS symbol fonts.
%
% Notice that you may still have to specify the option +psamsfonts+
% for these packages, so as to prevent them from using design sizes
% of the Euler Fraktur fonts, which may be
% unavailable within your TeX system; this works flawlessly with
% version 1.1 of the +ccfonts+ package now. (You need not care for this
% subject, unless Euler Fraktur is actually used.)
% \end{itemize}
%
% \subsection{Package options}
% \newcommand{\oitem}[1]{\item[\texttt{#1}]}
% \begin{description}
%   \oitem{boldsans} The semibold series of CM Sans is used
%   as a replacement for the missing bold series of Concrete.
%   (The default behaviour is to use the bold extended version of
%   CM Roman.)
%   \oitem{standard-baselineskips} disables the increased leading.
%   This can be useful, e.g., when typesetting in narrow columns.
%   \oitem{exscale} implements scaling of the math extension font.
%   For a discussion of this feature see the file +exscale.dtx+.
%   \oitem{slantedGreek} makes uppercase Greek letters slanted by default.
%   Regardless of this option, the new commands +\upDelta+ and +\upOmega+
%   will always produce an upright \( \Delta \) and \( \Omega \).
% \end{description}
%
% \subsection{Font encoding}
% The package does \emph{not} change the default output font
% encoding from OT1.  Switching to the extended T1 and TS1 encodings
% needs the following additional commands:
% \begin{verse}
% +\usepackage[T1]{fontenc}+\\
% +\usepackage{textcomp}+
% \end{verse}
%
% \section{Known problems}
% \begin{itemize}
% \item
% There are no bold math fonts available.
% \item
% In order to enlarge the default +\baselineskip+, the size-changing
% macros have been redefined, and they are no longer as robust as the
% original definitions.  This may result in \LaTeX\ errors with
% `moving arguments'.  As a workaround, you may protect any font-related
% commands in moving arguments with a +\protect+ command.  In case this
% does not help, the package should be loaded with the option
% \textsf{standard-baselineskips} which will prevent the commands from
% being redefined;  you will, however, have to care for an appropriate
% line spacing by other means then.
% \end{itemize}
%
% \section{NFSS classification of the Concrete typefaces}
% \begin{center}
%   \begin{tabular}{|l|l|l|l|}
%   \hline
%   \textbf{encoding} & \textbf{family} & \textbf{series} & \textbf{shape(s)}\\
%   \hline\hline
%   \multicolumn{4}{|c|}{\textit{Concrete}}\\ \hline
%   OT1, T1, TS1 & ccr & m & n, sl, it, sc \\ \hline
%   OT1          & ccr & c & sl\\ \hline \hline
%   \multicolumn{4}{|c|}{\textit{Concrete Math}}\\ \hline
%   OML          & ccm  & m & it \\ \hline \hline
%   OMS          & ccsy & m & n  \\ \hline
%   OMX          & ccex & m & n  \\ \hline \hline
%   \multicolumn{4}{|c|}{\textit{Concrete AMS A, B}}\\ \hline
%   U          & msa & m & n \\ \hline
%   U          & msb & m & n \\ \hline
%   \end{tabular}
% \end{center}
% Notice, that
% \begin{itemize}
%   \item the series c (condensed) is available as slanted
%   and with a font size of 9\,pt only;
%   \item the Concrete AMS fonts are only defined
%   through the package \textsf{ccfonts},
%   i.e., there are no related \texttt{.fd} files.
% \end{itemize}
%
% \StopEventually{}
%
% \section{Implementation}
% \subsection{Font setup for text mode}
% We make \texttt{ccr} the default font family:
%    \begin{macrocode}
%<*package>
\renewcommand{\rmdefault}{ccr}
%    \end{macrocode}
%
% The +\baselineskip+ should be larger than with CM Roman.
% In order to overwrite the +\baselineskip+ defined in the commands
% like +\normalsize+, +\small+, etc., we use a trick from Frank Jensen's
% package +beton+.
% First we set up a table containing our +\baselineskip+ values:
%    \begin{macrocode}
\def\cc@baselineskip@table
   {<\@viiipt>10<\@ixpt>11.5<\@xpt>13<\@xipt>14.5<\@xiipt>16}
%    \end{macrocode}
% All the standard \LaTeX\ size-changing commands (+\small+, +\large+,
% etc.)\ are defined in terms of the +\@setfontsize+ macro.  This
% macro is called with the following three arguments: +#1+~is the
% size-changing command; +#2+~is the font size; +#3+~is the
% +\baselineskip+ value.  We modify this macro to check
% the above +\cc@baselineskip@table+ for an alternative +\baselineskip+
% value:
%    \begin{macrocode}
\def\cc@setfontsize#1#2#3%
   {\edef\@tempa{\def\noexpand\@tempb####1<#2}%
    \@tempa>##2<##3\@nil{\def\cc@baselineskip@value{##2}}%
    \edef\@tempa{\noexpand\@tempb\cc@baselineskip@table<#2}%
    \@tempa><\@nil
    \ifx\cc@baselineskip@value\@empty
       \def\cc@baselineskip@value{#3}%
    \fi
    \old@setfontsize{#1}{#2}\cc@baselineskip@value}
%    \end{macrocode}
% Now we redefine +\@setfontsize+:
%    \begin{macrocode}
\let\old@setfontsize=\@setfontsize
\let\@setfontsize=\cc@setfontsize
%    \end{macrocode}
%
% \subsection{Options}
% \subsubsection{Standard leading}
% The +\baselineskip+ values specified in the above table should be
% appropriate for most purposes, i.\,e., for one-column material in the
% normal article/report/book formats.  However, it is sometimes
% desirable to use a smaller value for +\baselineskip+, e.\,g. in two-column
% material.  We therefore provide an option
% to turn off the above automatic mechanism for +\baselineskip+ settings:
%    \begin{macrocode}
\DeclareOption{standard-baselineskips}{%
 \let\@setfontsize=\old@setfontsize}
%    \end{macrocode}
%
% \subsubsection{The option \texttt{exscale}}
% The code is simply copied from \texttt{exscale.sty},
% with \texttt{xccex} instead of \texttt{cmex}.
%    \begin{macrocode}
\DeclareOption{exscale}{
\DeclareFontFamily{OMX}{ccex}{}
\DeclareFontShape{OMX}{ccex}{m}{n}{%
<-8>sfixed*xccex7%
<8>xccex8%
<9>xccex9%
<10><10.95><12><14.4><17.28><20.74><24.88>xccex10%
}{}
\newdimen\big@size
\addto@hook\every@math@size{\setbox\z@\vbox{\hbox{$($}\kern\z@}%
   \global\big@size 1.2\ht\z@}
\def\bBigg@#1#2{%
   {\hbox{$\left#2\vcenter to#1\big@size{}\right.\n@space$}}}
\def\big{\bBigg@\@ne}
\def\Big{\bBigg@{1.5}}
\def\bigg{\bBigg@\tw@}
\def\Bigg{\bBigg@{2.5}}
}
%    \end{macrocode}
%
% \subsubsection{The option \texttt{slantedGreek}}
%    \begin{macrocode}
\let\upDelta\Delta
\let\upOmega\Omega
\DeclareOption{slantedGreek}{%
 \DeclareMathSymbol{\Gamma}{\mathalpha}{letters}{0}
 \DeclareMathSymbol{\Delta}{\mathalpha}{letters}{1}
 \DeclareMathSymbol{\Theta}{\mathalpha}{letters}{2}
 \DeclareMathSymbol{\Lambda}{\mathalpha}{letters}{3}
 \DeclareMathSymbol{\Xi}{\mathalpha}{letters}{4}
 \DeclareMathSymbol{\Pi}{\mathalpha}{letters}{5}
 \DeclareMathSymbol{\Sigma}{\mathalpha}{letters}{6}
 \DeclareMathSymbol{\Upsilon}{\mathalpha}{letters}{7}
 \DeclareMathSymbol{\Phi}{\mathalpha}{letters}{8}
 \DeclareMathSymbol{\Psi}{\mathalpha}{letters}{9}
 \DeclareMathSymbol{\Omega}{\mathalpha}{letters}{10}
}
%    \end{macrocode}
%
% \subsection{The option \texttt{boldsans}}
%    \begin{macrocode}
\DeclareOption{boldsans}{%
 \@ifundefined{DeclareFontSeriesDefault}{%
  \renewcommand{\bfdefault}{sbc}}{%
  \DeclareFontSeriesDefault[rm]{bf}{sbc}}}
%    \end{macrocode}
%
% \subsubsection{Processing options}
% Note that +\old@setfontsize+ must have been defined before!
%    \begin{macrocode}
\ProcessOptions\relax
%    \end{macrocode}
%
% \subsection{Font setup for math mode}
%    \begin{macrocode}
\DeclareSymbolFont  {operators}   {OT1}{ccr} {m}{n}
\DeclareSymbolFont  {letters}     {OML}{ccm} {m}{it}
\DeclareSymbolFont  {symbols}     {OMS}{ccsy}{m}{n}
\DeclareSymbolFont  {largesymbols}{OMX}{ccex}{m}{n}
\DeclareMathAlphabet{\mathbf}     {OT1}{ccr}{bx}{n}
\DeclareMathAlphabet{\mathit}     {OT1}{ccr} {m}{it}
%    \end{macrocode}
%
% In case the package +amsfonts+ is loaded additionally,
% we must ensure that the Concrete versions of the
% AMS symbol fonts are used.  We execute the font definitions
% AtBeginDocument, so that loading +amsfonts+ with the
% option +psamsfonts+ cannot do any harm.  Notice that the option may
% be required for getting the Euler Fraktur fonts right.
%    \begin{macrocode}
\AtBeginDocument{
   \DeclareFontFamily{U}{msa}{}
   \DeclareFontShape{U}{msa}{m}{n}{%
   <5><6><7><8><9><10>gen*xccam%
   <10.95><12><14.4><17.28><20.74><24.88>xccam10}{}
   \DeclareFontFamily{U}{msb}{}
   \DeclareFontShape{U}{msb}{m}{n}{%
   <5><6><7><8><9><10>gen*xccbm%
   <10.95><12><14.4><17.28><20.74><24.88>xccbm10}{}
}
%    \end{macrocode}
%
%
% \subsection{Initialization}
% We ensure that any package loaded after \texttt{ccfonts}
% will find the new value of +\baselineskip+.
%    \begin{macrocode}
\normalsize
%</package>
%    \end{macrocode}
%
% The next line of code prevents DocStrip from adding the
% character table to all modules:
%    \begin{macrocode}
\endinput
%    \end{macrocode}
% \Finale
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%