diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/schedule')
-rw-r--r-- | Master/texmf-dist/source/latex/schedule/schedule.dtx | 144 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/schedule/schedule.ins | 8 |
2 files changed, 113 insertions, 39 deletions
diff --git a/Master/texmf-dist/source/latex/schedule/schedule.dtx b/Master/texmf-dist/source/latex/schedule/schedule.dtx index 602671021c3..d1740bb5492 100644 --- a/Master/texmf-dist/source/latex/schedule/schedule.dtx +++ b/Master/texmf-dist/source/latex/schedule/schedule.dtx @@ -13,13 +13,13 @@ Released under the LaTeX Project Public License v1.3c or later See http://www.latex-project.org/lppl.txt ---------------------------------------------------------------- -This package defines the {\ttfamily schedule} environment. This is primarily intended for +This package defines the schedule environment. This is primarily intended for constructing charts of recurring weekly appointments. It may also be used to create a schedule of events and sign-up sheets (for example, scheduling mandatory office visits with students for discussing paper topics, etc.) -This package requires the packages {\ttfamily calc} and {\ttfamily xcolor}. +This package requires the packages calc and xcolor. %</readme> %<*internal> \fi @@ -39,12 +39,12 @@ Copyright (c) Jason Alexander, 1997-2001 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. \endpreamble @@ -54,7 +54,7 @@ LaTeX version 2005/12/01 or later. %<batchfile>\endbatchfile %<*internal> \generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}} -\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}} +\generate{\file{README.md}{\from{\jobname.dtx}{readme}}} \endgroup %</internal> % @@ -74,6 +74,7 @@ LaTeX version 2005/12/01 or later. % % \changes{v1.00}{1997/10/11}{Initial version.} % \changes{v1.10}{2019/7/26}{Clarified `noon' and `midnight' for 12:00} +% \changes{v1.20}{2019/7/31}{Added switches for 12-hour or 24-hour time notation} % % \GetFileInfo{schedule.sty} % @@ -144,6 +145,7 @@ LaTeX version 2005/12/01 or later. % \BeginOn{Monday} % \TextSize{\tiny} % \FiveDay +% \TwelveHour % % \NewAppointment{meeting}{red}{white} % \NewAppointment{workshop}{green}{blue} @@ -166,6 +168,7 @@ LaTeX version 2005/12/01 or later. % \BeginOn{Monday} % \TextSize{\tiny} % \FiveDay +% \TwelveHour % % \NewAppointment{meeting}{red}{white} % \NewAppointment{workshop}{green}{blue} @@ -263,6 +266,14 @@ LaTeX version 2005/12/01 or later. % Tells \LaTeX\ to typeset a seven-day schedule. % \end{macro} % +% \begin{macro}{\TwelveHour} +% Tells \LaTeX\ to typeset times using a 12-hour clock. +% \end{macro} +% +% \begin{macro}{\TwentyFourHour} +% Tells \LaTeX\ to typeset times using a 24-hour clock. +% \end{macro} +% % \begin{macro}{\NewAppointment} % By using the |\NewAppointment| command, the user can customize the appearance % of the schedule by changing the color of the text or the background color. @@ -278,7 +289,7 @@ LaTeX version 2005/12/01 or later. % \begin{macrocode} \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} @@ -363,6 +374,7 @@ LaTeX version 2005/12/01 or later. \newsavebox{\temp@box} \newif\ifweekends +\newif\iftwelve \newcount\@i \newcount\@j @@ -380,6 +392,8 @@ LaTeX version 2005/12/01 or later. \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}}} @@ -443,23 +457,53 @@ LaTeX version 2005/12/01 or later. {\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% @@ -477,26 +521,56 @@ LaTeX version 2005/12/01 or later. \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% diff --git a/Master/texmf-dist/source/latex/schedule/schedule.ins b/Master/texmf-dist/source/latex/schedule/schedule.ins index 916fcc38594..120c91c9c46 100644 --- a/Master/texmf-dist/source/latex/schedule/schedule.ins +++ b/Master/texmf-dist/source/latex/schedule/schedule.ins @@ -15,12 +15,12 @@ %% %% 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. %% \input docstrip.tex @@ -36,12 +36,12 @@ Copyright (c) Jason Alexander, 1997-2001 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. \endpreamble |