diff options
author | Karl Berry <karl@freefriends.org> | 2019-08-02 21:30:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-08-02 21:30:38 +0000 |
commit | 4e9f35e25c96c1ab485d68203a8030360a652881 (patch) | |
tree | 3e6af7e24da98fc5cda0e8370f3b986c172c6fef /Master/texmf-dist/tex/latex/schedule | |
parent | d3e7458fa130f766e0df5ac37086b3ca79bc2a2a (diff) |
schedule (2aug19)
git-svn-id: svn://tug.org/texlive/trunk@51805 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/schedule')
-rw-r--r-- | Master/texmf-dist/tex/latex/schedule/schedule.sty | 127 |
1 files changed, 95 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/schedule/schedule.sty b/Master/texmf-dist/tex/latex/schedule/schedule.sty index c84ed8a97e9..010d12a5da5 100644 --- a/Master/texmf-dist/tex/latex/schedule/schedule.sty +++ b/Master/texmf-dist/tex/latex/schedule/schedule.sty @@ -15,17 +15,17 @@ %% %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either -%% version 1.3 of this license or (at your option) any later +%% version 1.3c of this license or (at your option) any later %% version. The latest version of this license is in: %% %% http://www.latex-project.org/lppl.txt %% -%% and version 1.3 or later is part of all distributions of +%% and version 1.3c or later is part of all distributions of %% LaTeX version 2005/12/01 or later. %% \ProvidesFile{schedule.sty} \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{schedule}[2019/7/26 v1.10 schedule package] +\ProvidesPackage{schedule}[2019/7/31 v1.20 schedule package] \RequirePackage{calc} \RequirePackage{xcolor} \definecolor{dark}{gray}{.75} @@ -104,6 +104,7 @@ \newsavebox{\temp@box} \newif\ifweekends +\newif\iftwelve \newcount\@i \newcount\@j @@ -121,6 +122,8 @@ \def\SevenDay{\weekendstrue} \def\FiveDay{\weekendsfalse} +\def\TwelveHour{\twelvetrue} +\def\TwentyFourHour{\twelvefalse} \def\CellHeight#1{\setlength{\cell@height}{#1}% \setlength{\unitlength}{\cell@height*\ratio{1pt}{60pt}}} @@ -181,23 +184,53 @@ {\setcounter{x@coord}{0}% Set the x-coord right \setcounter{y@coord}{\value{grid@height}-60*\@i}% adjust for the right hour cell \ifnum\value{@tempc}=0% - \setcounter{@tempd}{\value{@tempc}+12}% - \put(\value{x@coord},\value{y@coord}){% - \makebox(0,0)[r]{\the@tempd:00 midnight\ }}% Midnight Hack + \iftwelve + \setcounter{@tempd}{\value{@tempc}+12}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\the@tempd:00~midnight~~}}% Midnight Hack + \else + \setcounter{@tempd}{\value{@tempc}}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\the@tempd:00~~}}% Midnight Hack + \fi \else\ifnum\value{@tempc}=24% - \setcounter{@tempd}{\value{@tempc}-12}% - \put(\value{x@coord},\value{y@coord}){% - \makebox(0,0)[r]{\the@tempd:00 midnight\ }}% Midnight Hack + \iftwelve + \setcounter{@tempd}{\value{@tempc}-12}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\the@tempd:00~midnight~}}% Midnight Hack + \else + \setcounter{@tempd}{\value{@tempc}}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\the@tempd:00~~}}% Midnight Hack + \fi \else\ifnum\value{@tempc}>12% - \setcounter{@tempd}{\value{@tempc}-12}% - \put(\value{x@coord},\value{y@coord}){% - \makebox(0,0)[r]{\the@tempd:00 pm\ }}% + \iftwelve + \setcounter{@tempd}{\value{@tempc}-12}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\the@tempd:00~pm~}}% + \else + \setcounter{@tempd}{\value{@tempc}}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\the@tempd:00~~}}% + \fi \else\ifnum\value{@tempc}=12% - \setcounter{@tempd}{\value{@tempc}}% - \put(\value{x@coord},\value{y@coord}){% - \makebox(0,0)[r]{\the@tempd:00 noon\ }}% Noontime Hack - \else\put(\value{x@coord},\value{y@coord}){% - \makebox(0,0)[r]{\the@tempc:00 am\ }}% + \iftwelve + \setcounter{@tempd}{\value{@tempc}}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\the@tempd:00~noon~}}% Noontime Hack + \else + \setcounter{@tempd}{\value{@tempc}}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\the@tempd:00~~}}% + \fi + \else + \iftwelve + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\the@tempc:00~am~}}% + \else + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\the@tempc:00~~}}% + \fi \fi\relax% \fi\relax% \fi\relax% @@ -215,26 +248,56 @@ \fi% \setcounter{y@coord}{\value{y@coord}-\@j}% \ifnum\value{@tempc}=0% - \setcounter{@tempd}{\value{@tempc}+12}% - \put(\value{x@coord},\value{y@coord}){% - \makebox(0,0)[r]{\tiny\the@tempd:\the@minutes\ am\ }}% Hack to get 12:xx AM right. + \iftwelve + \setcounter{@tempd}{\value{@tempc}+12}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\tiny\the@tempd:\the@minutes~am~}}% Hack to get 12:xx AM right. + \else + \setcounter{@tempd}{\value{@tempc}}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\tiny\the@tempd:\the@minutes~~}} + \fi \else\ifnum\value{@tempc}=24% - \setcounter{@tempd}{\value{@tempc}-12}% - \put(\value{x@coord},\value{y@coord}){% - \makebox(0,0)[r]{\tiny\the@tempd:\the@minutes\ am\ }}% Hack to get 12:xx AM right. + \iftwelve + \setcounter{@tempd}{\value{@tempc}-12}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\tiny\the@tempd:\the@minutes~am~}}% Hack to get 12:xx AM right. + \else + \setcounter{@tempd}{\value{@tempc}}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\tiny\the@tempd:\the@minutes~~}} + \fi \else\ifnum\value{@tempc}>12% - \setcounter{@tempd}{\value{@tempc}-12}% - \put(\value{x@coord},\value{y@coord}){% - \makebox(0,0)[r]{\tiny\the@tempd:\the@minutes\ pm\ }}% ...write the time (using pm)... + \iftwelve + \setcounter{@tempd}{\value{@tempc}-12}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\tiny\the@tempd:\the@minutes~pm~}}% ...write the time (using pm)... + \else + \setcounter{@tempd}{\value{@tempc}}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\tiny\the@tempd:\the@minutes~~}} + \fi \else\ifnum\value{@tempc}=12% - \setcounter{@tempd}{\value{@tempc}}% - \put(\value{x@coord},\value{y@coord}){% - \makebox(0,0)[r]{\tiny\the@tempd:\the@minutes\ pm\ }}% Hack to get 12:xx PM right. - \else\put(\value{x@coord},\value{y@coord}){% - \makebox(0,0)[r]{\tiny\the@tempc:\the@minutes\ am\ }}% ...write the time (using am). + \iftwelve + \setcounter{@tempd}{\value{@tempc}}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\tiny\the@tempd:\the@minutes~pm~}}% Hack to get 12:xx PM right. + \else + \setcounter{@tempd}{\value{@tempc}}% + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\tiny\the@tempd:\the@minutes~~}} + \fi + \else + \iftwelve + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\tiny\the@tempc:\the@minutes~am~}}% ...write the time (using am). + \else + \put(\value{x@coord},\value{y@coord}){% + \makebox(0,0)[r]{\tiny\the@tempc:\the@minutes~~}} + \fi + \fi% \fi% \fi% - \fi% \fi% \fi% \fi% |