summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-06-30 16:24:23 +0000
committerKarl Berry <karl@freefriends.org>2008-06-30 16:24:23 +0000
commit18bb1e2c2cf25f1d0e33edb438a899f6a80cae02 (patch)
treeb33c37fe6b3c4d023321980aa68c4ac937f40827 /Master
parent8c35ac8f04be9e931fcae14c5f283e875ffaebda (diff)
new latex package eukdate (30jun08)
git-svn-id: svn://tug.org/texlive/trunk@9114 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/eukdate/README26
-rw-r--r--Master/texmf-dist/doc/latex/eukdate/eukdate.pdfbin0 -> 112490 bytes
-rw-r--r--Master/texmf-dist/source/latex/eukdate/eukdate.dtx186
-rw-r--r--Master/texmf-dist/source/latex/eukdate/eukdate.ins58
-rw-r--r--Master/texmf-dist/tex/latex/eukdate/eukdate.sty90
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/eukdate.tlpsrc2
8 files changed, 364 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/eukdate/README b/Master/texmf-dist/doc/latex/eukdate/README
new file mode 100644
index 00000000000..4a45081e586
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/eukdate/README
@@ -0,0 +1,26 @@
+The eukdate package
+Andrew Gilbert Moschou
+v1.01 2008/06/28
+
+This work is released under the LPPL v1.3c or later.
+
+The eukdate package is used to change the format of \today's date,
+including the weekday, e.g. `Saturday, 26 June 2008', the `UK format',
+which is preferred in many parts of the world, as distinct from that
+which is used in \maketitle of the article class, `June 26, 2008', the `US format'.
+
+Usage
+
+\usepackage[<options>]{eukdate}
+ Options
+ - no-weekday
+ - ukdate
+ - usdate
+ - gregorian
+ - julian
+
+Commands
+ \today Redefined to use the format that is specified by the
+ package options.
+ \weekday Typesets \today's day of the week.
+ \monthname Typesets the name of the current month.
diff --git a/Master/texmf-dist/doc/latex/eukdate/eukdate.pdf b/Master/texmf-dist/doc/latex/eukdate/eukdate.pdf
new file mode 100644
index 00000000000..8ca55f15bd0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/eukdate/eukdate.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/eukdate/eukdate.dtx b/Master/texmf-dist/source/latex/eukdate/eukdate.dtx
new file mode 100644
index 00000000000..457bc0f23bd
--- /dev/null
+++ b/Master/texmf-dist/source/latex/eukdate/eukdate.dtx
@@ -0,0 +1,186 @@
+% \iffalse meta-comment
+%
+% Copyright Andrew Gilbert Moschou 2008
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either 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.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% \fi
+%
+% \iffalse
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{eukdate}[2008/06/28 v1.01 LaTeX Package UK format date with weekday]
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{eukdate}
+\EnableCrossrefs
+\CodelineIndex
+\newcommand\US{\textsc{us}}
+\newcommand\UK{\textsc{uk}}
+\newcommand\floor[1]{\left\lfloor#1\right\rfloor}
+\newcommand\pp[1]{\left(#1\right)}
+\usepackage{amsmath}
+\frenchspacing
+\begin{document}
+ \DocInput{eukdate.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{163}
+%
+% \GetFileInfo{eukdate.sty}
+%
+% \DoNotIndex{\addtocounter}
+% \DoNotIndex{\day,\DeclareOption,\def,\divide}
+% \DoNotIndex{\else,\ExecuteOptions,\eukordinal}
+% \DoNotIndex{\fi}
+% \DoNotIndex{\ifcase,\ifnum}
+% \DoNotIndex{\loop}
+% \DoNotIndex{\month,\multiply}
+% \DoNotIndex{\newcommand,\newcounter,\newif,\number}
+% \DoNotIndex{\or}
+% \DoNotIndex{\ProcessOptions}
+% \DoNotIndex{\relax,\repeat}
+% \DoNotIndex{\setcounter,\space}
+% \DoNotIndex{\year}
+%
+% \title{The \textsf{eukdate} package\thanks{This document corresponds to \textsf{eukdate}~\fileversion, dated~\filedate.}}
+% \author{Andrew Gilbert Moschou\\\textsf{andmos@gmail.com}}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% This package redefines \DescribeMacro{\today}|\today|, to typeset |\today|'s date in, for example the format \emph{Day, Date Month Year} (here, called `\UK\ format'), `\weekday, \number\day\ \monthname\ \number\year' as is preferred in many parts of the world outside the \US. Thus, |\maketitle| uses the \UK\ format (instead of the default \US\ format, `\monthname\ \number\day, \number\year' as used in the |article| class).
+%
+% This package also determines |\today|'s day of the week, which still makes the package useful even to Americans who might use the |usdate| option. The day of the week is calculated according to Zeller's congruence:
+% \begin{align*}w &= \begin{cases}
+% d + \floor{\frac{26}{10}\pp{m+1}} + y + \floor{\frac{y}{4}} + \floor{\frac{c}{4}} - 2c\mod 7 & \mbox{Gregorian calendar}\\
+% d + \floor{\frac{26}{10}\pp{m+1}} + y + \floor{\frac{y}{4}} + 5 - c\mod 7 & \mbox{Julian calendar}
+% \end{cases}\end{align*}where $d$ is the day of the month, $m$ is the number of the month, $y$ is the two digit year, $c$ is the century (so the year is given by $100c+y$) and $w$ represents the day of the week (0 for \weekday\ through to 6 for Friday); January and February are counted as months 13 and 14 of the previous year.
+%
+% \makeatletter
+% The ordinal indicator of the date (in e.g. \number\day\textsuperscript{\euk@ordinal}, \number\day\euk@ordinal) is absent because its use is outdated.
+% \makeatother
+%
+% \section{Usage}
+%
+% The package is invoked with |\usepackage{eukdate}|. This package also defines \DescribeMacro{\weekday}|\weekday| to typeset |\today|'s day of the week and \DescribeMacro{\monthname}|\monthname| to typeset the name of |\today|'s month (`\weekday' and `\monthname' when this document was typeset).
+%
+% \subsection{Options}
+%
+% \begin{description}
+% \item[\sffamily no-weekday]Suppresses the weekday when typesetting |\today|, for example, `\number\day\ \monthname\ \number\year'. |\weekday| is still defined and can be used in the document.
+% \item[\sffamily ukdate]Typesets |\today| in \UK\ format, `\weekday, \number\day\ \monthname\ \number\year'. This option is applied by default, if the |usdate| option is not specified.
+% \item[\sffamily usdate]Typesets |\today| in \US\ format, `\weekday, \monthname\ \number\day, \number\year'.
+% \item[\sffamily gregorian]Calculates the day of the week according to the Gregorian calendar, which is the calendar that is socially used today. This option is applied by default, if the |julian| option is not specified.
+% \item[\sffamily julian]Calculates the day of the week according to the Julian calendar. However, since |\today|'s date is not \emph{today}'s date, as intepreted using the Julian calendar, this option is of limited use and can be safely ignored for every day use.
+% \end{description}
+%
+% \StopEventually{\PrintIndex}
+% \section{\textsf{eukdate.sty}}
+% \begin{macrocode}
+\newif\if@euk@noweekday
+\newif\if@euk@usdate
+\newif\if@euk@julian
+\DeclareOption{no-weekday}{\@euk@noweekdaytrue}
+\DeclareOption{ukdate}{\@euk@usdatefalse}
+\DeclareOption{usdate}{\@euk@usdatetrue}
+\DeclareOption{gregorian}{\@euk@julianfalse}
+\DeclareOption{julian}{\@euk@juliantrue}
+\ExecuteOptions{ukdate,gregorian}
+\ProcessOptions\relax
+% \end{macrocode}
+% \subsection{Zeller's congruence}
+% Actually, the equivalent congruence:\begin{align*}w &= \begin{cases}
+% d + \floor{\frac{26}{10}\pp{m+1}} + y + \floor{\frac{y}{4}} + \floor{\frac{c}{4}} + 5c\mod 7 & \mbox{Gregorian calendar}\\
+% d + \floor{\frac{26}{10}\pp{m+1}} + y + \floor{\frac{y}{4}} + 5 + 6c\mod 7 & \mbox{Julian calendar}
+% \end{cases}\end{align*}is used instead of Zeller's, as claimed, to simplify the algorithm for the modulo operation.
+% \begin{macrocode}
+\newcounter{euk@date}
+\newcounter{euk@month}
+\newcounter{euk@century}
+\newcounter{euk@year}
+\setcounter{euk@date}{\number\day}
+\setcounter{euk@month}{\number\month}
+\setcounter{euk@century}{\number\year}
+\divide\c@euk@century by 100
+\setcounter{euk@year}{\number\year}
+\addtocounter{euk@year}{-\theeuk@century00}
+\ifnum\number\theeuk@month<3
+ \addtocounter{euk@month}{13}
+ \addtocounter{euk@year}{-1}
+\else
+ \addtocounter{euk@month}{1}
+\fi
+\multiply\c@euk@month by 26
+\divide\c@euk@month by 10
+\addtocounter{euk@date}{\theeuk@month}
+\addtocounter{euk@date}{\theeuk@year}
+\divide\c@euk@year by 4
+\addtocounter{euk@date}{\theeuk@year}
+\if@euk@julian
+ \addtocounter{euk@date}{6\theeuk@century}
+ \addtocounter{euk@date}{5}
+\else
+ \addtocounter{euk@date}{5\theeuk@century}
+ \divide\c@euk@century by 4
+ \addtocounter{euk@date}{\theeuk@century}
+\fi
+% \end{macrocode}
+% The modulo operation.
+% \begin{macrocode}
+\loop\ifnum6<\theeuk@date
+ \addtocounter{euk@date}{-7}
+\repeat
+% \end{macrocode}
+% \subsection{Definitions}
+% \begin{macro}{\weekday}
+% Define |\weekday| to typeset the day of the week.
+% \begin{macrocode}
+\newcommand\weekday{%
+ \ifcase\theeuk@date Saturday\or Sunday\or Monday\or%
+ Tuesday\or Wednesday\or Thursday\or Friday\fi}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\monthname}
+% Define |\monthname| to typeset the month.
+% \begin{macrocode}
+\newcommand\monthname{%
+ \ifcase\number\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}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\today}
+% Redefine |\today|.
+% \begin{macrocode}
+\def\today{%
+ \if@euk@noweekday\else\weekday,\space\fi%
+ \if@euk@usdate
+ \monthname\space\number\day,%
+ \else
+ \number\day\space\monthname%
+ \fi
+ \space\number\year}
+% \end{macrocode}
+% \end{macro}
+% An `undocumented' feature.
+% \begin{macrocode}
+\edef\euk@ordinal{%
+ \ifcase\number\day\or st\or nd\or rd\or th\or th\or%
+ th\or th\or th\or th\or th\or th\or th\or th\or th\or%
+ th\or th\or th\or th\or th\or th\or st\or nd\or rd\or%
+ th\or th\or th\or th\or th\or th\or th\or st\fi}
+% \end{macrocode}
+% \Finale
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/eukdate/eukdate.ins b/Master/texmf-dist/source/latex/eukdate/eukdate.ins
new file mode 100644
index 00000000000..281e291b9ed
--- /dev/null
+++ b/Master/texmf-dist/source/latex/eukdate/eukdate.ins
@@ -0,0 +1,58 @@
+%% Copyright Andrew Gilbert Moschou 2008
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either 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.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Andrew Gilbert Moschou.
+%%
+%% This work consists of the files eukdate.dtx and eukdate.ins
+%% and the derived file eukdate.sty.
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/eukdate}
+
+\preamble
+
+This is a generated file.
+
+Copyright Andrew Gilbert Moschou 2008
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either 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.3c or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+\endpreamble
+
+\generate{\file{eukdate.sty}{\from{eukdate.dtx}{package}}}
+
+\Msg{*********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the}
+\Msg{* following file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space eukdate.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file eukdate.dtx}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*********************************************************}
+
+\endbatchfile
diff --git a/Master/texmf-dist/tex/latex/eukdate/eukdate.sty b/Master/texmf-dist/tex/latex/eukdate/eukdate.sty
new file mode 100644
index 00000000000..c2bccba2567
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/eukdate/eukdate.sty
@@ -0,0 +1,90 @@
+%%
+%% This is file `eukdate.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% eukdate.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright Andrew Gilbert Moschou 2008
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either 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.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{eukdate}[2008/06/28 v1.01 LaTeX Package UK format date with weekday]
+\newif\if@euk@noweekday
+\newif\if@euk@usdate
+\newif\if@euk@julian
+\DeclareOption{no-weekday}{\@euk@noweekdaytrue}
+\DeclareOption{ukdate}{\@euk@usdatefalse}
+\DeclareOption{usdate}{\@euk@usdatetrue}
+\DeclareOption{gregorian}{\@euk@julianfalse}
+\DeclareOption{julian}{\@euk@juliantrue}
+\ExecuteOptions{ukdate,gregorian}
+\ProcessOptions\relax
+\newcounter{euk@date}
+\newcounter{euk@month}
+\newcounter{euk@century}
+\newcounter{euk@year}
+\setcounter{euk@date}{\number\day}
+\setcounter{euk@month}{\number\month}
+\setcounter{euk@century}{\number\year}
+\divide\c@euk@century by 100
+\setcounter{euk@year}{\number\year}
+\addtocounter{euk@year}{-\theeuk@century00}
+\ifnum\number\theeuk@month<3
+ \addtocounter{euk@month}{13}
+ \addtocounter{euk@year}{-1}
+\else
+ \addtocounter{euk@month}{1}
+\fi
+\multiply\c@euk@month by 26
+\divide\c@euk@month by 10
+\addtocounter{euk@date}{\theeuk@month}
+\addtocounter{euk@date}{\theeuk@year}
+\divide\c@euk@year by 4
+\addtocounter{euk@date}{\theeuk@year}
+\if@euk@julian
+ \addtocounter{euk@date}{6\theeuk@century}
+ \addtocounter{euk@date}{5}
+\else
+ \addtocounter{euk@date}{5\theeuk@century}
+ \divide\c@euk@century by 4
+ \addtocounter{euk@date}{\theeuk@century}
+\fi
+\loop\ifnum6<\theeuk@date
+ \addtocounter{euk@date}{-7}
+\repeat
+\newcommand\weekday{%
+ \ifcase\theeuk@date Saturday\or Sunday\or Monday\or%
+ Tuesday\or Wednesday\or Thursday\or Friday\fi}
+\newcommand\monthname{%
+ \ifcase\number\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}
+\def\today{%
+ \if@euk@noweekday\else\weekday,\space\fi%
+ \if@euk@usdate
+ \monthname\space\number\day,%
+ \else
+ \number\day\space\monthname%
+ \fi
+ \space\number\year}
+\edef\euk@ordinal{%
+ \ifcase\number\day\or st\or nd\or rd\or th\or th\or%
+ th\or th\or th\or th\or th\or th\or th\or th\or th\or%
+ th\or th\or th\or th\or th\or th\or st\or nd\or rd\or%
+ th\or th\or th\or th\or th\or th\or th\or st\fi}
+\endinput
+%%
+%% End of file `eukdate.sty'.
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 8c49db6add8..a357ccceb59 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -71,7 +71,7 @@ my @WorkingTLP = qw(
epsdice epsf epsincl epslatex-fr epspdfconversion
eqlist eqnarray eqparbox errata es-tex-faq
ESIEEcv esdiff esint esint-type1 eskd eskdx eso-pic esvect etaremune
- ethiop ethiop-t1 etoolbox euenc
+ ethiop ethiop-t1 etoolbox euenc eukdate
eulervm euproposal euro europecv eurosans everypage exam
examdesign examplep exercise expl3 expressg extarrows exteps
extpfeil extract extsizes
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index 8930fd33f98..f704c418a05 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -158,6 +158,7 @@ depend esint
depend esint-type1
depend etaremune
depend etoolbox
+depend eukdate
depend europecv
depend everypage
depend exam
diff --git a/Master/tlpkg/tlpsrc/eukdate.tlpsrc b/Master/tlpkg/tlpsrc/eukdate.tlpsrc
new file mode 100644
index 00000000000..8553a04593c
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/eukdate.tlpsrc
@@ -0,0 +1,2 @@
+name eukdate
+category Package