summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/timesht/timesht.cls
blob: 47de37fd92910973439c7e75b048056e052facb3 (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
%%
%% This is file `timesht.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% timesht.dtx  (with options: `style')
%% 
%% This file is part of the Timesheet 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 Timesheet a more powerful,
%% friendlier, and better package, please contact me on
%% `fb' at soas.ac.uk
%% 
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{timesht}
          [1996/11/09 v0.03 Timesheet generator (Frank Bennett)]
\DeclareOption{a4paper}{\OptionNotUsed}
\DeclareOption{a5paper}{\OptionNotUsed}
\DeclareOption{b5paper}{\OptionNotUsed}
\DeclareOption{letterpaper}{\OptionNotUsed}
\DeclareOption{legalpaper}{\OptionNotUsed}
\DeclareOption{executivepaper}{\OptionNotUsed}
\DeclareOption{landscape}{\OptionNotUsed}
\DeclareOption{twoside}{\OptionNotUsed}
\DeclareOption{titlepage}{\OptionNotUsed}
\DeclareOption{onecolumn}{\OptionNotUsed}
\DeclareOption{10pt}{\PassOptionsToPackage{\CurrentOption}{article}}
\DeclareOption{11pt}{\PassOptionsToPackage{\CurrentOption}{article}}
\DeclareOption{12pt}{\PassOptionsToPackage{\CurrentOption}{article}}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{calendar}}
\ProcessOptions
\LoadClass[oneside]{article}
\pagestyle{empty}
\setlength{\parindent}{1em}
\setlength{\rightskip}{0pt plus \textwidth}
\setlength{\@rightskip}{\rightskip}
\setlength{\parfillskip}{0pt plus 2\textwidth}
\setlength{\columnsep}{2em}
\setlength{\textheight}{230mm}
\setlength{\topmargin}{-10mm}
\setlength{\linewidth}{\textwidth}
 \setlength{\textwidth}{180mm}
\setlength{\oddsidemargin}{-10mm}
\newcounter{timecount}
\newcounter{timecountlimit}
\newlength{\timesheetleft}
\newlength{\timesheetright}
\newif\if@makehash
\settowidth{\timesheetleft}{00:00\ --\ 00:00}
\addtolength{\timesheetleft}{5\arrayrulewidth}
\addtolength{\timesheetleft}{6\tabcolsep}
\addtolength{\timesheetleft}{\doublerulesep}
\setlength{\timesheetright}{\textwidth}
\addtolength{\timesheetright}{-\timesheetleft}
\def\@@maketimes#1{\xdef\timearg{\the\c@timecount}
\addtocounter{timecount}{1}%
\\\hline
\@makehashtrue
\timearg &00& \timearg &10&&\\
\timearg &10& \timearg &20&&\\
\timearg &20& \timearg &30&&\\
\timearg &30& \timearg &40&&\\
\timearg &40& \timearg &50&&\\
\timearg &50&\arabic{timecount}&00&&%
\@makehashfalse}
\def\@maketimes{\@@maketimes{\arabic{timecount}}%
 \ifnum\c@timecount>\c@timecountlimit%
  \let\next\\\else\let\next\@maketimes\fi%
 \next}
\def\maketimes#1#2{%
   \setcounter{timecount}{#1}%
   \setcounter{timecountlimit}{#2}%
\addtocounter{timecount}{1}%
\@makehashtrue
#1 &00& #1 &10&&\\
#1 &10& #1 &20&&\\
#1 &20& #1 &30&&\\
#1 &30& #1 &40&&\\
#1 &40& #1 &50&&\\
#1 &50&\arabic{timecount}&00&&
\@makehashfalse
\@maketimes}
\RequirePackage{longtable}[1996/05/24]
\RequirePackage{array}[1996/06/14]
\RequirePackage{calendar}
\IfFileExists{mygoth.sty}{\RequirePackage{mygoth}}{\let\textgoth\relax}
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\newenvironment{timesheet}
   {\begin{longtable}{%
     |r%
      @{:}%
      l%
      @{\ --\ }%
      r%
      @{:}%
      l%
     |p{0.33\timesheetright}%
     ||p{0.67\timesheetright}|%
}%
   \multicolumn{4}{l}{}&%
     \multicolumn{2}{l}{\large\bf\theweekday\hfill%
     {\Huge\textgoth{Timesheet}}\hfill%
     \theday{} %
     \themonth{} %
     \theyear}\\
   \multicolumn{6}{l}{}\\
     \multicolumn{4}{c}{\small Time}&%
     \multicolumn{1}{c}{\small Plan}&%
     \multicolumn{1}{c}{\small Action}\\
   \hline
   \endhead
   \hline
    \endfoot}
   {\end{longtable}}
\def\timesheets#1#2{%
  \everyday
   {#1}
   {#2}
   {\begin{timesheet}\maketimes{7}{22}\end{timesheet}}
}

\endinput
%%
%% End of file `timesht.cls'.