texlive[52846] Master/texmf-dist: datetime2 (17nov19)

commits+karl at tug.org commits+karl at tug.org
Sun Nov 17 23:38:44 CET 2019


Revision: 52846
          http://tug.org/svn/texlive?view=revision&revision=52846
Author:   karl
Date:     2019-11-17 23:38:43 +0100 (Sun, 17 Nov 2019)
Log Message:
-----------
datetime2 (17nov19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/datetime2/CHANGES
    trunk/Master/texmf-dist/doc/latex/datetime2/README
    trunk/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf
    trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf
    trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf
    trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf
    trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf
    trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf
    trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf
    trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdf
    trunk/Master/texmf-dist/source/latex/datetime2/datetime2.dtx
    trunk/Master/texmf-dist/source/latex/datetime2/datetime2.ins
    trunk/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty
    trunk/Master/texmf-dist/tex/latex/datetime2/datetime2.sty

Modified: trunk/Master/texmf-dist/doc/latex/datetime2/CHANGES
===================================================================
--- trunk/Master/texmf-dist/doc/latex/datetime2/CHANGES	2019-11-17 22:38:28 UTC (rev 52845)
+++ trunk/Master/texmf-dist/doc/latex/datetime2/CHANGES	2019-11-17 22:38:43 UTC (rev 52846)
@@ -1,3 +1,9 @@
+1.5.5 (2019-11-11):
+
+  * added check for \TrackIfKnownLanguage (provided by tracklang v1.3.9)
+
+  * added \DTMfinaldot and starred versions of \DTMdate and \DTMDate
+
 1.5.4 (2019-10-21):
 
   * renamed scratch variables to avoid conflict

Modified: trunk/Master/texmf-dist/doc/latex/datetime2/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/datetime2/README	2019-11-17 22:38:28 UTC (rev 52845)
+++ trunk/Master/texmf-dist/doc/latex/datetime2/README	2019-11-17 22:38:43 UTC (rev 52846)
@@ -1,6 +1,6 @@
-LaTeX Package : datetime2 v1.5.4 
+LaTeX Package : datetime2 v1.5.5 
 
-Last Modified : 2019-10-21
+Last Modified : 2019-11-11
 
 Author        : Nicola Talbot
 

Modified: trunk/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/datetime2/datetime2.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/datetime2/datetime2.dtx	2019-11-17 22:38:28 UTC (rev 52845)
+++ trunk/Master/texmf-dist/source/latex/datetime2/datetime2.dtx	2019-11-17 22:38:43 UTC (rev 52846)
@@ -1,13 +1,13 @@
 %\iffalse
 % datetime2.dtx generated using makedtx version 1.2 (c) Nicola Talbot
 % Command line args:
+%   -author "Nicola Talbot"
+%   -doc "datetime2-manual.tex"
+%   -section "chapter"
 %   -src "datetime2.sty\Z=>datetime2.sty"
 %   -src "datetime2-calc.sty\Z=>datetime2-calc.sty"
-%   -doc "datetime2-manual.tex"
-%   -section "chapter"
-%   -author "Nicola Talbot"
 %   datetime2
-% Created on 2019/10/21 11:37
+% Created on 2019/11/11 18:31
 %\fi
 %\iffalse
 %<*package>
@@ -47,7 +47,7 @@
             pdfauthor={Nicola L.C. Talbot},
             pdftitle={datetime2: date and time formats}]{hyperref}
 
-\CheckSum{2622}
+\CheckSum{2658}
 \RecordChanges
 \DisableCrossrefs
 
@@ -91,11 +91,11 @@
 %
 %\MakeShortVerb{"}
 %
-%\title{datetime2 v1.5.4:
+%\title{datetime2 v1.5.5:
 %date and time formats}
 %\author{Nicola L. C. Talbot\\\url{http://www.dickimaw-books.com/}}
 %
-%\date{2019-10-21}
+%\date{2019-11-11}
 %\maketitle
 %
 %\begin{abstract}
@@ -399,6 +399,12 @@
 %this is to first save the date and then use it (see
 %\sectionref{sec:store}).
 %
+%Some regional styles may end the date with a period (full stop).
+%This can cause a problem if the date occurs at the end of a
+%sentence. If the style has used \cs{DTMfinaldot} then you can use
+%\cs{DTMdate*} to suppress the terminating period if required. (See
+%below.)
+%
 %Examples (with the \pkgopt{showdow} package option set):
 %\begin{itemize}
 %\item Ignore day of week:
@@ -531,7 +537,30 @@
 %\begin{definition}[\DescribeMacro\DTMDate]
 %\cs{DTMDate}\marg{date}
 %\end{definition}
-%In these cases the date should be provided as
+%As from v1.5.5 there are also starred versions of these commands:
+%\begin{definition}[\DescribeMacro{\DTMdate*}]
+%\cs{DTMdate*}\marg{date}
+%\end{definition}
+%which essentially behaves like: 
+%\begin{display}
+%\string{\cs{let}\cs{DTMfinaldot}\cs{empty}\cs{DTMdate}\marg{date}\string}
+%\end{display}
+%and
+%\begin{definition}[\DescribeMacro{\DTMDate*}]
+%\cs{DTMDate*}\marg{date}
+%\end{definition}
+%which essentially behaves like: 
+%\begin{display}
+%\string{\cs{let}\cs{DTMfinaldot}\cs{empty}\cs{DTMDate}\marg{date}\string}
+%\end{display}
+%These commands are provided for date styles that use
+%\cs{DTMfinaldot} to produce a period (full stop) at the end of the date. These
+%two star-commands may be used at the end of a sentence to prevent
+%a double period. Note that there is no equivalent starred form of
+%\cs{DTMdisplaydate} or \cs{DTMDisplaydate}. (It would break their
+%ability to fully expand, which was their principle design feature.)
+%
+%In these cases (starred and unstarred) the date should be provided as
 %\meta{YYYY}\texttt{-}\meta{MM}\texttt{-}\meta{DD} in the argument
 %\meta{date}. For example:
 %\begin{verbatim}
@@ -1300,8 +1329,18 @@
 %\end{definition}
 %This defines a \term{partial style} that should only modify 
 %\cs{DTMdisplaydate} and \cs{DTMDisplaydate}. The redefinition of
-%these commands should be placed in \meta{definition}.
+%these commands should be placed in \meta{definition}. If the date
+%should end with a period (full stop) use:
+%\begin{definition}[\DescribeMacro\DTMfinaldot]
+%\cs{DTMfinaldot}
+%\end{definition}
+%at the end of the definitions of \cs{DTMdisplaydate} and
+%\cs{DTMDisplaydate}.
 %
+%This command is simply defined as ``\texttt{.}'' but it's locally
+%redefined to do nothing by the starred versions of \cs{DTMdate} and
+%\cs{DTMDate} allowing the dot to be discarded.
+%
 %A new \term{time style} can be defined using:
 %\begin{definition}[\DescribeMacro\DTMnewtimestyle]
 %\cs{DTMnewtimestyle}\marg{name}\marg{definition}
@@ -1608,6 +1647,14 @@
 %the currently selected date style.
 %\end{important}
 %
+%The document languages are detected using \sty{tracklang}'s
+%interface. This has limitations. In particular, it can't detect the
+%region with \sty{polyglossia} nor can it detect languages specified
+%after \sty{tracklang} has been loaded, and it can't pick up \sty{babel}'s new
+%\cs{babelprovide} command. See the \sty{tracklang} documentation for
+%further details. Please check that you have an up-to-date version of
+%\sty{tracklang}.
+%
 %Each language module defines a textual style (where the month is
 %displayed as a word) for that language or region
 %which can be used in the argument of \cs{DTMsetstyle},
@@ -1675,7 +1722,7 @@
 %\usepackage[en-GB,en-CA]{datetime2}
 %\begin{document}
 %\DTMsetstyle{en-GB}\today.
-%\DTMsetstyle{en-CA}\today
+%\DTMsetstyle{en-CA}\today.
 %\end{document}
 %\end{verbatim} 
 %
@@ -5686,7 +5733,7 @@
 %\changes{1.0}{2015-03-24}{Initial release}
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datetime2}[2019/10/21 v1.5.4 (NLCT) date and time formats]
+\ProvidesPackage{datetime2}[2019/11/11 v1.5.5 (NLCT) date and time formats]
 %    \end{macrocode}
 % Use \sty{tracklang} to find out what languages have been loaded.
 %    \begin{macrocode}
@@ -6100,16 +6147,33 @@
 % This will automatically switch the "useregional" setting to
 % \texttt{text}.
 %\changes{1.3}{2016-01-22}{added predefined dialect test}
+%\changes{1.5.5}{2019-11-11}{add check for \cs{TrackIfKnownLanguage}}
 %    \begin{macrocode}
 \DeclareOptionX*{%
   \ifcsundef{@tracklang at add@\CurrentOption}%
   {%
-    \PackageError{datetime2}{`\CurrentOption' is not a recognised dialect.
-    \MessageBreak Perhaps you have misspelt it or the 
-    \MessageBreak named dialect may be unsupported or
-    \MessageBreak perhaps you forgot to use the `style' key}%
-    {Any options that aren't described in the manual are assumed
-    \MessageBreak to be language or dialect names.}%
+    \ifundef\TrackIfKnownLanguage
+    {%
+       \PackageError{datetime2}{Unrecognised dialect `\CurrentOption'.
+         If you are using a valid ISO language code 
+         please update tracklang.sty to at least v1.3.9}%
+         {Any options that aren't described in the manual are assumed
+          \MessageBreak to be language or dialect names.}%
+    }%
+    {%
+       \TrackIfKnownLanguage{\CurrentOption}%
+       {\renewcommand*{\DTMifcaseregional}[3]{#2}}%
+       {%
+         \PackageError{datetime2}{`\CurrentOption' is not a recognised dialect
+          \MessageBreak and doesn't contain a known language code.
+          \MessageBreak Perhaps you have misspelt it or the 
+          \MessageBreak named dialect may be unsupported or
+          \MessageBreak perhaps you forgot the `<key>=' part
+          \MessageBreak for example, `style=\CurrentOption'}%
+          {Any options that aren't described in the manual are assumed
+           \MessageBreak to be language or dialect names.}%
+       }%
+    }%
   }%
   {%
     \TrackPredefinedDialect{\CurrentOption}%
@@ -6585,13 +6649,34 @@
 %    \end{macrocode}
 %\end{macro}
 %
+%\begin{macro}{\DTMfinaldot}
+%\changes{1.5.5}{2019-11-11}{new}
+%Some date styles require the date to end with a period (full stop).
+%These styles should use \cs{DTLfinaldot} for the terminating
+%period. This allows the starred version of \cs{DTMdate} to
+%locally redefine this command to do nothing when the date is
+%required at the end of a sentence.
+%    \begin{macrocode}
+\newcommand*{\DTMfinaldot}{.}
+%    \end{macrocode}
+%\end{macro}
+%
 %\begin{macro}{\DTMdate}
 % Display date where date is specified in the format
 %\meta{yyyy}-\meta{mm}-\meta{dd}. Use \cs{expandafter} in case
 %argument is a control sequence containing the date.
-% This command isn't expandable
+%This command isn't expandable. This now has a starred version that
+%locally redefines \cs{DTMfinaldot} to do nothing.
+%\changes{1.5.5}{2019-11-11}{added starred version}
 %    \begin{macrocode}
-\newrobustcmd*{\DTMdate}[1]{%
+\newrobustcmd*{\DTMdate}{\@ifstar\@sDTMdate\@DTMdate}
+%    \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@DTMdate}
+%\changes{1.5.5}{2019-11-11}{new}
+%    \begin{macrocode}
+\newcommand*{\@DTMdate}[1]{%
   \expandafter\@dtm at parsedate#1\@dtm at endparsedate
   \DTMdisplaydate{\@dtm at year}{\@dtm at month}{\@dtm at day}{\@dtm at dow}%
 }
@@ -6598,10 +6683,31 @@
 %    \end{macrocode}
 %\end{macro}
 %
+%\begin{macro}{\@sDTMdate}
+%\changes{1.5.5}{2019-11-11}{new}
+%    \begin{macrocode}
+\newcommand*{\@sDTMdate}[1]{%
+  {%
+    \let\DTMfinaldot\empty
+    \@DTMdate{#1}%
+  }%
+}
+%    \end{macrocode}
+%\end{macro}
+%
 %\begin{macro}{\DTMDate}
-% Upper case version.
+% Upper case version. This now has a starred version that
+%locally redefines \cs{DTMfinaldot} to do nothing.
+%\changes{1.5.5}{2019-11-11}{added starred version}
 %    \begin{macrocode}
-\newrobustcmd*{\DTMDate}[1]{%
+\newrobustcmd*{\DTMDate}{\@ifstar\@sDTMDate\@DTMDate}
+%    \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@sDTMDate}
+%\changes{1.5.5}{2019-11-11}{new}
+%    \begin{macrocode}
+\newcommand*{\@DTMDate}[1]{%
   \expandafter\@dtm at parsedate#1\@dtm at endparsedate
   \DTMDisplaydate{\@dtm at year}{\@dtm at month}{\@dtm at day}{\@dtm at dow}%
 }
@@ -6608,6 +6714,18 @@
 %    \end{macrocode}
 %\end{macro}
 %
+%\begin{macro}{\@sDTMDate}
+%\changes{1.5.5}{2019-11-11}{new}
+%    \begin{macrocode}
+\newcommand*{\@sDTMDate}[1]{%
+  {%
+    \let\DTMfinaldot\empty
+    \@DTMDate{#1}%
+  }%
+}
+%    \end{macrocode}
+%\end{macro}
+%
 %\begin{macro}{\DTMcurrenttime}
 % Display the current time.
 %    \begin{macrocode}
@@ -8862,7 +8980,7 @@
 %\section{datetime2-calc.sty code}
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datetime2-calc}[2019/10/21 v1.5.4 (NLCT)]
+\ProvidesPackage{datetime2-calc}[2019/11/11 v1.5.5 (NLCT)]
 %    \end{macrocode}
 % Load other required packages
 %    \begin{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/datetime2/datetime2.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/datetime2/datetime2.ins	2019-11-17 22:38:28 UTC (rev 52845)
+++ trunk/Master/texmf-dist/source/latex/datetime2/datetime2.ins	2019-11-17 22:38:43 UTC (rev 52846)
@@ -1,4 +1,4 @@
-% datetime2.ins generated using makedtx version 1.2 2019/10/21 11:37
+% datetime2.ins generated using makedtx version 1.2 2019/11/11 18:31
 \input docstrip
 
 \preamble

Modified: trunk/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty	2019-11-17 22:38:28 UTC (rev 52845)
+++ trunk/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty	2019-11-17 22:38:43 UTC (rev 52846)
@@ -39,7 +39,7 @@
 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
 %%   Right brace   \}     Tilde         \~}
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datetime2-calc}[2019/10/21 v1.5.4 (NLCT)]
+\ProvidesPackage{datetime2-calc}[2019/11/11 v1.5.5 (NLCT)]
 \RequirePackage{pgfkeys}
 \RequirePackage{pgfcalendar}
 \newcount\@dtm at julianday

Modified: trunk/Master/texmf-dist/tex/latex/datetime2/datetime2.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datetime2/datetime2.sty	2019-11-17 22:38:28 UTC (rev 52845)
+++ trunk/Master/texmf-dist/tex/latex/datetime2/datetime2.sty	2019-11-17 22:38:43 UTC (rev 52846)
@@ -39,7 +39,7 @@
 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
 %%   Right brace   \}     Tilde         \~}
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datetime2}[2019/10/21 v1.5.4 (NLCT) date and time formats]
+\ProvidesPackage{datetime2}[2019/11/11 v1.5.5 (NLCT) date and time formats]
 \RequirePackage{tracklang}
 \RequirePackage{etoolbox}
 \RequirePackage{xkeyval}[2006/11/18]
@@ -185,12 +185,28 @@
 \DeclareOptionX*{%
   \ifcsundef{@tracklang at add@\CurrentOption}%
   {%
-    \PackageError{datetime2}{`\CurrentOption' is not a recognised dialect.
-    \MessageBreak Perhaps you have misspelt it or the
-    \MessageBreak named dialect may be unsupported or
-    \MessageBreak perhaps you forgot to use the `style' key}%
-    {Any options that aren't described in the manual are assumed
-    \MessageBreak to be language or dialect names.}%
+    \ifundef\TrackIfKnownLanguage
+    {%
+       \PackageError{datetime2}{Unrecognised dialect `\CurrentOption'.
+         If you are using a valid ISO language code
+         please update tracklang.sty to at least v1.3.9}%
+         {Any options that aren't described in the manual are assumed
+          \MessageBreak to be language or dialect names.}%
+    }%
+    {%
+       \TrackIfKnownLanguage{\CurrentOption}%
+       {\renewcommand*{\DTMifcaseregional}[3]{#2}}%
+       {%
+         \PackageError{datetime2}{`\CurrentOption' is not a recognised dialect
+          \MessageBreak and doesn't contain a known language code.
+          \MessageBreak Perhaps you have misspelt it or the
+          \MessageBreak named dialect may be unsupported or
+          \MessageBreak perhaps you forgot the `<key>=' part
+          \MessageBreak for example, `style=\CurrentOption'}%
+          {Any options that aren't described in the manual are assumed
+           \MessageBreak to be language or dialect names.}%
+       }%
+    }%
   }%
   {%
     \TrackPredefinedDialect{\CurrentOption}%
@@ -476,14 +492,29 @@
   \number#1\dtm at yearmonthsep\DTMtwodigits{#2}\dtm at monthdaysep\DTMtwodigits{#3}%
 }%
 \newcommand*{\DTMDisplaydate}{\DTMdisplaydate}
-\newrobustcmd*{\DTMdate}[1]{%
+\newcommand*{\DTMfinaldot}{.}
+\newrobustcmd*{\DTMdate}{\@ifstar\@sDTMdate\@DTMdate}
+\newcommand*{\@DTMdate}[1]{%
   \expandafter\@dtm at parsedate#1\@dtm at endparsedate
   \DTMdisplaydate{\@dtm at year}{\@dtm at month}{\@dtm at day}{\@dtm at dow}%
 }
-\newrobustcmd*{\DTMDate}[1]{%
+\newcommand*{\@sDTMdate}[1]{%
+  {%
+    \let\DTMfinaldot\empty
+    \@DTMdate{#1}%
+  }%
+}
+\newrobustcmd*{\DTMDate}{\@ifstar\@sDTMDate\@DTMDate}
+\newcommand*{\@DTMDate}[1]{%
   \expandafter\@dtm at parsedate#1\@dtm at endparsedate
   \DTMDisplaydate{\@dtm at year}{\@dtm at month}{\@dtm at day}{\@dtm at dow}%
 }
+\newcommand*{\@sDTMDate}[1]{%
+  {%
+    \let\DTMfinaldot\empty
+    \@DTMDate{#1}%
+  }%
+}
 \newcommand*{\DTMcurrenttime}{%
  \DTMdisplaytime
   {\@dtm at currenthour}%



More information about the tex-live-commits mailing list