% \iffalse
%
% File calendar.dtx
% Copyright (C) 1996 by Frank Bennett.  All rights reserved.
%
% IMPORTANT NOTICE:
% 
% You are not allowed to change this file.  You may however copy
% this file to a file with a different name and then change the
% copy if (a) you do not charge for the modified code, (b) you
% acknowledge the author(s) in the new file, if it
% is distributed to others, and (c) you attach these same
% conditions to the new file.
% 
% You are not allowed to distribute this file alone.  You are not
% allowed to take money for the distribution or use of this file
% (or a changed version) except for a nominal charge for copying
% etc.
% 
% You are allowed to distribute this file under the condition that
% it is distributed with all of its contents, intact.
% 
% For error reports, or offers to help make Calendar a more powerful,
% friendlier, and altogether more thrilling package, please contact me on
% fb@soas.ac.uk
% 
%<*dtx>
          \ProvidesFile{calendar.dtx}
%</dtx>
%<style>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
%<style>\ProvidesPackage{calendar}
%<style>          [1996/11/09 v0.01 Calendar engine (Frank Bennett)]
% \fi
%
% \def\fileversion{v0.02}
% \def\filedate{1996/11/11}
%
%
% \iffalse
%<*driver>
\documentclass{ltxdoc}
\begin{document}
%\OnlyDescription            % comment out for implementation details
\DocInput{calendar.dtx}
\end{document}
%</driver>
% \fi
%
% \changes{v0.01}{1996/11/10}{Initial Version}
% \changes{v0.02}{1996/11/11}{Replaced \TeX{} newcount with \LaTeXe{}
% newcounter, and changed counters accordingly.}
% \changes{v0.02}{1996/11/11}
%    {Incorporated higher maths functions into an option declaration
%  in the main file (was loaded from a separate file in original
%  \TeX{} version.)}
%
%
% \title{User's Guide to the Calendar package\thanks{This file is version number
%    \fileversion{}.  It was last revised on
%    \filedate.}}
%
% \author{Frank G. Bennett, Jr.\thanks{The code contained in this file is simply a
%    recasting of the \texttt{calendar} macros for \TeX{} that I
%    found on CTAN into \LaTeXe.  The \TeX{} macros work quite
%    well, but lack any documentation.  Their provenance is also a
%    mystery.  If anyone can tell me who wrote them, I will gladly
%    include an acknowledgement in this documentation.}}
%
%  \maketitle
%
% \DoNotIndex{\@,\@@par,\@beginparpenalty,\@empty}
% \DoNotIndex{\@flushglue,\@gobble,\@input}
% \DoNotIndex{\@makefnmark,\@makeother,\@maketitle}
% \DoNotIndex{\@namedef,\@ne,\@spaces,\@tempa}
% \DoNotIndex{\@tempb,\@tempswafalse,\@tempswatrue}
% \DoNotIndex{\@thanks,\@thefnmark,\@topnum}
% \DoNotIndex{\@@,\@elt,\@forloop,\@fortmp,\@gtempa,\@totalleftmargin}
% \DoNotIndex{\",\/,\@ifundefined,\@nil,\@verbatim,\@vobeyspaces}
% \DoNotIndex{\|,\~,\ ,\active,\advance,\aftergroup,\begingroup,\bgroup}
% \DoNotIndex{\cal,\csname,\def,\documentstyle,\dospecials,\edef}
% \DoNotIndex{\egroup}
% \DoNotIndex{\else,\endcsname,\endgroup,\endinput,\endtrivlist}
% \DoNotIndex{\expandafter,\fi,\fnsymbol,\futurelet,\gdef,\global}
% \DoNotIndex{\hbox,\hss,\if,\if@inlabel,\if@tempswa,\if@twocolumn}
% \DoNotIndex{\ifcase}
% \DoNotIndex{\ifcat,\iffalse,\ifx,\ignorespaces,\index,\input,\item}
% \DoNotIndex{\jobname,\kern,\leavevmode,\leftskip,\let,\llap,\lower}
% \DoNotIndex{\m@ne,\next,\newpage,\nobreak,\noexpand,\nonfrenchspacing}
% \DoNotIndex{\obeylines,\or,\protect,\raggedleft,\rightskip,\rm,\sc}
% \DoNotIndex{\setbox,\setcounter,\small,\space,\string,\strut}
% \DoNotIndex{\strutbox}
% \DoNotIndex{\thefootnote,\thispagestyle,\topmargin,\trivlist,\tt}
% \DoNotIndex{\twocolumn,\typeout,\vss,\vtop,\xdef,\z@}
% \DoNotIndex{\,,\@bsphack,\@esphack,\@noligs,\@vobeyspaces,\@xverbatim}
% \DoNotIndex{\`,\catcode,\end,\escapechar,\frenchspacing,\glossary}
% \DoNotIndex{\hangindent,\hfil,\hfill,\hskip,\hspace,\ht,\it,\langle}
% \DoNotIndex{\leaders,\long,\makelabel,\marginpar,\markboth,\mathcode}
% \DoNotIndex{\mathsurround,\mbox,\newcount,\newdimen,\newskip}
% \DoNotIndex{\nopagebreak}
% \DoNotIndex{\parfillskip,\parindent,\parskip,\penalty,\raise,\rangle}
% \DoNotIndex{\section,\setlength,\TeX,\topsep,\underline,\unskip,\verb}
% \DoNotIndex{\vskip,\vspace,\widetilde,\\,\%,\@date,\@defpar}
% \DoNotIndex{\[,\{,\},\]}
% \DoNotIndex{\count@,\ifnum,\loop,\today,\uppercase,\uccode}
% \DoNotIndex{\baselineskip,\begin,\tw@}
% \DoNotIndex{\a,\b,\c,\d,\e,\f,\g,\h,\i,\j,\k,\l,\m,\n,\o,\p,\q}
% \DoNotIndex{\r,\s,\t,\u,\v,\w,\x,\y,\z,\A,\B,\C,\D,\E,\F,\G,\H}
% \DoNotIndex{\I,\J,\K,\L,\M,\N,\O,\P,\Q,\R,\S,\T,\U,\V,\W,\X,\Y,\Z}
% \DoNotIndex{\1,\2,\3,\4,\5,\6,\7,\8,\9,\0}
% \DoNotIndex{\!,\#,\$,\&,\',\(,\),\+,\.,\:,\;,\<,\=,\>,\?,\_}
% \DoNotIndex{\discretionary,\immediate,\makeatletter,\makeatother}
% \DoNotIndex{\meaning,\newenvironment,\par,\relax,\renewenvironment}
% \DoNotIndex{\repeat,\scriptsize,\selectfont,\the,\undefined}
% \DoNotIndex{\arabic,\do,\makeindex,\null,\number,\show,\write,\@ehc}
% \DoNotIndex{\@author,\@ehc,\@ifstar,\@sanitize,\@title,\everypar}
% \DoNotIndex{\if@minipage,\if@restonecol,\ifeof,\ifmmode}
% \DoNotIndex{\lccode,\newtoks,\onecolumn,\openin,\p@,\SelfDocumenting}
% \DoNotIndex{\settowidth,\@resetonecoltrue,\@resetonecolfalse,\bf}
% \DoNotIndex{\clearpage,\closein,\lowercase,\@inlabelfalse}
% \DoNotIndex{\selectfont,\mathcode,\newmathalphabet,\rmdefault}
% \DoNotIndex{\bfdefault}
% \setcounter{StandardModuleDepth}{1}
% \DeleteShortVerb{\|}
% \MakeShortVerb{\"}
%
% \begin{abstract}
% \noindent This package provides tools for creating
% customized calendars using \LaTeXe.
% \end{abstract}
%
%
% \CheckSum{593}
%
% \section{Introduction}
%
% This packages creates a macro, \verb+\everyday+ which
% accepts four arguments.  The first two are dates of the form
% \verb+YYYY/MM/DD+.  The third is a template that should
% generate a document of some kind. The templates are generated
% once for each date in the range of dates defined by the first and second
% arguments, inclusive.  Within the templates use "\theweekday"
% to get the day of the week, "\theyear" to get the year less
% the leading "19", "\themonth" to get the name of the month,
% "\theday" to get the current day.  For an application calling
% on these macros, see the "timesht" package, also on CTAN.
%
%\StopEventually{\PrintIndex}
%
% \section{The Macros}
%
% \subsection{Higher Math Option}
%    \begin{macrocode}
\DeclareOption{highermath}{%
%    \end{macrocode}
% Convert from Julian date and time in
% \date to long date (in local time) 
%    \begin{macrocode}
\def\JDTtoL{\advance\date by500
 \advance\date by\timezone\divide\date by1000}
%    \end{macrocode}
% Trigonometric functions
%    \begin{macrocode}
\def\sintable#1{\ifcase #1 0\or100\or199
 \or296\or389\or479\or565\or644\or717
 \or783\or841\or891\or932\or964\or985
 \or997\or1000\or992\or974\or946\or909
 \or863\or808\or746\or675\or598\or516
 \or427\or335\or239\or141\or42\or-58
 \or-158\fi}
%    \end{macrocode}
% Reduces modulo "2\pi" (requires positive
% argument theta):
% "theta := theta" "MOD 2\pi", where
% "theta = count1*10^(-3)"
%    \begin{macrocode}
\def\twopimod{\count2 =\count1
 \divide\count2 by6284 \count3 =1853
 \count4 =6283\multiply\count3  by\count2
 \multiply\count4  by\count2  
 \divide\count3  by10000
 \advance\count3  by\count4  
 \advance\count1  by-\count3}
%    \end{macrocode}
% "v := sin(theta)", where
% "v = count4*10^(-3)";
% "theta = count1*10^(-3)"
% theta is reduced "MOD 2\pi" to be
% "0<=theta<2\pi" by "\TWOPIMOD",
% then linear interpolation is performed
% using "\SINTABLE".
%    \begin{macrocode}
\newif\ifsign
\def\Sin{
 \ifnum\count1<0 \signtrue
 \count1=-\count1\else \signfalse\fi
 \loop\ifnum\count1>6284\twopimod\repeat
 \ifnum\count1>3142
 \advance\count1 by-3142
 \ifsign\signfalse\else\signtrue\fi\fi
 \multiply\count1  by10 \count3 =\count1 
 \divide\count3  by1000 \count2 =\count3 
 \multiply\count3  by1000
 \advance\count3  by-\count1  
 \count5 =\sintable{\count2 }
 \count4 =\count5\advance\count2  by1
 \advance\count4  by -\sintable{\count2 }
 \multiply\count4  by\count3  
 \divide\count4  by1000
 \advance\count4  by\count5  
 \ifsign\count4 =-\count4 \fi}
%    \end{macrocode}
% "v := cos(theta)", where
% "v = count4*10^(-3)";
% "theta = count1*10^(-3)".
% "\SIN" is evaluated on "pi/2-theta".
%    \begin{macrocode}
\def\Cos{\advance\count1  by-1571
 \multiply\count1  by-1\Sin}
%    \end{macrocode}
% Linear transformation of T giving
% "theta := a*T+b", where
% "T = count0*10^(-6)";
% "theta = count1*10^(-3)";
% "a = #1*10^3+#2+#3*10^(-3)";
% "b = #4*10^(-3)"
%    \begin{macrocode}
\def\lin#1.#2.#3+#4.{\count1 =#3
 \count2 =#2 \count3 =#1 
 \multiply\count1 by\count0
 \multiply\count2 by\count0 
 \multiply\count3 by\count0
 \divide\count1 by1000
 \advance\count1 by\count2
 \divide\count1 by1000
 \advance\count1 by\count3
 \advance\count1 by #4}
%    \end{macrocode}
% Accumulate value returned by a
% trigonometric function, scaled by
% factor f, into count6:
% "ac := ac+f*v", where
% "ac = count6*10^(-7)"
% "v = value" of "SIN" or "COS =count4*10^(-3)"
% "f = #1*10^(-4)"
%    \begin{macrocode}
\def\fac#1{\multiply\count4  by #1
 \advance\count6  by\count4}
\def\id{\count4=\count1}  % Identity
}
\ProcessOptions
%    \end{macrocode}
% \subsection{First run commands}
% 
% Create a toggle to flag leap years.
%    \begin{macrocode}
%<*style>
\newif\ifleapyear
%    \end{macrocode}
% Create some counters.
%    \begin{macrocode}
\newcounter{date}
\newcounter{weekd}
\newcounter{Year}
\newcounter{yearbase}
\newcounter{Month}
\newcounter{Day}
\newcounter{catch}
\newcounter{timezone}
%    \end{macrocode}
% Create a couple of shorthand macros, to keep the interface
% consistent.
%    \begin{macrocode}
\def\theyear{19\the\c@Year}
\def\theday{\the\c@Day}
%    \end{macrocode}
% Initialize the time zone to 0.
%    \begin{macrocode}
\setcounter{timezone}{0}
%    \end{macrocode}
% \begin{macro}{\setyear}
%    \begin{macrocode}
\def\setyear#1{\c@Year=#1
 \advance\c@Year by-1900\calculateyearbase}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\nextyear}
%    \begin{macrocode}
\def\nextyear{\advance\c@Year by1
 \calculateyearbase}
%    \end{macrocode}
% \end{macro}
% 
% \begin{macro}{\settimezone}
%    \begin{macrocode}
\def\settimezone#1{\c@timezone=#1
 \multiply\c@timezone by 1000
 \divide\c@timezone by24}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\calculateyearbase}
% Set the "\ifleapyear" toggle.  Set "\c@yearbase" to the number of
% days passed from 1900, Jan 0 to New year's date in the target year.
%    \begin{macrocode}
\def\calculateyearbase{%
 \c@yearbase=-1
 {\count0=\c@Year\divide\count0 by4
 \multiply\count0 by4
 \ifnum\c@Year=\count0
 \global\c@catch=0\else\global\c@catch=1\fi}%
 \ifcase\c@catch \leapyeartrue\or
  \leapyearfalse\fi
 {\count0=\c@Year\multiply\count0
 by1461\advance\count0 by3
 \divide\count0 by4
 \global\c@catch=\count0}%
 \advance\c@yearbase by\c@catch
 \ifnum\c@Year=0\c@yearbase=0\leapyearfalse\fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\monthdays}
%  Set the number of days passed at the end of each month in "\c@Day".
%    \begin{macrocode}
\def\monthdays{\global
 \c@catch=\ifcase\c@Month 0\or31\or
  59\or90\or120\or151\or181\or212\or
  243\or273\or304\or334\or365\fi
 {\ifleapyear\ifnum\c@Month>1
  \global\advance\c@catch by1\fi\fi}%
 \c@Day=\c@catch}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayno}
% Return the long date of "\c@Month", "\c@Day" in the year "\c@Year"
% in "\c@date".
%    \begin{macrocode}
\def\dayno{\c@date=\c@Day{\advance
 \c@Month by-1\monthdays
 \advance\c@date by\c@Day
 \global\advance\c@date by\c@yearbase}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\weekday}
% Long date MOD 7 gives the week day.
% Sunday is 0 and Saturday is 6. (This was the documentation to the original file.  Not sure what it means.)
%    \begin{macrocode}
\def\weekday{{\count0=\c@date\relax
 \count1=\count0\divide\count0 by 7
 \multiply\count0 by 7
\advance\count1 by -\count0
 \global\c@weekd=\count1}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\theweekday}
% Name of week day (Local).
%    \begin{macrocode}
\def\theweekday{\weekday
 \ifcase\c@weekd
 Sunday\or Monday\or Tuesday\or
 Wednesday\or Thursday\or Friday\or
 Saturday\fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\theshortweekday}
% (Local)
%    \begin{macrocode}
\def\theshortweekday{\weekday
 \ifcase\c@weekd Sun\or Mon\or Tue\or
  Wed\or Thu\or Fri\or Sat\fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\caldate}
% Gives the usual calendar date for
% a long date in counter "\c@date".
% Returned in "\c@Day", "\c@Month" and "\c@Year"
%    \begin{macrocode}
\def\caldate{\c@Year=\c@date
 \multiply\c@Year by4\divide\c@Year by1461
 \calculateyearbase
 {\advance\c@date by-\c@yearbase\c@Month=0
 \loop\monthdays\ifnum\c@Day<\c@date
 \global\advance\c@Month by1\repeat
 {\advance\c@Month by-1\monthdays
 \advance\c@date by-\c@Day
 \global\c@Day=\c@date}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\themonth}
% Name of month "\c@Month". (Local)
%    \begin{macrocode}
\def\themonth{\ifcase\c@Month
 \or January\or February\or March\or
 April\or May\or June\or July\or
 August\or September\or October\or
 November\or December\fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\nextday}
% Find the next (previous) day after
% (before) "\c@date" with "\weekday=#1".
%    \begin{macrocode}
\def\nextday#1{{\count0=#1\weekday
 \advance\count0 by-\c@weekd
 \ifnum\count0<0\advance\count0 by7\fi
 \global\advance\c@date by\count0}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\prevday}
%    \begin{macrocode}
\def\prevday#1{\snextday#1
 \advance\c@date by-7}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\snextday}
%    \begin{macrocode}
\def\snextday#1{\advance\c@date by1
 \nextday#1}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\sprevday}
%    \begin{macrocode}
\def\sprevday#1{\advance\c@date by-1
 \prevday#1}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\beginevents}
% \begin{macro}{\endevents}
% "\beginevents"\ldots"\endevents"
% contains control sequences like
% "\event" or "\evday" or sequences
% generating these commands.
%    \begin{macrocode}
\newwrite\evefile
\def\beginevents{%
 \immediate\openout
 \evefile=\jobname.eve\relax}
%    \end{macrocode}
%    \begin{macrocode}
\def\endevents{\immediate\closeout
 \evefile\end}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macro}{\event}
%    \begin{macrocode}
\newtoks\evetext
\def\event#1/#2[#3]{\evetext={#3}%
 \c@Day=#1\c@Month=#2\dayno
 \evday[\the\evetext]}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\evday}
%    \begin{macrocode}
\def\evday[#1]{\immediate\write\evefile{%
 \string\evententry{\the\c@date}{#1}}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\thecaldate}
%    \begin{macrocode}
\def\thecaldate{\the\c@Day/\the\c@Month}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\mute}
%    \begin{macrocode}
\def\mute{\def\thecaldate{}}
%    \end{macrocode}
% \end{macro}
% \subsection{Second run commands}
%
% We need a few counters.
%    \begin{macrocode}
\newcount\currentdate
\newcount\lastdate
\newcount\nextdate
%    \end{macrocode}
% We also need a few toggles.
%    \begin{macrocode}
\newif\ifdoing@day
\newif\ifholy
%    \end{macrocode}
% \begin{macro}{\holy}
%    \begin{macrocode}
\def\holy{\global\holytrue}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\upto}
%    \begin{macrocode}
\def\upto#1{\nextdate=#1
 \loop\advance\currentdate by1\relax
  \ifnum\currentdate<\nextdate
  \begin@day\end@day\repeat}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\evententry}
% This macro is invoked once for every event
% exported to the "jobname.eve" file by the
% selected date calculation engines contained
% in the various "*.cle" files.  The invocations
% occur after "\begin@day" has been invoked once
% by "\makeagenda".  "\begin@day" sets "\ifdoing@day"
% to "true", so this toggle is set on when the
% import takes place.  After the import, "\end@day"
% is invoked, which turns off "\ifdoing@day".
% "\upto" then produces empty templates until
% the current date is hit, and the macro then dumps
% the message text before calling "\end@day".
% Processing is then passed to the next entry
% in the "jobname.eve" file.  This method was
% inherited from the original \TeX{} package.
% It assumes that the events listed in the
% "jobname.eve" file will be in linear order.
% It therefore does not lend itself to use
% with multiple event files.  To overcome this
% limitation, we will need to store the event
% dates in a list macro that can then be sorted
% before producing the printed output, calling
% macros named for each event date and the
% events engine from which it was generated.
%    \begin{macrocode}
\def\evententry#1#2{\unskip
%    \end{macrocode}
% If the date established for the event
% in the current year falls after the
% last date in the processing range,
% do nothing at all.
%    \begin{macrocode}
 \ifnum#1>\lastdate\else
%    \end{macrocode}
% If the date established falls before the
% earliest date in the range, do nothing
% at all.
%    \begin{macrocode}
  \ifnum\currentdate<#1
%    \end{macrocode}
% The following looks like a bug to me, although
% I could be missing something.  It appears that if
% the very first date in the range is an event date,
% the event will be skipped.  Otherwise, though,
% we do a single blank entry, then roll forward with
% blank entries until the current event date given
% as the first argument to "\evententry" is reached.
%    \begin{macrocode}
   \ifdoing@day\end@day\fi
  \upto{#1}\fi
%    \end{macrocode}
% When that happens, "\currentdate" will naturally
% be a match.  The bug referred to above, if it is
% a bug, might be addressed by eliminating the
% initializing "\begin@day" from the "\makeagenda"
% macro.  It would then be provided by the code below,
% immediately before the output of the event text.
%    \begin{macrocode}
 \ifnum\currentdate=#1
  \ifdoing@day\else\begin@day\fi
  #2\par\fi\fi}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\begin@day}
%    \begin{macrocode}
\def\begin@day{\doing@daytrue
 \c@date=\currentdate\caldate
 \message{<\thecaldate}\beginday}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\end@day}
%    \begin{macrocode}
\def\end@day{\endday\doing@dayfalse
 \global\holyfalse\message{>}}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\makeagenda}
% This is the business end of the \TeX{} macros.  If an appropriate style
% is fed to this macro after invoking "\setyear", a calendar will be generated.
%    \begin{macrocode}
\def\makeagenda#1{\input #1.sty\relax
 \begin@day\input\jobname.eve\relax
 \evententry{\the\lastdate}{}\end@day
 \epilog\end}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\makeempty}
% Do not read events
%    \begin{macrocode}
\def\makeempty{\begin@day
 \evententry{\the\lastdate}{}\end@day}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\ParseDate}
% Break up a date in the first and second arguments to "\everyday"
% into its components in "\c@Year", "\c@Month" and "\c@Day", and set
% the corresponding long date in "\c@date".
%    \begin{macrocode}
\def\ParseDate#1{\@ParseDate#1\end}
\def\@ParseDate#1/#2/#3\end{\setyear{#1}\c@Month=#2\c@Day=#3\dayno}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\everyday}
% Set "\currentdate" and "\lastdate" to set the boundaries
% of iteration and define the bracketing macros "\beginday"
% and "\endday".  Initiate iteration by invoking "\makeempty".
%    \begin{macrocode}
\def\everyday#1#2#3{\ParseDate{#1}\currentdate=\c@date%
  \ParseDate{#2}\lastdate=\c@date%
  \def\beginday{#3}%
  \def\endday{}\makeempty}
%</style>
%    \end{macrocode}
% \end{macro}
% \section{The Installation File}
%    \begin{macrocode}
%<*installer>
\def\batchfile{calendar.ins}
\input docstrip.tex

\keepsilent

\preamble

This file is part of the Calendar package.
Copyright (C) 1996 Frank Bennett, Jr.
All rights reserved.
------------------------------------------
This is a generated file.

IMPORTANT NOTICE:

You are not allowed to change this file.  You may however copy
this file to a file with a different name and then change the
copy if (a) you do not charge for the modified code, (b) you
acknowledge the author(s) in the new file, if it
is distributed to others, and (c) you attach these same
conditions to the new file.

You are not allowed to distribute this file alone.  You are not
allowed to take money for the distribution or use of this file
(or a changed version) except for a nominal charge for copying
etc.

You are allowed to distribute this file under the condition that
it is distributed with all of its contents, intact.

For error reports, or offers to help make Calendar a more powerful,
friendlier, and better package, please contact me on
`fb' at soas.ac.uk

\endpreamble

\generateFile{calendar.sty}   {t}{\from{calendar.dtx}{style}}

\Msg{***********************************************************}
\Msg{*}
\Msg{* To finish the installation, you have to move the following}
\Msg{* file into a directory searched by TeX:}
\Msg{*}
\Msg{* \space\space calendar.sty}
\Msg{*}
\Msg{***********************************************************}
}
%</installer>
%    \end{macrocode}
% \Finale \PrintChanges
