diff options
author | Karl Berry <karl@freefriends.org> | 2009-03-28 22:52:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-03-28 22:52:37 +0000 |
commit | 48066adf939ff889ed9e33a4a8e5ede53db58d28 (patch) | |
tree | 98aec5997b916cfc7614afb4f0f21477f5a6a39a /Master/texmf-dist/tex | |
parent | 88e63a5d68668d620c783cdbf51e0c5bab111b7c (diff) |
pst-calendar missing (from Herbert Voss, 28mar09)
git-svn-id: svn://tug.org/texlive/trunk@12554 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-calendar/pst-calendar.sty | 496 |
1 files changed, 496 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/pst-calendar/pst-calendar.sty b/Master/texmf-dist/tex/latex/pst-calendar/pst-calendar.sty new file mode 100644 index 00000000000..c34692384f4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/pst-calendar/pst-calendar.sty @@ -0,0 +1,496 @@ +%% +%% This is file `pst-calendar.sty', +%% +%% IMPORTANT NOTICE: +%% +%% Package `pst-calendar.sty' +%% +%% Manuel LUQUE <Mluque5130aol.com> +%% Herbert Voss <voss _at_ perce.de> +%% +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN archives +%% in directory macros/latex/base/lppl.txt. +%% +%% DESCRIPTION: +%% `pst-calendar' is a PSTricks package to draw a calendar, +%% as a tabular or as doecahedron +%% +% Requires PSTricks, pstricks, pst-3d, multido, fp packages +%% Manuel LUQUE <Mluque5130aol.com> %% +%% 1 Octobre 1999 pour le dodécaèdre %% +%% 23 avril 2003 pour le calendrier %% +%% 27 avril : placer une date de son choix +%% suggestion de Jean-Michel Sarlat +%% jours fériés et fêtes : 1 mai 003 %% +%% 1 et 8 mai, 15 août, 1 et 11 novembre, 25 décembre +%% fête de Pâques %% +%% ascension et pentecôte : 8 mai 2003 +% +\NeedsTeXFormat{LaTeX2e} +% +\ProvidesPackage{pst-calendar} + [2005/11/09 v0.47 calendars with `PSTricks' (ML,hv)] + % +% +\RequirePackage{fp} +\FPmessagesfalse +\RequirePackage{pstricks} +\SpecialCoor% +\RequirePackage{pst-3d} +\RequirePackage{multido} +\RequirePackage{pst-xkey} + +\pst@addfams{pst-calendar}% hv + +\def\CalendrierFP@version{Version 0.47, 2005-11-07} +\message{`pst-Calendar avec FP', \CalendrierFP@version\space ML/hv} +% +\DeclareOption{english}{% +\def\ps@Jan{January} +\def\ps@Feb{February} +\def\ps@Mar{March} +\def\ps@Apr{April} +\def\ps@May{May} +\def\ps@Jun{June} +\def\ps@Jul{July} +\def\ps@Aug{August} +\def\ps@Sep{September} +\def\ps@Oct{October} +\def\ps@Nov{November} +\def\ps@Dec{December} +\def\ps@Mon{M} +\def\ps@Tue{T} +\def\ps@Wed{W} +\def\ps@Thu{T} +\def\ps@Fri{F} +\def\ps@Sat{S} +\def\ps@Son{S} +} +\DeclareOption{french}{% +\typeout{pst-calendar: using french options} +\def\ps@Jan{JANVIER} +\def\ps@Feb{FEVRIER} +\def\ps@Mar{MARS} +\def\ps@Apr{AVRIL} +\def\ps@May{MAI} +\def\ps@Jun{JUIN} +\def\ps@Jul{JUILLET} +\def\ps@Aug{AOUT} +\def\ps@Sep{SEPTEMBRE} +\def\ps@Oct{OCTOBRE} +\def\ps@Nov{NOVEMBRE} +\def\ps@Dec{DECEMBRE} +\def\ps@Mon{L} +\def\ps@Tue{M} +\def\ps@Wed{M} +\def\ps@Thu{J} +\def\ps@Fri{V} +\def\ps@Sat{S} +\def\ps@Son{D} +} +\DeclareOption{ngerman}{% +\def\ps@Jan{Januar} +\def\ps@Feb{Februar} +\def\ps@Mar{M\"arz} +\def\ps@Apr{April} +\def\ps@May{Mai} +\def\ps@Jun{Juni} +\def\ps@Jul{Juli} +\def\ps@Aug{August} +\def\ps@Sep{September} +\def\ps@Oct{Oktober} +\def\ps@Nov{November} +\def\ps@Dec{Dezember} +\def\ps@Mon{M} +\def\ps@Tue{D} +\def\ps@Wed{M} +\def\ps@Thu{D} +\def\ps@Fri{F} +\def\ps@Sat{S} +\def\ps@Son{S} +} +% +\ExecuteOptions{english} +\ProcessOptions +% +\define@key[psset]{pst-calendar}{Day}{\def\psk@CalendrierJ{#1}} +\define@key[psset]{pst-calendar}{MonthUse}{\def\psk@CalendrierMchoix{#1}} +\define@key[psset]{pst-calendar}{Month}{\def\psk@CalendrierM{#1}} +\define@key[psset]{pst-calendar}{Year}{\def\psk@CalendrierA{#1}} +\psset{Day=\number\day,Month=\number\month,MonthUse=\number\month,Year=\number\year} +% +\define@key[psset]{pst-calendar}{Jour}{\def\psk@CalendrierJ{#1}} +\define@key[psset]{pst-calendar}{MoisChoisi}{\def\psk@CalendrierMchoix{#1}} +\define@key[psset]{pst-calendar}{Mois}{\def\psk@CalendrierM{#1}} +\define@key[psset]{pst-calendar}{An}{\def\psk@CalendrierA{#1}} +\psset{Jour=\number\day,Mois=\number\month,MoisChoisi=\number\month,An=\number\year} +% +\define@key[psset]{pst-calendar}{Tag}{\def\psk@CalendrierJ{#1}} +\define@key[psset]{pst-calendar}{MonatT}{\def\psk@CalendrierMchoix{#1}} +\define@key[psset]{pst-calendar}{Monat}{\def\psk@CalendrierM{#1}} +\define@key[psset]{pst-calendar}{Jahr}{\def\psk@CalendrierA{#1}} +\psset{Tag=\number\day,Monat=\number\month,MonatT=\number\month,Jahr=\number\year} +% +\newpsstyle{january}{Vx=-\rc,Vy=0,Vz=-\rd,viewangle=108} +\newpsstyle{february}{Vx=\rc,Vy=0,Vz=-\rd,viewangle=180} +\newpsstyle{march}{Vx=0,Vy=-\ra,Vz=-\rb,viewangle=144} +\newpsstyle{april}{Vx=-\rd,Vy=-\rc,Vz=0,viewangle=162} +\newpsstyle{may}{Vx=-\rd,Vy=\rc,Vz=0,viewangle=198} +\newpsstyle{june}{Vx=0,Vy=\ra,Vz=-\rb,viewangle=216} +\newpsstyle{july}{Vx=-\rc,Vy=0,Vz=\rd,viewangle=0} +\newpsstyle{august}{Vx=0,Vy=-\ra,Vz=\rb,viewangle=-36} +\newpsstyle{september}{Vx=\rd,Vy=-\rc,Vz=0,viewangle=-18} +\newpsstyle{october}{Vx=\rd,Vy=\rc,Vz=0,viewangle=18} +\newpsstyle{november}{Vx=0,Vy=\ra,Vz=\rb,viewangle=36} +\newpsstyle{december}{Vx=\rc,Vy=0,Vz=\rb,viewangle=0} +% +\newpsstyle{Januar}{Vx=-\rc,Vy=0,Vz=-\rd,viewangle=108} +\newpsstyle{Februar}{Vx=\rc,Vy=0,Vz=-\rd,viewangle=180} +\newpsstyle{Maerz}{Vx=0,Vy=-\ra,Vz=-\rb,viewangle=144} +\newpsstyle{April}{Vx=-\rd,Vy=-\rc,Vz=0,viewangle=162} +\newpsstyle{Mai}{Vx=-\rd,Vy=\rc,Vz=0,viewangle=198} +\newpsstyle{Juni}{Vx=0,Vy=\ra,Vz=-\rb,viewangle=216} +\newpsstyle{Juli}{Vx=-\rc,Vy=0,Vz=\rd,viewangle=0} +\newpsstyle{August}{Vx=0,Vy=-\ra,Vz=\rb,viewangle=-36} +\newpsstyle{September}{Vx=\rd,Vy=-\rc,Vz=0,viewangle=-18} +\newpsstyle{Oktober}{Vx=\rd,Vy=\rc,Vz=0,viewangle=18} +\newpsstyle{November}{Vx=0,Vy=\ra,Vz=\rb,viewangle=36} +\newpsstyle{Dezember}{Vx=\rc,Vy=0,Vz=\rb,viewangle=0} +% +\newpsstyle{janvier}{Vx=-\rc,Vy=0,Vz=-\rd,viewangle=108} +\newpsstyle{fevrier}{Vx=\rc,Vy=0,Vz=-\rd,viewangle=180} +\newpsstyle{mars}{Vx=0,Vy=-\ra,Vz=-\rb,viewangle=144} +\newpsstyle{avril}{Vx=-\rd,Vy=-\rc,Vz=0,viewangle=162} +\newpsstyle{mai}{Vx=-\rd,Vy=\rc,Vz=0,viewangle=198} +\newpsstyle{juin}{Vx=0,Vy=\ra,Vz=-\rb,viewangle=216} +\newpsstyle{juillet}{Vx=-\rc,Vy=0,Vz=\rd,viewangle=0} +\newpsstyle{aout}{Vx=0,Vy=-\ra,Vz=\rb,viewangle=-36} +\newpsstyle{septembre}{Vx=\rd,Vy=-\rc,Vz=0,viewangle=-18} +\newpsstyle{octobre}{Vx=\rd,Vy=\rc,Vz=0,viewangle=18} +\newpsstyle{novembre}{Vx=0,Vy=\ra,Vz=\rb,viewangle=36} +\newpsstyle{decembre}{Vx=\rc,Vy=0,Vz=\rb,viewangle=0} +% +\definecolor{RougeA}{cmyk}{0.05,0.1,0.1,0} +\definecolor{RougeB}{cmyk}{0.05,0.15,0.15,0} +\definecolor{RougeC}{cmyk}{0.05,0.2,0.2,0} +\definecolor{RougeD}{cmyk}{0.05,0.25,0.25,0} +\definecolor{RougeE}{cmyk}{0.05,0.3,0.3,0} +\definecolor{RougeF}{cmyk}{0.05,0.35,0.35,0} +\definecolor{RougeG}{cmyk}{0.05,0.4,0.4,0} +\definecolor{RougeH}{cmyk}{0.05,0.45,0.45,0} +\definecolor{RougeI}{cmyk}{0.05,0.5,0.5,0} +\definecolor{RougeJ}{cmyk}{0.05,0.55,0.55,0} +\definecolor{RougeK}{cmyk}{0.05,0.6,0.6,0} +\definecolor{RougeL}{cmyk}{0.1,0.65,0.65,0} +\newpsstyle{holiday}{framesep=2pt,doubleline=true,doublecolor=red,linecolor=red,fillstyle=solid,fillcolor=RougeA} +\define@key[psset]{pst-calendar}{Vx}{\def\psk@Solide@Viewpointx{#1}} +\define@key[psset]{pst-calendar}{Vy}{\def\psk@Solide@Viewpointy{#1}} +\define@key[psset]{pst-calendar}{Vz}{\def\psk@Solide@Viewpointz{#1}} +\psset{Vx=1,Vy=1,Vz=1} +% +\def\RA{7.36022}\gdef\rb{5.06525}\gdef\ra{8.19574}% +\gdef\rc{5.06525}\gdef\rd{8.19574} +% +\def\psCalDodecaeder{% + \@ifnextchar[{\pst@CalDodecaedre}{\pst@CalDodecaedre[style=janvier]}}% +\def\pst@CalDodecaedre[#1]{{% + \psset{#1}% + \pspicture(-8,-12)(8,12)% + \psset{fillstyle=solid}% + \psset{viewpoint={\psk@Solide@Viewpointx} {\psk@Solide@Viewpointy} {\psk@Solide@Viewpointz}}% +\newcommand{\faceA}{\pspolygon(\RA;18)(\RA;90)(\RA;162)(\RA;234)(\RA;306)} +\newcommand{\faceB}{\pspolygon(\RA;270)(\RA;-18)(\RA;54)(\RA;126)(\RA;198)} +\newcommand{\faceC}{\pspolygon(\RA;0)(\RA;72)(\RA;144)(\RA;216)(\RA;288)} +\newcommand{\faceD}{\pspolygon(\RA;36)(\RA;108)(\RA;180)(\RA;252)(\RA;324)} +%face1 +\FPeval{\Test}{(\psk@Solide@Viewpointx)*(0)+(\psk@Solide@Viewpointy)*(\ra)+(\psk@Solide@Viewpointz)*(\rb)}% +\FPifpos{\Test}\ThreeDput[normal=0 {\ra} {\rb}](0,\ra,\rb){% +\psset{fillcolor=RougeA}\faceA\rput{36}{\rput(0,0){\psCalendar[Mois=11]}}}\fi +%face2 +\FPeval{\Test}{(\psk@Solide@Viewpointx)*(0)-(\psk@Solide@Viewpointy)*(\ra)+(\psk@Solide@Viewpointz)*(\rb)}% +\FPifpos{\Test}\ThreeDput[normal=0 {-\ra} {\rb}](0,-\ra,\rb){% +\psset{fillcolor=RougeB}\faceA\rput{-36}{\rput(0,0){\psCalendar[Mois=8]}}}\fi +%face3 +\FPeval{\Test}{(\psk@Solide@Viewpointx)*(0)+(\psk@Solide@Viewpointy)*(\ra)-(\psk@Solide@Viewpointz)*(\rb)}% +\FPifpos{\Test}\ThreeDput[normal=0 {\ra} {-\rb}](0,\ra,-\rb){% +\psset{fillcolor=RougeC}\faceB\rput{216}{\rput(0,0){\psCalendar[Mois=6]}}}\fi +%face4 +\FPeval{\Test}{(\psk@Solide@Viewpointx)*(0)-(\psk@Solide@Viewpointy)*(\ra)-(\psk@Solide@Viewpointz)*(\rb)}% +\FPifpos{\Test}\ThreeDput[normal=0 {-\ra} {-\rb}](0,-\ra,-\rb){% +\psset{fillcolor=RougeD}\faceB\rput{144}{\rput(0,0){\psCalendar[Mois=3]}}}\fi% +%face 5 +\FPeval{\Test}{(\psk@Solide@Viewpointx)*(\rc)+(\psk@Solide@Viewpointy)*(0)+(\psk@Solide@Viewpointz)*(\rd)}% +\FPifpos{\Test}\ThreeDput[normal={\rc} 0 {\rd}](\rc,0,\rd){% +\psset{fillcolor=RougeE}\faceB\rput(0,0){\psCalendar[Mois=12]}}\fi +%face6 +\FPeval{\Test}{(\psk@Solide@Viewpointx)*(-\rc)+(\psk@Solide@Viewpointy)*(0)+(\psk@Solide@Viewpointz)*(\rd)}% +\FPifpos{\Test}\ThreeDput[normal={-\rc} 0 {\rd}](-\rc,0,\rd){% +\psset{fillcolor=RougeF}\faceB\rput{0}{\rput(0,0){\psCalendar[Mois=7]}}}\fi +%face7 +\FPeval{\Test}{(\psk@Solide@Viewpointx)*(\rc)+(\psk@Solide@Viewpointy)*(0)-(\psk@Solide@Viewpointz)*(\rd)}% +\FPifpos{\Test}\ThreeDput[normal={\rc} 0 {-\rd}](\rc,0,-\rd){% +\psset{fillcolor=RougeG}\faceA\rput{180}{\rput(0,0){\psCalendar[Mois=2]}}}\fi +%face8 +\FPeval{\Test}{(\psk@Solide@Viewpointx)*(-\rc)+(\psk@Solide@Viewpointy)*(0)-(\psk@Solide@Viewpointz)*(\rd)}% +\FPifpos{\Test}\ThreeDput[normal={-\rc} 0 {-\rd}](-\rc,0,-\rd){% +\psset{fillcolor=RougeH}\faceA\rput{108}{\rput(0,0){\psCalendar[Mois=1]}}}\fi% +%face 9 +\FPeval{\Test}{(\psk@Solide@Viewpointx)*(\rd)+(\psk@Solide@Viewpointy)*(\rc)+(\psk@Solide@Viewpointz)*(0)}% +\FPifpos{\Test}\ThreeDput[normal={\rd} {\rc} 0](\rd,\rc,0){% +\psset{fillcolor=RougeI}\faceC\rput{18}{\rput(0,0){\psCalendar[Mois=10]}}}\fi +%face10 +\FPeval{\Test}{(\psk@Solide@Viewpointx)*(-\rd)+(\psk@Solide@Viewpointy)*(\rc)+(\psk@Solide@Viewpointz)*(0)}% +\FPifpos{\Test}\ThreeDput[normal={-\rd} {\rc} 0](-\rd,\rc,0){% +\psset{fillcolor=RougeJ}\faceD\rput{198}{\rput(0,0){\psCalendar[Mois=5]}}}\fi +%face11 +\FPeval{\Test}{(\psk@Solide@Viewpointx)*(\rd)-(\psk@Solide@Viewpointy)*(\rc)+(\psk@Solide@Viewpointz)*(0)}% +\FPifpos{\Test}\ThreeDput[normal={\rd} {-\rc} 0](\rd,-\rc,0){% +\psset{fillcolor=RougeK}\faceD\rput{-18}{\rput(0,0){\psCalendar[Mois=9]}}}\fi +%face8 +\FPeval{\Test}{(\psk@Solide@Viewpointx)*(-\rd)+(\psk@Solide@Viewpointz)*(0)-(\psk@Solide@Viewpointy)*(\rc)}% +\FPifpos{\Test}\ThreeDput[normal={-\rd} {-\rc} 0](-\rd,-\rc,0){% +\psset{fillcolor=RougeL}\faceC\rput{162}{\rput(0,0){\psCalendar[Mois=4]}}}\fi% +\endpspicture +}} +% +% +\newcount\colonne\newcount\ligne +\def\psCalendar{\@ifnextchar[{\pst@Calendrier}{\pst@Calendrier[]}} +\def\pst@Calendrier[#1]{{% + \pst@killglue + \psset{#1}% +% calcul de la date de Pâques +% lundi de Pâques + \FPset{\Year}{\psk@CalendrierA}% + \FPeval\GY{(\Year)-19*trunc((\Year)/19,0)}% + \FPeval{\Cent}{trunc((\Year)/100,0)}% + \FPeval{\Iter}{trunc((\Cent)-trunc((\Cent)/4,0)-trunc((8*(\Cent)+13)/25,0)+ + (\GY)*19+15,0)}% + \FPeval{\Iterdiv}{trunc((\Iter)/30,0)}% + \FPeval\Hepact{(\Iter)-30*(\Iterdiv)}% + \FPeval\Inbre{trunc((\Hepact)-trunc((\Hepact)/28,0)* + (1-trunc((\Hepact)/28,0))*(trunc(29/((\Hepact)+1),0)*trunc((21-(\GY))/11,0)),0)}% + \FPeval\Jnbreinter{trunc((\Year)+trunc((\Year)/4,0)+(\Inbre)+2-(\Cent)+trunc((\Cent)/4,0),0)}% + \FPeval\Jnbre{trunc((\Jnbreinter)-7*trunc((\Jnbreinter)/7,0),0)}% + \FPeval\Lnbre{trunc((\Inbre)-(\Jnbre),0)}% + \FPeval\Month{trunc(3+trunc(((\Lnbre)+40)/44,0),0)}% + \FPeval\Day{trunc((\Lnbre)+28-31*trunc((\Month)/4,0),0)}% + \ifnum\Month=4 + \ifnum\Day>25 \FPeval{\Day}{trunc((\Day)-7,0)}% dimanche de Pâques +% \ifnum\Day>25 \FPeval{\Day}{trunc((\Day)-6,0)}% Lundi de Pâques +% \else +% \FPeval{\Day}{trunc((\Day)+1,0)}% Lundi de Pâques + \fi + \fi +\ifnum\Month=3 + \ifnum\Day=32 \FPset{\Day}{1}\FPset{\Month}{4}% +% \else +% \FPeval{\Day}{trunc((\Day)+1,0)}% Lundi + \fi% +\fi% +% +% calcul du jour de l'ascension +% si Pâques tombe au mois d'avril, faire (39-30)+\Day = 9+\Day +% pour le jour du mois de mai de l'ascension +\ifnum\Month=4 + \FPeval\DayAscension{trunc((\Day)+9,0)}% + \FPeval\MonthAscension{trunc((\Month)+1,0)}% +% Ascension le \FPprint\DayAscension/\FPprint\MonthAscension/\FPprint\Year + \FPeval\TestJourPentecote{trunc((\DayAscension)+10,0)}% + \ifnum\TestJourPentecote>31 + \FPeval\DayPentecote{trunc((\TestJourPentecote)-31,0)}% + \FPeval\MonthPentecote{trunc((\Month)+2,0)}% + \else% + \FPset{\DayPentecote}{\TestJourPentecote}% + \FPset\MonthPentecote{\MonthAscension}% + \fi% +% +% Pentec\^ote le \FPprint\DayPentecote/\FPprint\MonthPentecote/\FPprint\Year +\fi% +% +% Dans le cas où Pâques tombe en mars +% (39-30)+\Day=8+\Day +% si 8+\Day<ou=30 on reste en avril +% \DayAscension=8+\Day +% \MonthAscension=4 +% Pentcôte est 10 jours après l'ascension +\ifnum\Month=3 + \FPeval\TestSiJourAvril{trunc((\Day)+8,0)}% + \ifnum\TestSiJourAvril<30 + \FPeval\MonthAscension{trunc((\Month)+1,0)}% + \FPeval\DayAscension{trunc(8+(\Day),0)}% + \else% + \FPeval\DayAscension{trunc((\Day)-22,0)}% + \FPeval\MonthAscension{trunc((\Month)+2,0)}% +\fi% + \FPeval\TestJourPentecote{trunc((\DayAscension)+10,0)}% + \ifnum\MonthAscension=4 + \ifnum\TestJourPentecote<31 + \FPset{\DayPentecote}{\TestJourPentecote}% + \FPset\MonthPentecote{4}% + \else + \FPeval\DayPentecote{trunc((\TestJourPentecote)-30,0)}% + \FPset\MonthPentecote{5}% + \fi% + \fi% + \ifnum\MonthAscension=5 + \FPeval\DayPentecote{trunc((\DayAscension)+10,0)}% + \FPset\MonthPentecote{5}% + \fi% +\fi% +% +% test d'une année bissextile +\FPeval{\YearBissextil}{(\psk@CalendrierA)/4}% +\FPtrunc{\YearBissextil}{\YearBissextil}{0}% +\FPeval{\YearBissextil}{(\YearBissextil)*4}% +\FPtrunc{\YearBissextil}{\YearBissextil}{0}% +% +\ifnum\psk@CalendrierM=1\def\adddays{0}\let\Name\ps@Jan\def\NbreJours{31}\fi% +\ifnum\psk@CalendrierM=2\def\adddays{31}\let\Name\ps@Feb% + \ifnum\YearBissextil=\psk@CalendrierA\def\NbreJours{29}\else\def\NbreJours{28}% +\fi\fi% +\ifnum\psk@CalendrierM=3 + \ifnum\YearBissextil=\psk@CalendrierA\def\adddays{60}\else\def\adddays{59}\fi% +\let\Name\ps@Mar\def\NbreJours{31}\fi% +\ifnum\psk@CalendrierM=4 + \ifnum\YearBissextil=\psk@CalendrierA\def\adddays{91}\else\def\adddays{90}\fi% +\let\Name\ps@Apr\def\NbreJours{30}\fi% +\ifnum\psk@CalendrierM=5 + \ifnum\YearBissextil=\psk@CalendrierA\def\adddays{121}\else\def\adddays{120}\fi% +\let\Name\ps@May\def\NbreJours{31}\fi% +\ifnum\psk@CalendrierM=6 + \ifnum\YearBissextil=\psk@CalendrierA\def\adddays{152}\else\def\adddays{151}\fi% +\let\Name\ps@Jun\def\NbreJours{30}\fi% +\ifnum\psk@CalendrierM=7 + \ifnum\YearBissextil=\psk@CalendrierA\def\adddays{182}\else\def\adddays{181}\fi% +\let\Name\ps@Jul\def\NbreJours{31}\fi% +\ifnum\psk@CalendrierM=8 + \ifnum\YearBissextil=\psk@CalendrierA\def\adddays{213}\else\def\adddays{212}\fi% +\let\Name\ps@Aug\def\NbreJours{31}\fi% +\ifnum\psk@CalendrierM=9 + \ifnum\YearBissextil=\psk@CalendrierA\def\adddays{244}\else\def\adddays{243}\fi% +\let\Name\ps@Sep\def\NbreJours{30}\fi% +\ifnum\psk@CalendrierM=10 + \ifnum\YearBissextil=\psk@CalendrierA\def\adddays{274}\else\def\adddays{273}\fi% +\let\Name\ps@Oct\def\NbreJours{31}\fi% +\ifnum\psk@CalendrierM=11 + \ifnum\YearBissextil=\psk@CalendrierA\def\adddays{305}\else\def\adddays{304}\fi% +\let\Name\ps@Nov\def\NbreJours{30}\fi% +\ifnum\psk@CalendrierM=12 + \ifnum\YearBissextil=\psk@CalendrierA\def\adddays{335}\else\def\adddays{334}\fi% +\let\Name\ps@Dec\def\NbreJours{31}\fi% +% +\ifnum\YearBissextil=\psk@CalendrierA + \FPeval{\NbYearBissextil}{((\psk@CalendrierA)-2000)/4}% + \FPtrunc{\NbYearBissextil}{\NbYearBissextil}{0}% + \else% + \FPeval{\NbYearBissextil}{((\psk@CalendrierA)-2000)/4+1}% + \FPtrunc{\NbYearBissextil}{\NbYearBissextil}{0}% +\fi% +% le 1 janvier 2000 est un samedi : Nbdays=6 +\FPeval{\NbDays}{6+((\psk@CalendrierA)-2000)+(\NbYearBissextil)+(\adddays)}% +% +\FPtrunc{\NbDays}{\NbDays}{0}% +% +\FPeval{\Frac}{(\NbDays)/7}% +\FPtrunc{\Frac}{\Frac}{0}% +% +\FPeval{\Quotient}{(\Frac)*7}% +\FPtrunc{\Quotient}{\Quotient}{0}% +% +\FPeval{\firstDay}{(\NbDays)-({\Quotient})}% +% +\FPclip{\firstDay}{\firstDay}% +\FPifzero\firstDay\FPset{\firstDay}{7}\fi% +\ligne=2% +\colonne=\firstDay% +\pspicture(0,-4)(8,4) + \psframe*[linecolor=blue](0.5,3.2)(7.5,4) + \rput(4,3.6){\textcolor{white}{\textsf{\textbf{\huge\Name}}}} + \rput(1,2.8){\textsf{\textbf{\Large\ps@Mon}}} + \rput(2,2.8){\textsf{\textbf{\Large\ps@Tue}}} + \rput(3,2.8){\textsf{\textbf{\Large\ps@Wed}}} + \rput(4,2.8){\textsf{\textbf{\Large\ps@Thu}}} + \rput(5,2.8){\textsf{\textbf{\Large\ps@Fri}}} + \rput(6,2.8){\textsf{\textbf{\Large\ps@Sat}}} + \rput(7,2.8){\textsf{\textbf{\Large\ps@Son}}} + \multido{\i=\firstDay+1}{\NbreJours}{% + \ifnum\i>7\ligne=1\fi + \ifnum\i>14\ligne=0\fi + \ifnum\i>21\ligne=-1\fi + \ifnum\i>28\ligne=-2\fi + \ifnum\i>35\ligne=-3\fi + \ifnum\psk@CalendrierM=\psk@CalendrierMchoix + \ifnum\the\multidocount=\psk@CalendrierJ + \rput(\colonne,\ligne){% + \pscirclebox[linestyle=none,fillstyle=solid,fillcolor=yellow]{\textbf{\textcolor{red}{\Large\the\multidocount}}}} + \else\rput(\colonne,\ligne){\textbf{\Large\the\multidocount}} + \fi + \else\rput(\colonne,\ligne){\textbf{\Large\the\multidocount}} + \fi +% les jours fériés +% le 1 de l'an + \ifnum\psk@CalendrierM=1 + \ifnum\the\multidocount=1 + \rput(\colonne,\ligne){\psframebox[style=holiday]{\textbf{\textcolor{red}{\Large\the\multidocount}}}} + \fi\fi +% le 1 mai et 8 mai + \ifnum\psk@CalendrierM=5 + \ifnum\the\multidocount=1 + \rput(\colonne,\ligne){\psframebox[style=holiday]{\textbf{\textcolor{red}{\Large\the\multidocount}}}}% + \fi + \ifnum\the\multidocount=8 + \rput(\colonne,\ligne){\psframebox[style=holiday]{\textbf{\textcolor{red}{\Large\the\multidocount}}}}% + \fi + \fi +% 15 août + \ifnum\psk@CalendrierM=8 + \ifnum\the\multidocount=15 + \rput(\colonne,\ligne){% + \psframebox[style=holiday]{\textbf{\textcolor{red}{\Large\the\multidocount}}}} + \fi\fi +% 1 Novembre et 11 Novembre + \ifnum\psk@CalendrierM=11 + \ifnum\the\multidocount=1 + \rput(\colonne,\ligne){% + \psframebox[style=holiday]{\textbf{\textcolor{red}{\Large\the\multidocount}}}} + \fi + \ifnum\the\multidocount=11 + \rput(\colonne,\ligne){% + \psframebox[style=holiday]{\textbf{\textcolor{red}{\Large\the\multidocount}}}} + \fi + \fi +% Noël + \ifnum\psk@CalendrierM=12 + \ifnum\the\multidocount=25 + \rput(\colonne,\ligne){% + \psframebox[style=holiday]{\textbf{\textcolor{red}{\Large\the\multidocount}}}} + \fi\fi +% Dimanche de Pâques + \ifnum\psk@CalendrierM=\Month + \ifnum\the\multidocount=\Day + \rput(\colonne,\ligne){% + \psframebox[style=holiday]{\textbf{\textcolor{red}{\Large\the\multidocount}}}} + \fi\fi +% Ascension + \ifnum\psk@CalendrierM=\MonthAscension + \ifnum\the\multidocount=\DayAscension + \rput(\colonne,\ligne){% + \psframebox[style=holiday]{\textbf{\textcolor{red}{\Large\the\multidocount}}}} + \fi\fi +% Pentecôte + \ifnum\psk@CalendrierM=\MonthPentecote + \ifnum\the\multidocount=\DayPentecote + \rput(\colonne,\ligne){% + \psframebox[style=holiday]{\textbf{\textcolor{red}{\Large\the\multidocount}}}} + \fi\fi +% +\advance\colonne by +1 +\ifnum\colonne>7\colonne=1\fi} +\rput(4,-3.5){\psovalbox[fillstyle=solid,fillcolor=blue,linestyle=none]{\textcolor{white}{\textsf{\textbf{\huge\psk@CalendrierA}}}}} +\multido{\rL=-2.5+1.0}{6}{\psline[linecolor=blue](0.5,\rL)(7.5,\rL)} +\endpspicture}} +% +%% END: CalendrierFP.sty +\endinput |