| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright 1999 |
| 4 |
% Karsten Tinnefeld <[email protected]> |
| 5 |
% |
| 6 |
% ----------------------------------------- |
| 7 |
% This file is part of the mtgreek package, |
| 8 |
% a contribution to the LaTeX2e system. |
| 9 |
% ----------------------------------------- |
| 10 |
% |
| 11 |
% It may be distributed and/or modified under the conditions of the |
| 12 |
% LaTeX Project Public License, either version 1.1 of this licence, or |
| 13 |
% (at your option) any later version. The latest version of this |
| 14 |
% license is in http://www.latex-project.org/lppl.txt and version 1.1 |
| 15 |
% is part of all distributions of LaTeX version 1999/06/01 or later. |
| 16 |
% |
| 17 |
\NeedsTeXFormat{LaTeX2e} |
| 18 |
%<*dtx> |
| 19 |
\ProvidesFile{mtgreek.dtx} |
| 20 |
%</dtx> |
| 21 |
%<!driver>\ProvidesPackage{mtgreek} |
| 22 |
%<driver>\ProvidesFile{mtgreek.drv} |
| 23 |
% \fi |
| 24 |
% \ProvidesFile{mtgreek.dtx} |
| 25 |
[1999/07/29 v0.01 upright and italic Greek letters with MathTime] |
| 26 |
% \iffalse |
| 27 |
%<*driver> |
| 28 |
\documentclass{ltxdoc} |
| 29 |
\usepackage{multicol} |
| 30 |
\GetFileInfo{mtgreek.dtx} |
| 31 |
\newcommand*{\docdate}{1999/07/29} |
| 32 |
\EnableCrossrefs |
| 33 |
%\DisableCrossrefs% when index is ready |
| 34 |
\CodelineIndex |
| 35 |
\RecordChanges |
| 36 |
\begin{document} |
| 37 |
\DocInput{\filename} |
| 38 |
\end{document} |
| 39 |
%</driver> |
| 40 |
% \fi |
| 41 |
% |
| 42 |
% \CheckSum{89} |
| 43 |
% |
| 44 |
% \changes{v0.01}{1999/07/29}{Initial Revision (KT).} |
| 45 |
% |
| 46 |
% \DoNotIndex{\advance, \begingroup, \count, \count@, \def, \divide, |
| 47 |
% \endgroup, \expandafter, \global, \hexnumber@, \mathchardef, |
| 48 |
% \multiply, \newcommand, \ProcessOptions, \relax, \RequirePackage, |
| 49 |
% \sixt@@n, \tw@, \z@} |
| 50 |
% |
| 51 |
% \date{printed \today} |
| 52 |
% \title{\texttt{mtgreek}, a package for enabling upright and italic |
| 53 |
% Greek math letters with MathTime\texttrademark\thanks{This file |
| 54 |
% has version number \fileversion, last revised on \filedate, |
| 55 |
% documentation dated \docdate.}} |
| 56 |
% \author{Karsten Tinnefeld\\ |
| 57 |
% Universit\"at Dortmund\\ |
| 58 |
% \texttt{[email protected]}} |
| 59 |
% \maketitle |
| 60 |
% |
| 61 |
% \section{Introduction} |
| 62 |
% This package is an add-on to the |MathTime| style, a style to |
| 63 |
% provide TeX support for the use of the MathTime\texttrademark\ |
| 64 |
% commercially distributed by Y\&Y, Inc. |
| 65 |
% |
| 66 |
% The style file for MathTime has hard-wired uppercase Greek letters, |
| 67 |
% they are upright and only upright, though the fonts come with |
| 68 |
% italic letters as well for each and every weight. This package |
| 69 |
% provides a switch to choose between both kinds of Greek uppercase |
| 70 |
% letters. |
| 71 |
% |
| 72 |
% \DescribeMacro{\uprightupcasegreek} With the command |
| 73 |
% |\uprightupcasegreek| you turn to upright letters, with |
| 74 |
% \DescribeMacro{\italicupcasegreek} |\italicupcasegreek| you turn to |
| 75 |
% italics. |
| 76 |
% |
| 77 |
% \StopEventually {} |
| 78 |
% |
| 79 |
% \section{Realization} |
| 80 |
% The whole stuff is realized by tweaking NFSS2, since Greek |
| 81 |
% characters are distributed rather madly in the fonts. In fact, |
| 82 |
% after a no-op option processing event |
| 83 |
% |
| 84 |
% \begin{macrocode} |
| 85 |
\ProcessOptions\relax |
| 86 |
% \end{macrocode} |
| 87 |
% |
| 88 |
% and the explicit care, that we do not tweak the original math font |
| 89 |
% setup, |
| 90 |
% |
| 91 |
% \begin{macrocode} |
| 92 |
\RequirePackage{mathtime} |
| 93 |
% \end{macrocode} |
| 94 |
% |
| 95 |
% we in fact adapt the core \LaTeX2e\ routines for command-character |
| 96 |
% mapping |\DeclareMathSymbol| and |\set@mathsymbol| by throwing away |
| 97 |
% all warning, other operators or |\@onlypreamble|-stuff. |
| 98 |
% |
| 99 |
% \begin{macro}{\mtg@realloc} |
| 100 |
% The macro |\mtg@realloc| turns the decimal digit into a |
| 101 |
% hexadecimal one (why isn't there a central routine for more than |
| 102 |
% one digit?) and calls |\mtg@re@lloc|, |
| 103 |
% |
| 104 |
% \begin{macrocode} |
| 105 |
\def\mtg@realloc#1#2{% |
| 106 |
\begingroup |
| 107 |
\count\z@=#2\relax |
| 108 |
\count\tw@\count\z@ |
| 109 |
\divide\count\z@\sixt@@n |
| 110 |
\count@\count\z@ |
| 111 |
\multiply\count@\sixt@@n |
| 112 |
\advance\count\tw@-\count@ |
| 113 |
\expandafter\mtg@re@lloc |
| 114 |
#1{\hexnumber@{\count\z@}\hexnumber@{\count\tw@}}% |
| 115 |
\endgroup} |
| 116 |
% \end{macrocode} |
| 117 |
% \end{macro} |
| 118 |
% |
| 119 |
% \begin{macro}{\@mtg@re@lloc} |
| 120 |
% then overwrites the |\mathchardef|inition for a single letter. |
| 121 |
% |
| 122 |
% \begin{macrocode} |
| 123 |
\def\mtg@re@lloc#1#2{\global\mathchardef#1="01#2\relax } |
| 124 |
% \end{macrocode} |
| 125 |
%\end{macro} |
| 126 |
% |
| 127 |
% The two switches take the character codes and plug them into the |
| 128 |
% appropriate letter commands, e basta cos\`\i! |
| 129 |
% |
| 130 |
% \begin{macrocode} |
| 131 |
\newcommand *\uprightupcasegreek {% |
| 132 |
\mtg@realloc\Gamma {48}\mtg@realloc\Delta {49}% |
| 133 |
\mtg@realloc\Theta {50}\mtg@realloc\Lambda {51}% |
| 134 |
\mtg@realloc\Xi {52}\mtg@realloc\Pi {53}% |
| 135 |
\mtg@realloc\Sigma {54}\mtg@realloc\Upsilon {55}% |
| 136 |
\mtg@realloc\Phi {56}\mtg@realloc\Psi {57}% |
| 137 |
\mtg@realloc\Omega {127}} |
| 138 |
\newcommand *\italicupcasegreek {% |
| 139 |
\mtg@realloc\Gamma {0}\mtg@realloc\Delta {1}% |
| 140 |
\mtg@realloc\Theta {2}\mtg@realloc\Lambda {3}% |
| 141 |
\mtg@realloc\Xi {4}\mtg@realloc\Pi {5}% |
| 142 |
\mtg@realloc\Sigma {6}\mtg@realloc\Upsilon {7}% |
| 143 |
\mtg@realloc\Phi {8}\mtg@realloc\Psi {9}% |
| 144 |
\mtg@realloc\Omega {10}} |
| 145 |
% \end{macrocode} |
| 146 |
% |
| 147 |
%\Finale |
| 148 |
% |
| 149 |
%% \CharacterTable |
| 150 |
%% {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 |
| 151 |
%% 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 |
| 152 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 153 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 154 |
%% Dollar \$ Percent \% Ampersand \& |
| 155 |
%% Acute accent \' Left paren \( Right paren \) |
| 156 |
%% Asterisk \* Plus \+ Comma \, |
| 157 |
%% Minus \- Point \. Solidus \/ |
| 158 |
%% Colon \: Semicolon \; Less than \< |
| 159 |
%% Equals \= Greater than \> Question mark \? |
| 160 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 161 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 162 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 163 |
%% Right brace \} Tilde \~} |
| 164 |
% |
| 165 |
%\endinput |