From b7f95896ce301dbceea61c49abdfa85b2bdb42f9 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 30 Mar 2015 23:12:49 +0000 Subject: datetime2-* (30mar15) git-svn-id: svn://tug.org/texlive/trunk@36682 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex/datetime2-bahasai/datetime2-bahasai.dtx | 428 +++++++++++ .../latex/datetime2-bahasai/datetime2-bahasai.ins | 38 + .../latex/datetime2-basque/datetime2-basque.dtx | 484 ++++++++++++ .../latex/datetime2-basque/datetime2-basque.ins | 38 + .../latex/datetime2-breton/datetime2-breton.dtx | 573 ++++++++++++++ .../latex/datetime2-breton/datetime2-breton.ins | 61 ++ .../datetime2-bulgarian/datetime2-bulgarian.dtx | 661 ++++++++++++++++ .../datetime2-bulgarian/datetime2-bulgarian.ins | 61 ++ .../latex/datetime2-catalan/datetime2-catalan.dtx | 627 ++++++++++++++++ .../latex/datetime2-catalan/datetime2-catalan.ins | 61 ++ .../datetime2-croatian/datetime2-croatian.dtx | 830 +++++++++++++++++++++ .../datetime2-croatian/datetime2-croatian.ins | 61 ++ .../latex/datetime2-czech/datetime2-czech.dtx | 630 ++++++++++++++++ .../latex/datetime2-czech/datetime2-czech.ins | 61 ++ .../latex/datetime2-danish/datetime2-danish.dtx | 722 ++++++++++++++++++ .../latex/datetime2-danish/datetime2-danish.ins | 61 ++ .../latex/datetime2-dutch/datetime2-dutch.dtx | 582 +++++++++++++++ .../latex/datetime2-dutch/datetime2-dutch.ins | 38 + .../datetime2-esperanto/datetime2-esperanto.dtx | 632 ++++++++++++++++ .../datetime2-esperanto/datetime2-esperanto.ins | 61 ++ .../datetime2-estonian/datetime2-estonian.dtx | 645 ++++++++++++++++ .../datetime2-estonian/datetime2-estonian.ins | 61 ++ .../latex/datetime2-finnish/datetime2-finnish.dtx | 630 ++++++++++++++++ .../latex/datetime2-finnish/datetime2-finnish.ins | 61 ++ 24 files changed, 8107 insertions(+) create mode 100644 Master/texmf-dist/source/latex/datetime2-bahasai/datetime2-bahasai.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-bahasai/datetime2-bahasai.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-breton/datetime2-breton.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-breton/datetime2-breton.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-bulgarian/datetime2-bulgarian.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-bulgarian/datetime2-bulgarian.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-catalan/datetime2-catalan.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-catalan/datetime2-catalan.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-croatian/datetime2-croatian.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-croatian/datetime2-croatian.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-czech/datetime2-czech.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-czech/datetime2-czech.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-danish/datetime2-danish.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-danish/datetime2-danish.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-dutch/datetime2-dutch.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-dutch/datetime2-dutch.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-esperanto/datetime2-esperanto.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-esperanto/datetime2-esperanto.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-estonian/datetime2-estonian.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-estonian/datetime2-estonian.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-finnish/datetime2-finnish.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-finnish/datetime2-finnish.ins (limited to 'Master/texmf-dist/source/latex') diff --git a/Master/texmf-dist/source/latex/datetime2-bahasai/datetime2-bahasai.dtx b/Master/texmf-dist/source/latex/datetime2-bahasai/datetime2-bahasai.dtx new file mode 100644 index 00000000000..af08d092734 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-bahasai/datetime2-bahasai.dtx @@ -0,0 +1,428 @@ +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2015 Nicola Talbot, all rights reserved. +% (New maintainer add relevant lines here.) +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\usepackage{alltt} +\usepackage{graphicx} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={datetime2.sty Bahasai Module}]{hyperref} + + +\CheckSum{173} + +\renewcommand*{\usage}[1]{\hyperpage{#1}} +\renewcommand*{\main}[1]{\hyperpage{#1}} +\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} +\setcounter{IndexColumns}{2} + +\newcommand*{\sty}[1]{\textsf{#1}} +\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} + +\RecordChanges +\PageIndex +\CodelineNumbered + +\begin{document} +\DocInput{datetime2-bahasai.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Bahasai Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-29 (v1.0)} +%\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 Bahasai language module for the \sty{datetime2} +%package. If you want to use the settings in this module you must +%install it in addition to installing \sty{datetime2}. If you use +%\sty{babel} or \sty{polyglossia}, you will need this module to +%prevent them from redefining \cs{today}. The \sty{datetime2} +% \opt{useregional} setting must be set to "text" or "numeric" +% for the language styles to be set. +% Alternatively, you can set the style in the document using +% \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} +% depending on the value of the \opt{useregional} setting. +%\end{abstract} +% +%I've copied the date style from \texttt{babel-bahasai}'s \cs{today}. +% +%I don't know if these settings are correct. +%In particular, I don't know if the "bahasai" 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-bahasai.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%At the moment there is only the one ".ldf" file. +% +%\subsection{Main Bahasai Module (\texttt{datetime2-bahasai.ldf})} +%\changes{1.0}{2015-03-29}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-bahasai.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{bahasai}[2015/03/29 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMbahasaiordinal} +% I don't know if this is correct, but it's provided in case +% a suffix is required. +% \begin{macrocode} +\newcommand*{\DTMbahasaiordinal}[1]{% + \number#1 % space intended +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbahasaimonthname} +% Bahasai month names. +% \begin{macrocode} +\newcommand*{\DTMbahasaimonthname}[1]{% + \ifcase#1 + \or + Januari% + \or + Pebruari% + \or + Maret% + \or + April% + \or + Mei% + \or + Juni% + \or + Juli% + \or + Agustus% + \or + September% + \or + Oktober% + \or + Nopember% + \or + Desember% + \fi +} +% \end{macrocode} +%\end{macro} +% +% +% Define the \texttt{bahasai} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. For +% example, if a 12 hour style similar to the "englishampm" (from the +% "english-base" module) is required. +% +% Allow the user a way of configuring the "bahasai" and +% "bahasai-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}{\DTMbahasaidaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMbahasaidaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbahasaimonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMbahasaimonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbahasaidatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMbahasaidatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbahasaitimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMbahasaitimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbahasaidatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMbahasaidatesep}{/} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbahasaitimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMbahasaitimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{bahasai}{daymonthsep}{\renewcommand*{\DTMbahasaidaymonthsep}{#1}} +\DTMdefkey{bahasai}{monthyearsep}{\renewcommand*{\DTMbahasaimonthyearsep}{#1}} +\DTMdefkey{bahasai}{datetimesep}{\renewcommand*{\DTMbahasaidatetimesep}{#1}} +\DTMdefkey{bahasai}{timezonesep}{\renewcommand*{\DTMbahasaitimezonesep}{#1}} +\DTMdefkey{bahasai}{datesep}{\renewcommand*{\DTMbahasaidatesep}{#1}} +\DTMdefkey{bahasai}{timesep}{\renewcommand*{\DTMbahasaitimesep}{#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 determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{bahasai}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{bahasai}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{bahasai}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{bahasai}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{bahasai}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{bahasai}{showyear}{true} +% \end{macrocode} +% +% Define the "bahasai" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {bahasai}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{bahasai}{showdayofmonth} + {\DTMbahasaiordinal{##3}\DTMbahasaidaymonthsep}% + {}% + \DTMbahasaimonthname{##2}% + \DTMifbool{bahasai}{showyear}% + {% + \DTMbahasaimonthyearsep + \number##1 % space intended + }% + {}% + }% + \renewcommand*\DTMDisplaydate{\DTMdisplaydate}% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMbahasaizonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{bahasai}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMbahasaitimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMbahasaidatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMbahasaitimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {bahasai-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{bahasai}{showdayofmonth}% + {% + \number##3 % space intended + \DTMbahasaidatesep + }% + {}% + \number##2 % space intended + \DTMifbool{bahasai}{showyear}% + {% + \DTMbahasaidatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMbahasaitimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMbahasaitimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMbahasaizonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{bahasai}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMbahasaitimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMbahasaidatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMbahasaitimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMbahasaizonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. This currently has no mappings. +% \begin{macrocode} +\newcommand*{\DTMbahasaizonemaps}{% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{bahasai}} +{\DTMsetstyle{bahasai-numeric}} +% \end{macrocode} +% +% Redefine \cs{datebahasai} (or \cs{date}\meta{dialect}) to prevent +% \sty{babel} from resetting \cs{today}. (For this to work, +% \sty{babel} must already have been loaded if it's required.) +% \begin{macrocode} +\ifcsundef{date\CurrentTrackedDialect} +{% + \ifundef\datebahasai + {% do nothing + }% + {% + \def\datebahasai{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{bahasai}}% + {\DTMsetstyle{bahasai-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{bahasai}}% + {\DTMsetstyle{bahasai-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-bahasai/datetime2-bahasai.ins b/Master/texmf-dist/source/latex/datetime2-bahasai/datetime2-bahasai.ins new file mode 100644 index 00000000000..e94af4f7642 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-bahasai/datetime2-bahasai.ins @@ -0,0 +1,38 @@ +\input docstrip + +\preamble + + datetime2-bahasai.dtx + Copyright 2015 Nicola Talbot + + 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. + 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 consists of the files datetime2-bahasai.dtx and + datetime2-bahasai.ins and the derived file + datetime2-bahasai.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-bahasai.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-bahasai.dtx}{datetime2-bahasai.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.dtx b/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.dtx new file mode 100644 index 00000000000..1c7245a5680 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.dtx @@ -0,0 +1,484 @@ +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2015 Nicola Talbot, all rights reserved. +% (New maintainer add relevant lines here.) +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\usepackage{alltt} +\usepackage{graphicx} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={datetime2.sty Basque Module}]{hyperref} + + +\CheckSum{204} + +\renewcommand*{\usage}[1]{\hyperpage{#1}} +\renewcommand*{\main}[1]{\hyperpage{#1}} +\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} +\setcounter{IndexColumns}{2} + +\newcommand*{\sty}[1]{\textsf{#1}} +\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} + +\RecordChanges +\PageIndex +\CodelineNumbered + +\begin{document} +\DocInput{datetime2-basque.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Basque Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-29 (v1.0)} +%\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 Basque language module for the \sty{datetime2} +%package. If you want to use the settings in this module you must +%install it in addition to installing \sty{datetime2}. If you use +%\sty{babel} or \sty{polyglossia}, you will need this module to +%prevent them from redefining \cs{today}. The \sty{datetime2} +% \opt{useregional} setting must be set to "text" or "numeric" +% for the language styles to be set. +% Alternatively, you can set the style in the document using +% \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} +% depending on the value of the \opt{useregional} setting. +%\end{abstract} +% +%I've copied the date style from \texttt{babel-basque}'s \cs{today}. +% +%I don't know if these settings are correct. +%In particular, I don't know if the "basque" 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-basque.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%At the moment there is only the one ".ldf" file. +% +%\subsection{Main Basque Module (\texttt{datetime2-basque.ldf})} +%\changes{1.0}{2015-03-29}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-basque.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{basque}[2015/03/29 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMbasqueordinal} +% I don't know if this is correct, but it's provided in case +% a suffix is required. +% \begin{macrocode} +\newcommand*{\DTMbasqueordinal}[1]{% + \number#1 % space intended +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbasquemonthname} +% Basque month names. +% \begin{macrocode} +\newcommand*{\DTMbasquemonthname}[1]{% + \ifcase#1 + \or + urtarrilaren% + \or + otsailaren% + \or + martxoaren% + \or + apirilaren% + \or + maiatzaren% + \or + ekainaren% + \or + uztailaren% + \or + abuztuaren% + \or + irailaren% + \or + urriaren% + \or + azaroaren% + \or + abenduaren% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbasqueMonthname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMbasqueMonthname}[1]{% + \ifcase#1 + \or + Urtarrilaren% + \or + Otsailaren% + \or + Martxoaren% + \or + Apirilaren% + \or + Maiatzaren% + \or + Ekainaren% + \or + Uztailaren% + \or + Abuztuaren% + \or + Irailaren% + \or + Urriaren% + \or + Azaroaren% + \or + Abenduaren% + \fi +} +% \end{macrocode} +%\end{macro} +% +% Define the \texttt{basque} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. For +% example, if a 12 hour style similar to the "englishampm" (from the +% "english-base" module) is required. +% +% Allow the user a way of configuring the "basque" and +% "basque-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}{\DTMbasquemonthdaysep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMbasquemonthdaysep}{% + \DTMtexorpdfstring{\protect~}{\space}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbasqueyearmonthsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMbasqueyearmonthsep}{.eko\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbasquedatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMbasquedatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbasquetimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMbasquetimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbasquedatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMbasquedatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbasquetimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMbasquetimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{basque}{monthdaysep}{\renewcommand*{\DTMbasquemonthdaysep}{#1}} +\DTMdefkey{basque}{yearmonthsep}{\renewcommand*{\DTMbasqueyearmonthsep}{#1}} +\DTMdefkey{basque}{datetimesep}{\renewcommand*{\DTMbasquedatetimesep}{#1}} +\DTMdefkey{basque}{timezonesep}{\renewcommand*{\DTMbasquetimezonesep}{#1}} +\DTMdefkey{basque}{datesep}{\renewcommand*{\DTMbasquedatesep}{#1}} +\DTMdefkey{basque}{timesep}{\renewcommand*{\DTMbasquetimesep}{#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 determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{basque}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{basque}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{basque}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{basque}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{basque}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{basque}{showyear}{true} +% \end{macrocode} +% +% Define the "basque" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {basque}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{basque}{showyear}% + {% + \number##1 % space intended + \DTMbasqueyearmonthsep + }% + {}% + \DTMbasquemonthname{##2}% + \DTMifbool{basque}{showdayofmonth} + {\DTMbasquemonthdaysep\DTMbasqueordinal{##3}}% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{basque}{showyear}% + {% + \number##1 % space intended + \DTMbasqueyearmonthsep + \DTMbasquemonthname{##2}% + }% + {% + \DTMbasqueMonthname{##2}% + }% + \DTMifbool{basque}{showdayofmonth} + {\DTMbasquemonthdaysep\DTMbasqueordinal{##3}}% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMbasquezonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{basque}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMbasquetimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMbasquedatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMbasquetimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMbasquedatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMbasquetimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {basque-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{basque}{showdayofmonth}% + {% + \number##3 % space intended + \DTMbasquedatesep + }% + {}% + \number##2 % space intended + \DTMifbool{basque}{showyear}% + {% + \DTMbasquedatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMbasquetimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMbasquetimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMbasquezonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{basque}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMbasquetimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMbasquedatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMbasquetimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMbasquezonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. This currently has no mappings. +% \begin{macrocode} +\newcommand*{\DTMbasquezonemaps}{% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{basque}} +{\DTMsetstyle{basque-numeric}} +% \end{macrocode} +% +% Redefine \cs{datebasque} (or \cs{date}\meta{dialect}) to prevent +% \sty{babel} from resetting \cs{today}. (For this to work, +% \sty{babel} must already have been loaded if it's required.) +% \begin{macrocode} +\ifcsundef{date\CurrentTrackedDialect} +{% + \ifundef\datebasque + {% do nothing + }% + {% + \def\datebasque{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{basque}}% + {\DTMsetstyle{basque-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{basque}}% + {\DTMsetstyle{basque-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.ins b/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.ins new file mode 100644 index 00000000000..28be67cf402 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.ins @@ -0,0 +1,38 @@ +\input docstrip + +\preamble + + datetime2-basque.dtx + Copyright 2015 Nicola Talbot + + 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. + 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 consists of the files datetime2-basque.dtx and + datetime2-basque.ins and the derived file + datetime2-basque.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-basque.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-basque.dtx}{datetime2-basque.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-breton/datetime2-breton.dtx b/Master/texmf-dist/source/latex/datetime2-breton/datetime2-breton.dtx new file mode 100644 index 00000000000..e07026e9592 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-breton/datetime2-breton.dtx @@ -0,0 +1,573 @@ +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2015 Nicola Talbot, all rights reserved. +% (New maintainer add relevant lines here.) +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\usepackage{alltt} +\usepackage{graphicx} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={datetime2.sty Breton Module}]{hyperref} + + +\CheckSum{252} + +\renewcommand*{\usage}[1]{\hyperpage{#1}} +\renewcommand*{\main}[1]{\hyperpage{#1}} +\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} +\setcounter{IndexColumns}{2} + +\newcommand*{\sty}[1]{\textsf{#1}} +\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} + +\RecordChanges +\PageIndex +\CodelineNumbered + +\begin{document} +\DocInput{datetime2-breton.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Breton Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-29 (v1.0)} +%\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 Breton language module for the \sty{datetime2} +%package. If you want to use the settings in this module you must +%install it in addition to installing \sty{datetime2}. If you use +%\sty{babel} or \sty{polyglossia}, you will need this module to +%prevent them from redefining \cs{today}. The \sty{datetime2} +% \opt{useregional} setting must be set to "text" or "numeric" +% for the language styles to be set. +% Alternatively, you can set the style in the document using +% \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} +% depending on the value of the \opt{useregional} setting. +%\end{abstract} +% +%I've copied the date style from \texttt{babel-breton}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Breton. +%In particular, I don't know if the "breton" 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-breton.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%\iffalse +% \begin{macrocode} +%<*datetime2-breton-utf8.ldf> +% \end{macrocode} +%\fi +%\subsection{UTF-8} +%This file contains the settings that use UTF-8 characters. This +%file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure +%your text editor is set to UTF-8 if you want to view this code. +%\changes{1.0}{2015-03-29}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{breton-utf8}[2015/03/29 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMbretonordinal} +% \begin{macrocode} +\newcommand*{\DTMbretonordinal}[1]{% + \number#1 + \ifnum#1=1 + \DTMbretonfmtordinal{añ}% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbretonfmtordinal} +% \begin{macrocode} +\newcommand*{\DTMbretonfmtordinal}[1]{% + \DTMtexorpdfstring{\protect\/\protect\textsuperscript{#1}}{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbretonmonthname} +% Breton month names. +% \begin{macrocode} +\newcommand*{\DTMbretonmonthname}[1]{% + \ifcase#1 + \or + Genver% + \or + C'hwevrer% + \or + Meurzh% + \or + Ebrel% + \or + Mae% + \or + Mezheven% + \or + Gouere% + \or + Eost% + \or + Gwengolo% + \or + Here% + \or + Du% + \or + Kerzu% + \fi +} +% \end{macrocode} +%\end{macro} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*datetime2-breton-ascii.ldf> +% \end{macrocode} +%\fi +%\subsection{ASCII} +%This file contains the settings that use \LaTeX\ commands for +%non-ASCII characters. This should be input if neither XeLaTeX nor +%LuaLaTeX are used. Even if the user has loaded \sty{inputenc} with +%"utf8", this file should still be used not the +%\texttt{datetime2-breton-utf8.ldf} file as the non-ASCII +%characters are made active in that situation and would need +%protecting against expansion. +%\changes{1.0}{2015-03-29}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{breton-ascii}[2015/03/29 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMbretonordinal} +% \begin{macrocode} +\newcommand*{\DTMbretonordinal}[1]{% + \number#1 + \ifnum#1=1 + \DTMbretonfmtordsuffix{a\protect\~{n}}% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbretonfmtordsuffix} +% \begin{macrocode} +\newcommand*{\DTMbretonfmtordsuffix}[1]{% + \DTMtexorpdfstring{\protect\/\protect\textsuperscript{#1}}{#1}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbretonmonthname} +% Breton month names. +% \begin{macrocode} +\newcommand*{\DTMbretonmonthname}[1]{% + \ifcase#1 + \or + Genver% + \or + C'hwevrer% + \or + Meurzh% + \or + Ebrel% + \or + Mae% + \or + Mezheven% + \or + Gouere% + \or + Eost% + \or + Gwengolo% + \or + Here% + \or + Du% + \or + Kerzu% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Breton Module (\texttt{datetime2-breton.ldf})} +%\changes{1.0}{2015-03-29}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-breton.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{breton}[2015/03/29 v1.0] +% \end{macrocode} +% Need to find out if XeTeX or LuaTeX are being used. +% \begin{macrocode} +\RequirePackage{ifxetex,ifluatex} +% \end{macrocode} +% XeTeX and LuaTeX natively support UTF-8, so load +% \texttt{breton-utf8} if either of those engines are used +% otherwise load \texttt{breton-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{breton-utf8} +\else + \ifluatex + \RequireDateTimeModule{breton-utf8} + \else + \RequireDateTimeModule{breton-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{breton} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. For +% example, if a 12 hour style similar to the "englishampm" (from the +% "english-base" module) is required. +% +% Allow the user a way of configuring the "breton" and +% "breton-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}{\DTMbretondaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMbretondaymonthsep}{\space a\space viz\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbretonmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMbretonmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbretondatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMbretondatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbretontimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMbretontimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbretondatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMbretondatesep}{/} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbretontimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMbretontimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{breton}{daymonthsep}{\renewcommand*{\DTMbretondaymonthsep}{#1}} +\DTMdefkey{breton}{monthyearsep}{\renewcommand*{\DTMbretonmonthyearsep}{#1}} +\DTMdefkey{breton}{datetimesep}{\renewcommand*{\DTMbretondatetimesep}{#1}} +\DTMdefkey{breton}{timezonesep}{\renewcommand*{\DTMbretontimezonesep}{#1}} +\DTMdefkey{breton}{datesep}{\renewcommand*{\DTMbretondatesep}{#1}} +\DTMdefkey{breton}{timesep}{\renewcommand*{\DTMbretontimesep}{#1}} +% \end{macrocode} +% +% Define a setting to change the ordinal suffix style. +% \begin{macrocode} +\DTMdefchoicekey{breton}{ord}[\val\nr]{level,raise,omit,sc}{% + \ifcase\nr\relax + \renewcommand*{\DTMbretonfmtordsuffix}[1]{##1}% + \or + \renewcommand*{\DTMbretonfmtordsuffix}[1]{% + \DTMtexorpdfstring{\protect\textsuperscript{##1}}{##1}}% + \or + \renewcommand*{\DTMbretonfmtordsuffix}[1]{}% + \or + \renewcommand*{\DTMbretonfmtordsuffix}[1]{% + \DTMtexorpdfstring{\protect\textsc{##1}}{##1}}% + \fi +} +% \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 determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{breton}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{breton}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{breton}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{breton}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{breton}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{breton}{showyear}{true} +% \end{macrocode} +% +% Define the "breton" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {breton}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{breton}{showdayofmonth} + {\DTMbretonordinal{##3}\DTMbretondaymonthsep}% + {}% + \DTMbretonmonthname{##2}% + \DTMifbool{breton}{showyear}% + {% + \DTMbretonmonthyearsep + \number##1 % space intended + }% + {}% + }% + \renewcommand*\DTMDisplaydate{\DTMdisplaydate}% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMbretonzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{breton}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMbretontimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMbretondatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMbretontimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {breton-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{breton}{showdayofmonth}% + {% + \number##3 % space intended + \DTMbretondatesep + }% + {}% + \number##2 % space intended + \DTMifbool{breton}{showyear}% + {% + \DTMbretondatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMbretontimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMbretontimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMbretonzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{breton}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMbretontimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMbretondatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMbretontimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMbretonzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. +% \begin{macrocode} +\newcommand*{\DTMbretonzonemaps}{% + \DTMdefzonemap{01}{00}{CET}% + \DTMdefzonemap{02}{00}{CEST}% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{breton}} +{\DTMsetstyle{breton-numeric}} +% \end{macrocode} +% +% Redefine \cs{datebreton} (or \cs{date}\meta{dialect}) to prevent +% \sty{babel} from resetting \cs{today}. (For this to work, +% \sty{babel} must already have been loaded if it's required.) +% \begin{macrocode} +\ifcsundef{date\CurrentTrackedDialect} +{% + \ifundef\datebreton + {% do nothing + }% + {% + \def\datebreton{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{breton}}% + {\DTMsetstyle{breton-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{breton}}% + {\DTMsetstyle{breton-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-breton/datetime2-breton.ins b/Master/texmf-dist/source/latex/datetime2-breton/datetime2-breton.ins new file mode 100644 index 00000000000..9bc3b360f0b --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-breton/datetime2-breton.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-breton.dtx + Copyright 2015 Nicola Talbot + + 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. + 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 consists of the files datetime2-breton.dtx and + datetime2-breton.ins and the derived files + datetime2-breton-utf8.ldf, datetime2-breton-ascii.ldf and + datetime2-breton.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-breton-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-breton.dtx}{datetime2-breton-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-breton-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-breton.dtx}{datetime2-breton-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-breton.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-breton.dtx}{datetime2-breton.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-bulgarian/datetime2-bulgarian.dtx b/Master/texmf-dist/source/latex/datetime2-bulgarian/datetime2-bulgarian.dtx new file mode 100644 index 00000000000..62ee62380a0 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-bulgarian/datetime2-bulgarian.dtx @@ -0,0 +1,661 @@ +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2015 Nicola Talbot, all rights reserved. +% (New maintainer add relevant lines here.) +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\usepackage{alltt} +\usepackage{graphicx} +\usepackage{fontspec} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={datetime2.sty Bulgarian Module}]{hyperref} + +\newfontfamily\cyrillicfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{545} + +\renewcommand*{\usage}[1]{\hyperpage{#1}} +\renewcommand*{\main}[1]{\hyperpage{#1}} +\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} +\setcounter{IndexColumns}{2} + +\newcommand*{\sty}[1]{\textsf{#1}} +\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} + +\RecordChanges +\PageIndex +\CodelineNumbered + +\begin{document} +\DocInput{datetime2-bulgarian.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Bulgarian Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-29 (v1.0)} +%\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 Bulgarian language module for the \sty{datetime2} +%package. If you want to use the settings in this module you must +%install it in addition to installing \sty{datetime2}. If you use +%\sty{babel} or \sty{polyglossia}, you will need this module to +%prevent them from redefining \cs{today}. The \sty{datetime2} +% \opt{useregional} setting must be set to "text" or "numeric" +% for the language styles to be set. +% Alternatively, you can set the style in the document using +% \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} +% depending on the value of the \opt{useregional} setting. +%\end{abstract} +% +%I've copied the date style from \texttt{babel-bulgarian}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Bulgarian. +%In particular, I don't know if the "bulgarian" 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-bulgarian.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%\iffalse +% \begin{macrocode} +%<*datetime2-bulgarian-utf8.ldf> +% \end{macrocode} +%\fi +%\subsection{UTF-8} +%This file contains the settings that use UTF-8 characters. This +%file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure +%your text editor is set to UTF-8 if you want to view this code. +%\changes{1.0}{2015-03-29}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{bulgarian-utf8}[2015/03/29 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMbulgarianordinal} +% \begin{macrocode} +\newcommand*{\DTMbulgarianordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbulgarianyear} +% \begin{macrocode} +\newcommand*{\DTMbulgarianyear}[1]{% + \number#1 + \DTMtexorpdfstring{\protect~}{\space}г.% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\DTMbulgarianmonthname} +% Bulgarian month names. +% \begin{macrocode} +\newcommand*{\DTMbulgarianmonthname}[1]{% + \ifcase#1 + \or + януари% + \or + февруари% + \or + март% + \or + април% + \or + май% + \or + юни% + \or + юли% + \or + август% + \or + септември% + \or + октомври% + \or + ноември% + \or + декември% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbulgarianMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMbulgarianMonthname}[1]{% + \ifcase#1 + \or + Януари% + \or + Февруари% + \or + Март% + \or + Април% + \or + Май% + \or + Юни% + \or + Юли% + \or + Август% + \or + Септември% + \or + Октомври% + \or + Ноември% + \or + Декември% + \fi +} +% \end{macrocode} +%\end{macro} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*datetime2-bulgarian-ascii.ldf> +% \end{macrocode} +%\fi +%\subsection{ASCII} +%This file contains the settings that use \LaTeX\ commands for +%non-ASCII characters. This should be input if neither XeLaTeX nor +%LuaLaTeX are used. Even if the user has loaded \sty{inputenc} with +%"utf8", this file should still be used not the +%\texttt{datetime2-bulgarian-utf8.ldf} file as the non-ASCII +%characters are made active in that situation and would need +%protecting against expansion. +%\changes{1.0}{2015-03-29}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{bulgarian-ascii}[2015/03/29 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMbulgarianordinal} +% \begin{macrocode} +\newcommand*{\DTMbulgarianordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbulgarianyear} +% \begin{macrocode} +\newcommand*{\DTMbulgarianyear}[1]{% + \number#1 + \DTMtexorpdfstring{\protect~}{\space}\protect\cyrg.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbulgarianmonthname} +% Bulgarian month names. +% \begin{macrocode} +\newcommand*{\DTMbulgarianmonthname}[1]{% + \ifcase#1 + \or + \protect\cyrya\protect\cyrn\protect\cyru\protect\cyra\protect\cyrr + \protect\cyri + \or + \protect\cyrf\protect\cyre\protect\cyrv\protect\cyrr\protect\cyru + \protect\cyra\protect\cyrr\protect\cyri + \or + \protect\cyrm\protect\cyra\protect\cyrr\protect\cyrt + \or + \protect\cyra\protect\cyrp\protect\cyrr\protect\cyri\protect\cyrl + \or + \protect\cyrm\protect\cyra\protect\cyrishrt + \or + \protect\cyryu\protect\cyrn\protect\cyri + \or + \protect\cyryu\protect\cyrl\protect\cyri + \or + \protect\cyra\protect\cyrv\protect\cyrg\protect\cyru\protect\cyrs + \protect\cyrt + \or + \protect\cyrs\protect\cyre\protect\cyrp\protect\cyrt\protect\cyre + \protect\cyrm\protect\cyrv\protect\cyrr\protect\cyri + \or + \protect\cyro\protect\cyrk\protect\cyrt\protect\cyro\protect\cyrm + \protect\cyrv\protect\cyrr\protect\cyri + \or + \protect\cyrn\protect\cyro\protect\cyre\protect\cyrm\protect\cyrv + \protect\cyrr\protect\cyri + \or + \protect\cyrd\protect\cyre\protect\cyrk\protect\cyre\protect\cyrm + \protect\cyrv\protect\cyrr\protect\cyri + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbulgarianMonthname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMbulgarianMonthname}[1]{% + \ifcase#1 + \or + \protect\CYRYA\protect\cyrn\protect\cyru\protect\cyra\protect\cyrr + \protect\cyri + \or + \protect\CYRF\protect\cyre\protect\cyrv\protect\cyrr\protect\cyru + \protect\cyra\protect\cyrr\protect\cyri + \or + \protect\CYRM\protect\cyra\protect\cyrr\protect\cyrt + \or + \protect\CYRA\protect\cyrp\protect\cyrr\protect\cyri\protect\cyrl + \or + \protect\CYRM\protect\cyra\protect\cyrishrt + \or + \protect\CYRYU\protect\cyrn\protect\cyri + \or + \protect\CYRYU\protect\cyrl\protect\cyri + \or + \protect\CYRA\protect\cyrv\protect\cyrg\protect\cyru\protect\cyrs + \protect\cyrt + \or + \protect\CYRS\protect\cyre\protect\cyrp\protect\cyrt\protect\cyre + \protect\cyrm\protect\cyrv\protect\cyrr\protect\cyri + \or + \protect\CYRO\protect\cyrk\protect\cyrt\protect\cyro\protect\cyrm + \protect\cyrv\protect\cyrr\protect\cyri + \or + \protect\CYRN\protect\cyro\protect\cyre\protect\cyrm\protect\cyrv + \protect\cyrr\protect\cyri + \or + \protect\CYRD\protect\cyre\protect\cyrk\protect\cyre\protect\cyrm + \protect\cyrv\protect\cyrr\protect\cyri + \fi +} +% \end{macrocode} +%\end{macro} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Bulgarian Module (\texttt{datetime2-bulgarian.ldf})} +%\changes{1.0}{2015-03-29}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-bulgarian.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{bulgarian}[2015/03/29 v1.0] +% \end{macrocode} +% Need to find out if XeTeX or LuaTeX are being used. +% \begin{macrocode} +\RequirePackage{ifxetex,ifluatex} +% \end{macrocode} +% XeTeX and LuaTeX natively support UTF-8, so load +% \texttt{bulgarian-utf8} if either of those engines are used +% otherwise load \texttt{bulgarian-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{bulgarian-utf8} +\else + \ifluatex + \RequireDateTimeModule{bulgarian-utf8} + \else + \RequireDateTimeModule{bulgarian-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{bulgarian} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. For +% example, if a 12 hour style similar to the "englishampm" (from the +% "english-base" module) is required. +% +% Allow the user a way of configuring the "bulgarian" and +% "bulgarian-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}{\DTMbulgariandaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMbulgariandaymonthsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbulgarianmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMbulgarianmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbulgariandatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMbulgariandatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbulgariantimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMbulgariantimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbulgariandatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMbulgariandatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMbulgariantimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMbulgariantimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{bulgarian}{daymonthsep}{\renewcommand*{\DTMbulgariandaymonthsep}{#1}} +\DTMdefkey{bulgarian}{monthyearsep}{\renewcommand*{\DTMbulgarianmonthyearsep}{#1}} +\DTMdefkey{bulgarian}{datetimesep}{\renewcommand*{\DTMbulgariandatetimesep}{#1}} +\DTMdefkey{bulgarian}{timezonesep}{\renewcommand*{\DTMbulgariantimezonesep}{#1}} +\DTMdefkey{bulgarian}{datesep}{\renewcommand*{\DTMbulgariandatesep}{#1}} +\DTMdefkey{bulgarian}{timesep}{\renewcommand*{\DTMbulgariantimesep}{#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 determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{bulgarian}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{bulgarian}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{bulgarian}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{bulgarian}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{bulgarian}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{bulgarian}{showyear}{true} +% \end{macrocode} +% +% Define the "bulgarian" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {bulgarian}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{bulgarian}{showdayofmonth} + {\DTMbulgarianordinal{##3}\DTMbulgariandaymonthsep}% + {}% + \DTMbulgarianmonthname{##2}% + \DTMifbool{bulgarian}{showyear}% + {% + \DTMbulgarianmonthyearsep + \DTMbulgarianyear{##1}% + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{bulgarian}{showdayofmonth} + {% + \DTMbulgarianordinal{##3}\DTMbulgariandaymonthsep + \DTMbulgarianmonthname{##2}% + }% + {% + \DTMbulgarianMonthname{##2}% + }% + \DTMifbool{bulgarian}{showyear}% + {% + \DTMbulgarianmonthyearsep + \DTMbulgarianyear{##1}% + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMbulgarianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{bulgarian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMbulgariantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMbulgariandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMbulgariantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMbulgariandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMbulgariantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {bulgarian-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{bulgarian}{showdayofmonth}% + {% + \number##3 % space intended + \DTMbulgariandatesep + }% + {}% + \number##2 % space intended + \DTMifbool{bulgarian}{showyear}% + {% + \DTMbulgariandatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMbulgariantimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMbulgariantimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMbulgarianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{bulgarian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMbulgariantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMbulgariandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMbulgariantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMbulgarianzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. +% \begin{macrocode} +\newcommand*{\DTMbulgarianzonemaps}{% + \DTMdefzonemap{02}{00}{EET}% + \DTMdefzonemap{03}{00}{EEST}% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{bulgarian}} +{\DTMsetstyle{bulgarian-numeric}} +% \end{macrocode} +% +% Redefine \cs{datebulgarian} (or \cs{date}\meta{dialect}) to prevent +% \sty{babel} from resetting \cs{today}. (For this to work, +% \sty{babel} must already have been loaded if it's required.) +% \begin{macrocode} +\ifcsundef{date\CurrentTrackedDialect} +{% + \ifundef\datebulgarian + {% do nothing + }% + {% + \def\datebulgarian{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{bulgarian}}% + {\DTMsetstyle{bulgarian-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{bulgarian}}% + {\DTMsetstyle{bulgarian-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-bulgarian/datetime2-bulgarian.ins b/Master/texmf-dist/source/latex/datetime2-bulgarian/datetime2-bulgarian.ins new file mode 100644 index 00000000000..e9b01604480 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-bulgarian/datetime2-bulgarian.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-bulgarian.dtx + Copyright 2015 Nicola Talbot + + 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. + 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 consists of the files datetime2-bulgarian.dtx and + datetime2-bulgarian.ins and the derived files + datetime2-bulgarian-utf8.ldf, datetime2-bulgarian-ascii.ldf and + datetime2-bulgarian.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-bulgarian-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-bulgarian.dtx}{datetime2-bulgarian-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-bulgarian-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-bulgarian.dtx}{datetime2-bulgarian-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-bulgarian.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-bulgarian.dtx}{datetime2-bulgarian.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-catalan/datetime2-catalan.dtx b/Master/texmf-dist/source/latex/datetime2-catalan/datetime2-catalan.dtx new file mode 100644 index 00000000000..1b08eef5bef --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-catalan/datetime2-catalan.dtx @@ -0,0 +1,627 @@ +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2015 Nicola Talbot, all rights reserved. +% (New maintainer add relevant lines here.) +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\usepackage{alltt} +\usepackage{graphicx} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={datetime2.sty Catalan Module}]{hyperref} + + +\CheckSum{258} + +\renewcommand*{\usage}[1]{\hyperpage{#1}} +\renewcommand*{\main}[1]{\hyperpage{#1}} +\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} +\setcounter{IndexColumns}{2} + +\newcommand*{\sty}[1]{\textsf{#1}} +\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} + +\RecordChanges +\PageIndex +\CodelineNumbered + +\begin{document} +\DocInput{datetime2-catalan.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Catalan Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2013-03-29 (v1.0)} +%\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 Catalan language module for the \sty{datetime2} +%package. If you want to use the settings in this module you must +%install it in addition to installing \sty{datetime2}. If you use +%\sty{babel} or \sty{polyglossia}, you will need this module to +%prevent them from redefining \cs{today}. The \sty{datetime2} +% \opt{useregional} setting must be set to "text" or "numeric" +% for the language styles to be set. +% Alternatively, you can set the style in the document using +% \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} +% depending on the value of the \opt{useregional} setting. +%\end{abstract} +% +%I've copied the date style from \texttt{babel-catalan}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Catalan. +%In particular, I don't know if the "catalan" 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-catalan.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%\iffalse +% \begin{macrocode} +%<*datetime2-catalan-utf8.ldf> +% \end{macrocode} +%\fi +%\subsection{UTF-8} +%This file contains the settings that use UTF-8 characters. This +%file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure +%your text editor is set to UTF-8 if you want to view this code. +%\changes{1.0}{2013-03-29}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{catalan-utf8}[2013/03/29 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMcatalanordinal} +% \begin{macrocode} +\newcommand*{\DTMcatalanordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcatalanmonthname} +% Catalan month names. +% \begin{macrocode} +\newcommand*{\DTMcatalanmonthname}[1]{% + \ifcase#1 + \or + de gener% + \or + de febrer% + \or + de març% + \or + d'abril% + \or + de maig% + \or + de juny% + \or + de juliol% + \or + d'agost% + \or + de setembre% + \or + d'octubre% + \or + de novembre% + \or + de desembre% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcatalanMonthname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMcatalanMonthname}[1]{% + \ifcase#1 + \or + De gener% + \or + De febrer% + \or + De març% + \or + D'abril% + \or + De maig% + \or + De juny% + \or + De juliol% + \or + D'agost% + \or + De setembre% + \or + D'octubre% + \or + De novembre% + \or + De desembre% + \fi +} +% \end{macrocode} +%\end{macro} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*datetime2-catalan-ascii.ldf> +% \end{macrocode} +%\fi +%\subsection{ASCII} +%This file contains the settings that use \LaTeX\ commands for +%non-ASCII characters. This should be input if neither XeLaTeX nor +%LuaLaTeX are used. Even if the user has loaded \sty{inputenc} with +%"utf8", this file should still be used not the +%\texttt{datetime2-catalan-utf8.ldf} file as the non-ASCII +%characters are made active in that situation and would need +%protecting against expansion. +%\changes{1.0}{2013-03-29}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{catalan-ascii}[2013/03/29 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMcatalanordinal} +% \begin{macrocode} +\newcommand*{\DTMcatalanordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcatalanmonthname} +% Catalan month names. +% \begin{macrocode} +\newcommand*{\DTMcatalanmonthname}[1]{% + \ifcase#1 + \or + de gener% + \or + de febrer% + \or + de mar\protect\c{c}% + \or + d'abril% + \or + de maig% + \or + de juny% + \or + de juliol% + \or + d'agost% + \or + de setembre% + \or + d'octubre% + \or + de novembre% + \or + de desembre% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcatalanMonthname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMcatalanMonthname}[1]{% + \ifcase#1 + \or + De gener% + \or + De febrer% + \or + De mar\protect\c{c}% + \or + D'abril% + \or + De maig% + \or + De juny% + \or + De juliol% + \or + D'agost% + \or + De setembre% + \or + D'octubre% + \or + De novembre% + \or + De desembre% + \fi +} +% \end{macrocode} +%\end{macro} +% +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Catalan Module (\texttt{datetime2-catalan.ldf})} +%\changes{1.0}{2013-03-29}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-catalan.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{catalan}[2013/03/29 v1.0] +% \end{macrocode} +% Need to find out if XeTeX or LuaTeX are being used. +% \begin{macrocode} +\RequirePackage{ifxetex,ifluatex} +% \end{macrocode} +% XeTeX and LuaTeX natively support UTF-8, so load +% \texttt{catalan-utf8} if either of those engines are used +% otherwise load \texttt{catalan-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{catalan-utf8} +\else + \ifluatex + \RequireDateTimeModule{catalan-utf8} + \else + \RequireDateTimeModule{catalan-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{catalan} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. For +% example, if a 12 hour style similar to the "englishampm" (from the +% "english-base" module) is required. +% +% Allow the user a way of configuring the "catalan" and +% "catalan-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}{\DTMcatalandaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMcatalandaymonthsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcatalanmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMcatalanmonthyearsep}{% + \space de\DTMtexorpdfstring{\protect~}{\space}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcatalandatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMcatalandatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcatalantimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMcatalantimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcatalandatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMcatalandatesep}{/} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcatalantimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMcatalantimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{catalan}{daymonthsep}{\renewcommand*{\DTMcatalandaymonthsep}{#1}} +\DTMdefkey{catalan}{monthyearsep}{\renewcommand*{\DTMcatalanmonthyearsep}{#1}} +\DTMdefkey{catalan}{datetimesep}{\renewcommand*{\DTMcatalandatetimesep}{#1}} +\DTMdefkey{catalan}{timezonesep}{\renewcommand*{\DTMcatalantimezonesep}{#1}} +\DTMdefkey{catalan}{datesep}{\renewcommand*{\DTMcatalandatesep}{#1}} +\DTMdefkey{catalan}{timesep}{\renewcommand*{\DTMcatalantimesep}{#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 determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{catalan}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{catalan}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{catalan}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{catalan}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{catalan}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{catalan}{showyear}{true} +% \end{macrocode} +% +% Define the "catalan" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {catalan}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{catalan}{showdayofmonth} + {\DTMcatalanordinal{##3}\DTMcatalandaymonthsep}% + {}% + \DTMcatalanmonthname{##2}% + \DTMifbool{catalan}{showyear}% + {% + \DTMcatalanmonthyearsep + \number##1 % space intended + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{catalan}{showdayofmonth} + {% + \DTMcatalanordinal{##3}\DTMcatalandaymonthsep + \DTMcatalanmonthname{##2}% + }% + {\DTMcatalanMonthname{##2}}% + \DTMifbool{catalan}{showyear}% + {% + \DTMcatalanmonthyearsep + \number##1 % space intended + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMcatalanzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{catalan}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMcatalantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMcatalandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMcatalantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMcatalandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMcatalantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {catalan-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{catalan}{showdayofmonth}% + {% + \number##3 % space intended + \DTMcatalandatesep + }% + {}% + \number##2 % space intended + \DTMifbool{catalan}{showyear}% + {% + \DTMcatalandatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMcatalantimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMcatalantimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMcatalanzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{catalan}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMcatalantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMcatalandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMcatalantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMcatalanzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. +% \begin{macrocode} +\newcommand*{\DTMcatalanzonemaps}{% + \DTMdefzonemap{01}{00}{CET}% + \DTMdefzonemap{02}{00}{CEST}% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{catalan}} +{\DTMsetstyle{catalan-numeric}} +% \end{macrocode} +% +% Redefine \cs{datecatalan} (or \cs{date}\meta{dialect}) to prevent +% \sty{babel} from resetting \cs{today}. (For this to work, +% \sty{babel} must already have been loaded if it's required.) +% \begin{macrocode} +\ifcsundef{date\CurrentTrackedDialect} +{% + \ifundef\datecatalan + {% do nothing + }% + {% + \def\datecatalan{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{catalan}}% + {\DTMsetstyle{catalan-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{catalan}}% + {\DTMsetstyle{catalan-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-catalan/datetime2-catalan.ins b/Master/texmf-dist/source/latex/datetime2-catalan/datetime2-catalan.ins new file mode 100644 index 00000000000..4f2d6ac9f9c --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-catalan/datetime2-catalan.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-catalan.dtx + Copyright 2015 Nicola Talbot + + 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. + 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 consists of the files datetime2-catalan.dtx and + datetime2-catalan.ins and the derived files + datetime2-catalan-utf8.ldf, datetime2-catalan-ascii.ldf and + datetime2-catalan.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-catalan-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-catalan.dtx}{datetime2-catalan-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-catalan-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-catalan.dtx}{datetime2-catalan-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-catalan.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-catalan.dtx}{datetime2-catalan.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-croatian/datetime2-croatian.dtx b/Master/texmf-dist/source/latex/datetime2-croatian/datetime2-croatian.dtx new file mode 100644 index 00000000000..7aba69614cf --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-croatian/datetime2-croatian.dtx @@ -0,0 +1,830 @@ +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2015 Nicola Talbot, all rights reserved. +% (New maintainer add relevant lines here.) +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\usepackage{alltt} +\usepackage{graphicx} +\usepackage{fontspec} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={datetime2.sty Croatian Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{359} + +\renewcommand*{\usage}[1]{\hyperpage{#1}} +\renewcommand*{\main}[1]{\hyperpage{#1}} +\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} +\setcounter{IndexColumns}{2} + +\newcommand*{\sty}[1]{\textsf{#1}} +\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} + +\RecordChanges +\PageIndex +\CodelineNumbered + +\begin{document} +\DocInput{datetime2-croatian.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Croatian Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-30 (v1.0)} +%\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 Croatian language module for the \sty{datetime2} +%package. If you want to use the settings in this module you must +%install it in addition to installing \sty{datetime2}. If you use +%\sty{babel} or \sty{polyglossia}, you will need this module to +%prevent them from redefining \cs{today}. The \sty{datetime2} +% \opt{useregional} setting must be set to "text" or "numeric" +% for the language styles to be set. +% Alternatively, you can set the style in the document using +% \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} +% depending on the value of the \opt{useregional} setting. +%\end{abstract} +% +%I've copied the date style from \texttt{babel-croatian}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Croatian. +%In particular, I don't know if the "croatian" 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-croatian.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%\iffalse +% \begin{macrocode} +%<*datetime2-croatian-utf8.ldf> +% \end{macrocode} +%\fi +%\subsection{UTF-8} +%This file contains the settings that use UTF-8 characters. This +%file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure +%your text editor is set to UTF-8 if you want to view this code. +%\changes{1.0}{2015-03-30}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{croatian-utf8}[2015/03/30 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMcroatianordinal} +% \begin{macrocode} +\newcommand*{\DTMcroatianordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianyear} +% \begin{macrocode} +\newcommand*{\DTMcroatianyear}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\DTMcroatianmonthname} +% Croatian month names. +% \begin{macrocode} +\newcommand*{\DTMcroatianmonthname}[1]{% + \ifcase#1 + \or + siječnja% + \or + veljače% + \or + ožujka% + \or + travnja% + \or + svibnja% + \or + lipnja% + \or + srpnja% + \or + kolovoza% + \or + rujna% + \or + listopada% + \or + studenoga% + \or + prosinca% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMcroatianMonthname}[1]{% + \ifcase#1 + \or + Siječnja% + \or + Veljače% + \or + Ožujka% + \or + Travnja% + \or + Svibnja% + \or + Lipnja% + \or + Srpnja% + \or + Kolovoza% + \or + Rujna% + \or + Listopada% + \or + Studenoga% + \or + Prosinca% + \fi +} +% \end{macrocode} +%\end{macro} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +% +%\begin{macro}{\DTMcroatianweekdayname} +% Croatian day of week names. +% \begin{macrocode} +\newcommand*{\DTMcroatianweekdayname}[1]{% + \ifcase#1 + nedjelja% + \or + ponedjeljak% + \or + utorak% + \or + srijeda% + \or + četvrtak% + \or + petak% + \or + subota% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMcroatianWeekdayname}[1]{% + \ifcase#1 + Nedjelja% + \or + Ponedjeljak% + \or + Utorak% + \or + Srijeda% + \or + Četvrtak% + \or + Petak% + \or + Subota% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianshortweekdayname} +%Abbreviated Croatian day of week names. +% \begin{macrocode} +\newcommand*{\DTMcroatianshortweekdayname}[1]{% + \ifcase#1 + ned% + \or + pon% + \or + uto% + \or + sri% + \or + čet% + \or + pet% + \or + sub% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianshortWeekdayname} +%As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMcroatianshortWeekdayname}[1]{% + \ifcase#1 + Ned% + \or + Pon% + \or + Uto% + \or + Sri% + \or + Čet% + \or + Pet% + \or + Sub% + \fi +} +% \end{macrocode} +%\end{macro} +% +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*datetime2-croatian-ascii.ldf> +% \end{macrocode} +%\fi +%\subsection{ASCII} +%This file contains the settings that use \LaTeX\ commands for +%non-ASCII characters. This should be input if neither XeLaTeX nor +%LuaLaTeX are used. Even if the user has loaded \sty{inputenc} with +%"utf8", this file should still be used not the +%\texttt{datetime2-croatian-utf8.ldf} file as the non-ASCII +%characters are made active in that situation and would need +%protecting against expansion. +%\changes{1.0}{2015-03-30}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{croatian-ascii}[2015/03/30 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMcroatianordinal} +% \begin{macrocode} +\newcommand*{\DTMcroatianordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianyear} +% \begin{macrocode} +\newcommand*{\DTMcroatianyear}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianmonthname} +% Croatian month names. +% \begin{macrocode} +\newcommand*{\DTMcroatianmonthname}[1]{% + \ifcase#1 + \or + sije\protect\v{c}nja% + \or + velja\protect\v{c}e% + \or + o\protect\v{z}ujka% + \or + travnja% + \or + svibnja% + \or + lipnja% + \or + srpnja% + \or + kolovoza% + \or + rujna% + \or + listopada% + \or + studenoga% + \or + prosinca% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianMonthname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMcroatianMonthname}[1]{% + \ifcase#1 + \or + Sije\protect\v{c}nja% + \or + Velja\protect\v{c}e% + \or + O\protect\v{z}ujka% + \or + Travnja% + \or + Svibnja% + \or + Lipnja% + \or + Srpnja% + \or + Kolovoza% + \or + Rujna% + \or + Listopada% + \or + Studenoga% + \or + Prosinca% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianweekdayname} +% Croatian day of week names. +% \begin{macrocode} +\newcommand*{\DTMcroatianweekdayname}[1]{% + \ifcase#1 + nedjelja% + \or + ponedjeljak% + \or + utorak% + \or + srijeda% + \or + \protect\v{c}etvrtak% + \or + petak% + \or + subota% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMcroatianWeekdayname}[1]{% + \ifcase#1 + Nedjelja% + \or + Ponedjeljak% + \or + Utorak% + \or + Srijeda% + \or + \protect\v{C}etvrtak% + \or + Petak% + \or + Subota% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianshortweekdayname} +% Abbreviated Croatian day of week names. +% \begin{macrocode} +\newcommand*{\DTMcroatianshortweekdayname}[1]{% + \ifcase#1 + ned% + \or + pon% + \or + uto% + \or + sri% + \or + \protect\v{c}et% + \or + pet% + \or + sub% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianshortWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMcroatianshortWeekdayname}[1]{% + \ifcase#1 + Ned% + \or + Pon% + \or + Uto% + \or + Sri% + \or + \protect\v{C}et% + \or + Pet% + \or + Sub% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Croatian Module (\texttt{datetime2-croatian.ldf})} +%\changes{1.0}{2015-03-30}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-croatian.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{croatian}[2015/03/30 v1.0] +% \end{macrocode} +% Need to find out if XeTeX or LuaTeX are being used. +% \begin{macrocode} +\RequirePackage{ifxetex,ifluatex} +% \end{macrocode} +% XeTeX and LuaTeX natively support UTF-8, so load +% \texttt{croatian-utf8} if either of those engines are used +% otherwise load \texttt{croatian-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{croatian-utf8} +\else + \ifluatex + \RequireDateTimeModule{croatian-utf8} + \else + \RequireDateTimeModule{croatian-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{croatian} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. For +% example, if a 12 hour style similar to the "englishampm" (from the +% "english-base" module) is required. +% +% Allow the user a way of configuring the "croatian" and +% "croatian-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}{\DTMcroatiandaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMcroatiandaymonthsep}{\DTMtexorpdfstring{\protect~}{\space}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatianmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMcroatianmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatiandatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMcroatiandatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatiantimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMcroatiantimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatiandatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMcroatiandatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMcroatiantimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMcroatiantimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{croatian}{daymonthsep}{\renewcommand*{\DTMcroatiandaymonthsep}{#1}} +\DTMdefkey{croatian}{monthyearsep}{\renewcommand*{\DTMcroatianmonthyearsep}{#1}} +\DTMdefkey{croatian}{datetimesep}{\renewcommand*{\DTMcroatiandatetimesep}{#1}} +\DTMdefkey{croatian}{timezonesep}{\renewcommand*{\DTMcroatiantimezonesep}{#1}} +\DTMdefkey{croatian}{datesep}{\renewcommand*{\DTMcroatiandatesep}{#1}} +\DTMdefkey{croatian}{timesep}{\renewcommand*{\DTMcroatiantimesep}{#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 determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{croatian}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{croatian}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{croatian}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{croatian}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{croatian}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{croatian}{showyear}{true} +% \end{macrocode} +% +% Define the "croatian" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {croatian}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{croatian}{showdayofmonth} + {\DTMcroatianordinal{##3}\DTMcroatiandaymonthsep}% + {}% + \DTMcroatianmonthname{##2}% + \DTMifbool{croatian}{showyear}% + {% + \DTMcroatianmonthyearsep + \DTMcroatianyear{##1}% + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{croatian}{showdayofmonth} + {% + \DTMcroatianordinal{##3}\DTMcroatiandaymonthsep + \DTMcroatianmonthname{##2}% + }% + {% + \DTMcroatianMonthname{##2}% + }% + \DTMifbool{croatian}{showyear}% + {% + \DTMcroatianmonthyearsep + \DTMcroatianyear{##1}% + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMcroatianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{croatian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMcroatiantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMcroatiandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMcroatiantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMcroatiandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMcroatiantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {croatian-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{croatian}{showdayofmonth}% + {% + \number##3 % space intended + \DTMcroatiandatesep + }% + {}% + \number##2 % space intended + \DTMifbool{croatian}{showyear}% + {% + \DTMcroatiandatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMcroatiantimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMcroatiantimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMcroatianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{croatian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMcroatiantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMcroatiandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMcroatiantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMcroatianzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. +% \begin{macrocode} +\newcommand*{\DTMcroatianzonemaps}{% + \DTMdefzonemap{01}{00}{CET}% + \DTMdefzonemap{02}{00}{CEST}% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{croatian}} +{\DTMsetstyle{croatian-numeric}} +% \end{macrocode} +% +% Redefine \cs{datecroatian} (or \cs{date}\meta{dialect}) to prevent +% \sty{babel} from resetting \cs{today}. (For this to work, +% \sty{babel} must already have been loaded if it's required.) +% \begin{macrocode} +\ifcsundef{date\CurrentTrackedDialect} +{% + \ifundef\datecroatian + {% do nothing + }% + {% + \def\datecroatian{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{croatian}}% + {\DTMsetstyle{croatian-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{croatian}}% + {\DTMsetstyle{croatian-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-croatian/datetime2-croatian.ins b/Master/texmf-dist/source/latex/datetime2-croatian/datetime2-croatian.ins new file mode 100644 index 00000000000..078c709a20d --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-croatian/datetime2-croatian.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-croatian.dtx + Copyright 2015 Nicola Talbot + + 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. + 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 consists of the files datetime2-croatian.dtx and + datetime2-croatian.ins and the derived files + datetime2-croatian-utf8.ldf, datetime2-croatian-ascii.ldf and + datetime2-croatian.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-croatian-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-croatian.dtx}{datetime2-croatian-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-croatian-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-croatian.dtx}{datetime2-croatian-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-croatian.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-croatian.dtx}{datetime2-croatian.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-czech/datetime2-czech.dtx b/Master/texmf-dist/source/latex/datetime2-czech/datetime2-czech.dtx new file mode 100644 index 00000000000..868d2b709f5 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-czech/datetime2-czech.dtx @@ -0,0 +1,630 @@ +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2015 Nicola Talbot, all rights reserved. +% (New maintainer add relevant lines here.) +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\usepackage{alltt} +\usepackage{graphicx} +\usepackage{fontspec} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={datetime2.sty Czech Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{301} + +\renewcommand*{\usage}[1]{\hyperpage{#1}} +\renewcommand*{\main}[1]{\hyperpage{#1}} +\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} +\setcounter{IndexColumns}{2} + +\newcommand*{\sty}[1]{\textsf{#1}} +\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} + +\RecordChanges +\PageIndex +\CodelineNumbered + +\begin{document} +\DocInput{datetime2-czech.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Czech Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-30 (v1.0)} +%\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 Czech language module for the \sty{datetime2} +%package. If you want to use the settings in this module you must +%install it in addition to installing \sty{datetime2}. If you use +%\sty{babel} or \sty{polyglossia}, you will need this module to +%prevent them from redefining \cs{today}. The \sty{datetime2} +% \opt{useregional} setting must be set to "text" or "numeric" +% for the language styles to be set. +% Alternatively, you can set the style in the document using +% \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} +% depending on the value of the \opt{useregional} setting. +%\end{abstract} +% +%I've copied the date style from \texttt{babel-czech}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Czech. +%In particular, I don't know if the "czech" 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-czech.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%\iffalse +% \begin{macrocode} +%<*datetime2-czech-utf8.ldf> +% \end{macrocode} +%\fi +%\subsection{UTF-8} +%This file contains the settings that use UTF-8 characters. This +%file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure +%your text editor is set to UTF-8 if you want to view this code. +%\changes{1.0}{2015-03-30}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{czech-utf8}[2015/03/30 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMczechordinal} +% \begin{macrocode} +\newcommand*{\DTMczechordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\DTMczechmonthname} +% Czech month names. +% \begin{macrocode} +\newcommand*{\DTMczechmonthname}[1]{% + \ifcase#1 + \or + ledna% + \or + února% + \or + března% + \or + dubna% + \or + května% + \or + června% + \or + července% + \or + srpna% + \or + září% + \or + října% + \or + listopadu% + \or + prosince% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMczechMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMczechMonthname}[1]{% + \ifcase#1 + \or + Ledna% + \or + Února% + \or + Března% + \or + Dubna% + \or + Května% + \or + Června% + \or + Července% + \or + Srpna% + \or + Září% + \or + Října% + \or + Listopadu% + \or + Prosince% + \fi +} +% \end{macrocode} +%\end{macro} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +% +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*datetime2-czech-ascii.ldf> +% \end{macrocode} +%\fi +%\subsection{ASCII} +%This file contains the settings that use \LaTeX\ commands for +%non-ASCII characters. This should be input if neither XeLaTeX nor +%LuaLaTeX are used. Even if the user has loaded \sty{inputenc} with +%"utf8", this file should still be used not the +%\texttt{datetime2-czech-utf8.ldf} file as the non-ASCII +%characters are made active in that situation and would need +%protecting against expansion. +%\changes{1.0}{2015-03-30}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{czech-ascii}[2015/03/30 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMczechordinal} +% \begin{macrocode} +\newcommand*{\DTMczechordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMczechmonthname} +% Czech month names. +% \begin{macrocode} +\newcommand*{\DTMczechmonthname}[1]{% + \ifcase#1 + \or + ledna% + \or + \protect\'unora% + \or + b\protect\v{r}ezna% + \or + dubna% + \or + kv\protect\v{e}tna% + \or + \protect\v{c}ervna% + \or + \protect\v{c}ervence% + \or + srpna% + \or + z\protect\'a\protect\v{r}\protect\'{\protect\i}% + \or + \protect\v{r}\protect\'{\protect\i}jna% + \or + listopadu% + \or + prosince% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMczechMonthname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMczechMonthname}[1]{% + \ifcase#1 + \or + Ledna% + \or + \protect\'Unora% + \or + B\protect\v{r}ezna% + \or + Dubna% + \or + Kv\protect\v{e}tna% + \or + \protect\v{C}ervna% + \or + \protect\v{C}ervence% + \or + Srpna% + \or + Z\protect\'a\protect\v{r}\protect\'{\protect\i}% + \or + \protect\v{R}\protect\'{\protect\i}jna% + \or + Listopadu% + \or + Prosince% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Czech Module (\texttt{datetime2-czech.ldf})} +%\changes{1.0}{2015-03-30}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-czech.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{czech}[2015/03/30 v1.0] +% \end{macrocode} +% Need to find out if XeTeX or LuaTeX are being used. +% \begin{macrocode} +\RequirePackage{ifxetex,ifluatex} +% \end{macrocode} +% XeTeX and LuaTeX natively support UTF-8, so load +% \texttt{czech-utf8} if either of those engines are used +% otherwise load \texttt{czech-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{czech-utf8} +\else + \ifluatex + \RequireDateTimeModule{czech-utf8} + \else + \RequireDateTimeModule{czech-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{czech} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. For +% example, if a 12 hour style similar to the "englishampm" (from the +% "english-base" module) is required. +% +% Allow the user a way of configuring the "czech" and +% "czech-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}{\DTMczechdaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMczechdaymonthsep}{\DTMtexorpdfstring{\protect~}{\space}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMczechmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMczechmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMczechdatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMczechdatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMczechtimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMczechtimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMczechdatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMczechdatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMczechtimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMczechtimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{czech}{daymonthsep}{\renewcommand*{\DTMczechdaymonthsep}{#1}} +\DTMdefkey{czech}{monthyearsep}{\renewcommand*{\DTMczechmonthyearsep}{#1}} +\DTMdefkey{czech}{datetimesep}{\renewcommand*{\DTMczechdatetimesep}{#1}} +\DTMdefkey{czech}{timezonesep}{\renewcommand*{\DTMczechtimezonesep}{#1}} +\DTMdefkey{czech}{datesep}{\renewcommand*{\DTMczechdatesep}{#1}} +\DTMdefkey{czech}{timesep}{\renewcommand*{\DTMczechtimesep}{#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 determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{czech}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{czech}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{czech}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{czech}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{czech}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{czech}{showyear}{true} +% \end{macrocode} +% +% Define the "czech" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {czech}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{czech}{showdayofmonth} + {\DTMczechordinal{##3}\DTMczechdaymonthsep}% + {}% + \DTMczechmonthname{##2}% + \DTMifbool{czech}{showyear}% + {% + \DTMczechmonthyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{czech}{showdayofmonth} + {% + \DTMczechordinal{##3}\DTMczechdaymonthsep + \DTMczechmonthname{##2}% + }% + {% + \DTMczechMonthname{##2}% + }% + \DTMifbool{czech}{showyear}% + {% + \DTMczechmonthyearsep + \number##1 + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMczechzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{czech}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMczechtimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMczechdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMczechtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMczechdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMczechtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {czech-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{czech}{showdayofmonth}% + {% + \number##3 % space intended + \DTMczechdatesep + }% + {}% + \number##2 % space intended + \DTMifbool{czech}{showyear}% + {% + \DTMczechdatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMczechtimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMczechtimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMczechzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{czech}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMczechtimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMczechdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMczechtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMczechzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. +% \begin{macrocode} +\newcommand*{\DTMczechzonemaps}{% + \DTMdefzonemap{01}{00}{CET}% + \DTMdefzonemap{02}{00}{CEST}% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{czech}} +{\DTMsetstyle{czech-numeric}} +% \end{macrocode} +% +% Redefine \cs{dateczech} (or \cs{date}\meta{dialect}) to prevent +% \sty{babel} from resetting \cs{today}. (For this to work, +% \sty{babel} must already have been loaded if it's required.) +% \begin{macrocode} +\ifcsundef{date\CurrentTrackedDialect} +{% + \ifundef\dateczech + {% do nothing + }% + {% + \def\dateczech{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{czech}}% + {\DTMsetstyle{czech-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{czech}}% + {\DTMsetstyle{czech-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-czech/datetime2-czech.ins b/Master/texmf-dist/source/latex/datetime2-czech/datetime2-czech.ins new file mode 100644 index 00000000000..882f9e23f23 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-czech/datetime2-czech.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-czech.dtx + Copyright 2015 Nicola Talbot + + 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. + 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 consists of the files datetime2-czech.dtx and + datetime2-czech.ins and the derived files + datetime2-czech-utf8.ldf, datetime2-czech-ascii.ldf and + datetime2-czech.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-czech-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-czech.dtx}{datetime2-czech-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-czech-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-czech.dtx}{datetime2-czech-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-czech.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-czech.dtx}{datetime2-czech.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-danish/datetime2-danish.dtx b/Master/texmf-dist/source/latex/datetime2-danish/datetime2-danish.dtx new file mode 100644 index 00000000000..d8d1f249c4a --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-danish/datetime2-danish.dtx @@ -0,0 +1,722 @@ +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2015 Nicola Talbot, all rights reserved. +% (New maintainer add relevant lines here.) +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\usepackage{alltt} +\usepackage{graphicx} +\usepackage{fontspec} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={datetime2.sty Danish Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{301} + +\renewcommand*{\usage}[1]{\hyperpage{#1}} +\renewcommand*{\main}[1]{\hyperpage{#1}} +\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} +\setcounter{IndexColumns}{2} + +\newcommand*{\sty}[1]{\textsf{#1}} +\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} + +\RecordChanges +\PageIndex +\CodelineNumbered + +\begin{document} +\DocInput{datetime2-danish.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Danish Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-30 (v1.0)} +%\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 Danish language module for the \sty{datetime2} +%package. If you want to use the settings in this module you must +%install it in addition to installing \sty{datetime2}. If you use +%\sty{babel} or \sty{polyglossia}, you will need this module to +%prevent them from redefining \cs{today}. The \sty{datetime2} +% \opt{useregional} setting must be set to "text" or "numeric" +% for the language styles to be set. +% Alternatively, you can set the style in the document using +% \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} +% depending on the value of the \opt{useregional} setting. +%\end{abstract} +% +%I've copied the date style from \texttt{babel-danish}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Danish. +%In particular, I don't know if the "danish" 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-danish.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%\iffalse +% \begin{macrocode} +%<*datetime2-danish-utf8.ldf> +% \end{macrocode} +%\fi +%\subsection{UTF-8} +%This file contains the settings that use UTF-8 characters. This +%file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure +%your text editor is set to UTF-8 if you want to view this code. +%\changes{1.0}{2015-03-30}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{danish-utf8}[2015/03/30 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMdanishordinal} +% \begin{macrocode} +\newcommand*{\DTMdanishordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\DTMdanishmonthname} +% Danish month names. +% \begin{macrocode} +\newcommand*{\DTMdanishmonthname}[1]{% + \ifcase#1 + \or + januar% + \or + februar% + \or + marts% + \or + april% + \or + maj% + \or + juni% + \or + juli% + \or + august% + \or + september% + \or + oktober% + \or + november% + \or + december% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdanishMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMdanishMonthname}[1]{% + \ifcase#1 + \or + Januar% + \or + Februar% + \or + Marts% + \or + April% + \or + Maj% + \or + Juni% + \or + Juli% + \or + August% + \or + September% + \or + Oktober% + \or + November% + \or + December% + \fi +} +% \end{macrocode} +%\end{macro} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +% +%\begin{macro}{\DTMdanishweekdayname} +% Danish day of week names. +% \begin{macrocode} +\newcommand*{\DTMdanishweekdayname}[1]{% + \ifcase#1 + mandag% + \or + tirsdag% + \or + onsdag% + \or + torsdag% + \or + fredag% + \or + lørdag% + \or + søndag% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdanishWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMdanishWeekdayname}[1]{% + \ifcase#1 + Mandag% + \or + Tirsdag% + \or + Onsdag% + \or + Torsdag% + \or + Fredag% + \or + Lørdag% + \or + Søndag% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*datetime2-danish-ascii.ldf> +% \end{macrocode} +%\fi +%\subsection{ASCII} +%This file contains the settings that use \LaTeX\ commands for +%non-ASCII characters. This should be input if neither XeLaTeX nor +%LuaLaTeX are used. Even if the user has loaded \sty{inputenc} with +%"utf8", this file should still be used not the +%\texttt{datetime2-danish-utf8.ldf} file as the non-ASCII +%characters are made active in that situation and would need +%protecting against expansion. +%\changes{1.0}{2015-03-30}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{danish-ascii}[2015/03/30 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMdanishordinal} +% \begin{macrocode} +\newcommand*{\DTMdanishordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdanishmonthname} +% Danish month names. +% \begin{macrocode} +\newcommand*{\DTMdanishmonthname}[1]{% + \ifcase#1 + \or + januar% + \or + februar% + \or + marts% + \or + april% + \or + maj% + \or + juni% + \or + juli% + \or + august% + \or + september% + \or + oktober% + \or + november% + \or + december% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdanishMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMdanishMonthname}[1]{% + \ifcase#1 + \or + Januar% + \or + Februar% + \or + Marts% + \or + April% + \or + Maj% + \or + Juni% + \or + Juli% + \or + August% + \or + September% + \or + Oktober% + \or + November% + \or + December% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdanishweekdayname} +% Danish day of week names. +% \begin{macrocode} +\newcommand*{\DTMdanishweekdayname}[1]{% + \ifcase#1 + mandag% + \or + tirsdag% + \or + onsdag% + \or + torsdag% + \or + fredag% + \or + l\protect\o rdag% + \or + s\protect\o ndag% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdanishWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMdanishWeekdayname}[1]{% + \ifcase#1 + Mandag% + \or + Tirsdag% + \or + Onsdag% + \or + Torsdag% + \or + Fredag% + \or + L\protect\o rdag% + \or + S\protect\o ndag% + \fi +} +% \end{macrocode} +%\end{macro} +% +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Danish Module (\texttt{datetime2-danish.ldf})} +%\changes{1.0}{2015-03-30}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-danish.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{danish}[2015/03/30 v1.0] +% \end{macrocode} +% Need to find out if XeTeX or LuaTeX are being used. +% \begin{macrocode} +\RequirePackage{ifxetex,ifluatex} +% \end{macrocode} +% XeTeX and LuaTeX natively support UTF-8, so load +% \texttt{danish-utf8} if either of those engines are used +% otherwise load \texttt{danish-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{danish-utf8} +\else + \ifluatex + \RequireDateTimeModule{danish-utf8} + \else + \RequireDateTimeModule{danish-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{danish} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. For +% example, if a 12 hour style similar to the "englishampm" (from the +% "english-base" module) is required. +% +% Allow the user a way of configuring the "danish" and +% "danish-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}{\DTMdanishdaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMdanishdaymonthsep}{\DTMtexorpdfstring{\protect~}{\space}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdanishmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMdanishmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdanishdatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMdanishdatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdanishtimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMdanishtimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdanishdatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMdanishdatesep}{-} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdanishtimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMdanishtimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{danish}{daymonthsep}{\renewcommand*{\DTMdanishdaymonthsep}{#1}} +\DTMdefkey{danish}{monthyearsep}{\renewcommand*{\DTMdanishmonthyearsep}{#1}} +\DTMdefkey{danish}{datetimesep}{\renewcommand*{\DTMdanishdatetimesep}{#1}} +\DTMdefkey{danish}{timezonesep}{\renewcommand*{\DTMdanishtimezonesep}{#1}} +\DTMdefkey{danish}{datesep}{\renewcommand*{\DTMdanishdatesep}{#1}} +\DTMdefkey{danish}{timesep}{\renewcommand*{\DTMdanishtimesep}{#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 determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{danish}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{danish}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{danish}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{danish}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{danish}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{danish}{showyear}{true} +% \end{macrocode} +% +% Define the "danish" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {danish}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{danish}{showdayofmonth} + {\DTMdanishordinal{##3}\DTMdanishdaymonthsep}% + {}% + \DTMdanishmonthname{##2}% + \DTMifbool{danish}{showyear}% + {% + \DTMdanishmonthyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{danish}{showdayofmonth} + {% + \DTMdanishordinal{##3}\DTMdanishdaymonthsep + \DTMdanishmonthname{##2}% + }% + {% + \DTMdanishMonthname{##2}% + }% + \DTMifbool{danish}{showyear}% + {% + \DTMdanishmonthyearsep + \number##1 + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMdanishzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{danish}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMdanishtimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMdanishdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMdanishtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMdanishdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMdanishtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {danish-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{danish}{showdayofmonth}% + {% + \number##3 % space intended + \DTMdanishdatesep + }% + {}% + \number##2 % space intended + \DTMifbool{danish}{showyear}% + {% + \DTMdanishdatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMdanishtimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMdanishtimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMdanishzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{danish}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMdanishtimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMdanishdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMdanishtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMdanishzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. +% \begin{macrocode} +\newcommand*{\DTMdanishzonemaps}{% + \DTMdefzonemap{01}{00}{CET}% + \DTMdefzonemap{02}{00}{CEST}% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{danish}} +{\DTMsetstyle{danish-numeric}} +% \end{macrocode} +% +% Redefine \cs{datedanish} (or \cs{date}\meta{dialect}) to prevent +% \sty{babel} from resetting \cs{today}. (For this to work, +% \sty{babel} must already have been loaded if it's required.) +% \begin{macrocode} +\ifcsundef{date\CurrentTrackedDialect} +{% + \ifundef\datedanish + {% do nothing + }% + {% + \def\datedanish{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{danish}}% + {\DTMsetstyle{danish-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{danish}}% + {\DTMsetstyle{danish-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-danish/datetime2-danish.ins b/Master/texmf-dist/source/latex/datetime2-danish/datetime2-danish.ins new file mode 100644 index 00000000000..9b9098ab473 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-danish/datetime2-danish.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-danish.dtx + Copyright 2015 Nicola Talbot + + 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. + 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 consists of the files datetime2-danish.dtx and + datetime2-danish.ins and the derived files + datetime2-danish-utf8.ldf, datetime2-danish-ascii.ldf and + datetime2-danish.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-danish-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-danish.dtx}{datetime2-danish-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-danish-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-danish.dtx}{datetime2-danish-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-danish.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-danish.dtx}{datetime2-danish.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-dutch/datetime2-dutch.dtx b/Master/texmf-dist/source/latex/datetime2-dutch/datetime2-dutch.dtx new file mode 100644 index 00000000000..1d38e4c18af --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-dutch/datetime2-dutch.dtx @@ -0,0 +1,582 @@ +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2015 Nicola Talbot, all rights reserved. +% (New maintainer add relevant lines here.) +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\usepackage{alltt} +\usepackage{graphicx} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={datetime2.sty Dutch Module}]{hyperref} + + +\CheckSum{246} + +\renewcommand*{\usage}[1]{\hyperpage{#1}} +\renewcommand*{\main}[1]{\hyperpage{#1}} +\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} +\setcounter{IndexColumns}{2} + +\newcommand*{\sty}[1]{\textsf{#1}} +\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} + +\RecordChanges +\PageIndex +\CodelineNumbered + +\begin{document} +\DocInput{datetime2-dutch.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Dutch Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-29 (v1.0)} +%\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 Dutch language module for the \sty{datetime2} +%package. If you want to use the settings in this module you must +%install it in addition to installing \sty{datetime2}. If you use +%\sty{babel} or \sty{polyglossia}, you will need this module to +%prevent them from redefining \cs{today}. The \sty{datetime2} +% \opt{useregional} setting must be set to "text" or "numeric" +% for the language styles to be set. +% Alternatively, you can set the style in the document using +% \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} +% depending on the value of the \opt{useregional} setting. +%\end{abstract} +% +%I've copied the date style from \texttt{babel-dutch}'s \cs{today}. +% +%I don't know if these settings are correct. +%In particular, I don't know if the "dutch" 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-dutch.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%At the moment there is only the one ".ldf" file. +% +%\subsection{Main Dutch Module (\texttt{datetime2-dutch.ldf})} +%\changes{1.0}{2015-03-29}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-dutch.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{dutch}[2015/03/29 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMdutchordinal} +% I don't know if this is correct, but it's provided in case +% a suffix is required. +% \begin{macrocode} +\newcommand*{\DTMdutchordinal}[1]{% + \number#1 % space intended +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdutchmonthname} +% Dutch month names. +% \begin{macrocode} +\newcommand*{\DTMdutchmonthname}[1]{% + \ifcase#1 + \or + januari% + \or + februari% + \or + maart% + \or + april% + \or + mei% + \or + juni% + \or + juli% + \or + augustus% + \or + september% + \or + oktober% + \or + november% + \or + december% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdutchMonthname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMdutchMonthname}[1]{% + \ifcase#1 + \or + Januari% + \or + Februari% + \or + Maart% + \or + April% + \or + Mei% + \or + Juni% + \or + Juli% + \or + Augustus% + \or + September% + \or + Oktober% + \or + November% + \or + December% + \fi +} +% \end{macrocode} +%\end{macro} +% +% Week day names are provided but currently not used in the date style. +% +%\begin{macro}{\DTMdutchweekdayname} +% Dutch day of week names. +% \begin{macrocode} +\newcommand*{\DTMdutchweekdayname}[1]{% + \ifcase#1 + maandag% + \or + dinsdag% + \or + woensdag% + \or + donderdag% + \or + vrijdag% + \or + zaterdag% + \or + zondag% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdutchWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMdutchWeekdayname}[1]{% + \ifcase#1 + Maandag% + \or + Dinsdag% + \or + Woensdag% + \or + Donderdag% + \or + Vrijdag% + \or + Zaterdag% + \or + Zondag% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdutchshortweekdayname} +% Abbreviated day of week names. +% \begin{macrocode} +\newcommand*{\DTMdutchshortweekdayname}[1]{% + \ifcase#1 + ma% + \or + di% + \or + wo% + \or + do% + \or + vr% + \or + za% + \or + zo% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdutchshortWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMdutchshortWeekdayname}[1]{% + \ifcase#1 + Ma% + \or + Di% + \or + Wo% + \or + Do% + \or + Vr% + \or + Za% + \or + Zo% + \fi +} +% \end{macrocode} +%\end{macro} +% +% Define the \texttt{dutch} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. For +% example, if a 12 hour style similar to the "englishampm" (from the +% "english-base" module) is required. +% +% Allow the user a way of configuring the "dutch" and +% "dutch-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}{\DTMdutchdaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMdutchdaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdutchmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMdutchmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdutchdatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMdutchdatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdutchtimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMdutchtimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdutchdatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMdutchdatesep}{-} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMdutchtimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMdutchtimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{dutch}{daymonthsep}{\renewcommand*{\DTMdutchdaymonthsep}{#1}} +\DTMdefkey{dutch}{monthyearsep}{\renewcommand*{\DTMdutchmonthyearsep}{#1}} +\DTMdefkey{dutch}{datetimesep}{\renewcommand*{\DTMdutchdatetimesep}{#1}} +\DTMdefkey{dutch}{timezonesep}{\renewcommand*{\DTMdutchtimezonesep}{#1}} +\DTMdefkey{dutch}{datesep}{\renewcommand*{\DTMdutchdatesep}{#1}} +\DTMdefkey{dutch}{timesep}{\renewcommand*{\DTMdutchtimesep}{#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 determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{dutch}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{dutch}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{dutch}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{dutch}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{dutch}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{dutch}{showyear}{true} +% \end{macrocode} +% +% Define the "dutch" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {dutch}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{dutch}{showdayofmonth} + {\DTMdutchordinal{##3}\DTMdutchdaymonthsep}% + {}% + \DTMdutchmonthname{##2}% + \DTMifbool{dutch}{showyear}% + {% + \DTMdutchmonthyearsep + \number##1 % space intended + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{dutch}{showdayofmonth} + {% + \DTMdutchordinal{##3}\DTMdutchdaymonthsep + \DTMdutchmonthname{##2}% + }% + {% + \DTMdutchMonthname{##2}% + }% + \DTMifbool{dutch}{showyear}% + {% + \DTMdutchmonthyearsep + \number##1 % space intended + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMdutchzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{dutch}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMdutchtimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMdutchdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMdutchtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMdutchdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMdutchtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {dutch-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{dutch}{showdayofmonth}% + {% + \number##3 % space intended + \DTMdutchdatesep + }% + {}% + \number##2 % space intended + \DTMifbool{dutch}{showyear}% + {% + \DTMdutchdatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMdutchtimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMdutchtimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMdutchzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{dutch}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMdutchtimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMdutchdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMdutchtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMdutchzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. +% \begin{macrocode} +\newcommand*{\DTMdutchzonemaps}{% + \DTMdefzonemap{01}{00}{CET}% + \DTMdefzonemap{02}{00}{CEST}% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{dutch}} +{\DTMsetstyle{dutch-numeric}} +% \end{macrocode} +% +% Redefine \cs{datedutch} (or \cs{date}\meta{dialect}) to prevent +% \sty{babel} from resetting \cs{today}. (For this to work, +% \sty{babel} must already have been loaded if it's required.) +% \begin{macrocode} +\ifcsundef{date\CurrentTrackedDialect} +{% + \ifundef\datedutch + {% do nothing + }% + {% + \def\datedutch{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{dutch}}% + {\DTMsetstyle{dutch-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{dutch}}% + {\DTMsetstyle{dutch-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-dutch/datetime2-dutch.ins b/Master/texmf-dist/source/latex/datetime2-dutch/datetime2-dutch.ins new file mode 100644 index 00000000000..210944cc921 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-dutch/datetime2-dutch.ins @@ -0,0 +1,38 @@ +\input docstrip + +\preamble + + datetime2-dutch.dtx + Copyright 2015 Nicola Talbot + + 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. + 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 consists of the files datetime2-dutch.dtx and + datetime2-dutch.ins and the derived file + datetime2-dutch.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-dutch.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-dutch.dtx}{datetime2-dutch.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-esperanto/datetime2-esperanto.dtx b/Master/texmf-dist/source/latex/datetime2-esperanto/datetime2-esperanto.dtx new file mode 100644 index 00000000000..2a85e254f42 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-esperanto/datetime2-esperanto.dtx @@ -0,0 +1,632 @@ +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2015 Nicola Talbot, all rights reserved. +% (New maintainer add relevant lines here.) +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\usepackage{alltt} +\usepackage{graphicx} +\usepackage{fontspec} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={datetime2.sty Esperanto Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{258} + +\renewcommand*{\usage}[1]{\hyperpage{#1}} +\renewcommand*{\main}[1]{\hyperpage{#1}} +\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} +\setcounter{IndexColumns}{2} + +\newcommand*{\sty}[1]{\textsf{#1}} +\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} + +\RecordChanges +\PageIndex +\CodelineNumbered + +\begin{document} +\DocInput{datetime2-esperanto.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Esperanto Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-30 (v1.0)} +%\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 Esperanto language module for the \sty{datetime2} +%package. If you want to use the settings in this module you must +%install it in addition to installing \sty{datetime2}. If you use +%\sty{babel} or \sty{polyglossia}, you will need this module to +%prevent them from redefining \cs{today}. The \sty{datetime2} +% \opt{useregional} setting must be set to "text" or "numeric" +% for the language styles to be set. +% Alternatively, you can set the style in the document using +% \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} +% depending on the value of the \opt{useregional} setting. +%\end{abstract} +% +%I've copied the date style from \texttt{babel-esperanto}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Esperanto. +%In particular, I don't know if the "esperanto" 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-esperanto.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%\iffalse +% \begin{macrocode} +%<*datetime2-esperanto-utf8.ldf> +% \end{macrocode} +%\fi +%\subsection{UTF-8} +%This file contains the settings that use UTF-8 characters. This +%file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure +%your text editor is set to UTF-8 if you want to view this code. +%\changes{1.0}{2015-03-30}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{esperanto-utf8}[2015/03/30 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMesperantoordinal} +% \begin{macrocode} +\newcommand*{\DTMesperantoordinal}[1]{% + \number#1–a% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\DTMesperantomonthname} +% Esperanto month names. +% \begin{macrocode} +\newcommand*{\DTMesperantomonthname}[1]{% + \ifcase#1 + \or + januaro% + \or + februaro% + \or + marto% + \or + aprilo% + \or + majo% + \or + junio% + \or + julio% + \or + aŭgusto% + \or + septembro% + \or + oktobro% + \or + novembro% + \or + decembro% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMesperantoMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMesperantoMonthname}[1]{% + \ifcase#1 + \or + Januaro% + \or + Februaro% + \or + Marto% + \or + Aprilo% + \or + Majo% + \or + Junio% + \or + Julio% + \or + Aŭgusto% + \or + Septembro% + \or + Oktobro% + \or + Novembro% + \or + Decembro% + \fi +} +% \end{macrocode} +%\end{macro} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*datetime2-esperanto-ascii.ldf> +% \end{macrocode} +%\fi +%\subsection{ASCII} +%This file contains the settings that use \LaTeX\ commands for +%non-ASCII characters. This should be input if neither XeLaTeX nor +%LuaLaTeX are used. Even if the user has loaded \sty{inputenc} with +%"utf8", this file should still be used not the +%\texttt{datetime2-esperanto-utf8.ldf} file as the non-ASCII +%characters are made active in that situation and would need +%protecting against expansion. +%\changes{1.0}{2015-03-30}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{esperanto-ascii}[2015/03/30 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMesperantoordinal} +% \begin{macrocode} +\newcommand*{\DTMesperantoordinal}[1]{% + \number#1--a% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMesperantomonthname} +% Esperanto month names. +% \begin{macrocode} +\newcommand*{\DTMesperantomonthname}[1]{% + \ifcase#1 + \or + januaro% + \or + februaro% + \or + marto% + \or + aprilo% + \or + majo% + \or + junio% + \or + julio% + \or + a\protect\u{u}gusto% + \or + septembro% + \or + oktobro% + \or + novembro% + \or + decembro% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMesperantoMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMesperantoMonthname}[1]{% + \ifcase#1 + \or + Januaro% + \or + Februaro% + \or + Marto% + \or + Aprilo% + \or + Majo% + \or + Junio% + \or + Julio% + \or + A\protect\u{u}gusto% + \or + Septembro% + \or + Oktobro% + \or + Novembro% + \or + Decembro% + \fi +} +% \end{macrocode} +%\end{macro} +% +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Esperanto Module (\texttt{datetime2-esperanto.ldf})} +%\changes{1.0}{2015-03-30}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-esperanto.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{esperanto}[2015/03/30 v1.0] +% \end{macrocode} +% Need to find out if XeTeX or LuaTeX are being used. +% \begin{macrocode} +\RequirePackage{ifxetex,ifluatex} +% \end{macrocode} +% XeTeX and LuaTeX natively support UTF-8, so load +% \texttt{esperanto-utf8} if either of those engines are used +% otherwise load \texttt{esperanto-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{esperanto-utf8} +\else + \ifluatex + \RequireDateTimeModule{esperanto-utf8} + \else + \RequireDateTimeModule{esperanto-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{esperanto} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. For +% example, if a 12 hour style similar to the "englishampm" (from the +% "english-base" module) is required. +% +% Allow the user a way of configuring the "esperanto" and +% "esperanto-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}{\DTMesperantodaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMesperantodaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}% + de% + \DTMtexorpdfstring{\protect~}{\space}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMesperantomonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMesperantomonthyearsep}{,\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMesperantodatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMesperantodatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMesperantotimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMesperantotimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMesperantodatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMesperantodatesep}{-} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMesperantotimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMesperantotimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{esperanto}{daymonthsep}{\renewcommand*{\DTMesperantodaymonthsep}{#1}} +\DTMdefkey{esperanto}{monthyearsep}{\renewcommand*{\DTMesperantomonthyearsep}{#1}} +\DTMdefkey{esperanto}{datetimesep}{\renewcommand*{\DTMesperantodatetimesep}{#1}} +\DTMdefkey{esperanto}{timezonesep}{\renewcommand*{\DTMesperantotimezonesep}{#1}} +\DTMdefkey{esperanto}{datesep}{\renewcommand*{\DTMesperantodatesep}{#1}} +\DTMdefkey{esperanto}{timesep}{\renewcommand*{\DTMesperantotimesep}{#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 determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{esperanto}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{esperanto}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{esperanto}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{esperanto}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{esperanto}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{esperanto}{showyear}{true} +% \end{macrocode} +% +% Define the "esperanto" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {esperanto}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{esperanto}{showdayofmonth} + {\DTMesperantoordinal{##3}\DTMesperantodaymonthsep}% + {}% + \DTMesperantomonthname{##2}% + \DTMifbool{esperanto}{showyear}% + {% + \DTMesperantomonthyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{esperanto}{showdayofmonth} + {% + \DTMesperantoordinal{##3}\DTMesperantodaymonthsep + \DTMesperantomonthname{##2}% + }% + {% + \DTMesperantoMonthname{##2}% + }% + \DTMifbool{esperanto}{showyear}% + {% + \DTMesperantomonthyearsep + \number##1 + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMesperantozonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{esperanto}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMesperantotimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMesperantodatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMesperantotimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMesperantodatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMesperantotimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {esperanto-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{esperanto}{showdayofmonth}% + {% + \number##3 % space intended + \DTMesperantodatesep + }% + {}% + \number##2 % space intended + \DTMifbool{esperanto}{showyear}% + {% + \DTMesperantodatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMesperantotimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMesperantotimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMesperantozonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{esperanto}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMesperantotimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMesperantodatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMesperantotimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMesperantozonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. No default mappings are provided at the moment. +% \begin{macrocode} +\newcommand*{\DTMesperantozonemaps}{% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{esperanto}} +{\DTMsetstyle{esperanto-numeric}} +% \end{macrocode} +% +% Redefine \cs{dateesperanto} (or \cs{date}\meta{dialect}) to prevent +% \sty{babel} from resetting \cs{today}. (For this to work, +% \sty{babel} must already have been loaded if it's required.) +% \begin{macrocode} +\ifcsundef{date\CurrentTrackedDialect} +{% + \ifundef\dateesperanto + {% do nothing + }% + {% + \def\dateesperanto{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{esperanto}}% + {\DTMsetstyle{esperanto-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{esperanto}}% + {\DTMsetstyle{esperanto-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-esperanto/datetime2-esperanto.ins b/Master/texmf-dist/source/latex/datetime2-esperanto/datetime2-esperanto.ins new file mode 100644 index 00000000000..4d199abcb01 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-esperanto/datetime2-esperanto.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-esperanto.dtx + Copyright 2015 Nicola Talbot + + 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. + 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 consists of the files datetime2-esperanto.dtx and + datetime2-esperanto.ins and the derived files + datetime2-esperanto-utf8.ldf, datetime2-esperanto-ascii.ldf and + datetime2-esperanto.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-esperanto-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-esperanto.dtx}{datetime2-esperanto-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-esperanto-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-esperanto.dtx}{datetime2-esperanto-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-esperanto.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-esperanto.dtx}{datetime2-esperanto.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-estonian/datetime2-estonian.dtx b/Master/texmf-dist/source/latex/datetime2-estonian/datetime2-estonian.dtx new file mode 100644 index 00000000000..87449527f26 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-estonian/datetime2-estonian.dtx @@ -0,0 +1,645 @@ +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2015 Nicola Talbot, all rights reserved. +% (New maintainer add relevant lines here.) +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\usepackage{alltt} +\usepackage{graphicx} +\usepackage{fontspec} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={datetime2.sty Estonian Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{265} + +\renewcommand*{\usage}[1]{\hyperpage{#1}} +\renewcommand*{\main}[1]{\hyperpage{#1}} +\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} +\setcounter{IndexColumns}{2} + +\newcommand*{\sty}[1]{\textsf{#1}} +\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} + +\RecordChanges +\PageIndex +\CodelineNumbered + +\begin{document} +\DocInput{datetime2-estonian.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Estonian Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-30 (v1.0)} +%\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 Estonian language module for the \sty{datetime2} +%package. If you want to use the settings in this module you must +%install it in addition to installing \sty{datetime2}. If you use +%\sty{babel} or \sty{polyglossia}, you will need this module to +%prevent them from redefining \cs{today}. The \sty{datetime2} +% \opt{useregional} setting must be set to "text" or "numeric" +% for the language styles to be set. +% Alternatively, you can set the style in the document using +% \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} +% depending on the value of the \opt{useregional} setting. +%\end{abstract} +% +%I've copied the date style from \texttt{babel-estonian}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Estonian. +%In particular, I don't know if the "estonian" 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-estonian.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%\iffalse +% \begin{macrocode} +%<*datetime2-estonian-utf8.ldf> +% \end{macrocode} +%\fi +%\subsection{UTF-8} +%This file contains the settings that use UTF-8 characters. This +%file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure +%your text editor is set to UTF-8 if you want to view this code. +%\changes{1.0}{2015-03-30}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{estonian-utf8}[2015/03/30 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMestonianordinal} +% \begin{macrocode} +\newcommand*{\DTMestonianordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMestonianyear} +% \begin{macrocode} +\newcommand*{\DTMestonianyear}[1]{% + \number#1.\space a.% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\DTMestonianmonthname} +% Estonian month names. +% \begin{macrocode} +\newcommand*{\DTMestonianmonthname}[1]{% + \ifcase#1 + \or + jaanuar% + \or + veebruar% + \or + mäarts% + \or + aprill% + \or + mai% + \or + juuni% + \or + juuli% + \or + august% + \or + september% + \or + oktoober% + \or + november% + \or + detsember% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMestonianMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMestonianMonthname}[1]{% + \ifcase#1 + \or + Jaanuar% + \or + Veebruar% + \or + Mäarts% + \or + Aprill% + \or + Mai% + \or + Juuni% + \or + Juuli% + \or + August% + \or + September% + \or + Oktoober% + \or + November% + \or + Detsember% + \fi +} +% \end{macrocode} +%\end{macro} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*datetime2-estonian-ascii.ldf> +% \end{macrocode} +%\fi +%\subsection{ASCII} +%This file contains the settings that use \LaTeX\ commands for +%non-ASCII characters. This should be input if neither XeLaTeX nor +%LuaLaTeX are used. Even if the user has loaded \sty{inputenc} with +%"utf8", this file should still be used not the +%\texttt{datetime2-estonian-utf8.ldf} file as the non-ASCII +%characters are made active in that situation and would need +%protecting against expansion. +%\changes{1.0}{2015-03-30}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{estonian-ascii}[2015/03/30 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMestonianordinal} +% \begin{macrocode} +\newcommand*{\DTMestonianordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMestonianyear} +% \begin{macrocode} +\newcommand*{\DTMestonianyear}[1]{% + \number#1.\space a.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMestonianmonthname} +% Estonian month names. +% \begin{macrocode} +\newcommand*{\DTMestonianmonthname}[1]{% + \ifcase#1 + \or + jaanuar% + \or + veebruar% + \or + m\protect\"arts% + \or + aprill% + \or + mai% + \or + juuni% + \or + juuli% + \or + august% + \or + september% + \or + oktoober% + \or + november% + \or + detsember% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMestonianMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMestonianMonthname}[1]{% + \ifcase#1 + \or + Jaanuar% + \or + Veebruar% + \or + M\protect\"arts% + \or + Aprill% + \or + Mai% + \or + Juuni% + \or + Juuli% + \or + August% + \or + September% + \or + Oktoober% + \or + November% + \or + Detsember% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Estonian Module (\texttt{datetime2-estonian.ldf})} +%\changes{1.0}{2015-03-30}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-estonian.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{estonian}[2015/03/30 v1.0] +% \end{macrocode} +% Need to find out if XeTeX or LuaTeX are being used. +% \begin{macrocode} +\RequirePackage{ifxetex,ifluatex} +% \end{macrocode} +% XeTeX and LuaTeX natively support UTF-8, so load +% \texttt{estonian-utf8} if either of those engines are used +% otherwise load \texttt{estonian-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{estonian-utf8} +\else + \ifluatex + \RequireDateTimeModule{estonian-utf8} + \else + \RequireDateTimeModule{estonian-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{estonian} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. For +% example, if a 12 hour style similar to the "englishampm" (from the +% "english-base" module) is required. +% +% Allow the user a way of configuring the "estonian" and +% "estonian-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}{\DTMestoniandaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMestoniandaymonthsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMestonianmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMestonianmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMestoniandatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMestoniandatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMestoniantimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMestoniantimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMestoniandatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMestoniandatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMestoniantimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMestoniantimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{estonian}{daymonthsep}{\renewcommand*{\DTMestoniandaymonthsep}{#1}} +\DTMdefkey{estonian}{monthyearsep}{\renewcommand*{\DTMestonianmonthyearsep}{#1}} +\DTMdefkey{estonian}{datetimesep}{\renewcommand*{\DTMestoniandatetimesep}{#1}} +\DTMdefkey{estonian}{timezonesep}{\renewcommand*{\DTMestoniantimezonesep}{#1}} +\DTMdefkey{estonian}{datesep}{\renewcommand*{\DTMestoniandatesep}{#1}} +\DTMdefkey{estonian}{timesep}{\renewcommand*{\DTMestoniantimesep}{#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 determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{estonian}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{estonian}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{estonian}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{estonian}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{estonian}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{estonian}{showyear}{true} +% \end{macrocode} +% +% Define the "estonian" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {estonian}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{estonian}{showdayofmonth} + {\DTMestonianordinal{##3}\DTMestoniandaymonthsep}% + {}% + \DTMestonianmonthname{##2}% + \DTMifbool{estonian}{showyear}% + {% + \DTMestonianmonthyearsep + \DTMestonianyear{\number##1}% + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{estonian}{showdayofmonth} + {% + \DTMestonianordinal{##3}\DTMestoniandaymonthsep + \DTMestonianmonthname{##2}% + }% + {% + \DTMestonianMonthname{##2}% + }% + \DTMifbool{estonian}{showyear}% + {% + \DTMestonianmonthyearsep + \DTMestonianyear{\number##1}% + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMestonianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{estonian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMestoniantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMestoniandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMestoniantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMestoniandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMestoniantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {estonian-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{estonian}{showdayofmonth}% + {% + \number##3 % space intended + \DTMestoniandatesep + }% + {}% + \number##2 % space intended + \DTMifbool{estonian}{showyear}% + {% + \DTMestoniandatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMestoniantimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMestoniantimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMestonianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{estonian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMestoniantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMestoniandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMestoniantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMestonianzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. No default mappings are provided at the moment. +% \begin{macrocode} +\newcommand*{\DTMestonianzonemaps}{% + \DTMdefzonemap{02}{00}{EET}% + \DTMdefzonemap{03}{00}{EEST}% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{estonian}} +{\DTMsetstyle{estonian-numeric}} +% \end{macrocode} +% +% Redefine \cs{dateestonian} (or \cs{date}\meta{dialect}) to prevent +% \sty{babel} from resetting \cs{today}. (For this to work, +% \sty{babel} must already have been loaded if it's required.) +% \begin{macrocode} +\ifcsundef{date\CurrentTrackedDialect} +{% + \ifundef\dateestonian + {% do nothing + }% + {% + \def\dateestonian{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{estonian}}% + {\DTMsetstyle{estonian-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{estonian}}% + {\DTMsetstyle{estonian-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-estonian/datetime2-estonian.ins b/Master/texmf-dist/source/latex/datetime2-estonian/datetime2-estonian.ins new file mode 100644 index 00000000000..8233e84e884 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-estonian/datetime2-estonian.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-estonian.dtx + Copyright 2015 Nicola Talbot + + 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. + 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 consists of the files datetime2-estonian.dtx and + datetime2-estonian.ins and the derived files + datetime2-estonian-utf8.ldf, datetime2-estonian-ascii.ldf and + datetime2-estonian.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-estonian-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-estonian.dtx}{datetime2-estonian-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-estonian-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-estonian.dtx}{datetime2-estonian-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-estonian.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-estonian.dtx}{datetime2-estonian.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-finnish/datetime2-finnish.dtx b/Master/texmf-dist/source/latex/datetime2-finnish/datetime2-finnish.dtx new file mode 100644 index 00000000000..43e54a8be16 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-finnish/datetime2-finnish.dtx @@ -0,0 +1,630 @@ +%\iffalse +%<*package> +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% +%\fi +% \iffalse +% Doc-Source file to use with LaTeX2e +% Copyright (C) 2015 Nicola Talbot, all rights reserved. +% (New maintainer add relevant lines here.) +% \fi +% \iffalse +%<*driver> +\documentclass{ltxdoc} + +\usepackage{alltt} +\usepackage{graphicx} +\usepackage{fontspec} +\usepackage[colorlinks, + bookmarks, + hyperindex=false, + pdfauthor={Nicola L.C. Talbot}, + pdftitle={datetime2.sty Finnish Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{261} + +\renewcommand*{\usage}[1]{\hyperpage{#1}} +\renewcommand*{\main}[1]{\hyperpage{#1}} +\IndexPrologue{\section*{\indexname}\markboth{\indexname}{\indexname}} +\setcounter{IndexColumns}{2} + +\newcommand*{\sty}[1]{\textsf{#1}} +\newcommand*{\opt}[1]{\texttt{#1}\index{#1=\texttt{#1}|main}} + +\RecordChanges +\PageIndex +\CodelineNumbered + +\begin{document} +\DocInput{datetime2-finnish.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Finnish Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-30 (v1.0)} +%\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 Finnish language module for the \sty{datetime2} +%package. If you want to use the settings in this module you must +%install it in addition to installing \sty{datetime2}. If you use +%\sty{babel} or \sty{polyglossia}, you will need this module to +%prevent them from redefining \cs{today}. The \sty{datetime2} +% \opt{useregional} setting must be set to "text" or "numeric" +% for the language styles to be set. +% Alternatively, you can set the style in the document using +% \cs{DTMsetstyle}, but this may be changed by \cs{date}\meta{language} +% depending on the value of the \opt{useregional} setting. +%\end{abstract} +% +%I've copied the date style from \texttt{babel-finnish}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Finnish. +%In particular, I don't know if the "finnish" 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-finnish.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%\iffalse +% \begin{macrocode} +%<*datetime2-finnish-utf8.ldf> +% \end{macrocode} +%\fi +%\subsection{UTF-8} +%This file contains the settings that use UTF-8 characters. This +%file is loaded if XeLaTeX or LuaLaTeX are used. Please make sure +%your text editor is set to UTF-8 if you want to view this code. +%\changes{1.0}{2015-03-30}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{finnish-utf8}[2015/03/30 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMfinnishordinal} +% \begin{macrocode} +\newcommand*{\DTMfinnishordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfinnishmonthname} +% Finnish month names. +% \begin{macrocode} +\newcommand*{\DTMfinnishmonthname}[1]{% + \ifcase#1 + \or + tammikuuta% + \or + helmikuuta% + \or + maaliskuuta% + \or + huhtikuuta% + \or + toukokuuta% + \or + kesäkuuta% + \or + heinäkuuta% + \or + elokuuta% + \or + syyskuuta% + \or + lokakuuta% + \or + marraskuuta% + \or + joulukuuta% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfinnishMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMfinnishMonthname}[1]{% + \ifcase#1 + \or + Tammikuuta% + \or + Helmikuuta% + \or + Maaliskuuta% + \or + Huhtikuuta% + \or + Toukokuuta% + \or + Kesäkuuta% + \or + Heinäkuuta% + \or + Elokuuta% + \or + Syyskuuta% + \or + Lokakuuta% + \or + Marraskuuta% + \or + Joulukuuta% + \fi +} +% \end{macrocode} +%\end{macro} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*datetime2-finnish-ascii.ldf> +% \end{macrocode} +%\fi +%\subsection{ASCII} +%This file contains the settings that use \LaTeX\ commands for +%non-ASCII characters. This should be input if neither XeLaTeX nor +%LuaLaTeX are used. Even if the user has loaded \sty{inputenc} with +%"utf8", this file should still be used not the +%\texttt{datetime2-finnish-utf8.ldf} file as the non-ASCII +%characters are made active in that situation and would need +%protecting against expansion. +%\changes{1.0}{2015-03-30}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{finnish-ascii}[2015/03/30 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMfinnishordinal} +% \begin{macrocode} +\newcommand*{\DTMfinnishordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfinnishmonthname} +% Finnish month names. +% \begin{macrocode} +\newcommand*{\DTMfinnishmonthname}[1]{% + \ifcase#1 + \or + tammikuuta% + \or + helmikuuta% + \or + maaliskuuta% + \or + huhtikuuta% + \or + toukokuuta% + \or + kes\protect\"akuuta% + \or + hein\protect\"akuuta% + \or + elokuuta% + \or + syyskuuta% + \or + lokakuuta% + \or + marraskuuta% + \or + joulukuuta% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfinnishMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMfinnishMonthname}[1]{% + \ifcase#1 + \or + Tammikuuta% + \or + Helmikuuta% + \or + Maaliskuuta% + \or + Huhtikuuta% + \or + Toukokuuta% + \or + Kes\protect\"akuuta% + \or + Hein\protect\"akuuta% + \or + Elokuuta% + \or + Syyskuuta% + \or + Lokakuuta% + \or + Marraskuuta% + \or + Joulukuuta% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Finnish Module (\texttt{datetime2-finnish.ldf})} +%\changes{1.0}{2015-03-30}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-finnish.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{finnish}[2015/03/30 v1.0] +% \end{macrocode} +% Need to find out if XeTeX or LuaTeX are being used. +% \begin{macrocode} +\RequirePackage{ifxetex,ifluatex} +% \end{macrocode} +% XeTeX and LuaTeX natively support UTF-8, so load +% \texttt{finnish-utf8} if either of those engines are used +% otherwise load \texttt{finnish-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{finnish-utf8} +\else + \ifluatex + \RequireDateTimeModule{finnish-utf8} + \else + \RequireDateTimeModule{finnish-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{finnish} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. For +% example, if a 12 hour style similar to the "englishampm" (from the +% "english-base" module) is required. +% +% Allow the user a way of configuring the "finnish" and +% "finnish-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}{\DTMfinnishdaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMfinnishdaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfinnishmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMfinnishmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfinnishdatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMfinnishdatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfinnishtimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMfinnishtimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfinnishdatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMfinnishdatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMfinnishtimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMfinnishtimesep}{.} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{finnish}{daymonthsep}{\renewcommand*{\DTMfinnishdaymonthsep}{#1}} +\DTMdefkey{finnish}{monthyearsep}{\renewcommand*{\DTMfinnishmonthyearsep}{#1}} +\DTMdefkey{finnish}{datetimesep}{\renewcommand*{\DTMfinnishdatetimesep}{#1}} +\DTMdefkey{finnish}{timezonesep}{\renewcommand*{\DTMfinnishtimezonesep}{#1}} +\DTMdefkey{finnish}{datesep}{\renewcommand*{\DTMfinnishdatesep}{#1}} +\DTMdefkey{finnish}{timesep}{\renewcommand*{\DTMfinnishtimesep}{#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 determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{finnish}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{finnish}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{finnish}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{finnish}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{finnish}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{finnish}{showyear}{true} +% \end{macrocode} +% +% Define the "finnish" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {finnish}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{finnish}{showdayofmonth} + {\DTMfinnishordinal{##3}\DTMfinnishdaymonthsep}% + {}% + \DTMfinnishmonthname{##2}% + \DTMifbool{finnish}{showyear}% + {% + \DTMfinnishmonthyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{finnish}{showdayofmonth} + {% + \DTMfinnishordinal{##3}\DTMfinnishdaymonthsep + \DTMfinnishmonthname{##2}% + }% + {% + \DTMfinnishMonthname{##2}% + }% + \DTMifbool{finnish}{showyear}% + {% + \DTMfinnishmonthyearsep + \number##1 + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMfinnishzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{finnish}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMfinnishtimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMfinnishdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMfinnishtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMfinnishdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMfinnishtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {finnish-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{finnish}{showdayofmonth}% + {% + \number##3 % space intended + \DTMfinnishdatesep + }% + {}% + \number##2 % space intended + \DTMifbool{finnish}{showyear}% + {% + \DTMfinnishdatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMfinnishtimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMfinnishtimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMfinnishzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{finnish}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMfinnishtimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMfinnishdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMfinnishtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMfinnishzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. No default mappings are provided at the moment. +% \begin{macrocode} +\newcommand*{\DTMfinnishzonemaps}{% + \DTMdefzonemap{02}{00}{EET}% + \DTMdefzonemap{03}{00}{EEST}% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{finnish}} +{\DTMsetstyle{finnish-numeric}} +% \end{macrocode} +% +% Redefine \cs{datefinnish} (or \cs{date}\meta{dialect}) to prevent +% \sty{babel} from resetting \cs{today}. (For this to work, +% \sty{babel} must already have been loaded if it's required.) +% \begin{macrocode} +\ifcsundef{date\CurrentTrackedDialect} +{% + \ifundef\datefinnish + {% do nothing + }% + {% + \def\datefinnish{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{finnish}}% + {\DTMsetstyle{finnish-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{finnish}}% + {\DTMsetstyle{finnish-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-finnish/datetime2-finnish.ins b/Master/texmf-dist/source/latex/datetime2-finnish/datetime2-finnish.ins new file mode 100644 index 00000000000..382a2c2ca16 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-finnish/datetime2-finnish.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-finnish.dtx + Copyright 2015 Nicola Talbot + + 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. + 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 consists of the files datetime2-finnish.dtx and + datetime2-finnish.ins and the derived files + datetime2-finnish-utf8.ldf, datetime2-finnish-ascii.ldf and + datetime2-finnish.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-finnish-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-finnish.dtx}{datetime2-finnish-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-finnish-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-finnish.dtx}{datetime2-finnish-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-finnish.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-finnish.dtx}{datetime2-finnish.ldf,package}% + }% +} + +\endbatchfile + -- cgit v1.2.3