summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-11-17 22:38:43 +0000
committerKarl Berry <karl@freefriends.org>2019-11-17 22:38:43 +0000
commit8a79552abe489b9b36d0986944dfc616595e63a4 (patch)
tree2ec6544e4c2edc1f083f193fbc09520abaca25c4
parenta319b877e3db590613748f78848498aea73114dc (diff)
datetime2 (17nov19)
git-svn-id: svn://tug.org/texlive/trunk@52846 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/datetime2/CHANGES6
-rw-r--r--Master/texmf-dist/doc/latex/datetime2/README4
-rw-r--r--Master/texmf-dist/doc/latex/datetime2/datetime2.pdfbin685020 -> 690721 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdfbin73269 -> 50065 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdfbin28801 -> 28789 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdfbin16654 -> 16564 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdfbin62238 -> 62459 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdfbin100536 -> 100525 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdfbin53924 -> 54274 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdfbin7018 -> 7157 bytes
-rw-r--r--Master/texmf-dist/source/latex/datetime2/datetime2.dtx162
-rw-r--r--Master/texmf-dist/source/latex/datetime2/datetime2.ins2
-rw-r--r--Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty2
-rw-r--r--Master/texmf-dist/tex/latex/datetime2/datetime2.sty49
14 files changed, 190 insertions, 35 deletions
diff --git a/Master/texmf-dist/doc/latex/datetime2/CHANGES b/Master/texmf-dist/doc/latex/datetime2/CHANGES
index e25ea544923..a357d7f4afe 100644
--- a/Master/texmf-dist/doc/latex/datetime2/CHANGES
+++ b/Master/texmf-dist/doc/latex/datetime2/CHANGES
@@ -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
diff --git a/Master/texmf-dist/doc/latex/datetime2/README b/Master/texmf-dist/doc/latex/datetime2/README
index 6e9b85f4f17..bb49d1d6767 100644
--- a/Master/texmf-dist/doc/latex/datetime2/README
+++ b/Master/texmf-dist/doc/latex/datetime2/README
@@ -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
diff --git a/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf b/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf
index e356981288d..15d428a37e5 100644
--- a/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf
+++ b/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf
index f0c400e8088..bbddda8f9f3 100644
--- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf
+++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf
index 2fb24bf61e7..e6cf98dc88a 100644
--- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf
+++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf
index d4c34cdf2f7..269dff73faa 100644
--- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf
+++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf
index 1236d2fc42e..afbbe3c7432 100644
--- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf
+++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf
index be21e3c7acd..4c014554306 100644
--- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf
+++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf
index 3ed5e296f38..cac832cd51e 100644
--- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf
+++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdf b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdf
index 2e485f20cae..7a78c01c36b 100644
--- a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdf
+++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-xe.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/datetime2/datetime2.dtx b/Master/texmf-dist/source/latex/datetime2/datetime2.dtx
index 401236b8d04..75c965671fb 100644
--- a/Master/texmf-dist/source/latex/datetime2/datetime2.dtx
+++ b/Master/texmf-dist/source/latex/datetime2/datetime2.dtx
@@ -1,13 +1,13 @@
%\iffalse
% datetime2.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -src "datetime2.sty\Z=>datetime2.sty"
-% -src "datetime2-calc.sty\Z=>datetime2-calc.sty"
+% -author "Nicola Talbot"
% -doc "datetime2-manual.tex"
% -section "chapter"
-% -author "Nicola Talbot"
+% -src "datetime2.sty\Z=>datetime2.sty"
+% -src "datetime2-calc.sty\Z=>datetime2-calc.sty"
% 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,7 +1329,17 @@
%\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]
@@ -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@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,29 +6649,83 @@
% \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}{\@ifstar\@sDTMdate\@DTMdate}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@DTMdate}
+%\changes{1.5.5}{2019-11-11}{new}
% \begin{macrocode}
-\newrobustcmd*{\DTMdate}[1]{%
+\newcommand*{\@DTMdate}[1]{%
\expandafter\@dtm@parsedate#1\@dtm@endparsedate
\DTMdisplaydate{\@dtm@year}{\@dtm@month}{\@dtm@day}{\@dtm@dow}%
}
% \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}{\@ifstar\@sDTMDate\@DTMDate}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@sDTMDate}
+%\changes{1.5.5}{2019-11-11}{new}
% \begin{macrocode}
-\newrobustcmd*{\DTMDate}[1]{%
+\newcommand*{\@DTMDate}[1]{%
\expandafter\@dtm@parsedate#1\@dtm@endparsedate
\DTMDisplaydate{\@dtm@year}{\@dtm@month}{\@dtm@day}{\@dtm@dow}%
}
% \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}
diff --git a/Master/texmf-dist/source/latex/datetime2/datetime2.ins b/Master/texmf-dist/source/latex/datetime2/datetime2.ins
index d839777cd70..b7c5abb20c6 100644
--- a/Master/texmf-dist/source/latex/datetime2/datetime2.ins
+++ b/Master/texmf-dist/source/latex/datetime2/datetime2.ins
@@ -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
diff --git a/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty b/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty
index 0760e5ce1f4..97d48f9bc51 100644
--- a/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty
+++ b/Master/texmf-dist/tex/latex/datetime2/datetime2-calc.sty
@@ -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@julianday
diff --git a/Master/texmf-dist/tex/latex/datetime2/datetime2.sty b/Master/texmf-dist/tex/latex/datetime2/datetime2.sty
index 48d95241b60..c6763902a55 100644
--- a/Master/texmf-dist/tex/latex/datetime2/datetime2.sty
+++ b/Master/texmf-dist/tex/latex/datetime2/datetime2.sty
@@ -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@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@yearmonthsep\DTMtwodigits{#2}\dtm@monthdaysep\DTMtwodigits{#3}%
}%
\newcommand*{\DTMDisplaydate}{\DTMdisplaydate}
-\newrobustcmd*{\DTMdate}[1]{%
+\newcommand*{\DTMfinaldot}{.}
+\newrobustcmd*{\DTMdate}{\@ifstar\@sDTMdate\@DTMdate}
+\newcommand*{\@DTMdate}[1]{%
\expandafter\@dtm@parsedate#1\@dtm@endparsedate
\DTMdisplaydate{\@dtm@year}{\@dtm@month}{\@dtm@day}{\@dtm@dow}%
}
-\newrobustcmd*{\DTMDate}[1]{%
+\newcommand*{\@sDTMdate}[1]{%
+ {%
+ \let\DTMfinaldot\empty
+ \@DTMdate{#1}%
+ }%
+}
+\newrobustcmd*{\DTMDate}{\@ifstar\@sDTMDate\@DTMDate}
+\newcommand*{\@DTMDate}[1]{%
\expandafter\@dtm@parsedate#1\@dtm@endparsedate
\DTMDisplaydate{\@dtm@year}{\@dtm@month}{\@dtm@day}{\@dtm@dow}%
}
+\newcommand*{\@sDTMDate}[1]{%
+ {%
+ \let\DTMfinaldot\empty
+ \@DTMDate{#1}%
+ }%
+}
\newcommand*{\DTMcurrenttime}{%
\DTMdisplaytime
{\@dtm@currenthour}%