summaryrefslogtreecommitdiff
path: root/info/examples/tip/yearcal.tip
blob: c9ce2d2b1846d27b7d7b291f2fdb11f0d2823c58 (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
% This macro source file is from the four volume series
% "TeX in Practice" by Stephan von Bechtolsheim, published
% 1993 by Springer-Verlag, New York.
% Copyright 1993 Stephan von Bechtolsheim.
% No warranty or liability is assumed.
% This macro may be copied freely if no fees other than
% media cost or shipping charges are charged and as long
% as this copyright and the following source code itself
% is not changed. Please see the series for further information.
%
% Version: 1.0
% Date: May 1, 1993
%
%
% This source code is documented in 26.21, p. III-390.
% Original source in file "macros6.TEX", starting line 1540.
\wlog{L: "yearcal.tip" ["macros6.TEX," l. 1540, p. III-390]}%
% This file DOES belong to format "texip."
\InputD{mocal.tip}
\def\YearlyCalendar #1#2#3{%
    \vbox{%
        \dimen0 = #2\relax
        \ifdim\dimen0 = 0.0pt
            \dimen0 = \hsize
        \fi
        \dimen1 = #3\relax
        \ifdim\dimen1 = 0.0pt
            \dimen1 = \dimen0
            \divide\dimen1 by 3
            \advance\dimen1 by -5pt
        \fi
        \hsize = \dimen0
        \centerline{\Large\bf Year #1}
        \bigskip
        \line{%
            \MonthlyCalendar{#1}{1}{\dimen1}%
            \hfil
            \MonthlyCalendar{#1}{2}{\dimen1}%
            \hfil
            \MonthlyCalendar{#1}{3}{\dimen1}%
        }%
        \bigskip
            \line{%
            \MonthlyCalendar{#1}{4}{\dimen1}%
            \hfil
            \MonthlyCalendar{#1}{5}{\dimen1}%
            \hfil
            \MonthlyCalendar{#1}{6}{\dimen1}%
        }%
        \bigskip
        \line{%
            \MonthlyCalendar{#1}{7}{\dimen1}%
            \hfil
            \MonthlyCalendar{#1}{8}{\dimen1}%
            \hfil
            \MonthlyCalendar{#1}{9}{\dimen1}%
        }%
        \bigskip
        \line{%
            \MonthlyCalendar{#1}{10}{\dimen1}%
            \hfil
            \MonthlyCalendar{#1}{11}{\dimen1}%
            \hfil
            \MonthlyCalendar{#1}{12}{\dimen1}%
        }%
    }
}