From 057df000f18ca5aa989a2a547c00fe2507f5613d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 12 Feb 2016 00:20:54 +0000 Subject: datetime2 (11feb16) git-svn-id: svn://tug.org/texlive/trunk@39675 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/datetime2/CHANGES | 15 +++ Master/texmf-dist/doc/latex/datetime2/README | 4 +- .../texmf-dist/doc/latex/datetime2/datetime2.pdf | Bin 644579 -> 650400 bytes .../datetime2/samples/datetime2-sample-babel.pdf | Bin 72776 -> 73007 bytes .../datetime2/samples/datetime2-sample-calc.pdf | Bin 28789 -> 28789 bytes .../samples/datetime2-sample-filedate.pdf | Bin 16515 -> 16349 bytes .../samples/datetime2-sample-hyperref.pdf | Bin 62429 -> 62444 bytes .../datetime2/samples/datetime2-sample-journal.pdf | Bin 0 -> 100505 bytes .../datetime2/samples/datetime2-sample-journal.tex | 127 +++++++++++++++++++++ .../datetime2/samples/datetime2-sample-styles.pdf | Bin 27159 -> 27158 bytes 10 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf create mode 100644 Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.tex (limited to 'Master/texmf-dist/doc') diff --git a/Master/texmf-dist/doc/latex/datetime2/CHANGES b/Master/texmf-dist/doc/latex/datetime2/CHANGES index 5c66deccc67..408b3ac5b5d 100644 --- a/Master/texmf-dist/doc/latex/datetime2/CHANGES +++ b/Master/texmf-dist/doc/latex/datetime2/CHANGES @@ -1,3 +1,18 @@ +1.4 (2016-02-11) : + + * datetime2-calc.sty: + + - new command \DTMcomputedayofweekindex + + * datetime2.sty: + + - new commands \DTMtoday and \DTMToday. + \today and \Today are now \let to them, respectively. + + - added check for scrlttr2. + + * Added extra sample file datetime2-sample-journal.tex + 1.3 (2016-01-22) : * datetime2.sty: diff --git a/Master/texmf-dist/doc/latex/datetime2/README b/Master/texmf-dist/doc/latex/datetime2/README index 275a604a457..eca11c74cca 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.3 +LaTeX Package : datetime2 v1.4 -Last Modified : 2016-01-22 +Last Modified : 2016-02-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 a665d5d24bb..ac93b840459 100644 Binary files a/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf and b/Master/texmf-dist/doc/latex/datetime2/datetime2.pdf 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 37fd783acb3..845c271bb64 100644 Binary files a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf and b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-babel.pdf 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 a425777c94b..0743c36da31 100644 Binary files a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf and b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-calc.pdf 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 711982016ca..4c8eab73628 100644 Binary files a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf and b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-filedate.pdf 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 1e4879d3163..21efd33fbe3 100644 Binary files a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf and b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-hyperref.pdf 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 new file mode 100644 index 00000000000..0dedb3a78e8 Binary files /dev/null and b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.pdf differ diff --git a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.tex b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.tex new file mode 100644 index 00000000000..26aa64535e7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-journal.tex @@ -0,0 +1,127 @@ +% arara: pdflatex +% arara: pdflatex +\documentclass{memoir} + +\usepackage[en-GB,showdow]{datetime2} + +\usepackage{lipsum}% dummy text +\usepackage[hidelinks]{hyperref} + +\newcommand*{\numdash}{\texorpdfstring{\,--\,}{--}} + +% \DTMmonthname is robust and can't be used in the bookmarks +% or headings so use \DTMenglishmonthname since this +% document is in English. +\newcommand*{\entrymonth}[2]{\DTMenglishmonthname{#2} #1} + +% A range of dates. +% Syntax: \daterange{yyyy1}{mm1}{dd1}{yyyy2}{mm2}{dd2} +\newcommand*{\daterange}[6]{% + \ifnum#1=#4 +% Same year + \ifnum#2=#5 +% Same month + \ifnum#3=#6 +% Same day - not a range! + \DTMdisplaydate{#1}{#2}{#3}% + \else +% Range within the same month. +% This needs to be done explicitly but match the separators +% with the en-GB style. + \DTMenglishordinal{#3}\numdash\DTMenglishordinal{#6}% + \DTMenGBdaymonthsep + \DTMenglishmonthname{#2}% + \DTMenGBmonthyearsep\number#1 + \fi + \else +% Not the same month + \DTMdisplaydate{#1}{#2}{#3}{-1}\numdash\DTMdisplaydate{#4}{#5}{#6}{-1}% + \fi + \else +% Not same year + \DTMdisplaydate{#1}{#2}{#3}{-1}\numdash\DTMdisplaydate{#4}{#5}{#6}{-1}% + \fi +} + +% range of months +% Syntax: \monthspan{yyyy1}{mm1}{yyyy2}{mm2} +\newcommand*{\monthspan}[4]{% + \ifnum#1=#3 +% Same year + \DTMenglishmonthname{#2}\numdash\DTMenglishmonthname{#4}% + \DTMenGBmonthyearsep\number#1 + \else +% Not the same year + \DTMenglishmonthname{#2}% + \DTMenGBmonthyearsep\number#1 + \numdash\DTMenglishmonthname{#4}% + \DTMenGBmonthyearsep\number#3 + \fi +} + +\newcommand*{\entrydate}[3]{\DTMdisplaydate{#1}{#2}{#3}{-1}} +\newcommand*{\titleentrydate}[3]{\DTMdate{#1-#2-#3}} + +\renewcommand*{\printchaptertitle}[1]{% + {% + \let\entrydate\titleentrydate + \chaptitlefont{#1}% + }% +} + +\setsecheadstyle{\let\entrydate\titleentrydate + \Large\bfseries\memRTLraggedright} + +\begin{document} + +\frontmatter +\tableofcontents + +\mainmatter +\chapter{Introduction} + +This is a test document that illustrates the use of dates within +chapter titles. + +\section{Sample} + +An example section. + +\chapter{\entrymonth{2016}{01}} + +\lipsum + +\section{\entrydate{2016}{01}{01}} + +\lipsum[1-10] + +\section{\entrydate{2016}{01}{02}} + +\lipsum + +\section{\daterange{2016}{01}{04}{2016}{01}{12}} + +\lipsum[1-3] + +\chapter{\entrydate{2016}{02}{03}} + +\lipsum + +\chapter{\monthspan{2016}{02}{2016}{03}} + +\lipsum + +\section{\daterange{2016}{02}{04}{2016}{03}{01}} + +\lipsum + +\chapter{\monthspan{2015}{12}{2016}{01}} + +\lipsum + +\section{\daterange{2015}{12}{20}{2016}{01}{01}} + +\lipsum + + +\end{document} 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 d9e46899419..90c9464e440 100644 Binary files a/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf and b/Master/texmf-dist/doc/latex/datetime2/samples/datetime2-sample-styles.pdf differ -- cgit v1.2.3