diff options
Diffstat (limited to 'Master/texmf-dist/tex/plain/calendar')
-rw-r--r-- | Master/texmf-dist/tex/plain/calendar/a5.sty | 45 | ||||
-rw-r--r-- | Master/texmf-dist/tex/plain/calendar/a6.sty | 66 | ||||
-rw-r--r-- | Master/texmf-dist/tex/plain/calendar/block.sty | 59 | ||||
-rw-r--r-- | Master/texmf-dist/tex/plain/calendar/calend0.tex | 156 | ||||
-rw-r--r-- | Master/texmf-dist/tex/plain/calendar/calend1.tex | 85 | ||||
-rw-r--r-- | Master/texmf-dist/tex/plain/calendar/feasts.tex | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/plain/calendar/moon.tex | 89 | ||||
-rw-r--r-- | Master/texmf-dist/tex/plain/calendar/sun.tex | 15 | ||||
-rw-r--r-- | Master/texmf-dist/tex/plain/calendar/wall.sty | 60 |
9 files changed, 607 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/plain/calendar/a5.sty b/Master/texmf-dist/tex/plain/calendar/a5.sty new file mode 100644 index 00000000000..6c09b53428d --- /dev/null +++ b/Master/texmf-dist/tex/plain/calendar/a5.sty @@ -0,0 +1,45 @@ +%% +%% FILE a5.sty +%% +\newcount\daysinpage +\newdimen\cellheight +\vsize=17.5cm\voffset=-0.5in +\hsize=11cm\hoffset=-0.6in +\cellheight=\vsize +\divide\cellheight by7 +\advance\cellheight by-0.4pt +\parindent=0pt +\font\Rm=cmr10 at 14pt +\font\Bf=cmbx10 at 14pt +\font\rm=cmr10 +\footline={\Bf\ifodd\pageno\hfill\botmark + \else\botmark\hfill\fi} +\def\newpage{\vfill\penalty-10000} +\def\beginday{\ifnum\daysinpage>0\hrule\fi + \mark{\themonth} % Outside any box + \setbox2=\vbox\bgroup + \ifodd\pageno + \rightskip=3cm plus 1fill + \else + \leftskip=3cm plus 1fill\fi\rm} +\def\endday{\egroup + \vbox to\cellheight{\vglue2pt + \setbox0=\hbox to\hsize{% + \ifodd\pageno + \hfill{\Rm\theweekday\ \ifholy\Bf\fi\the\Day} + \else + {\Rm{\ifholy\Bf\fi\the\Day}\ \theweekday}% + \hfill\fi} + \copy0\kern-\ht0\box2\vfill} + \advance\daysinpage by1 + \ifnum\daysinpage=7 \daysinpage=0 + \newpage\fi} +% +% Local: from monday ... +\Day=1 \Month=9\dayno\nextday1\currentdate=\date +% Local: ... to sunday. +{\nextyear\Day=31 \Month=5\dayno\nextday0 + \global\lastdate=\date} +\leftskip=0pt\rightskip=0pt +\daysinpage=0 +\def\epilog{} diff --git a/Master/texmf-dist/tex/plain/calendar/a6.sty b/Master/texmf-dist/tex/plain/calendar/a6.sty new file mode 100644 index 00000000000..d6fa4e274b0 --- /dev/null +++ b/Master/texmf-dist/tex/plain/calendar/a6.sty @@ -0,0 +1,66 @@ +%% +%% FILE a6.sty +%% +\baselineskip=10pt +\newcount\daysinpage +\newdimen\cellwidth +\newdimen\cellheight +\vsize=5in\voffset=-0.2in +\hsize=3.5in\hoffset=-0.25in +\newdimen\sphsize +\sphsize=\hsize +\divide\sphsize by2\advance\sphsize by-0.4pt +\cellheight=\vsize +\divide\cellheight by3 +\advance\cellheight by-0.4pt\parindent=0pt +\font\bf=cmbx12 +\font\rm=cmr12 +\font\small=cmr9 +\headline={\hfill + \ifodd\pageno + \rm\xdef\ftmk{\firstmark}% + \divide\pageno by2\advance\pageno by1 + Week \#\the\pageno + \else + \bf\edef\btmk{\botmark}% + \ifx\ftmk\btmk\else\ftmk/\fi\btmk + \fi\hfill} +\footline={} +\def\newpage{\vfill\penalty-10000} +\def\beginday{ + \ifcase\daysinpage\or\hrule\or\hrule\or\or + \hrule\or\hrule\fi + \mark{\themonth} % Outside any box + \setbox1=\vbox to\cellheight\bgroup\vglue4pt + \ifnum\daysinpage>4\hsize=\sphsize\fi + \setbox3=\vbox\bgroup + \ifnum\daysinpage>2 + \rightskip=1.45cm plus 1fill + \else + \leftskip=1.45cm plus 1fill\fi + \noindent\small} +\def\endday{\egroup + \setbox0=\hbox to\hsize{\rm\ifholy\bf\fi + \ifnum\daysinpage=6\bf\fi + \ifnum\daysinpage>2 + \hfill{{\rm\theshortweekday} + \ \the\Day\hskip0.5em} + \else + {\hskip0.5em\the\Day + \ {\rm\theshortweekday}}\hfill\fi} + \copy0\kern-\ht0\vskip0pt\box3 + \vfill\egroup + \advance\daysinpage by1 + \ifcase\daysinpage\or\box1\or\box1\or + \box1\newpage\or\box1\or\box1\or + \setbox2=\box1\or + \hbox{\box2\vrule\box1}\newpage + \daysinpage=0\fi} +% +% Local: from monday ... +\Day=1\Month=1\dayno\prevday1\currentdate=\date +% Local: ... to sunday. +\Day=31\Month=12\dayno\nextday0\lastdate=\date +\leftskip=3pt\rightskip=3pt +\daysinpage=0 +\def\epilog{} diff --git a/Master/texmf-dist/tex/plain/calendar/block.sty b/Master/texmf-dist/tex/plain/calendar/block.sty new file mode 100644 index 00000000000..72433136f1b --- /dev/null +++ b/Master/texmf-dist/tex/plain/calendar/block.sty @@ -0,0 +1,59 @@ +%% +%% FILE block.sty +%% +\newcount\daysinrow +\newcount\saveMonth +\font\bf=cmbx12 at 16pt +\font\Rm=cmr12 at 48pt +\font\Bf=cmbx12 at 48pt +\font\rm=cmr12 +\font\small=cmr10 +\footline={} +\def\card{{\mute + \saveMonth=\Month + \def\beginday{ + \ifnum\daysinrow=0\setbox1=\hbox{}\fi + \setbox0=\hbox to1.3em{\hss + \ifnum\Month=\saveMonth\the\Day\fi}} + \def\endday{\setbox1=\hbox{\unhbox1\box0} + \advance\daysinrow by1 + \ifnum\daysinrow=7\box1\daysinrow=0\fi} +% Local: from sunday ... + \Day=1\dayno + \prevday0\currentdate=\date + \Day=1\advancemonth \dayno +% Local: ... to saturday. + \advance\date by-1 \nextday6 \lastdate=\date + \daysinrow=0 + \baselineskip=9pt\small + \global\setbox3=\vbox to0.55in{\makeempty\vss}}} +% +\def\cstrut{\vrule width0pt depth0.3in} +\baselineskip=14pt +\parindent=0pt +\vsize=5in \voffset=-0.2in +\hsize=4in \hoffset=-0.25in +\def\advancemonth{\ifnum\Month=12 + \nextyear\Month=1\else + \advance\Month by1\fi} +\def\beginday{\ifnum\Day=1 + \setbox2=\box3{\advancemonth\card}\fi + \date=\currentdate\caldate + \centerline{\bf\uppercase + \expandafter{\themonth}} + \setbox0=\vbox\bgroup\noindent\rm} +\def\endday{\egroup\vskip10pt + \centerline{\cstrut\copy2\quad + \hbox to1in{\Rm\weekday +% Local: sundays in bf. + \ifnum\weekd=0\Bf\fi\ifholy\Bf\fi + \hss\the\Day\hss}\quad\copy3} + \centerline{\rm\theweekday} + \vskip20pt\box0\newpage} +\def\newpage{\vfill\penalty-10000} +% +\Day=31\Month=12\dayno\lastdate=\date +\Day=1\Month=1\dayno\currentdate=\date +\card +\leftskip=1em plus1fill\rightskip=1em plus1fill +\def\epilog{} diff --git a/Master/texmf-dist/tex/plain/calendar/calend0.tex b/Master/texmf-dist/tex/plain/calendar/calend0.tex new file mode 100644 index 00000000000..854adc3cab6 --- /dev/null +++ b/Master/texmf-dist/tex/plain/calendar/calend0.tex @@ -0,0 +1,156 @@ +%% +%% FILE calend0.tex +%% Modificat 9/12/92 +\catcode`\@=11 +\newif\ifleapyear +\def\loadadvanced{% + \input calend1.tex\relax} +\newcount\date +\newcount\weekd +\newcount\Year +\newcount\yearbase +\newcount\Month +\newcount\Day +\newcount\@catch +\newcount\timezone\timezone=0 +\def\setyear#1{\Year=#1 + \advance\Year by-1900\calculateyearbase} +\def\nextyear{\advance\Year by1 + \calculateyearbase} +\def\settimezone#1{\timezone=#1 + \multiply\timezone by 1000 + \divide\timezone by24} +% \ifleapyear is set; +% \yearbase is the number of +% days passed from 1900, Jan 0 +% to New year's date; +\def\calculateyearbase{% + \yearbase=-1 + {\count0=\Year\divide\count0 by4 + \multiply\count0 by4 + \ifnum\Year=\count0 + \global\@catch=0\else\global\@catch=1\fi}% + \ifcase\@catch \leapyeartrue\or + \leapyearfalse\fi + {\count0=\Year\multiply\count0 + by1461\advance\count0 by3 + \divide\count0 by4 + \global\@catch=\count0}% + \advance\yearbase by\@catch + \ifnum\Year=0\yearbase=0\leapyearfalse\fi} +% Gives the number of days passed +% at the end of each month. +% Value returned in \Day +\def\monthdays{\global + \@catch=\ifcase\Month 0\or31\or + 59\or90\or120\or151\or181\or212\or + 243\or273\or304\or334\or365\fi + {\ifleapyear\ifnum\Month>1 + \global\advance\@catch by1\fi\fi}% + \Day=\@catch} +% Long date of \Month, \Day +% in the year \Year. +% Value returned in \date +\def\dayno{\date=\Day{\advance + \Month by-1\monthdays + \advance\date by\Day + \global\advance\date by\yearbase}} +% Long date MOD 7 gives the week day. +% Sunday is 0 and Saturday is 6. +\def\weekday{{\count0=\date\relax + \count1=\count0\divide\count0 by 7 + \multiply\count0 by 7 +\advance\count1 by -\count0 + \global\weekd=\count1}} +% Name of week day (Local). +\def\theweekday{\weekday + \ifcase\weekd + Sunday\or Monday\or Tuesday\or + Wednesday\or Thursday\or Friday\or + Saturday\fi} +% (Local) +\def\theshortweekday{\weekday + \ifcase\weekd Sun\or Mon\or Tue\or + Wed\or Thu\or Fri\or Sat\fi} +% Gives the usual calendar date for +% a long date in counter \date. +% Returned in \Day, \Month and \Year +\def\caldate{\Year=\date + \multiply\Year by4\divide\Year by1461 + \calculateyearbase + {\advance\date by-\yearbase\Month=0 + \loop\monthdays\ifnum\Day<\date + \global\advance\Month by1\repeat + {\advance\Month by-1\monthdays + \advance\date by-\Day + \global\Day=\date}}} +% Name of month \Month. (Local) +\def\themonth{\ifcase\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} +% Find the next (previous) day after +% (before) \date with \weekday=#1. +\def\nextday#1{{\count0=#1\weekday + \advance\count0 by-\weekd + \ifnum\count0<0\advance\count0 by7\fi + \global\advance\date by\count0}} +\def\prevday#1{\snextday#1 + \advance\date by-7} +\def\snextday#1{\advance\date by1 + \nextday#1} +\def\sprevday#1{\advance\date by-1 + \prevday#1} +% \beginevents...\endevents +% contains control sequences like +% \event or \evday or sequences +% generating these commands. +\newwrite\evefile +\def\beginevents{% + \immediate\openout + \evefile=\jobname.eve\relax} +\def\endevents{\immediate\closeout + \evefile\end} +\newtoks\evetext +\def\event#1/#2[#3]{\evetext={#3}% + \Day=#1\Month=#2\dayno + \evday[\the\evetext]} +\def\evday[#1]{\immediate\write\evefile{% + \string\evententry{\the\date}{#1}}} +\def\thecaldate{\the\Day/\the\Month} +\def\mute{\def\thecaldate{}} +% +% 2nd run commands +% +\newcount\currentdate +\newcount\lastdate +\newcount\nextdate +\newif\ifdoing@day +\newif\ifholy +\def\holy{\global\holytrue} +\def\upto#1{\nextdate=#1 + \loop\advance\currentdate by1\relax + \ifnum\currentdate<\nextdate + \begin@day\end@day\repeat} +\def\evententry#1#2{\unskip + \ifnum#1>\lastdate\else + \ifnum\currentdate<#1 + \ifdoing@day\end@day\fi + \upto{#1}\fi + \ifnum\currentdate=#1 + \ifdoing@day\else\begin@day\fi + #2\par\fi\fi} +\def\begin@day{\doing@daytrue + \date=\currentdate\caldate + \message{<\thecaldate}\beginday} +\def\end@day{\endday\doing@dayfalse + \global\holyfalse\message{>}} +\def\makeagenda#1{\input #1.sty\relax + \begin@day\input\jobname.eve\relax + \evententry{\the\lastdate}{}\end@day + \epilog\end} +% Do not read events +\def\makeempty{\begin@day + \evententry{\the\lastdate}{}\end@day} +\catcode`\@=12 diff --git a/Master/texmf-dist/tex/plain/calendar/calend1.tex b/Master/texmf-dist/tex/plain/calendar/calend1.tex new file mode 100644 index 00000000000..7ce74606469 --- /dev/null +++ b/Master/texmf-dist/tex/plain/calendar/calend1.tex @@ -0,0 +1,85 @@ +%% +%% FILE calend1.tex +%% +\def\loadadvanced{\relax} +% Convert from Julian date and time in +% \date to long date (in local time) +\def\JDTtoL{\advance\date by500 + \advance\date by\timezone\divide\date by1000} +%% Trigonometric functions +\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} +% Reduces modulo 2\pi (requires positive +% argument theta): +% theta := theta MOD 2\pi, where +% theta = count1*10^(-3) +\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} +\newif\ifsign +% 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. +\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} +% v := cos(theta), where +% v = count4*10^(-3); +% theta = count1*10^(-3). +% \SIN is evaluated on pi/2-theta. +\def\Cos{\advance\count1 by-1571 + \multiply\count1 by-1\Sin} +% 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) +\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} +% 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) +\def\fac#1{\multiply\count4 by #1 + \advance\count6 by\count4} +\def\id{\count4=\count1} % Identity diff --git a/Master/texmf-dist/tex/plain/calendar/feasts.tex b/Master/texmf-dist/tex/plain/calendar/feasts.tex new file mode 100644 index 00000000000..ab5d48976b3 --- /dev/null +++ b/Master/texmf-dist/tex/plain/calendar/feasts.tex @@ -0,0 +1,32 @@ +%% +%% FILE feasts.tex +%% +% Date of Easter for year \Year. +% Value returned in \date +\def\easter{{\count0=\Year\count1=\count0 + \divide\count0 by19\multiply\count0 by19 + \advance\count1 by-\count0 + \advance\count1 by 1 % Golden number + \count2=\count1\multiply\count2 by11 + \advance\count2 by18\count0=\count2 + \divide\count0 by30\multiply\count0 by30 + \advance\count2 by-\count0 % Epact + \ifnum\count2=25\ifnum\count1>11 + \count2=26 \fi\fi + \ifnum\count2=24 \count2=25\fi + \advance\count2 by-44 + \multiply\count2 by-1 + \ifnum\count2<21 \advance\count2 by30\fi + \Month=3\Day=0\dayno\global\advance\date + by\count2}\snextday0} +% (local) +\def\includefeasts{% + \message{Including feasts} + \easter\evday[Easter Sunday] + {\advance\date by49\evday[Whitsun]} + {\advance\date by-7\evday[Palm Sunday]} + {\advance\date by-46\evday[Ash Wendsday] + \advance\date by-3\evday[Carnival]} + \Month=1\Day=1\dayno\snextday0 + \evday[Epiphany] + \event 25/12[\holy Christmas]} diff --git a/Master/texmf-dist/tex/plain/calendar/moon.tex b/Master/texmf-dist/tex/plain/calendar/moon.tex new file mode 100644 index 00000000000..f64c1f10b73 --- /dev/null +++ b/Master/texmf-dist/tex/plain/calendar/moon.tex @@ -0,0 +1,89 @@ +%% +%% FILE moon.tex +%% +\loadadvanced +\newcount\moonno +\def\firstmoon{\moonno=\Year + \multiply\moonno by123685 + \divide\moonno by10000 + \multiply\moonno by4\advance\moonno by-1 + \loop\moondate\ifnum\date<\yearbase + \advance\moonno by1\repeat} +% Compute date for cycle quarter MOONNO +\def\moondate{{\count0=\moonno + \lin 202.126.369+0.\count0=\count1 + \count6=0 + \lin 0.2.319+2907.\Sin\fac{3} + \divide\count6 by1000 + \lin 365.249.86+7593.\id\fac{1} + \divide\count6 by10\count7 =\count6 + \ifodd\moonno\quarters + \else\fullornew\fi\global\date=\count7} + \JDTtoL\message{\the\date}} +% Correction for full and new moon +\def\fullornew{\count6=0 + \lin -393.0.0+0. + \divide\count1 by100000000 + \advance\count6 by\count1 + \lin 0.628.300+6269.\Sin + \multiply\count6 by\count4 + \lin -7.-700.-369+ 928.\Sin\fac{ -74} + \lin 0. 628. 300+ 6269.\Sin\fac{ 1734} + \lin 1. 256. 600+12539.\Sin\fac{ 21} + \lin 8. 328. 670+ 5341.\Sin\fac{-4068} + \lin 8. 538. 220+-4597.\Sin\fac{ 10} + \lin 8. 956. 970+11610.\Sin\fac{ -51} + \lin 16. 238. 589+-5526.\Sin\fac{ -4} + \lin 16. 657. 340+10682.\Sin\fac{ 161} + \lin 16. 866. 890+ 743.\Sin\fac{ 104} + \lin 17. 285. 640+16951.\Sin\fac{ 50} + \lin 17. 495. 190+ 7013.\Sin\fac{ 4} + \lin 24. 986. 10+16023.\Sin\fac{ -4} + \lin 25. 195. 560+ 6084.\Sin\fac{ -6} + \divide\count6 by10000 + \advance\count7 by\count6 } +% Correction for quarters +\def\quarters{\lin -393.0.0+0. + \divide\count1 by100000000 + \count6 =\count1 \lin 0.628.300+6269. + \Sin\multiply\count6 by\count4 + \lin -16. -29. -40+-4413.\Sin\fac{ 40} + \lin -7.-700.-369+ 928.\Sin\fac{ -47} + \lin -7. -72. -69+ 7198.\Sin\fac{ -30} + \lin 0. 628. 300+ 6270.\Sin\fac{ 1721} + \lin 1. 256. 600+12539.\Sin\fac{ 21} + \lin 8. 328. 670+ 5341.\Sin\fac{-6280} + \lin 8. 538. 220+-4598.\Sin\fac{ 21} + \lin 8. 956. 970+11611.\Sin\fac{ -119} + \lin 16. 238. 589+-5526.\Sin\fac{ -4} + \lin 16. 657. 340+10682.\Sin\fac{ 89} + \lin 16. 866. 890+ 743.\Sin\fac{ 79} + \lin 17. 285. 640+16952.\Sin\fac{ 3} + \lin 17. 495. 190+ 7013.\Sin\fac{ 3} + \lin 24. 986. 10+16023.\Sin\fac{ -4} + \lin 25. 195. 560+ 6085.\Sin\fac{ -6} + \count8=\count6\count6=28000 + \lin 628. 300. 373+ 6270.\Cos\fac{ -4} + \lin 8. 328. 670+ 5341.\Cos\fac{ 3} + \count2=\moonno + \advance\count2 by-1\divide\count2 by2 + \ifodd\count2\multiply\count6 by-1 \fi + \advance\count6 by\count8 + \divide\count6 by10000 + \advance\count7 by\count6 } +% Events for phases. +% Uses PHASE (local). +\def\includemoons{\message{Including moons} + {\firstmoon +\Month=12\Day=31\dayno\advance\date by1 + \count1=\date + \loop\moondate\phase\ifnum\date<\count1 + \evday[\themoon]\advance\moonno by1 + \repeat}} +\def\phase{{\count0=\moonno + \count1=\moonno + \divide\count0 by4\multiply\count0 by4 + \advance\count1 by-\count0\relax + \global\edef\themoon{\ifcase\count1 + New moon\or First quarter\or + Full Moon\or Last quarter\fi}}} diff --git a/Master/texmf-dist/tex/plain/calendar/sun.tex b/Master/texmf-dist/tex/plain/calendar/sun.tex new file mode 100644 index 00000000000..9ec246b1f9a --- /dev/null +++ b/Master/texmf-dist/tex/plain/calendar/sun.tex @@ -0,0 +1,15 @@ +%% +%% FILE sun.tex +%% +\loadadvanced +\def\linY#1.#2.#3+#4.{{\count0=\Year + \multiply\count0 by1000\count1=0 + \lin #1.#2.#3+#4. + \global\date=\count1}\JDTtoL} +% (local) +\def\includeseasons{% + \message{Including seasons} + \linY 365.242.365+ 79573.\evday[Spring] + \linY 365.241.628+172405.\evday[Summer] + \linY 365.242.045+266014.\evday[Fall] + \linY 365.242.756+355784.\evday[Winter]} diff --git a/Master/texmf-dist/tex/plain/calendar/wall.sty b/Master/texmf-dist/tex/plain/calendar/wall.sty new file mode 100644 index 00000000000..076eb579ba1 --- /dev/null +++ b/Master/texmf-dist/tex/plain/calendar/wall.sty @@ -0,0 +1,60 @@ +%% +%% FILE wall.sty +%% +\hsize=9.5in +\vsize=7.5in\voffset=-0.65in +\baselineskip=12pt +\newcount\daysinrow +\newdimen\cellwidth +\newdimen\cellheight +\cellheight=1.13in +\parindent=0pt +\cellwidth=\hsize +\divide\cellwidth by7 +\advance\cellwidth by-0.4pt +\font\BBf=cmbx12 at 24pt +\font\Bf=cmbx10 at 20pt +\font\Rm=cmr10 at 20pt +\font\rm=cmr12 at 14pt +\font\small=cmr9 +\footline={} +\def\hstrut{\hrule height0pt depth0pt + width\cellwidth} +\def\beginday{ + \ifnum\daysinrow=0\setbox1=\hbox{\vrule}\fi + \setbox0=\vbox to\cellheight\bgroup + \hstrut\hsize=\cellwidth\vskip5pt + \setbox2=\vbox\bgroup\small} +\def\endday{\egroup + \hbox{\hskip0.5em\Rm\ifholy\Bf\fi\the\Day} + \vskip2pt\box2\vfill\egroup + \setbox1=\hbox{\unhbox1\box0\vrule} + \advance\daysinrow by1 + \ifnum\daysinrow=7\box1\hrule\daysinrow=0\fi} +% +\def\advancemonth{\ifnum\Month=12 + \nextyear\Month=1\else\advance\Month by1\fi} +% If no Month is given, take today's date. +\ifnum\Month=0 \Month=\month + \ifnum\day>15 \advancemonth\fi\fi +\Day=1\dayno +\topskip=0pt\hbox{} +\vfill +\centerline{\BBf\themonth} +\penalty10000 +\vskip40pt minus32pt +% Local: from sunday ... +\prevday0\currentdate=\date +\hbox{\rm\loop + \hbox to\cellwidth{\hss\theweekday\hss} + \unskip\ifnum\weekd<6\advance\date by1\repeat} +\penalty10000 +\vskip3pt +% Local: ... to saturday. +\Day=1 \advance\Month by1\dayno +\advance\date by-1\nextday6\lastdate=\date +\leftskip=3pt +\raggedright +\daysinrow=0 +\vbox\bgroup\hrule +\def\epilog{\vfill\egroup\supereject} |