texlive[49362] Master/texmf-dist: texdate (9dec18)
commits+karl at tug.org
commits+karl at tug.org
Sun Dec 9 23:39:10 CET 2018
Revision: 49362
http://tug.org/svn/texlive?view=revision&revision=49362
Author: karl
Date: 2018-12-09 23:39:10 +0100 (Sun, 09 Dec 2018)
Log Message:
-----------
texdate (9dec18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/generic/texdate/CHANGES
trunk/Master/texmf-dist/doc/generic/texdate/texdate.pdf
trunk/Master/texmf-dist/source/generic/texdate/texdate.dtx
trunk/Master/texmf-dist/tex/generic/texdate/texdate.sty
Modified: trunk/Master/texmf-dist/doc/generic/texdate/CHANGES
===================================================================
--- trunk/Master/texmf-dist/doc/generic/texdate/CHANGES 2018-12-09 22:38:56 UTC (rev 49361)
+++ trunk/Master/texmf-dist/doc/generic/texdate/CHANGES 2018-12-09 22:39:10 UTC (rev 49362)
@@ -1 +1,6 @@
+08 Dec 1202 (08 Dec 2018): Modified slightly to permit
+using the package with plain TeX. Also included
+dependencies in the documentation, and explained how to use
+the package with plain TeX. v2.0.
+
26 May 1202 (30 May 2018): Initial release.
Modified: trunk/Master/texmf-dist/doc/generic/texdate/texdate.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/generic/texdate/texdate.dtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/texdate/texdate.dtx 2018-12-09 22:38:56 UTC (rev 49361)
+++ trunk/Master/texmf-dist/source/generic/texdate/texdate.dtx 2018-12-09 22:39:10 UTC (rev 49362)
@@ -26,7 +26,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-%<package>\ProvidesPackage{texdate}[2018/05/30 v1.0 Print and manipulate dates in plain TeX]
+%<package>\ProvidesPackage{texdate}[2018/12/08 v2.0 Print and manipulate dates in plain TeX]
%<*driver>
\documentclass{ltxdoc}
@@ -48,7 +48,7 @@
\end{document}
%</driver> \fi
%
-% \title{The |texdate| Package, v1.0}
+% \title{The |texdate| Package, v2.0}
% \author{Donald P.\ Goodman III}
% \date{\today}
%
@@ -110,6 +110,14 @@
% package to do this. For more information, see
% \url{http://www.dozenal.org}.
%
+% \section{Dependencies}
+% \label{sect:deps}
+%
+% |texdate| requires the |padcount|, |modulus|, and |iflang|
+% packages internally, so be sure that they are installed.
+% They are all available on CTAN and in the \TeX{}Live
+% distribution.
+%
% \section{Printing and Setting the Date}
% \label{sect:basic}
%
@@ -674,6 +682,64 @@
% \emph{after} you've loaded |texdate|, will localize all
% the strings involved.
%
+% \section{Plain \TeX\ Usage}
+%
+% I was asked recently, quite unexpectedly, whether
+% |texdate| could be used with plain \TeX. My initial
+% thought was an obvious ``yes,'' since it's implemented
+% entirely with \TeX\ primitives; however, the matter wasn't
+% quite that simple. The package file does use some
+% \LaTeX-specific macros, all related to the packaging
+% itself; and it uses a |padcount| macro which doesn't work
+% with plain \TeX. Also, according to \LaTeX\ convention,
+% it uses |@| as a letter in control sequences willy-nilly,
+% and \TeX\ balks at such craziness. Finally, a small
+% change in the code (due to deep \TeX\ magic involving
+% |\outer| that is best left unspoken) needed to be made.
+% This done, however, the package \emph{can} (mostly) be
+% used in plain \TeX. Here's how.
+%
+% The following must be included in your document in order
+% to prevent \TeX\ from choking on our \LaTeX\ packaging
+% macros:
+%
+% \begin{quote}
+% |\def\NeedsTeXFormat#1[#2]{}|\\
+% |\def\ProvidesPackage#1[#2]{}|\\
+% |\def\RequirePackage#1{}|\\
+% |\def\AtBeginDocument#1{}|\\
+% \end{quote}
+%
+% This simply defines these macros to do nothing, which is
+% how \TeX\ prefers packaging macros to work. Then, you
+% need to tell \TeX\ that |@| can, in fact, be part of the
+% name of a control sequence:
+%
+% \begin{quote}
+% |\catcode`@=11|
+% \end{quote}
+%
+% This, again, is some deep \TeX\ magic best left
+% undiscussed for the benefit of those not interested.
+% There's plenty of information around if you really want
+% it. Finally, we need to input the packages that |texdate|
+% needs, and tell \TeX\ not to use the
+% |padcount| macro that it doesn't like, by redefining it to
+% simply spit out its own parameter:
+%
+% \begin{quote}
+% |\input modulus.sty|\\
+% |\input padcount.sty|\\
+% |\input texdate.sty|\\
+% |\def\padnum#1{#1}|\\
+% \end{quote}
+%
+% These things done, |texdate| will work almost entirely
+% with plain \TeX, except that (obviously) the padding
+% options won't have any effect. So, if plain \TeX\ is your
+% preference, go for it.
+%
+%
% \section{Implementation}
%
% \begin{macrocode}
@@ -689,11 +755,11 @@
\newcount\texd at rmon%
%% taken from dayofweek.tex, by Martin Minow of DEC;
%% included in TeXLive
+\newcount\texd at dow% Gets day of the week
+\newcount\texd at leap% Leap year fingaler
+\newcount\texd at x% Temp register
+\newcount\texd at y% Another temp register
\def\texd at nextdow#1#2#3{%
- \newcount\texd at dow% Gets day of the week
- \newcount\texd at leap% Leap year fingaler
- \newcount\texd at x% Temp register
- \newcount\texd at y% Another temp register
\global\texd at leap=#2%
\global\advance\texd at leap by-14%
\global\divide\texd at leap by12%
Modified: trunk/Master/texmf-dist/tex/generic/texdate/texdate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/texdate/texdate.sty 2018-12-09 22:38:56 UTC (rev 49361)
+++ trunk/Master/texmf-dist/tex/generic/texdate/texdate.sty 2018-12-09 22:39:10 UTC (rev 49362)
@@ -26,7 +26,7 @@
%% derived files texdate.sty and texdate.pdf.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{texdate}[2018/05/30 v1.0 Print and manipulate dates in plain TeX]
+\ProvidesPackage{texdate}[2018/12/08 v2.0 Print and manipulate dates in plain TeX]
\RequirePackage{modulus}%
\RequirePackage{padcount}%
\RequirePackage{iflang}%
@@ -39,11 +39,11 @@
\newcount\texd at rmon%
%% taken from dayofweek.tex, by Martin Minow of DEC;
%% included in TeXLive
-\def\texd at nextdow#1#2#3{%
\newcount\texd at dow% Gets day of the week
\newcount\texd at leap% Leap year fingaler
\newcount\texd at x% Temp register
\newcount\texd at y% Another temp register
+\def\texd at nextdow#1#2#3{%
\global\texd at leap=#2%
\global\advance\texd at leap by-14%
\global\divide\texd at leap by12%
More information about the tex-live-commits
mailing list