\def\filename{twcal.dtx}
\def\fileversion{1.2}
\def\filedate{1996/07/18}
\let\docversion=\fileversion
\let\docdate=\filedate
% \iffalse meta-comment
%
% Copyright 1996 by Gerd Neugebauer
% 
% For further copyright information, and conditions for modification
% and distribution, see the file legal.txt, and any other copyright
% notices in this file.
% 
%   This system 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.
% 
%   For error reports concerning UNCHANGED versions of this file no
%   more than one year old, see bugs.txt.
% 
%   Please do not request updates from us directly.  Primary
%   distribution is through the CTAN archives.
% 
% 
% IMPORTANT COPYRIGHT NOTICE:
% 
% You are NOT ALLOWED to distribute this file alone.
% 
% You are allowed to distribute this file under the condition that it
% is distributed together with all the files listed in manifest.txt.
% 
% If you receive only some of these files from someone, complain!
% 
% 
% Permission is granted to copy this file to another file with a
% clearly different name and to customize the declarations in that
% copy to serve the needs of your installation, provided that you
% comply with the conditions in the file legal.txt.
% 
% However, NO PERMISSION is granted to produce or to distribute a
% modified version of this file under its original name.
%  
% You are NOT ALLOWED to change this file.
% 
% 
% 
% \fi
% \iffalse
%%% File: twcal.dtx
%% Copyright (C) 1996 Gerd Neugebauer
%% all rights reserved.
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{twcal}[1996/07/18 v1.2 LaTeX package twcal]
%<*driver>
\documentclass{ltxdoc}
\usepackage{twcal}
\GetFileInfo{twcal.sty}
\begin{document}
\title{The \texttt{twcal} package\thanks
       {This file has version number \fileversion, dated \filedate.}\\
      for use with \LaTeX2e}
\author{Gerd Neugebauer\\Mainzer Str.~16\\56321 Rhens\\
  \texttt{gerd@informatik.uni-koblenz.de}}
\date{\docdate}
\maketitle
\DocInput{twcal.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{64}
%% \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         \~}
%
%    \changes{v1.0}{1996/03/03}{First release.}
%    \changes{v1.1}{1996/05/19}{Macro texttwcal added.}
%    \changes{v1.2}{1996/07/18}{Some commands made robust.}
%
%
%    \section{Introduction}
%
%    The font twcal provides a calligraphic font. This font has been
%    written by Thomas Weinmann. It can be found on the CTAN in the
%    directory \texttt{tex-archive/fonts/twcal}.
%    This package provides means to use this font.
%
%
%    \section{Usage}
%
%    This file can be used as a package by placing its name
%    in the argument of |\usepackage|. Afterwards the font family twcal
%    is defined. This could also have been done by providing a
%    font definition file.
%
%
%    \DescribeMacro{\twcal}
%    The command |\twcal| changes the current font family to twcal and the
%    encoding to OT1. Usually this should be used in a \TeX{} group only
%    since it changes the font encoding and redefines the umlaut macro.
%
%    \DescribeMacro{\texttwcal}
%    The macro |\texttwcal| typesets its argument in the twcal font. 
%
%    \DescribeMacro{\twcallogo}
%    The command |\twcallogo| typesetz the logo for the twcal font as
%    defined by the author of the font.
%
%
%    \StopEventually{}
%
%
%    \section{Implementation}
%
%
%    First we declare a new font family for the twcal font.
%    \begin{macrocode}
\DeclareFontFamily{OT1}{twcal}{}
%    \end{macrocode}
%
%    This font is only available in the normal shape. Here we can get the
%    desired font by (silently) scaling the only present fonts.
% 
%    \begin{macrocode}
\DeclareFontFamily{OT1}{twcal}{}
\DeclareFontShape{OT1}{twcal}{m}{n}{<->s*[0.7]twcal14}{}
%    \end{macrocode}
%
%    Next we define some macros to perform the mapping of umlaut
%    characters to the unusual positions used in this font.
%    \begin{macrocode}
\newcommand\twcal@a{\char26}
\newcommand\twcal@o{\char27}
\newcommand\twcal@u{\char28}
\newcommand\twcal@A{\char29}
\newcommand\twcal@O{\char30}
\newcommand\twcal@U{\char31}
%    \end{macrocode}
%
%    Now we define the font changing command.
% 
%    \begin{macro}{\twcal}
%    The macro |\twcal| selects the twcal family. 
%    \begin{macrocode}
\DeclareRobustCommand\twcal{%
  \let\twcal@original@umlaut=\"
  \def\"##1{%
    \@ifundefined{twcal@##1}{%
      \twcal@original@umlaut{##1}}{%
      \@nameuse{twcal@##1}}}%
  \fontfamily{twcal}%
  \fontencoding{OT1}%
  \selectfont}
%    \end{macrocode}
%    \end{macro}
% 
%    \begin{macro}{\texttwcal}
%    The macro |\texttwcal| typesets its argument in the twcal font. 
%    \begin{macrocode}
\newcommand\texttwcal[1]{\begingroup\twcal #1\endgroup}
%    \end{macrocode}
%    \end{macro}
%
%    \begin{macro}{\twcallogo}
%    Finally we provide the logo for this font as defined by the author
%    of the font.
%    \begin{macrocode}
\newcommand\twcallogo{\mbox{\({ 
         \lower-0.3ex\hbox{T}\kern-0.22em
         \lower0.3ex\hbox{W}\kern-0em
         \lower-0.3ex\hbox{C}\kern-0.24em
         \lower0.3ex\hbox{A}\kern-0.14em
         \lower-0.3ex\hbox{L}}\kern-0.19em
         \lower0.1ex\hbox{1}\kern-0.14em
         \lower-0.1ex\hbox{4}\)}}
%    \end{macrocode}
%    \end{macro}
%
% \Finale
%
\endinput
