From b0dfd5e7f300bcfe96ad84722848ce8137be7ac9 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 10 Apr 2017 22:02:53 +0000 Subject: datetime2-french git-svn-id: svn://tug.org/texlive/trunk@43742 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/datetime2-french/README | 12 +- .../datetime2-french-test-luatex.pdf | Bin 0 -> 10294 bytes .../datetime2-french-test-luatex.tex | 9 + .../datetime2-french-test-pdftex.pdf | Bin 0 -> 15778 bytes .../datetime2-french-test-pdftex.tex | 8 + .../datetime2-french-test-xetex.pdf | Bin 0 -> 9013 bytes .../datetime2-french-test-xetex.tex | 9 + .../datetime2-french/datetime2-french-test.tex | 30 ++ .../latex/datetime2-french/datetime2-french.pdf | Bin 286837 -> 122396 bytes .../latex/datetime2-french/datetime2-french.dtx | 536 ++++++++++++++++++--- .../latex/datetime2-french/datetime2-french.ins | 7 +- .../datetime2-french/datetime2-french-ascii.ldf | 133 ++++- .../datetime2-french/datetime2-french-utf8.ldf | 133 ++++- .../latex/datetime2-french/datetime2-french.ldf | 117 ++++- 14 files changed, 892 insertions(+), 102 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-luatex.pdf create mode 100644 Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-luatex.tex create mode 100644 Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-pdftex.pdf create mode 100644 Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-pdftex.tex create mode 100644 Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-xetex.pdf create mode 100644 Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-xetex.tex create mode 100644 Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test.tex (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/datetime2-french/README b/Master/texmf-dist/doc/latex/datetime2-french/README index 302aef4e914..14ddb2cc9de 100644 --- a/Master/texmf-dist/doc/latex/datetime2-french/README +++ b/Master/texmf-dist/doc/latex/datetime2-french/README @@ -1,14 +1,12 @@ French Language Module for datetime2 Package Author: Nicola L. C. Talbot (inactive) + Paul A. Patience Licence: LPPL Required Packages: datetime2, tracklang -This module is unmaintained. If you want to volunteer to take over -the maintenance contact me at www.dickimaw-books.com/contact.html - Example usage: \documentclass{article} @@ -35,18 +33,18 @@ Example usage: INSTALLATION ============ -latex datetime2-french.ins +xelatex datetime2-french.ins Move all *.ldf files to TEXMF/tex/latex/datetime2-contrib/datetime2-french/ Documentation: -pdflatex datetime2-french.dtx +xelatex datetime2-french.dtx makeindex -s gind.ist datetime2-french.idx makeindex -s gglo.ist -o datetime2-french.gls datetime2-french.glo -pdflatex datetime2-french.dtx -pdflatex datetime2-french.dtx +xelatex datetime2-french.dtx +xelatex datetime2-french.dtx Move datetime2-french.pdf and README to TEXMF/doc/latex/datetime2-contrib/datetime2-french/ diff --git a/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-luatex.pdf b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-luatex.pdf new file mode 100644 index 00000000000..2e34ee8a369 Binary files /dev/null and b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-luatex.pdf differ diff --git a/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-luatex.tex b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-luatex.tex new file mode 100644 index 00000000000..29b78f3a1eb --- /dev/null +++ b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-luatex.tex @@ -0,0 +1,9 @@ +% arara: lualatex +\documentclass{article} + +\usepackage{fontspec} +\usepackage{polyglossia} +\setdefaultlanguage{french} +\setotherlanguage{english} + +\input{datetime2-french-test} diff --git a/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-pdftex.pdf b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-pdftex.pdf new file mode 100644 index 00000000000..5f9ee14ccef Binary files /dev/null and b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-pdftex.pdf differ diff --git a/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-pdftex.tex b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-pdftex.tex new file mode 100644 index 00000000000..e36851b8b7e --- /dev/null +++ b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-pdftex.tex @@ -0,0 +1,8 @@ +% arara: pdflatex +\documentclass[english,french]{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[english,main=french]{babel} + +\input{datetime2-french-test} diff --git a/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-xetex.pdf b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-xetex.pdf new file mode 100644 index 00000000000..8b9342ccd96 Binary files /dev/null and b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-xetex.pdf differ diff --git a/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-xetex.tex b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-xetex.tex new file mode 100644 index 00000000000..36874a42ec4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test-xetex.tex @@ -0,0 +1,9 @@ +% arara: xelatex +\documentclass{article} + +\usepackage{fontspec} +\usepackage{polyglossia} +\setdefaultlanguage{french} +\setotherlanguage{english} + +\input{datetime2-french-test} diff --git a/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test.tex b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test.tex new file mode 100644 index 00000000000..3de529d56ae --- /dev/null +++ b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french-test.tex @@ -0,0 +1,30 @@ +\usepackage[en-GB,en-US]{datetime2} + +\newcommand*{\teststyle}[1]{% + \DTMsetstyle{#1} + \texttt{#1}:\par + \DTMnow\par + \DTMNow\par +} + +\newcommand*{\testall}[1]{% + \DTMlangsetup*{#1} + \texttt{#1}:\par + \teststyle{default} + \teststyle{iso} + \teststyle{english} + \teststyle{en-GB} + \teststyle{en-GB-numeric} + \teststyle{en-US} + \teststyle{en-US-numeric} + \teststyle{french} + \teststyle{french-numeric} +} + +\begin{document} + +\testall{showdayofmonth=true,abbr=false} +\testall{showdayofmonth=false} +\testall{abbr=true} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french.pdf b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french.pdf index b94b283fe80..713f7c01d77 100644 Binary files a/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french.pdf and b/Master/texmf-dist/doc/latex/datetime2-french/datetime2-french.pdf differ diff --git a/Master/texmf-dist/source/latex/datetime2-french/datetime2-french.dtx b/Master/texmf-dist/source/latex/datetime2-french/datetime2-french.dtx index 96f0075eb53..ffcce39e15d 100644 --- a/Master/texmf-dist/source/latex/datetime2-french/datetime2-french.dtx +++ b/Master/texmf-dist/source/latex/datetime2-french/datetime2-french.dtx @@ -20,7 +20,7 @@ % \iffalse % Doc-Source file to use with LaTeX2e % Copyright (C) 2015 Nicola Talbot, all rights reserved. -% (New maintainer add relevant lines here.) +% Copyright (C) 2017 Paul A. Patience , all rights reserved. % \fi % \iffalse %<*driver> @@ -33,11 +33,11 @@ \usepackage[colorlinks, bookmarks, hyperindex=false, - pdfauthor={Nicola L.C. Talbot}, + pdfauthor={Nicola L.C. Talbot and Paul A. Patience}, pdftitle={datetime2.sty French Module}]{hyperref} -\CheckSum{333} +\CheckSum{580} \renewcommand*{\usage}[1]{\hyperpage{#1}} \renewcommand*{\main}[1]{\hyperpage{#1}} @@ -60,14 +60,11 @@ %\MakeShortVerb{"} % %\title{French Module for datetime2 Package} -%\author{Nicola L. C. Talbot (inactive)} -%\date{2015-03-27 (v1.0)} +%\author{Nicola L. C. Talbot (inactive) \\ +% Paul A. Patience\thanks{E-mail: pap@papatience.com}} +%\date{2017-04-08 (v1.02)} %\maketitle % -%This module is currently unmaintained and may be subject to change. -%If you want to volunteer to take over maintanance, contact me at -%\url{http://www.dickimaw-books.com/contact.html} -% %\begin{abstract} %This is the French language module for the \sty{datetime2} %package. If you want to use the settings in this module you must @@ -81,27 +78,6 @@ % depending on the value of the \opt{useregional} setting. %\end{abstract} % -%I've copied the date style from \texttt{babel-french}'s \cs{today}. -% -%I don't know if these settings are correct. -%In particular, I don't know if the "french" time style is -%correct. Currently this just uses the "default" time style. Please -%be aware that this may change. Whoever takes over maintanance -%of this module may can change it as appropriate. -% -%The new maintainer should add the line: -%\begin{verbatim} -% The Current Maintainer of this work is Name. -%\end{verbatim} -%to the preamble part in \texttt{datetime2-french.ins} where Name -%is the name of the maintainer(s) and replace -%the `inactive' status to `maintained'. -% -%Currently there is only a regionless style. New maintainers may -%want to add regional variants such as "fr-FR"\slash"fr-FR-numeric" -%or "fr-BE"\slash"fr-BE-numeric". This style currently doesn't check the -%\opt{showdow} setting. -% %\StopEventually{% %\clearpage %\phantomsection @@ -122,7 +98,7 @@ %\changes{1.0}{2015-03-27}{Initial release} % Identify module % \begin{macrocode} -\ProvidesDateTimeModule{french-utf8}[2015/03/27 v1.0] +\ProvidesDateTimeModule{french-utf8}[2017/04/08 v1.02] % \end{macrocode} %\begin{macro}{\DTMfrenchordinal} % \begin{macrocode} @@ -210,11 +186,77 @@ % \end{macrocode} %\end{macro} % -%If abbreviated dates are supported, short month names should be -%likewise provided. +%\begin{macro}{\DTMfrenchshortmonthname} +% Abbreviated French month names. +%\changes{1.01}{2017-04-08}{Add abbreviated month names} +% \begin{macrocode} +\newcommand*{\DTMfrenchshortmonthname}[1]{% + \ifcase#1 + \or + janv.% + \or + févr.% + \or + mars% + \or + avr.% + \or + mai% + \or + juin% + \or + juill.% + \or + août% + \or + sept.% + \or + oct.% + \or + nov.% + \or + déc.% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfrenchshortMonthname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMfrenchshortMonthname}[1]{% + \ifcase#1 + \or + Janv.% + \or + Févr.% + \or + Mars% + \or + Avr.% + \or + Mai% + \or + Juin% + \or + Juill.% + \or + Août% + \or + Sept.% + \or + Oct.% + \or + Nov.% + \or + Déc.% + \fi +} +% \end{macrocode} +%\end{macro} % %\begin{macro}{\DTMfrenchweekdayname} -%These are provided here but not currently used in the date format. +% French day of week names. % \begin{macrocode} \newcommand*{\DTMfrenchweekdayname}[1]{% \ifcase#1 @@ -237,7 +279,7 @@ %\end{macro} % %\begin{macro}{\DTMfrenchWeekdayname} -%As above but start with a capital. +% As above but start with a capital. % \begin{macrocode} \newcommand*{\DTMfrenchWeekdayname}[1]{% \ifcase#1 @@ -259,6 +301,112 @@ % \end{macrocode} %\end{macro} % +%\begin{macro}{\DTMfrenchshortweekdayname} +% French abbreviated day of week names. +%\changes{1.01}{2017-04-08}{Add abbreviated day of week names} +% \begin{macrocode} +\newcommand*{\DTMfrenchshortweekdayname}[1]{% + \ifcase#1 + lun.% + \or + mar.% + \or + mer.% + \or + jeu.% + \or + ven.% + \or + sam.% + \or + dim.% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfrenchshortWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMfrenchshortWeekdayname}[1]{% + \ifcase#1 + Lun.% + \or + Mar.% + \or + Mer.% + \or + Jeu.% + \or + Ven.% + \or + Sam.% + \or + Dim.% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfrenchmidnight} +% \begin{macrocode} +\newcommand*\DTMfrenchmidnight{minuit}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfrenchnoon} +% \begin{macrocode} +\newcommand*\DTMfrenchnoon{midi}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfrenchtimesymsep} +% \begin{macrocode} +\newcommand*\DTMfrenchtimesymsep{\,}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfrenchhoursym} +% \begin{macrocode} +\newcommand*\DTMfrenchhoursym{h}% +% \end{macrocode} +%\end{macro} +% +% This style ignores seconds. +%\changes{1.01}{2017-04-08}{Add frenchalpha time style} +% \begin{macrocode} +\DTMnewtimestyle + {frenchalpha}% label + {% + \renewcommand*\DTMdisplaytime[3]{% + \ifnum##2=0 + \ifnum##1=12 + \DTMfrenchnoon + \else + \ifnum##1=0 + \DTMfrenchmidnight + \else + \ifnum##1=24 + \DTMfrenchmidnight + \else + \number##1 + \DTMfrenchtimesymsep\DTMfrenchhoursym + \fi + \fi + \fi + \else + \ifnum##1=24 + 0% + \else + \number##1 + \fi + \DTMfrenchtimesymsep\DTMfrenchhoursym + \DTMfrenchtimesymsep\DTMtwodigits{##2}% + \fi + }% + }% +% \end{macrocode} +% %\iffalse % \begin{macrocode} % @@ -280,11 +428,9 @@ %\changes{1.0}{2015-03-27}{Initial release} % Identify module % \begin{macrocode} -\ProvidesDateTimeModule{french-ascii}[2015/03/27 v1.0] +\ProvidesDateTimeModule{french-ascii}[2017/04/08 v1.02] % \end{macrocode} % -%If abbreviated dates are supported, short month names should be -%likewise provided. %\begin{macro}{\DTMfrenchordinal} % \begin{macrocode} \ifdef\ier @@ -371,8 +517,77 @@ % \end{macrocode} %\end{macro} % +%\begin{macro}{\DTMfrenchshortmonthname} +% Abbreviated French month names. +%\changes{1.01}{2017-04-08}{Add abbreviated month names} +% \begin{macrocode} +\newcommand*{\DTMfrenchshortmonthname}[1]{% + \ifcase#1 + \or + janv.% + \or + f\protect\'evr.% + \or + mars% + \or + avr.% + \or + mai% + \or + juin% + \or + juill.% + \or + ao\protect\^ut% + \or + sept.% + \or + oct.% + \or + nov.% + \or + d\protect\'ec.% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfrenchshortMonthname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMfrenchshortMonthname}[1]{% + \ifcase#1 + \or + Janv.% + \or + F\protect\'evr.% + \or + Mars% + \or + Avr.% + \or + Mai% + \or + Juin% + \or + Juill.% + \or + Ao\protect\^ut% + \or + Sept.% + \or + Oct.% + \or + Nov.% + \or + D\protect\'ec.% + \fi +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\DTMfrenchweekdayname} -%These are provided here but not currently used in the date format. +% French day of week names. % \begin{macrocode} \newcommand*{\DTMfrenchweekdayname}[1]{% \ifcase#1 @@ -395,7 +610,7 @@ %\end{macro} % %\begin{macro}{\DTMfrenchWeekdayname} -%As above but start with a capital. +% As above but start with a capital. % \begin{macrocode} \newcommand*{\DTMfrenchWeekdayname}[1]{% \ifcase#1 @@ -417,6 +632,111 @@ % \end{macrocode} %\end{macro} % +%\begin{macro}{\DTMfrenchshortweekdayname} +% French abbreviated day of week names. +%\changes{1.01}{2017-04-08}{Add abbreviated day of week names} +% \begin{macrocode} +\newcommand*{\DTMfrenchshortweekdayname}[1]{% + \ifcase#1 + lun.% + \or + mar.% + \or + mer.% + \or + jeu.% + \or + ven.% + \or + sam.% + \or + dim.% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfrenchshortWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMfrenchshortWeekdayname}[1]{% + \ifcase#1 + Lun.% + \or + Mar.% + \or + Mer.% + \or + Jeu.% + \or + Ven.% + \or + Sam.% + \or + Dim.% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfrenchmidnight} +% \begin{macrocode} +\newcommand*\DTMfrenchmidnight{minuit}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfrenchnoon} +% \begin{macrocode} +\newcommand*\DTMfrenchnoon{midi}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfrenchtimesymsep} +% \begin{macrocode} +\newcommand*\DTMfrenchtimesymsep{\,}% +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfrenchhoursym} +% \begin{macrocode} +\newcommand*\DTMfrenchhoursym{h}% +% \end{macrocode} +%\end{macro} +% +% This style ignores seconds. +%\changes{1.01}{2017-04-08}{Add frenchalpha time style} +% \begin{macrocode} +\DTMnewtimestyle + {frenchalpha}% label + {% + \renewcommand*\DTMdisplaytime[3]{% + \ifnum##2=0 + \ifnum##1=12 + \DTMfrenchnoon + \else + \ifnum##1=0 + \DTMfrenchmidnight + \else + \ifnum##1=24 + \DTMfrenchmidnight + \else + \number##1 + \DTMfrenchtimesymsep\DTMfrenchhoursym + \fi + \fi + \fi + \else + \ifnum##1=24 + 0% + \else + \number##1 + \fi + \DTMfrenchtimesymsep\DTMfrenchhoursym + \DTMfrenchtimesymsep\DTMtwodigits{##2}% + \fi + }% + }% +% \end{macrocode} % %\iffalse % \begin{macrocode} @@ -435,7 +755,7 @@ % % Identify Module % \begin{macrocode} -\ProvidesDateTimeModule{french}[2015/03/27 v1.0] +\ProvidesDateTimeModule{french}[2017/04/08 v1.02] % \end{macrocode} % Need to find out if XeTeX or LuaTeX are being used. % \begin{macrocode} @@ -458,16 +778,29 @@ % % Define the \texttt{french} style. % The time style is the same as the "default" style -% provided by \sty{datetime2}. This may need correcting. +% provided by \sty{datetime2}. This may need correcting. % % Allow the user a way of configuring the "french" and % "french-numeric" styles. This doesn't use the package wide % separators such as % \cs{dtm@datetimesep} in case other date formats are also required. +% +%\begin{macro}{\DTMfrenchdowdaysep} +% The separator between the day of week name and the day of month +% number for the text format. +%\changes{1.01}{2017-04-08}{Add support for showdow} +% \begin{macrocode} +\newcommand*{\DTMfrenchdowdaysep}{\space} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\DTMfrenchdaymonthsep} % The separator between the day and month for the text format. +%\changes{1.02}{2017-04-08}{Use non-breaking space} % \begin{macrocode} -\newcommand*{\DTMfrenchdaymonthsep}{\space} +\newcommand*{\DTMfrenchdaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}% +} % \end{macrocode} %\end{macro} % @@ -482,7 +815,7 @@ % The separator between the date and time blocks in the full format % (either text or numeric). % \begin{macrocode} -\newcommand*{\DTMfrenchdatetimesep}{\space} +\newcommand*{\DTMfrenchdatetimesep}{,\space} % \end{macrocode} %\end{macro} % @@ -511,6 +844,7 @@ %Provide keys that can be used in \cs{DTMlangsetup} to set these %separators. % \begin{macrocode} +\DTMdefkey{french}{dowdaysep}{\renewcommand*{\DTMfrenchdowdaysep}{#1}} \DTMdefkey{french}{daymonthsep}{\renewcommand*{\DTMfrenchdaymonthsep}{#1}} \DTMdefkey{french}{monthyearsep}{\renewcommand*{\DTMfrenchmonthyearsep}{#1}} \DTMdefkey{french}{datetimesep}{\renewcommand*{\DTMfrenchdatetimesep}{#1}} @@ -519,9 +853,16 @@ \DTMdefkey{french}{timesep}{\renewcommand*{\DTMfrenchtimesep}{#1}} % \end{macrocode} % -% TODO: provide a boolean key to switch between full and abbreviated -% formats if appropriate. (I don't know how the date should be -% abbreviated.) +% Define a boolean key that can switch between full and abbreviated +% formats for the month and day of week names in the text format. +%\changes{1.01}{2017-04-08}{Add support for abbr} +% \begin{macrocode} +\DTMdefboolkey{french}{abbr}[true]{} +% \end{macrocode} +% The default is the full name. +% \begin{macrocode} +\DTMsetbool{french}{abbr}{false} +% \end{macrocode} % % Define a boolean key that determines if the time zone mappings % should be used. @@ -553,30 +894,30 @@ \DTMsetbool{french}{showyear}{true} % \end{macrocode} % -% Define the "french" style. (TODO: implement day of week?) +% Define the "french" style. +%\changes{1.01}{2017-04-08}{Add support for abbr and showdow} % \begin{macrocode} \DTMnewstyle {french}% label {% date style \renewcommand*\DTMdisplaydate[4]{% - \DTMifbool{french}{showdayofmonth} - {\DTMfrenchordinal{##3}\DTMfrenchdaymonthsep}% - {}% - \DTMfrenchmonthname{##2}% - \DTMifbool{french}{showyear}% + \ifDTMshowdow + \ifnum##4>-1 + \DTMifbool{french}{abbr}% + {\DTMfrenchshortweekdayname{##4}}% + {\DTMfrenchweekdayname{##4}}% + \DTMfrenchdowdaysep + \fi + \fi + \DTMifbool{french}{showdayofmonth}% {% - \DTMfrenchmonthyearsep - \number##1 % space intended + \DTMfrenchordinal{##3}% + \DTMfrenchdaymonthsep }% {}% - }% - \renewcommand*\DTMDisplaydate[4]{% - \DTMifbool{french}{showdayofmonth} - {% - \DTMfrenchordinal{##3}\DTMfrenchdaymonthsep - \DTMfrenchmonthname{##2}% - }% - {\DTMfrenchMonthname{##2}}% + \DTMifbool{french}{abbr}% + {\DTMfrenchshortmonthname{##2}}% + {\DTMfrenchmonthname{##2}}% \DTMifbool{french}{showyear}% {% \DTMfrenchmonthyearsep @@ -584,9 +925,74 @@ }% {}% }% + \renewcommand*\DTMDisplaydate[4]{% + \ifDTMshowdow + \ifnum##4>-1 + \DTMifbool{french}{abbr}% + {\DTMfrenchshortWeekdayname{##4}}% + {\DTMfrenchWeekdayname{##4}}% + \DTMfrenchdowdaysep + \DTMifbool{french}{showdayofmonth}% + {% + \DTMfrenchordinal{##3}% + \DTMfrenchdaymonthsep + }% + {}% + \DTMifbool{french}{abbr}% + {\DTMfrenchshortmonthname{##2}}% + {\DTMfrenchmonthname{##2}}% + \DTMifbool{french}{showyear}% + {% + \DTMfrenchmonthyearsep + \number##1 % space intended + }% + {}% + \else + \DTMifbool{french}{showdayofmonth} + {% + \DTMfrenchordinal{##3}% + \DTMfrenchdaymonthsep + \DTMifbool{french}{abbr}% + {\DTMfrenchshortmonthname{##2}}% + {\DTMfrenchmonthname{##2}}% + }% + {% + \DTMifbool{french}{abbr}% + {\DTMfrenchshortMonthname{##2}}% + {\DTMfrenchMonthname{##2}}% + }% + \DTMifbool{french}{showyear}% + {% + \DTMfrenchmonthyearsep + \number##1 % space intended + }% + {}% + \fi + \else + \DTMifbool{french}{showdayofmonth} + {% + \DTMfrenchordinal{##3}% + \DTMfrenchdaymonthsep + \DTMifbool{french}{abbr}% + {\DTMfrenchshortmonthname{##2}}% + {\DTMfrenchmonthname{##2}}% + }% + {% + \DTMifbool{french}{abbr}% + {\DTMfrenchshortMonthname{##2}}% + {\DTMfrenchMonthname{##2}}% + }% + \DTMifbool{french}{showyear}% + {% + \DTMfrenchmonthyearsep + \number##1 % space intended + }% + {}% + \fi + }% }% - {% time style (use default) - \DTMsettimestyle{default}% + {% time style + \DTMsettimestyle{frenchalpha}% }% {% zone style \DTMresetzones diff --git a/Master/texmf-dist/source/latex/datetime2-french/datetime2-french.ins b/Master/texmf-dist/source/latex/datetime2-french/datetime2-french.ins index dc656547dfd..d685a6f8f22 100644 --- a/Master/texmf-dist/source/latex/datetime2-french/datetime2-french.ins +++ b/Master/texmf-dist/source/latex/datetime2-french/datetime2-french.ins @@ -4,16 +4,19 @@ datetime2-french.dtx Copyright 2015 Nicola Talbot + Copyright 2017 Paul A. Patience This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 - of this license of (at your option) any later version. + 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.3 or later is part of all distributions of LaTeX version 2005/12/01 or later. - This work has the LPPL maintenance status `inactive'. + This work has the LPPL maintenance status `maintained'. + + The Current Maintainer of this work is Paul A. Patience. This work consists of the files datetime2-french.dtx and datetime2-french.ins and the derived files diff --git a/Master/texmf-dist/tex/latex/datetime2-french/datetime2-french-ascii.ldf b/Master/texmf-dist/tex/latex/datetime2-french/datetime2-french-ascii.ldf index e70848a9735..623f548d0e7 100644 --- a/Master/texmf-dist/tex/latex/datetime2-french/datetime2-french-ascii.ldf +++ b/Master/texmf-dist/tex/latex/datetime2-french/datetime2-french-ascii.ldf @@ -8,16 +8,19 @@ %% %% datetime2-french.dtx %% Copyright 2015 Nicola Talbot +%% Copyright 2017 Paul A. Patience %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 -%% of this license of (at your option) any later version. +%% 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.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. %% -%% This work has the LPPL maintenance status `inactive'. +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Paul A. Patience. %% %% This work consists of the files datetime2-french.dtx and %% datetime2-french.ins and the derived files @@ -39,7 +42,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesDateTimeModule{french-ascii}[2015/03/27 v1.0] +\ProvidesDateTimeModule{french-ascii}[2017/04/08 v1.02] \ifdef\ier {% \newcommand*{\DTMfrenchordinal}[1]{% @@ -109,6 +112,62 @@ D\protect\'ecembre% \fi } +\newcommand*{\DTMfrenchshortmonthname}[1]{% + \ifcase#1 + \or + janv.% + \or + f\protect\'evr.% + \or + mars% + \or + avr.% + \or + mai% + \or + juin% + \or + juill.% + \or + ao\protect\^ut% + \or + sept.% + \or + oct.% + \or + nov.% + \or + d\protect\'ec.% + \fi +} +\newcommand*{\DTMfrenchshortMonthname}[1]{% + \ifcase#1 + \or + Janv.% + \or + F\protect\'evr.% + \or + Mars% + \or + Avr.% + \or + Mai% + \or + Juin% + \or + Juill.% + \or + Ao\protect\^ut% + \or + Sept.% + \or + Oct.% + \or + Nov.% + \or + D\protect\'ec.% + \fi +} \newcommand*{\DTMfrenchweekdayname}[1]{% \ifcase#1 lundi% @@ -143,6 +202,74 @@ Dimanche% \fi } +\newcommand*{\DTMfrenchshortweekdayname}[1]{% + \ifcase#1 + lun.% + \or + mar.% + \or + mer.% + \or + jeu.% + \or + ven.% + \or + sam.% + \or + dim.% + \fi +} +\newcommand*{\DTMfrenchshortWeekdayname}[1]{% + \ifcase#1 + Lun.% + \or + Mar.% + \or + Mer.% + \or + Jeu.% + \or + Ven.% + \or + Sam.% + \or + Dim.% + \fi +} +\newcommand*\DTMfrenchmidnight{minuit}% +\newcommand*\DTMfrenchnoon{midi}% +\newcommand*\DTMfrenchtimesymsep{\,}% +\newcommand*\DTMfrenchhoursym{h}% +\DTMnewtimestyle + {frenchalpha}% label + {% + \renewcommand*\DTMdisplaytime[3]{% + \ifnum##2=0 + \ifnum##1=12 + \DTMfrenchnoon + \else + \ifnum##1=0 + \DTMfrenchmidnight + \else + \ifnum##1=24 + \DTMfrenchmidnight + \else + \number##1 + \DTMfrenchtimesymsep\DTMfrenchhoursym + \fi + \fi + \fi + \else + \ifnum##1=24 + 0% + \else + \number##1 + \fi + \DTMfrenchtimesymsep\DTMfrenchhoursym + \DTMfrenchtimesymsep\DTMtwodigits{##2}% + \fi + }% + }% \endinput %% %% End of file `datetime2-french-ascii.ldf'. diff --git a/Master/texmf-dist/tex/latex/datetime2-french/datetime2-french-utf8.ldf b/Master/texmf-dist/tex/latex/datetime2-french/datetime2-french-utf8.ldf index 8d68d1ff60e..7059e81af21 100644 --- a/Master/texmf-dist/tex/latex/datetime2-french/datetime2-french-utf8.ldf +++ b/Master/texmf-dist/tex/latex/datetime2-french/datetime2-french-utf8.ldf @@ -8,16 +8,19 @@ %% %% datetime2-french.dtx %% Copyright 2015 Nicola Talbot +%% Copyright 2017 Paul A. Patience %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 -%% of this license of (at your option) any later version. +%% 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.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. %% -%% This work has the LPPL maintenance status `inactive'. +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Paul A. Patience. %% %% This work consists of the files datetime2-french.dtx and %% datetime2-french.ins and the derived files @@ -39,7 +42,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesDateTimeModule{french-utf8}[2015/03/27 v1.0] +\ProvidesDateTimeModule{french-utf8}[2017/04/08 v1.02] \ifdef\ier {% \newcommand*{\DTMfrenchordinal}[1]{% @@ -109,6 +112,62 @@ Décembre% \fi } +\newcommand*{\DTMfrenchshortmonthname}[1]{% + \ifcase#1 + \or + janv.% + \or + févr.% + \or + mars% + \or + avr.% + \or + mai% + \or + juin% + \or + juill.% + \or + août% + \or + sept.% + \or + oct.% + \or + nov.% + \or + déc.% + \fi +} +\newcommand*{\DTMfrenchshortMonthname}[1]{% + \ifcase#1 + \or + Janv.% + \or + Févr.% + \or + Mars% + \or + Avr.% + \or + Mai% + \or + Juin% + \or + Juill.% + \or + Août% + \or + Sept.% + \or + Oct.% + \or + Nov.% + \or + Déc.% + \fi +} \newcommand*{\DTMfrenchweekdayname}[1]{% \ifcase#1 lundi% @@ -143,6 +202,74 @@ Dimanche% \fi } +\newcommand*{\DTMfrenchshortweekdayname}[1]{% + \ifcase#1 + lun.% + \or + mar.% + \or + mer.% + \or + jeu.% + \or + ven.% + \or + sam.% + \or + dim.% + \fi +} +\newcommand*{\DTMfrenchshortWeekdayname}[1]{% + \ifcase#1 + Lun.% + \or + Mar.% + \or + Mer.% + \or + Jeu.% + \or + Ven.% + \or + Sam.% + \or + Dim.% + \fi +} +\newcommand*\DTMfrenchmidnight{minuit}% +\newcommand*\DTMfrenchnoon{midi}% +\newcommand*\DTMfrenchtimesymsep{\,}% +\newcommand*\DTMfrenchhoursym{h}% +\DTMnewtimestyle + {frenchalpha}% label + {% + \renewcommand*\DTMdisplaytime[3]{% + \ifnum##2=0 + \ifnum##1=12 + \DTMfrenchnoon + \else + \ifnum##1=0 + \DTMfrenchmidnight + \else + \ifnum##1=24 + \DTMfrenchmidnight + \else + \number##1 + \DTMfrenchtimesymsep\DTMfrenchhoursym + \fi + \fi + \fi + \else + \ifnum##1=24 + 0% + \else + \number##1 + \fi + \DTMfrenchtimesymsep\DTMfrenchhoursym + \DTMfrenchtimesymsep\DTMtwodigits{##2}% + \fi + }% + }% \endinput %% %% End of file `datetime2-french-utf8.ldf'. diff --git a/Master/texmf-dist/tex/latex/datetime2-french/datetime2-french.ldf b/Master/texmf-dist/tex/latex/datetime2-french/datetime2-french.ldf index f2eecc9d57a..34ff9ed6bfe 100644 --- a/Master/texmf-dist/tex/latex/datetime2-french/datetime2-french.ldf +++ b/Master/texmf-dist/tex/latex/datetime2-french/datetime2-french.ldf @@ -8,16 +8,19 @@ %% %% datetime2-french.dtx %% Copyright 2015 Nicola Talbot +%% Copyright 2017 Paul A. Patience %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 -%% of this license of (at your option) any later version. +%% 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.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. %% -%% This work has the LPPL maintenance status `inactive'. +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Paul A. Patience. %% %% This work consists of the files datetime2-french.dtx and %% datetime2-french.ins and the derived files @@ -39,7 +42,7 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesDateTimeModule{french}[2015/03/27 v1.0] +\ProvidesDateTimeModule{french}[2017/04/08 v1.02] \RequirePackage{ifxetex,ifluatex} \ifxetex \RequireDateTimeModule{french-utf8} @@ -50,18 +53,24 @@ \RequireDateTimeModule{french-ascii} \fi \fi -\newcommand*{\DTMfrenchdaymonthsep}{\space} +\newcommand*{\DTMfrenchdowdaysep}{\space} +\newcommand*{\DTMfrenchdaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}% +} \newcommand*{\DTMfrenchmonthyearsep}{\space} -\newcommand*{\DTMfrenchdatetimesep}{\space} +\newcommand*{\DTMfrenchdatetimesep}{,\space} \newcommand*{\DTMfrenchtimezonesep}{\space} \newcommand*{\DTMfrenchdatesep}{/} \newcommand*{\DTMfrenchtimesep}{:} +\DTMdefkey{french}{dowdaysep}{\renewcommand*{\DTMfrenchdowdaysep}{#1}} \DTMdefkey{french}{daymonthsep}{\renewcommand*{\DTMfrenchdaymonthsep}{#1}} \DTMdefkey{french}{monthyearsep}{\renewcommand*{\DTMfrenchmonthyearsep}{#1}} \DTMdefkey{french}{datetimesep}{\renewcommand*{\DTMfrenchdatetimesep}{#1}} \DTMdefkey{french}{timezonesep}{\renewcommand*{\DTMfrenchtimezonesep}{#1}} \DTMdefkey{french}{datesep}{\renewcommand*{\DTMfrenchdatesep}{#1}} \DTMdefkey{french}{timesep}{\renewcommand*{\DTMfrenchtimesep}{#1}} +\DTMdefboolkey{french}{abbr}[true]{} +\DTMsetbool{french}{abbr}{false} \DTMdefboolkey{french}{mapzone}[true]{} \DTMsetbool{french}{mapzone}{true} \DTMdefboolkey{french}{showdayofmonth}[true]{} @@ -72,24 +81,23 @@ {french}% label {% date style \renewcommand*\DTMdisplaydate[4]{% - \DTMifbool{french}{showdayofmonth} - {\DTMfrenchordinal{##3}\DTMfrenchdaymonthsep}% - {}% - \DTMfrenchmonthname{##2}% - \DTMifbool{french}{showyear}% + \ifDTMshowdow + \ifnum##4>-1 + \DTMifbool{french}{abbr}% + {\DTMfrenchshortweekdayname{##4}}% + {\DTMfrenchweekdayname{##4}}% + \DTMfrenchdowdaysep + \fi + \fi + \DTMifbool{french}{showdayofmonth}% {% - \DTMfrenchmonthyearsep - \number##1 % space intended + \DTMfrenchordinal{##3}% + \DTMfrenchdaymonthsep }% {}% - }% - \renewcommand*\DTMDisplaydate[4]{% - \DTMifbool{french}{showdayofmonth} - {% - \DTMfrenchordinal{##3}\DTMfrenchdaymonthsep - \DTMfrenchmonthname{##2}% - }% - {\DTMfrenchMonthname{##2}}% + \DTMifbool{french}{abbr}% + {\DTMfrenchshortmonthname{##2}}% + {\DTMfrenchmonthname{##2}}% \DTMifbool{french}{showyear}% {% \DTMfrenchmonthyearsep @@ -97,9 +105,74 @@ }% {}% }% + \renewcommand*\DTMDisplaydate[4]{% + \ifDTMshowdow + \ifnum##4>-1 + \DTMifbool{french}{abbr}% + {\DTMfrenchshortWeekdayname{##4}}% + {\DTMfrenchWeekdayname{##4}}% + \DTMfrenchdowdaysep + \DTMifbool{french}{showdayofmonth}% + {% + \DTMfrenchordinal{##3}% + \DTMfrenchdaymonthsep + }% + {}% + \DTMifbool{french}{abbr}% + {\DTMfrenchshortmonthname{##2}}% + {\DTMfrenchmonthname{##2}}% + \DTMifbool{french}{showyear}% + {% + \DTMfrenchmonthyearsep + \number##1 % space intended + }% + {}% + \else + \DTMifbool{french}{showdayofmonth} + {% + \DTMfrenchordinal{##3}% + \DTMfrenchdaymonthsep + \DTMifbool{french}{abbr}% + {\DTMfrenchshortmonthname{##2}}% + {\DTMfrenchmonthname{##2}}% + }% + {% + \DTMifbool{french}{abbr}% + {\DTMfrenchshortMonthname{##2}}% + {\DTMfrenchMonthname{##2}}% + }% + \DTMifbool{french}{showyear}% + {% + \DTMfrenchmonthyearsep + \number##1 % space intended + }% + {}% + \fi + \else + \DTMifbool{french}{showdayofmonth} + {% + \DTMfrenchordinal{##3}% + \DTMfrenchdaymonthsep + \DTMifbool{french}{abbr}% + {\DTMfrenchshortmonthname{##2}}% + {\DTMfrenchmonthname{##2}}% + }% + {% + \DTMifbool{french}{abbr}% + {\DTMfrenchshortMonthname{##2}}% + {\DTMfrenchMonthname{##2}}% + }% + \DTMifbool{french}{showyear}% + {% + \DTMfrenchmonthyearsep + \number##1 % space intended + }% + {}% + \fi + }% }% - {% time style (use default) - \DTMsettimestyle{default}% + {% time style + \DTMsettimestyle{frenchalpha}% }% {% zone style \DTMresetzones -- cgit v1.2.3