From 8d5ac97d04669f4d0d108242397dfbf809eeb185 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 31 Mar 2015 21:57:53 +0000 Subject: datetime2-* (31mar15) git-svn-id: svn://tug.org/texlive/trunk@36692 c570f23f-e606-0410-a88d-b1316a301751 --- .../datetime2-galician/datetime2-galician.dtx | 636 +++++++++++++++++ .../datetime2-galician/datetime2-galician.ins | 61 ++ .../latex/datetime2-greek/datetime2-greek.dtx | 538 ++++++++++++++ .../latex/datetime2-greek/datetime2-greek.ins | 61 ++ .../latex/datetime2-hebrew/datetime2-hebrew.dtx | 360 ++++++++++ .../latex/datetime2-hebrew/datetime2-hebrew.ins | 38 + .../datetime2-icelandic/datetime2-icelandic.dtx | 631 ++++++++++++++++ .../datetime2-icelandic/datetime2-icelandic.ins | 61 ++ .../latex/datetime2-latin/datetime2-latin.dtx | 500 +++++++++++++ .../latex/datetime2-latin/datetime2-latin.ins | 38 + .../datetime2-lsorbian/datetime2-lsorbian.dtx | 792 +++++++++++++++++++++ .../datetime2-lsorbian/datetime2-lsorbian.ins | 61 ++ .../latex/datetime2-magyar/datetime2-magyar.dtx | 646 +++++++++++++++++ .../latex/datetime2-magyar/datetime2-magyar.ins | 61 ++ .../latex/datetime2-norsk/datetime2-norsk.dtx | 723 +++++++++++++++++++ .../latex/datetime2-norsk/datetime2-norsk.ins | 61 ++ .../latex/datetime2-polish/datetime2-polish.dtx | 723 +++++++++++++++++++ .../latex/datetime2-polish/datetime2-polish.ins | 61 ++ .../datetime2-romanian/datetime2-romanian.dtx | 723 +++++++++++++++++++ .../datetime2-romanian/datetime2-romanian.ins | 61 ++ .../latex/datetime2-russian/datetime2-russian.dtx | 640 +++++++++++++++++ .../latex/datetime2-russian/datetime2-russian.ins | 61 ++ .../latex/datetime2-samin/datetime2-samin.dtx | 631 ++++++++++++++++ .../latex/datetime2-samin/datetime2-samin.ins | 61 ++ 24 files changed, 8229 insertions(+) create mode 100644 Master/texmf-dist/source/latex/datetime2-galician/datetime2-galician.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-galician/datetime2-galician.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-greek/datetime2-greek.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-greek/datetime2-greek.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-hebrew/datetime2-hebrew.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-hebrew/datetime2-hebrew.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-icelandic/datetime2-icelandic.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-icelandic/datetime2-icelandic.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-latin/datetime2-latin.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-latin/datetime2-latin.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-lsorbian/datetime2-lsorbian.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-lsorbian/datetime2-lsorbian.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-magyar/datetime2-magyar.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-magyar/datetime2-magyar.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-norsk/datetime2-norsk.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-norsk/datetime2-norsk.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-polish/datetime2-polish.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-polish/datetime2-polish.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-romanian/datetime2-romanian.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-romanian/datetime2-romanian.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-russian/datetime2-russian.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-russian/datetime2-russian.ins create mode 100644 Master/texmf-dist/source/latex/datetime2-samin/datetime2-samin.dtx create mode 100644 Master/texmf-dist/source/latex/datetime2-samin/datetime2-samin.ins (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/datetime2-galician/datetime2-galician.dtx b/Master/texmf-dist/source/latex/datetime2-galician/datetime2-galician.dtx new file mode 100644 index 00000000000..45d58b939ba --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-galician/datetime2-galician.dtx @@ -0,0 +1,636 @@ +%\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 Galician 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-galician.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Galician 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 Galician 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-galician}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Galician. +%In particular, I don't know if the "galician" 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-galician.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-galician-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{galician-utf8}[2015/03/30 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMgalicianordinal} +% \begin{macrocode} +\newcommand*{\DTMgalicianordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\DTMgalicianmonthname} +% Galician month names. +% \begin{macrocode} +\newcommand*{\DTMgalicianmonthname}[1]{% + \ifcase#1 + \or + xaneiro% + \or + febreiro% + \or + marzo% + \or + abril% + \or + maio% + \or + xuño% + \or + xullo% + \or + agosto% + \or + setembro% + \or + outubro% + \or + novembro% + \or + decembro% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgalicianMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMgalicianMonthname}[1]{% + \ifcase#1 + \or + Xaneiro% + \or + Febreiro% + \or + Marzo% + \or + Abril% + \or + Maio% + \or + Xuño% + \or + Xullo% + \or + Agosto% + \or + Setembro% + \or + Outubro% + \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-galician-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-galician-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{galician-ascii}[2015/03/30 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMgalicianordinal} +% \begin{macrocode} +\newcommand*{\DTMgalicianordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgalicianmonthname} +% Galician month names. +% \begin{macrocode} +\newcommand*{\DTMgalicianmonthname}[1]{% + \ifcase#1 + \or + xaneiro% + \or + febreiro% + \or + marzo% + \or + abril% + \or + maio% + \or + xu\protect\~no% + \or + xullo% + \or + agosto% + \or + setembro% + \or + outubro% + \or + novembro% + \or + decembro% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgalicianMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMgalicianMonthname}[1]{% + \ifcase#1 + \or + Xaneiro% + \or + Febreiro% + \or + Marzo% + \or + Abril% + \or + Maio% + \or + Xu\protect\~no% + \or + Xullo% + \or + Agosto% + \or + Setembro% + \or + Outubro% + \or + Novembro% + \or + Decembro% + \fi +} +% \end{macrocode} +%\end{macro} +% +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Galician Module (\texttt{datetime2-galician.ldf})} +%\changes{1.0}{2015-03-30}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-galician.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{galician}[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{galician-utf8} if either of those engines are used +% otherwise load \texttt{galician-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{galician-utf8} +\else + \ifluatex + \RequireDateTimeModule{galician-utf8} + \else + \RequireDateTimeModule{galician-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{galician} 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 "galician" and +% "galician-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}{\DTMgaliciandaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMgaliciandaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}% + de\space +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgalicianmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMgalicianmonthyearsep}{% + \space de% + \DTMtexorpdfstring{\protect~}{\space}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgaliciandatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMgaliciandatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgaliciantimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMgaliciantimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgaliciandatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMgaliciandatesep}{/} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgaliciantimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMgaliciantimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{galician}{daymonthsep}{\renewcommand*{\DTMgaliciandaymonthsep}{#1}} +\DTMdefkey{galician}{monthyearsep}{\renewcommand*{\DTMgalicianmonthyearsep}{#1}} +\DTMdefkey{galician}{datetimesep}{\renewcommand*{\DTMgaliciandatetimesep}{#1}} +\DTMdefkey{galician}{timezonesep}{\renewcommand*{\DTMgaliciantimezonesep}{#1}} +\DTMdefkey{galician}{datesep}{\renewcommand*{\DTMgaliciandatesep}{#1}} +\DTMdefkey{galician}{timesep}{\renewcommand*{\DTMgaliciantimesep}{#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{galician}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{galician}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{galician}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{galician}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{galician}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{galician}{showyear}{true} +% \end{macrocode} +% +% Define the "galician" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {galician}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{galician}{showdayofmonth} + {\DTMgalicianordinal{##3}\DTMgaliciandaymonthsep}% + {}% + \DTMgalicianmonthname{##2}% + \DTMifbool{galician}{showyear}% + {% + \DTMgalicianmonthyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{galician}{showdayofmonth} + {% + \DTMgalicianordinal{##3}\DTMgaliciandaymonthsep + \DTMgalicianmonthname{##2}% + }% + {% + \DTMgalicianMonthname{##2}% + }% + \DTMifbool{galician}{showyear}% + {% + \DTMgalicianmonthyearsep + \number##1 + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMgalicianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{galician}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMgaliciantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMgaliciandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMgaliciantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMgaliciandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMgaliciantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {galician-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{galician}{showdayofmonth}% + {% + \number##3 % space intended + \DTMgaliciandatesep + }% + {}% + \number##2 % space intended + \DTMifbool{galician}{showyear}% + {% + \DTMgaliciandatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMgaliciantimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMgaliciantimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMgalicianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{galician}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMgaliciantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMgaliciandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMgaliciantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMgalicianzonemaps} +% 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*{\DTMgalicianzonemaps}{% + \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{galician}} +{\DTMsetstyle{galician-numeric}} +% \end{macrocode} +% +% Redefine \cs{dategalician} (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\dategalician + {% do nothing + }% + {% + \def\dategalician{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{galician}}% + {\DTMsetstyle{galician-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{galician}}% + {\DTMsetstyle{galician-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-galician/datetime2-galician.ins b/Master/texmf-dist/source/latex/datetime2-galician/datetime2-galician.ins new file mode 100644 index 00000000000..7de788083ad --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-galician/datetime2-galician.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-galician.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-galician.dtx and + datetime2-galician.ins and the derived files + datetime2-galician-utf8.ldf, datetime2-galician-ascii.ldf and + datetime2-galician.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-galician-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-galician.dtx}{datetime2-galician-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-galician-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-galician.dtx}{datetime2-galician-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-galician.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-galician.dtx}{datetime2-galician.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-greek/datetime2-greek.dtx b/Master/texmf-dist/source/latex/datetime2-greek/datetime2-greek.dtx new file mode 100644 index 00000000000..c9f21c3e858 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-greek/datetime2-greek.dtx @@ -0,0 +1,538 @@ +%\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 Greek Module}]{hyperref} + +\newfontfamily\greekfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{230} + +\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-greek.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Greek 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 Greek 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-greek}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Greek. +%In particular, I don't know if the "greek" 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-greek.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +%Currently there is only a regionless style. There is currently no +%support for Ancient Greek. +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +%\iffalse +% \begin{macrocode} +%<*datetime2-greek-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{greek-utf8}[2015/03/30 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMgreekordinal} +% \begin{macrocode} +\newcommand*{\DTMgreekordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\DTMgreekmonthname} +% Greek month names. +% \begin{macrocode} +\newcommand*{\DTMgreekmonthname}[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-greek-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-greek-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{greek-ascii}[2015/03/30 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMgreekordinal} +% \begin{macrocode} +\newcommand*{\DTMgreekordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgreekmonthname} +% Greek month names. +% \begin{macrocode} +\newcommand*{\DTMgreekmonthname}[1]{% + \ifcase#1 + \or + Ianouar\protect\'iou% + \or + Febrouar\protect\'iou% + \or + Mart\protect\'iou% + \or + April\protect\'iou% + \or + Ma\protect\'{\protect\"i}ou% + \or + Ioun\protect\'iou% + \or + Ioul\protect\'iou% + \or + Augo\protect\'ustou% + \or + Septembr\protect\'iou% + \or + Oktwbr\protect\'iou% + \or + Noembr\protect\'iou% + \or + Dekembr\protect\'iou% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Greek Module (\texttt{datetime2-greek.ldf})} +%\changes{1.0}{2015-03-30}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-greek.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{greek}[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{greek-utf8} if either of those engines are used +% otherwise load \texttt{greek-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{greek-utf8} +\else + \ifluatex + \RequireDateTimeModule{greek-utf8} + \else + \RequireDateTimeModule{greek-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{greek} 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 "greek" and +% "greek-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}{\DTMgreekdaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMgreekdaymonthsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgreekmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMgreekmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgreekdatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMgreekdatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgreektimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMgreektimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgreekdatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMgreekdatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMgreektimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMgreektimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{greek}{daymonthsep}{\renewcommand*{\DTMgreekdaymonthsep}{#1}} +\DTMdefkey{greek}{monthyearsep}{\renewcommand*{\DTMgreekmonthyearsep}{#1}} +\DTMdefkey{greek}{datetimesep}{\renewcommand*{\DTMgreekdatetimesep}{#1}} +\DTMdefkey{greek}{timezonesep}{\renewcommand*{\DTMgreektimezonesep}{#1}} +\DTMdefkey{greek}{datesep}{\renewcommand*{\DTMgreekdatesep}{#1}} +\DTMdefkey{greek}{timesep}{\renewcommand*{\DTMgreektimesep}{#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{greek}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{greek}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{greek}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{greek}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{greek}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{greek}{showyear}{true} +% \end{macrocode} +% +% Define the "greek" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {greek}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{greek}{showdayofmonth} + {\DTMgreekordinal{##3}\DTMgreekdaymonthsep}% + {}% + \DTMgreekmonthname{##2}% + \DTMifbool{greek}{showyear}% + {% + \DTMgreekmonthyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate{\DTMdisplaydate}% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMgreekzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{greek}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMgreektimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMgreekdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMgreektimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {greek-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{greek}{showdayofmonth}% + {% + \number##3 % space intended + \DTMgreekdatesep + }% + {}% + \number##2 % space intended + \DTMifbool{greek}{showyear}% + {% + \DTMgreekdatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMgreektimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMgreektimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMgreekzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{greek}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMgreektimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMgreekdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMgreektimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMgreekzonemaps} +% 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*{\DTMgreekzonemaps}{% + \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{greek}} +{\DTMsetstyle{greek-numeric}} +% \end{macrocode} +% +% Redefine \cs{dategreek} (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\dategreek + {% do nothing + }% + {% + \def\dategreek{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{greek}}% + {\DTMsetstyle{greek-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{greek}}% + {\DTMsetstyle{greek-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-greek/datetime2-greek.ins b/Master/texmf-dist/source/latex/datetime2-greek/datetime2-greek.ins new file mode 100644 index 00000000000..c32ff1b4091 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-greek/datetime2-greek.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-greek.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-greek.dtx and + datetime2-greek.ins and the derived files + datetime2-greek-utf8.ldf, datetime2-greek-ascii.ldf and + datetime2-greek.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-greek-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-greek.dtx}{datetime2-greek-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-greek-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-greek.dtx}{datetime2-greek-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-greek.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-greek.dtx}{datetime2-greek.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-hebrew/datetime2-hebrew.dtx b/Master/texmf-dist/source/latex/datetime2-hebrew/datetime2-hebrew.dtx new file mode 100644 index 00000000000..feba06e73d3 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-hebrew/datetime2-hebrew.dtx @@ -0,0 +1,360 @@ +%\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 Hebrew Module}]{hyperref} + +\CheckSum{162} + +\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-hebrew.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Hebrew 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 Hebrew 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} +% +%The date style simply uses either \sty{babel}'s \cs{hebdate} +%or \sty{polyglossia}'s \cs{hebrewdate} so the date style isn't +%expandable. +% +%I don't know if these settings are correct as I can't speak Hebrew. +%In particular, I don't know if the "hebrew" 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-hebrew.ins} where Name +%is the name of the maintainer(s) and replace +%the `inactive' status to `maintained'. +% +% +%\StopEventually{% +%\clearpage +%\phantomsection +%\addcontentsline{toc}{section}{Change History}% +%\PrintChanges +%\addcontentsline{toc}{section}{\indexname}% +%\PrintIndex} +%\section{The Code} +% There is currently only one ".ldf" file. +% +%\subsection{Main Hebrew Module (\texttt{datetime2-hebrew.ldf})} +%\changes{1.0}{2015-03-30}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-hebrew.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{hebrew}[2015/03/30 v1.0] +% \end{macrocode} +% The date style uses \cs{hebrewdate} or \cs{hebdate}, depending on +% which is defined. This needs to be robust, which means the date +% can't be expanded with this style. This should be fixed if at all +% possible. (I don't know how.) +%\begin{macro}{\DTMhebrewdate} +% \begin{macrocode} +\ifdef\hebrewdate +{% + \newrobustcmd*\DTMhebrewdate[3]{\hebrewdate{#3}{#2}{#1}}% +}% +{% + \ifdef\hebdate + {% + \newrobustcmd*\DTMhebrewdate[3]{\hebdate{#3}{#2}{#1}}% + }% + {% + \newcommand*\DTMhebrewdate[3]{#3-#2-#1}% + \PackageWarning{datetime2-hebrew}{Neither + \string\hebrewdate\space nor \string\hebdate\space defined}{}% + }% +}% +% \end{macrocode} +%\end{macro} +%For some reason \cs{hebrewdate} doesn't work with \cs{datetime2}'s +%definition of \cs{today} so it needs to be changed. +%\begin{macro}{\today} +% \begin{macrocode} +\renewcommand*{\today}{\DTMdisplaydate{\year}{\month}{\day}{-1}} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\Today} +% \begin{macrocode} +\renewcommand*{\Today}{\DTMDisplaydate{\year}{\month}{\day}{-1}} +% \end{macrocode} +%\end{macro} +% +%The full style will probably need to check for RL or LR. +%\begin{macro}{\DTMhebrewdatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMhebrewdatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMhebrewtimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMhebrewtimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMhebrewdatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMhebrewdatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMhebrewtimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMhebrewtimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{hebrew}{datetimesep}{\renewcommand*{\DTMhebrewdatetimesep}{#1}} +\DTMdefkey{hebrew}{timezonesep}{\renewcommand*{\DTMhebrewtimezonesep}{#1}} +\DTMdefkey{hebrew}{datesep}{\renewcommand*{\DTMhebrewdatesep}{#1}} +\DTMdefkey{hebrew}{timesep}{\renewcommand*{\DTMhebrewtimesep}{#1}} +% \end{macrocode} +% +% Define a boolean key that determines if the time zone mappings +% should be used. +% \begin{macrocode} +\DTMdefboolkey{hebrew}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{hebrew}{mapzone}{true} +% \end{macrocode} +% +% Define the "hebrew" style. +% \begin{macrocode} +\DTMnewstyle + {hebrew}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMtexorpdfstring{\DTMhebrewdate{##1}{##2}{##3}}{##3-##2-##1}% + }% + \renewcommand*\DTMDisplaydate{\DTMdisplaydate}% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMhebrewzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{hebrew}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMhebrewtimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMhebrewdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMhebrewtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {hebrew-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{hebrew}{showdayofmonth}% + {% + \number##3 % space intended + \DTMhebrewdatesep + }% + {}% + \number##2 % space intended + \DTMifbool{hebrew}{showyear}% + {% + \DTMhebrewdatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*\DTMDisplaydate{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMhebrewtimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMhebrewtimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMhebrewzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{hebrew}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMhebrewtimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMhebrewdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMhebrewtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMhebrewzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. There are currently no mappings. +% \begin{macrocode} +\newcommand*{\DTMhebrewzonemaps}{% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{hebrew}} +{\DTMsetstyle{hebrew-numeric}} +% \end{macrocode} +% +% Redefine \cs{datehebrew} (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\datehebrew + {% do nothing + }% + {% + \def\datehebrew{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{hebrew}}% + {\DTMsetstyle{hebrew-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{hebrew}}% + {\DTMsetstyle{hebrew-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-hebrew/datetime2-hebrew.ins b/Master/texmf-dist/source/latex/datetime2-hebrew/datetime2-hebrew.ins new file mode 100644 index 00000000000..12ecc81e483 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-hebrew/datetime2-hebrew.ins @@ -0,0 +1,38 @@ +\input docstrip + +\preamble + + datetime2-hebrew.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-hebrew.dtx and + datetime2-hebrew.ins and the derived file + datetime2-hebrew.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-hebrew.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-hebrew.dtx}{datetime2-hebrew.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-icelandic/datetime2-icelandic.dtx b/Master/texmf-dist/source/latex/datetime2-icelandic/datetime2-icelandic.dtx new file mode 100644 index 00000000000..c72118b636e --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-icelandic/datetime2-icelandic.dtx @@ -0,0 +1,631 @@ +%\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 Icelandic Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{300} + +\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-icelandic.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Icelandic 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 Icelandic 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-icelandic}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Icelandic. +%In particular, I don't know if the "icelandic" 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-icelandic.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-icelandic-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{icelandic-utf8}[2015/03/30 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMicelandicordinal} +% \begin{macrocode} +\newcommand*{\DTMicelandicordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\DTMicelandicmonthname} +% Icelandic month names. +% \begin{macrocode} +\newcommand*{\DTMicelandicmonthname}[1]{% + \ifcase#1 + \or + janúar% + \or + febrúar% + \or + mars% + \or + apríl% + \or + maí% + \or + júní% + \or + júlí% + \or + ágúst% + \or + september% + \or + október% + \or + nóvember% + \or + desembe% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMicelandicMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMicelandicMonthname}[1]{% + \ifcase#1 + \or + Janúar% + \or + Febrúar% + \or + Mars% + \or + Apríl% + \or + Maí% + \or + Júní% + \or + Júlí% + \or + Ágúst% + \or + September% + \or + Október% + \or + Nóvember% + \or + Desembe% + \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-icelandic-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-icelandic-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{icelandic-ascii}[2015/03/30 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMicelandicordinal} +% \begin{macrocode} +\newcommand*{\DTMicelandicordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMicelandicmonthname} +% Icelandic month names. +% \begin{macrocode} +\newcommand*{\DTMicelandicmonthname}[1]{% + \ifcase#1 + \or + jan\protect\'uar% + \or + febr\protect\'uar% + \or + mars% + \or + apr\protect\'il% + \or + ma\protect\'i% + \or + j\protect\'un\protect\'i% + \or + j\protect\'ul\protect\'i% + \or + \protect\'ag\protect\'ust% + \or + september% + \or + okt\protect\'ober% + \or + n\protect\'ovember% + \or + desembe% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMicelandicMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMicelandicMonthname}[1]{% + \ifcase#1 + \or + Jan\protect\'uar% + \or + Febr\protect\'uar% + \or + Mars% + \or + Apr\protect\'il% + \or + Ma\protect\'i% + \or + J\protect\'un\protect\'i% + \or + J\protect\'ul\protect\'i% + \or + \protect\'Ag\protect\'ust% + \or + September% + \or + Okt\protect\'ober% + \or + N\protect\'ovember% + \or + Desembe% + \fi +} +% \end{macrocode} +%\end{macro} +% +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Icelandic Module (\texttt{datetime2-icelandic.ldf})} +%\changes{1.0}{2015-03-30}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-icelandic.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{icelandic}[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{icelandic-utf8} if either of those engines are used +% otherwise load \texttt{icelandic-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{icelandic-utf8} +\else + \ifluatex + \RequireDateTimeModule{icelandic-utf8} + \else + \RequireDateTimeModule{icelandic-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{icelandic} 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 "icelandic" and +% "icelandic-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}{\DTMicelandicdaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMicelandicdaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMicelandicmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMicelandicmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMicelandicdatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMicelandicdatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMicelandictimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMicelandictimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMicelandicdatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMicelandicdatesep}{/} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMicelandictimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMicelandictimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{icelandic}{daymonthsep}{\renewcommand*{\DTMicelandicdaymonthsep}{#1}} +\DTMdefkey{icelandic}{monthyearsep}{\renewcommand*{\DTMicelandicmonthyearsep}{#1}} +\DTMdefkey{icelandic}{datetimesep}{\renewcommand*{\DTMicelandicdatetimesep}{#1}} +\DTMdefkey{icelandic}{timezonesep}{\renewcommand*{\DTMicelandictimezonesep}{#1}} +\DTMdefkey{icelandic}{datesep}{\renewcommand*{\DTMicelandicdatesep}{#1}} +\DTMdefkey{icelandic}{timesep}{\renewcommand*{\DTMicelandictimesep}{#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{icelandic}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{icelandic}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{icelandic}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{icelandic}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{icelandic}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{icelandic}{showyear}{true} +% \end{macrocode} +% +% Define the "icelandic" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {icelandic}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{icelandic}{showdayofmonth} + {\DTMicelandicordinal{##3}\DTMicelandicdaymonthsep}% + {}% + \DTMicelandicmonthname{##2}% + \DTMifbool{icelandic}{showyear}% + {% + \DTMicelandicmonthyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{icelandic}{showdayofmonth} + {% + \DTMicelandicordinal{##3}\DTMicelandicdaymonthsep + \DTMicelandicmonthname{##2}% + }% + {% + \DTMicelandicMonthname{##2}% + }% + \DTMifbool{icelandic}{showyear}% + {% + \DTMicelandicmonthyearsep + \number##1 + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMicelandiczonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{icelandic}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMicelandictimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMicelandicdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMicelandictimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMicelandicdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMicelandictimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {icelandic-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{icelandic}{showdayofmonth}% + {% + \number##3 % space intended + \DTMicelandicdatesep + }% + {}% + \number##2 % space intended + \DTMifbool{icelandic}{showyear}% + {% + \DTMicelandicdatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMicelandictimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMicelandictimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMicelandiczonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{icelandic}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMicelandictimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMicelandicdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMicelandictimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMicelandiczonemaps} +% 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*{\DTMicelandiczonemaps}{% + \DTMdefzonemap{00}{00}{GMT}% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{icelandic}} +{\DTMsetstyle{icelandic-numeric}} +% \end{macrocode} +% +% Redefine \cs{dateicelandic} (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\dateicelandic + {% do nothing + }% + {% + \def\dateicelandic{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{icelandic}}% + {\DTMsetstyle{icelandic-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{icelandic}}% + {\DTMsetstyle{icelandic-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-icelandic/datetime2-icelandic.ins b/Master/texmf-dist/source/latex/datetime2-icelandic/datetime2-icelandic.ins new file mode 100644 index 00000000000..2f9a258657b --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-icelandic/datetime2-icelandic.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-icelandic.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-icelandic.dtx and + datetime2-icelandic.ins and the derived files + datetime2-icelandic-utf8.ldf, datetime2-icelandic-ascii.ldf and + datetime2-icelandic.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-icelandic-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-icelandic.dtx}{datetime2-icelandic-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-icelandic-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-icelandic.dtx}{datetime2-icelandic-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-icelandic.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-icelandic.dtx}{datetime2-icelandic.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-latin/datetime2-latin.dtx b/Master/texmf-dist/source/latex/datetime2-latin/datetime2-latin.dtx new file mode 100644 index 00000000000..879a041fbe3 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-latin/datetime2-latin.dtx @@ -0,0 +1,500 @@ +%\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 Latin Module}]{hyperref} + + +\CheckSum{212} + +\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-latin.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Latin Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-31 (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 Latin 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-latin}'s \cs{today}. +%This is different from \sty{polyglossia}'s Latin \cs{today} so +%there's a check to see if \sty{polyglossia} has been loaded to make +%the styles match. +% +%I don't know if these settings are correct. +%In particular, I don't know if the "latin" 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-latin.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 Latin Module (\texttt{datetime2-latin.ldf})} +%\changes{1.0}{2015-03-31}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-latin.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{latin}[2015/03/31 v1.0] +% \end{macrocode} +% +%\begin{macro}{\DTMlatindatefont} +%\sty{polyglossia} version doesn't implement a font change. +% \begin{macrocode} +\@ifpackageloaded{polyglossia} +{ + \newcommand*{\DTMlatindayfont}[1]{#1} +} +{ +% \end{macrocode} +%This will need protecting. +% \begin{macrocode} + \newcommand*{\DTMlatindayfont}[1]{% + {\check@mathfonts\fontsize\sf@size\z@\math@fontsfalse\selectfont#1}% + } +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlatinordinal} +% \begin{macrocode} +\newcommand*{\DTMlatinordinal}[1]{% + \DTMtexorpdfstring + {% + \protect\DTMlatindayfont{\uppercase\expandafter{\romannumeral#1}}% + }% + {\romannumeral#1 }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlatinyear} +% \begin{macrocode} +\newcommand*{\DTMlatinyear}[1]{% + \DTMtexorpdfstring + {% + \uppercase\expandafter{\romannumeral#1}% + }% + {\romannumeral#1 }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlatinmonthname} +% Latin month names. +% \begin{macrocode} +\@ifpackageloaded{polyglossia} +{ +% \end{macrocode} +% Match \sty{polyglossia} month names: +% \begin{macrocode} + \newcommand*{\DTMlatinmonthname}[1]{% + \ifcase#1 + \or + Januarii% + \or + Februarii% + \or + Martii% + \or + Aprilis% + \or + Maji% + \or + Junii% + \or + Julii% + \or + Augusti% + \or + Septembris% + \or + Octobris% + \or + Novembris% + \or + Decembris% + \fi + } +} +{ +% \end{macrocode} +% Match \sty{babel} month names: +% \begin{macrocode} + \newcommand*{\DTMlatinmonthname}[1]{% + \ifcase#1 + \or + Ianuarii% + \or + Februarii% + \or + Martii% + \or + Aprilis% + \or + Maii% + \or + Iunii% + \or + Iulii% + \or + Augusti% + \or + Septembris% + \or + Octobris% + \or + Novembris% + \or + Decembris% + \fi + } +} +% \end{macrocode} +%\end{macro} +% +% +% Define the \texttt{latin} style. +% The time style is the same as the "default" style +% provided by \sty{datetime2}. This may need correcting. +% +% Allow the user a way of configuring the "latin" and +% "latin-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}{\DTMlatindaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMlatindaymonthsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlatinmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMlatinmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlatindatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMlatindatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlatintimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMlatintimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlatindatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMlatindatesep}{/} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlatintimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMlatintimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{latin}{daymonthsep}{\renewcommand*{\DTMlatindaymonthsep}{#1}} +\DTMdefkey{latin}{monthyearsep}{\renewcommand*{\DTMlatinmonthyearsep}{#1}} +\DTMdefkey{latin}{datetimesep}{\renewcommand*{\DTMlatindatetimesep}{#1}} +\DTMdefkey{latin}{timezonesep}{\renewcommand*{\DTMlatintimezonesep}{#1}} +\DTMdefkey{latin}{datesep}{\renewcommand*{\DTMlatindatesep}{#1}} +\DTMdefkey{latin}{timesep}{\renewcommand*{\DTMlatintimesep}{#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{latin}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{latin}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{latin}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{latin}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{latin}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{latin}{showyear}{true} +% \end{macrocode} +% +% Define the "latin" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {latin}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{latin}{showdayofmonth} + {\DTMlatinordinal{##3}\DTMlatindaymonthsep}% + {}% + \DTMlatinmonthname{##2}% + \DTMifbool{latin}{showyear}% + {% + \DTMlatinmonthyearsep + \DTMlatinyear{##1}% + }% + {}% + }% + \renewcommand*\DTMDisplaydate{\DTMdisplaydate}% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMlatinzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{latin}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMlatintimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMlatindatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMlatintimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {latin-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{latin}{showdayofmonth}% + {% + \number##3 % space intended + \DTMlatindatesep + }% + {}% + \number##2 % space intended + \DTMifbool{latin}{showyear}% + {% + \DTMlatindatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMlatintimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMlatintimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMlatinzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{latin}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMlatintimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMlatindatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMlatintimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMlatinzonemaps} +% 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*{\DTMlatinzonemaps}{% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{latin}} +{\DTMsetstyle{latin-numeric}} +% \end{macrocode} +% +% Redefine \cs{datelatin} (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\datelatin + {% do nothing + }% + {% + \def\datelatin{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{latin}}% + {\DTMsetstyle{latin-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{latin}}% + {\DTMsetstyle{latin-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-latin/datetime2-latin.ins b/Master/texmf-dist/source/latex/datetime2-latin/datetime2-latin.ins new file mode 100644 index 00000000000..112cf79667e --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-latin/datetime2-latin.ins @@ -0,0 +1,38 @@ +\input docstrip + +\preamble + + datetime2-latin.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-latin.dtx and + datetime2-latin.ins and the derived file + datetime2-latin.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-latin.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-latin.dtx}{datetime2-latin.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-lsorbian/datetime2-lsorbian.dtx b/Master/texmf-dist/source/latex/datetime2-lsorbian/datetime2-lsorbian.dtx new file mode 100644 index 00000000000..d7795cdc690 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-lsorbian/datetime2-lsorbian.dtx @@ -0,0 +1,792 @@ +%\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 Lower Sorbian Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{395} + +\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-lsorbian.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Lower Sorbian 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 Lower Sorbian 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-lsorbian}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Lower Sorbian. +%In particular, I don't know if the "lsorbian" 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-lsorbian.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-lsorbian-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{lsorbian-utf8}[2015/03/30 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMlsorbianordinal} +% \begin{macrocode} +\newcommand*{\DTMlsorbianordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\DTMlsorbiannewmonthname} +% Lower Sorbian month names. +% \begin{macrocode} +\newcommand*{\DTMlsorbiannewmonthname}[1]{% + \ifcase#1 + \or + januara% + \or + februara% + \or + měrca% + \or + apryla% + \or + maja% + \or + junija% + \or + julija% + \or + awgusta% + \or + septembra% + \or + oktobra% + \or + nowembra% + \or + decembra% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlsorbiannewMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMlsorbiannewMonthname}[1]{% + \ifcase#1 + \or + Januara% + \or + Februara% + \or + Měrca% + \or + Apryla% + \or + Maja% + \or + Junija% + \or + Julija% + \or + Awgusta% + \or + Septembra% + \or + Oktobra% + \or + Nowembra% + \or + Decembra% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlsorbianoldmonthname} +% Lower Sorbian (old) month names. +% \begin{macrocode} +\newcommand*{\DTMlsorbianoldmonthname}[1]{% + \ifcase#1 + \or + wjelikego rožka% + \or + małego rožka% + \or + nalětnika% + \or + jatšownika% + \or + rožownika% + \or + smažnika% + \or + pražnika% + \or + žnjeńca% + \or + požnjeńca% + \or + winowca% + \or + nazymnika% + \or + godownika% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlsorbianoldMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMlsorbianoldMonthname}[1]{% + \ifcase#1 + \or + Wjelikego rožka% + \or + Małego rožka% + \or + Nalětnika% + \or + Jatšownika% + \or + Rožownika% + \or + Smažnika% + \or + Pražnika% + \or + Žnjeńca% + \or + Požnjeńca% + \or + Winowca% + \or + Nazymnika% + \or + Godownika% + \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-lsorbian-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-lsorbian-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{lsorbian-ascii}[2015/03/30 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMlsorbianordinal} +% \begin{macrocode} +\newcommand*{\DTMlsorbianordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlsorbiannewmonthname} +% Lower Sorbian month names. +% \begin{macrocode} +\newcommand*{\DTMlsorbiannewmonthname}[1]{% + \ifcase#1 + \or + januara% + \or + februara% + \or + m\protect\v erca% + \or + apryla% + \or + maja% + \or + junija% + \or + julija% + \or + awgusta% + \or + septembra% + \or + oktobra% + \or + nowembra% + \or + decembra% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlsorbiannewMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMlsorbiannewMonthname}[1]{% + \ifcase#1 + \or + Januara% + \or + Februara% + \or + M\protect\v erca% + \or + Apryla% + \or + Maja% + \or + Junija% + \or + Julija% + \or + Awgusta% + \or + Septembra% + \or + Oktobra% + \or + Nowembra% + \or + Decembra% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlsorbianoldmonthname} +% Lower Sorbian (old) month names. +% \begin{macrocode} +\newcommand*{\DTMlsorbianoldmonthname}[1]{% + \ifcase#1 + \or + wjelikego ro\protect\v zka% + \or + ma\protect\l ego ro\protect\v zka% + \or + nal\protect\v etnika% + \or + jat\protect\v sownika% + \or + ro\protect\v zownika% + \or + sma\protect\v znika% + \or + pra\protect\v znika% + \or + \protect\v znje\protect\'nca% + \or + po\protect\v znje\protec\'nca% + \or + winowca% + \or + nazymnika% + \or + godownika% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlsorbianoldMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMlsorbianoldMonthname}[1]{% + \ifcase#1 + \or + Wjelikego ro\protect\v zka% + \or + Ma\protect\l ego ro\protect\v zka% + \or + Nal\protect\v etnika% + \or + Jat\protect\v sownika% + \or + Ro\protect\v zownika% + \or + Sma\protect\v znika% + \or + Pra\protect\v znika% + \or + \protect\v Znje\protect\'nca% + \or + Po\protect\v znje\protec\'nca% + \or + Winowca% + \or + Nazymnika% + \or + Godownika% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Lower Sorbian Module (\texttt{datetime2-lsorbian.ldf})} +%\changes{1.0}{2015-03-30}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-lsorbian.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{lsorbian}[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{lsorbian-utf8} if either of those engines are used +% otherwise load \texttt{lsorbian-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{lsorbian-utf8} +\else + \ifluatex + \RequireDateTimeModule{lsorbian-utf8} + \else + \RequireDateTimeModule{lsorbian-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{lsorbian} 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 "lsorbian" and +% "lsorbian-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}{\DTMlsorbiandaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMlsorbiandaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlsorbianmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMlsorbianmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlsorbiandatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMlsorbiandatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlsorbiantimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMlsorbiantimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlsorbiandatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMlsorbiandatesep}{/} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMlsorbiantimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMlsorbiantimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{lsorbian}{daymonthsep}{\renewcommand*{\DTMlsorbiandaymonthsep}{#1}} +\DTMdefkey{lsorbian}{monthyearsep}{\renewcommand*{\DTMlsorbianmonthyearsep}{#1}} +\DTMdefkey{lsorbian}{datetimesep}{\renewcommand*{\DTMlsorbiandatetimesep}{#1}} +\DTMdefkey{lsorbian}{timezonesep}{\renewcommand*{\DTMlsorbiantimezonesep}{#1}} +\DTMdefkey{lsorbian}{datesep}{\renewcommand*{\DTMlsorbiandatesep}{#1}} +\DTMdefkey{lsorbian}{timesep}{\renewcommand*{\DTMlsorbiantimesep}{#1}} +% \end{macrocode} +% +%\begin{macro}{\DTMlsorbianmonthname} +% Provide a way to switch between old and new month names +% \begin{macrocode} +\newcommand*\DTMlsorbianmonthname{\DTMlsorbiannewmonthname} +% \end{macrocode} +%\end{macro} +%\begin{macro}{\DTMlsorbianMonthname} +% Provide a way to switch between old and new month names +% \begin{macrocode} +\newcommand*\DTMlsorbianMonthname{\DTMlsorbiannewMonthname} +% \end{macrocode} +%\end{macro} +% Define a key to easily switch: +% \begin{macrocode} +\DTMdefchoicekey{lsorbian}{style}[\val\nr]{old,new}{% + \ifcase\nr\relax + \renewcommand*\DTMlsorbianmonthname{\DTMlsorbianoldmonthname}% + \renewcommand*\DTMlsorbianMonthname{\DTMlsorbianoldMonthname}% + \or + \renewcommand*\DTMlsorbianmonthname{\DTMlsorbiannewmonthname}% + \renewcommand*\DTMlsorbianMonthname{\DTMlsorbiannewMonthname}% + \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{lsorbian}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{lsorbian}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{lsorbian}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{lsorbian}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{lsorbian}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{lsorbian}{showyear}{true} +% \end{macrocode} +% +% Define the "lsorbian" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {lsorbian}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{lsorbian}{showdayofmonth} + {\DTMlsorbianordinal{##3}\DTMlsorbiandaymonthsep}% + {}% + \DTMlsorbianmonthname{##2}% + \DTMifbool{lsorbian}{showyear}% + {% + \DTMlsorbianmonthyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{lsorbian}{showdayofmonth} + {% + \DTMlsorbianordinal{##3}\DTMlsorbiandaymonthsep + \DTMlsorbianmonthname{##2}% + }% + {% + \DTMlsorbianMonthname{##2}% + }% + \DTMifbool{lsorbian}{showyear}% + {% + \DTMlsorbianmonthyearsep + \number##1 + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMlsorbianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{lsorbian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMlsorbiantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMlsorbiandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMlsorbiantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMlsorbiandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMlsorbiantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {lsorbian-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{lsorbian}{showdayofmonth}% + {% + \number##3 % space intended + \DTMlsorbiandatesep + }% + {}% + \number##2 % space intended + \DTMifbool{lsorbian}{showyear}% + {% + \DTMlsorbiandatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMlsorbiantimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMlsorbiantimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMlsorbianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{lsorbian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMlsorbiantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMlsorbiandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMlsorbiantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMlsorbianzonemaps} +% 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*{\DTMlsorbianzonemaps}{% + \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{lsorbian}} +{\DTMsetstyle{lsorbian-numeric}} +% \end{macrocode} +% +% Redefine \cs{datelsorbian} (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\datelsorbian + {% do nothing + }% + {% + \def\datelsorbian{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{lsorbian}}% + {\DTMsetstyle{lsorbian-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{lsorbian}}% + {\DTMsetstyle{lsorbian-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-lsorbian/datetime2-lsorbian.ins b/Master/texmf-dist/source/latex/datetime2-lsorbian/datetime2-lsorbian.ins new file mode 100644 index 00000000000..1a70ca3b2d5 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-lsorbian/datetime2-lsorbian.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-lsorbian.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-lsorbian.dtx and + datetime2-lsorbian.ins and the derived files + datetime2-lsorbian-utf8.ldf, datetime2-lsorbian-ascii.ldf and + datetime2-lsorbian.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-lsorbian-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-lsorbian.dtx}{datetime2-lsorbian-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-lsorbian-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-lsorbian.dtx}{datetime2-lsorbian-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-lsorbian.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-lsorbian.dtx}{datetime2-lsorbian.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-magyar/datetime2-magyar.dtx b/Master/texmf-dist/source/latex/datetime2-magyar/datetime2-magyar.dtx new file mode 100644 index 00000000000..52c23fddfd5 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-magyar/datetime2-magyar.dtx @@ -0,0 +1,646 @@ +%\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 Hungarian Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{289} + +\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-magyar.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Hungarian Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-31 (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 Hungarian 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-magyar}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Hungarian. +%In particular, I don't know if the "magyar" 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-magyar.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-magyar-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-31}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{magyar-utf8}[2015/03/31 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMmagyarordinal} +% \begin{macrocode} +\newcommand*{\DTMmagyarordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMmagyaryear} +% \begin{macrocode} +\newcommand*{\DTMmagyaryear}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\DTMmagyarmonthname} +% Hungarian month names. +% \begin{macrocode} +\newcommand*{\DTMmagyarmonthname}[1]{% + \ifcase#1 + \or + január% + \or + február% + \or + március% + \or + április% + \or + május% + \or + június% + \or + július% + \or + augusztus% + \or + szeptember% + \or + október% + \or + november% + \or + december% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMmagyarMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMmagyarMonthname}[1]{% + \ifcase#1 + \or + Január% + \or + Február% + \or + Március% + \or + Április% + \or + Május% + \or + Június% + \or + Július% + \or + Augusztus% + \or + Szeptember% + \or + Október% + \or + November% + \or + December% + \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-magyar-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-magyar-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-31}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{magyar-ascii}[2015/03/31 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMmagyarordinal} +% \begin{macrocode} +\newcommand*{\DTMmagyarordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMmagyaryear} +% \begin{macrocode} +\newcommand*{\DTMmagyaryear}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMmagyarmonthname} +% Hungarian month names. +% \begin{macrocode} +\newcommand*{\DTMmagyarmonthname}[1]{% + \ifcase#1 + \or + janu\protect\'ar% + \or + febru\protect\'ar% + \or + m\protect\'arcius% + \or + \protect\'aprilis% + \or + m\protect\'ajus% + \or + j\protect\'unius% + \or + j\protect\'ulius% + \or + augusztus% + \or + szeptember% + \or + okt\protect\'ober% + \or + november% + \or + december% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMmagyarMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMmagyarMonthname}[1]{% + \ifcase#1 + \or + Janu\protect\'ar% + \or + Febru\protect\'ar% + \or + M\protect\'arcius% + \or + \protect\'Aprilis% + \or + M\protect\'ajus% + \or + J\protect\'unius% + \or + J\protect\'ulius% + \or + Augusztus% + \or + Szeptember% + \or + Okt\protect\'ober% + \or + November% + \or + December% + \fi +} +% \end{macrocode} +%\end{macro} +% +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Hungarian Module (\texttt{datetime2-magyar.ldf})} +%\changes{1.0}{2015-03-31}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-magyar.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{magyar}[2015/03/31 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{magyar-utf8} if either of those engines are used +% otherwise load \texttt{magyar-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{magyar-utf8} +\else + \ifluatex + \RequireDateTimeModule{magyar-utf8} + \else + \RequireDateTimeModule{magyar-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{magyar} 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 "magyar" and +% "magyar-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}{\DTMmagyardaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMmagyardaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMmagyarmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMmagyarmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMmagyardatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMmagyardatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMmagyartimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMmagyartimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMmagyardatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMmagyardatesep}{/} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMmagyartimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMmagyartimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{magyar}{daymonthsep}{\renewcommand*{\DTMmagyardaymonthsep}{#1}} +\DTMdefkey{magyar}{monthyearsep}{\renewcommand*{\DTMmagyarmonthyearsep}{#1}} +\DTMdefkey{magyar}{datetimesep}{\renewcommand*{\DTMmagyardatetimesep}{#1}} +\DTMdefkey{magyar}{timezonesep}{\renewcommand*{\DTMmagyartimezonesep}{#1}} +\DTMdefkey{magyar}{datesep}{\renewcommand*{\DTMmagyardatesep}{#1}} +\DTMdefkey{magyar}{timesep}{\renewcommand*{\DTMmagyartimesep}{#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{magyar}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{magyar}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{magyar}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{magyar}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{magyar}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{magyar}{showyear}{true} +% \end{macrocode} +% +% Define the "magyar" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {magyar}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{magyar}{showdayofmonth} + {\DTMmagyarordinal{##3}\DTMmagyardaymonthsep}% + {}% + \DTMmagyarmonthname{##2}% + \DTMifbool{magyar}{showyear}% + {% + \DTMmagyarmonthyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{magyar}{showdayofmonth} + {% + \DTMmagyarordinal{##3}\DTMmagyardaymonthsep + \DTMmagyarmonthname{##2}% + }% + {% + \DTMmagyarMonthname{##2}% + }% + \DTMifbool{magyar}{showyear}% + {% + \DTMmagyarmonthyearsep + \number##1 + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMmagyarzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{magyar}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMmagyartimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMmagyardatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMmagyartimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMmagyardatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMmagyartimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {magyar-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{magyar}{showdayofmonth}% + {% + \number##3 % space intended + \DTMmagyardatesep + }% + {}% + \number##2 % space intended + \DTMifbool{magyar}{showyear}% + {% + \DTMmagyardatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMmagyartimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMmagyartimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMmagyarzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{magyar}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMmagyartimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMmagyardatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMmagyartimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMmagyarzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. There are currently no mappings defined. +% \begin{macrocode} +\newcommand*{\DTMmagyarzonemaps}{% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{magyar}} +{\DTMsetstyle{magyar-numeric}} +% \end{macrocode} +% +% Redefine \cs{datemagyar} (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\datemagyar + {% do nothing + }% + {% + \def\datemagyar{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{magyar}}% + {\DTMsetstyle{magyar-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{magyar}}% + {\DTMsetstyle{magyar-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-magyar/datetime2-magyar.ins b/Master/texmf-dist/source/latex/datetime2-magyar/datetime2-magyar.ins new file mode 100644 index 00000000000..fae6431931d --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-magyar/datetime2-magyar.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-magyar.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-magyar.dtx and + datetime2-magyar.ins and the derived files + datetime2-magyar-utf8.ldf, datetime2-magyar-ascii.ldf and + datetime2-magyar.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-magyar-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-magyar.dtx}{datetime2-magyar-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-magyar-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-magyar.dtx}{datetime2-magyar-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-magyar.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-magyar.dtx}{datetime2-magyar.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-norsk/datetime2-norsk.dtx b/Master/texmf-dist/source/latex/datetime2-norsk/datetime2-norsk.dtx new file mode 100644 index 00000000000..3ee4bf488ea --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-norsk/datetime2-norsk.dtx @@ -0,0 +1,723 @@ +%\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 Norwegian Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{297} + +\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-norsk.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Norwegian Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-31 (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 Norwegian 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-norsk}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Norwegian. +%In particular, I don't know if the "norsk" 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-norsk.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-norsk-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-31}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{norsk-utf8}[2015/03/31 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMnorskordinal} +% \begin{macrocode} +\newcommand*{\DTMnorskordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMnorskmonthname} +% Norwegian month names. +% \begin{macrocode} +\newcommand*{\DTMnorskmonthname}[1]{% + \ifcase#1 + \or + januar% + \or + februar% + \or + mars% + \or + april% + \or + mai% + \or + juni% + \or + juli% + \or + august% + \or + september% + \or + oktober% + \or + november% + \or + desember% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMnorskMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMnorskMonthname}[1]{% + \ifcase#1 + \or + Januar% + \or + Februar% + \or + Mars% + \or + April% + \or + Mai% + \or + Juni% + \or + Juli% + \or + August% + \or + September% + \or + Oktober% + \or + November% + \or + Desember% + \fi +} +% \end{macrocode} +%\end{macro} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +% +%\begin{macro}{\DTMnorskweekdayname} +% Day of week names. +% \begin{macrocode} +\newcommand*{\DTMnorskweekdayname}[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}{\DTMnorskWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMnorskWeekdayname}[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-norsk-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-norsk-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-31}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{norsk-ascii}[2015/03/31 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMnorskordinal} +% \begin{macrocode} +\newcommand*{\DTMnorskordinal}[1]{% + \number#1.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMnorskmonthname} +% Norwegian month names. +% \begin{macrocode} +\newcommand*{\DTMnorskmonthname}[1]{% + \ifcase#1 + \or + januar% + \or + februar% + \or + mars% + \or + april% + \or + mai% + \or + juni% + \or + juli% + \or + august% + \or + september% + \or + oktober% + \or + november% + \or + desember% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMnorskMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMnorskMonthname}[1]{% + \ifcase#1 + \or + Januar% + \or + Februar% + \or + Mars% + \or + April% + \or + Mai% + \or + Juni% + \or + Juli% + \or + August% + \or + September% + \or + Oktober% + \or + November% + \or + Desember% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMnorskweekdayname} +% Day of week names. +% \begin{macrocode} +\newcommand*{\DTMnorskweekdayname}[1]{% + \ifcase#1 + mandag% + \or + tirsdag% + \or + onsdag% + \or + torsdag% + \or + fredag% + \or + l\o rdag% + \or + s\o ndag% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMnorskWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMnorskWeekdayname}[1]{% + \ifcase#1 + Mandag% + \or + Tirsdag% + \or + Onsdag% + \or + Torsdag% + \or + Fredag% + \or + L\o rdag% + \or + S\o ndag% + \fi +} +% \end{macrocode} +%\end{macro} +% +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Norwegian Module (\texttt{datetime2-norsk.ldf})} +%\changes{1.0}{2015-03-31}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-norsk.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{norsk}[2015/03/31 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{norsk-utf8} if either of those engines are used +% otherwise load \texttt{norsk-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{norsk-utf8} +\else + \ifluatex + \RequireDateTimeModule{norsk-utf8} + \else + \RequireDateTimeModule{norsk-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{norsk} 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 "norsk" and +% "norsk-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}{\DTMnorskdaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMnorskdaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMnorskmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMnorskmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMnorskdatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMnorskdatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMnorsktimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMnorsktimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMnorskdatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMnorskdatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMnorsktimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMnorsktimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{norsk}{daymonthsep}{\renewcommand*{\DTMnorskdaymonthsep}{#1}} +\DTMdefkey{norsk}{monthyearsep}{\renewcommand*{\DTMnorskmonthyearsep}{#1}} +\DTMdefkey{norsk}{datetimesep}{\renewcommand*{\DTMnorskdatetimesep}{#1}} +\DTMdefkey{norsk}{timezonesep}{\renewcommand*{\DTMnorsktimezonesep}{#1}} +\DTMdefkey{norsk}{datesep}{\renewcommand*{\DTMnorskdatesep}{#1}} +\DTMdefkey{norsk}{timesep}{\renewcommand*{\DTMnorsktimesep}{#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{norsk}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{norsk}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{norsk}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{norsk}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{norsk}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{norsk}{showyear}{true} +% \end{macrocode} +% +% Define the "norsk" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {norsk}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{norsk}{showdayofmonth} + {\DTMnorskordinal{##3}\DTMnorskdaymonthsep}% + {}% + \DTMnorskmonthname{##2}% + \DTMifbool{norsk}{showyear}% + {% + \DTMnorskmonthyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{norsk}{showdayofmonth} + {% + \DTMnorskordinal{##3}\DTMnorskdaymonthsep + \DTMnorskmonthname{##2}% + }% + {% + \DTMnorskMonthname{##2}% + }% + \DTMifbool{norsk}{showyear}% + {% + \DTMnorskmonthyearsep + \number##1 + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMnorskzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{norsk}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMnorsktimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMnorskdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMnorsktimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMnorskdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMnorsktimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {norsk-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{norsk}{showdayofmonth}% + {% + \number##3 % space intended + \DTMnorskdatesep + }% + {}% + \number##2 % space intended + \DTMifbool{norsk}{showyear}% + {% + \DTMnorskdatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMnorsktimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMnorsktimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMnorskzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{norsk}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMnorsktimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMnorskdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMnorsktimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMnorskzonemaps} +% 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*{\DTMnorskzonemaps}{% + \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{norsk}} +{\DTMsetstyle{norsk-numeric}} +% \end{macrocode} +% +% Redefine \cs{datenorsk} (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\datenorsk + {% do nothing + }% + {% + \def\datenorsk{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{norsk}}% + {\DTMsetstyle{norsk-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{norsk}}% + {\DTMsetstyle{norsk-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-norsk/datetime2-norsk.ins b/Master/texmf-dist/source/latex/datetime2-norsk/datetime2-norsk.ins new file mode 100644 index 00000000000..ad619455f90 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-norsk/datetime2-norsk.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-norsk.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-norsk.dtx and + datetime2-norsk.ins and the derived files + datetime2-norsk-utf8.ldf, datetime2-norsk-ascii.ldf and + datetime2-norsk.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-norsk-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-norsk.dtx}{datetime2-norsk-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-norsk-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-norsk.dtx}{datetime2-norsk-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-norsk.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-norsk.dtx}{datetime2-norsk.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-polish/datetime2-polish.dtx b/Master/texmf-dist/source/latex/datetime2-polish/datetime2-polish.dtx new file mode 100644 index 00000000000..5c22610f5f3 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-polish/datetime2-polish.dtx @@ -0,0 +1,723 @@ +%\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 Polish Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{313} + +\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-polish.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Polish Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-31 (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 Polish 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-polish}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Polish. +%In particular, I don't know if the "polish" 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-polish.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-polish-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-31}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{polish-utf8}[2015/03/31 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMpolishordinal} +% \begin{macrocode} +\newcommand*{\DTMpolishordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMpolishmonthname} +% Polish month names. +% \begin{macrocode} +\newcommand*{\DTMpolishmonthname}[1]{% + \ifcase#1 + \or + stycznia% + \or + lutego% + \or + marca% + \or + kwietnia% + \or + maja% + \or + czerwca% + \or + lipca% + \or + sierpnia% + \or + września% + \or + października% + \or + listopada% + \or + grudnia% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMpolishMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMpolishMonthname}[1]{% + \ifcase#1 + \or + Stycznia% + \or + Lutego% + \or + Marca% + \or + Kwietnia% + \or + Maja% + \or + Czerwca% + \or + Lipca% + \or + Sierpnia% + \or + Września% + \or + Października% + \or + Listopada% + \or + Grudnia% + \fi +} +% \end{macrocode} +%\end{macro} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +% +%\begin{macro}{\DTMpolishweekdayname} +% Day of week names. +% \begin{macrocode} +\newcommand*{\DTMpolishweekdayname}[1]{% + \ifcase#1 + poniedziałek% + \or + wtorek% + \or + środa% + \or + czwartek% + \or + piątek% + \or + sobota% + \or + niedziela% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMpolishWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMpolishWeekdayname}[1]{% + \ifcase#1 + Poniedziałek% + \or + Wtorek% + \or + Środa% + \or + Czwartek% + \or + Piątek% + \or + Sobota% + \or + Niedziela% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*datetime2-polish-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-polish-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-31}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{polish-ascii}[2015/03/31 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMpolishordinal} +% \begin{macrocode} +\newcommand*{\DTMpolishordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMpolishmonthname} +% Polish month names. +% \begin{macrocode} +\newcommand*{\DTMpolishmonthname}[1]{% + \ifcase#1 + \or + stycznia% + \or + lutego% + \or + marca% + \or + kwietnia% + \or + maja% + \or + czerwca% + \or + lipca% + \or + sierpnia% + \or + wrze\protect\'snia% + \or + pa\protect\'zdziernika% + \or + listopada% + \or + grudnia% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMpolishMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMpolishMonthname}[1]{% + \ifcase#1 + \or + Stycznia% + \or + Lutego% + \or + Marca% + \or + Kwietnia% + \or + Maja% + \or + Czerwca% + \or + Lipca% + \or + Sierpnia% + \or + Wrze\protect\'snia% + \or + Pa\protect\'zdziernika% + \or + Listopada% + \or + Grudnia% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMpolishweekdayname} +% Day of week names. +% \begin{macrocode} +\newcommand*{\DTMpolishweekdayname}[1]{% + \ifcase#1 + poniedzia\protect\l ek% + \or + wtorek% + \or + \protect\'sroda% + \or + czwartek% + \or + pi\protect\k atek% + \or + sobota% + \or + niedziela% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMpolishWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMpolishWeekdayname}[1]{% + \ifcase#1 + Poniedzia\protect\l ek% + \or + Wtorek% + \or + \protect\'Sroda% + \or + Czwartek% + \or + Pi\protect\k atek% + \or + Sobota% + \or + Niedziela% + \fi +} +% \end{macrocode} +%\end{macro} +% +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Polish Module (\texttt{datetime2-polish.ldf})} +%\changes{1.0}{2015-03-31}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-polish.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{polish}[2015/03/31 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{polish-utf8} if either of those engines are used +% otherwise load \texttt{polish-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{polish-utf8} +\else + \ifluatex + \RequireDateTimeModule{polish-utf8} + \else + \RequireDateTimeModule{polish-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{polish} 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 "polish" and +% "polish-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}{\DTMpolishdaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMpolishdaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMpolishmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMpolishmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMpolishdatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMpolishdatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMpolishtimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMpolishtimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMpolishdatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMpolishdatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMpolishtimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMpolishtimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{polish}{daymonthsep}{\renewcommand*{\DTMpolishdaymonthsep}{#1}} +\DTMdefkey{polish}{monthyearsep}{\renewcommand*{\DTMpolishmonthyearsep}{#1}} +\DTMdefkey{polish}{datetimesep}{\renewcommand*{\DTMpolishdatetimesep}{#1}} +\DTMdefkey{polish}{timezonesep}{\renewcommand*{\DTMpolishtimezonesep}{#1}} +\DTMdefkey{polish}{datesep}{\renewcommand*{\DTMpolishdatesep}{#1}} +\DTMdefkey{polish}{timesep}{\renewcommand*{\DTMpolishtimesep}{#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{polish}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{polish}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{polish}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{polish}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{polish}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{polish}{showyear}{true} +% \end{macrocode} +% +% Define the "polish" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {polish}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{polish}{showdayofmonth} + {\DTMpolishordinal{##3}\DTMpolishdaymonthsep}% + {}% + \DTMpolishmonthname{##2}% + \DTMifbool{polish}{showyear}% + {% + \DTMpolishmonthyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{polish}{showdayofmonth} + {% + \DTMpolishordinal{##3}\DTMpolishdaymonthsep + \DTMpolishmonthname{##2}% + }% + {% + \DTMpolishMonthname{##2}% + }% + \DTMifbool{polish}{showyear}% + {% + \DTMpolishmonthyearsep + \number##1 + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMpolishzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{polish}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMpolishtimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMpolishdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMpolishtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMpolishdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMpolishtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {polish-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{polish}{showdayofmonth}% + {% + \number##3 % space intended + \DTMpolishdatesep + }% + {}% + \number##2 % space intended + \DTMifbool{polish}{showyear}% + {% + \DTMpolishdatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMpolishtimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMpolishtimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMpolishzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{polish}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMpolishtimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMpolishdatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMpolishtimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMpolishzonemaps} +% 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*{\DTMpolishzonemaps}{% + \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{polish}} +{\DTMsetstyle{polish-numeric}} +% \end{macrocode} +% +% Redefine \cs{datepolish} (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\datepolish + {% do nothing + }% + {% + \def\datepolish{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{polish}}% + {\DTMsetstyle{polish-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{polish}}% + {\DTMsetstyle{polish-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-polish/datetime2-polish.ins b/Master/texmf-dist/source/latex/datetime2-polish/datetime2-polish.ins new file mode 100644 index 00000000000..5b4c36b3038 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-polish/datetime2-polish.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-polish.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-polish.dtx and + datetime2-polish.ins and the derived files + datetime2-polish-utf8.ldf, datetime2-polish-ascii.ldf and + datetime2-polish.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-polish-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-polish.dtx}{datetime2-polish-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-polish-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-polish.dtx}{datetime2-polish-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-polish.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-polish.dtx}{datetime2-polish.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-romanian/datetime2-romanian.dtx b/Master/texmf-dist/source/latex/datetime2-romanian/datetime2-romanian.dtx new file mode 100644 index 00000000000..ad0b55b624b --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-romanian/datetime2-romanian.dtx @@ -0,0 +1,723 @@ +%\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 Romanian Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{313} + +\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-romanian.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Romanian Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-31 (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 Romanian 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-romanian}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Romanian. +%In particular, I don't know if the "romanian" 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-romanian.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-romanian-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-31}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{romanian-utf8}[2015/03/31 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMromanianordinal} +% \begin{macrocode} +\newcommand*{\DTMromanianordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMromanianmonthname} +% Romanian month names. +% \begin{macrocode} +\newcommand*{\DTMromanianmonthname}[1]{% + \ifcase#1 + \or + ianuarie% + \or + februarie% + \or + martie% + \or + aprilie% + \or + mai% + \or + iunie% + \or + iulie% + \or + august% + \or + septembrie% + \or + octombrie% + \or + noiembrie% + \or + decembrie% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMromanianMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMromanianMonthname}[1]{% + \ifcase#1 + \or + Ianuarie% + \or + Februarie% + \or + Martie% + \or + Aprilie% + \or + Mai% + \or + Iunie% + \or + Iulie% + \or + August% + \or + Septembrie% + \or + Octombrie% + \or + Noiembrie% + \or + Decembrie% + \fi +} +% \end{macrocode} +%\end{macro} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +% +%\begin{macro}{\DTMromanianweekdayname} +% Day of week names. +% \begin{macrocode} +\newcommand*{\DTMromanianweekdayname}[1]{% + \ifcase#1 + luni% + \or + marţi% + \or + miercuri% + \or + joi% + \or + vineri% + \or + sâmbătă% + \or + duminică% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMromanianWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMromanianWeekdayname}[1]{% + \ifcase#1 + Luni% + \or + Marţi% + \or + Miercuri% + \or + Joi% + \or + Vineri% + \or + Sâmbătă% + \or + Duminică% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} +%<*datetime2-romanian-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-romanian-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-31}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{romanian-ascii}[2015/03/31 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMromanianordinal} +% \begin{macrocode} +\newcommand*{\DTMromanianordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMromanianmonthname} +% Romanian month names. +% \begin{macrocode} +\newcommand*{\DTMromanianmonthname}[1]{% + \ifcase#1 + \or + ianuarie% + \or + februarie% + \or + martie% + \or + aprilie% + \or + mai% + \or + iunie% + \or + iulie% + \or + august% + \or + septembrie% + \or + octombrie% + \or + noiembrie% + \or + decembrie% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMromanianMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMromanianMonthname}[1]{% + \ifcase#1 + \or + Ianuarie% + \or + Februarie% + \or + Martie% + \or + Aprilie% + \or + Mai% + \or + Iunie% + \or + Iulie% + \or + August% + \or + Septembrie% + \or + Octombrie% + \or + Noiembrie% + \or + Decembrie% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMromanianweekdayname} +% Day of week names. +% \begin{macrocode} +\newcommand*{\DTMromanianweekdayname}[1]{% + \ifcase#1 + luni% + \or + mar\protect\c ti% + \or + miercuri% + \or + joi% + \or + vineri% + \or + s\protect\^amb\protect\u at\protect\u a% + \or + duminic\protect\u a% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMromanianWeekdayname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMromanianWeekdayname}[1]{% + \ifcase#1 + Luni% + \or + Mar\protect\c ti% + \or + Miercuri% + \or + Joi% + \or + Vineri% + \or + S\protect\^amb\protect\u at\protect\u a% + \or + Duminic\protect\u a% + \fi +} +% \end{macrocode} +%\end{macro} +% +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Romanian Module (\texttt{datetime2-romanian.ldf})} +%\changes{1.0}{2015-03-31}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-romanian.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{romanian}[2015/03/31 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{romanian-utf8} if either of those engines are used +% otherwise load \texttt{romanian-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{romanian-utf8} +\else + \ifluatex + \RequireDateTimeModule{romanian-utf8} + \else + \RequireDateTimeModule{romanian-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{romanian} 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 "romanian" and +% "romanian-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}{\DTMromaniandaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMromaniandaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMromanianmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMromanianmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMromaniandatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMromaniandatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMromaniantimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMromaniantimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMromaniandatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMromaniandatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMromaniantimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMromaniantimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{romanian}{daymonthsep}{\renewcommand*{\DTMromaniandaymonthsep}{#1}} +\DTMdefkey{romanian}{monthyearsep}{\renewcommand*{\DTMromanianmonthyearsep}{#1}} +\DTMdefkey{romanian}{datetimesep}{\renewcommand*{\DTMromaniandatetimesep}{#1}} +\DTMdefkey{romanian}{timezonesep}{\renewcommand*{\DTMromaniantimezonesep}{#1}} +\DTMdefkey{romanian}{datesep}{\renewcommand*{\DTMromaniandatesep}{#1}} +\DTMdefkey{romanian}{timesep}{\renewcommand*{\DTMromaniantimesep}{#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{romanian}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{romanian}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{romanian}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{romanian}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{romanian}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{romanian}{showyear}{true} +% \end{macrocode} +% +% Define the "romanian" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {romanian}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{romanian}{showdayofmonth} + {\DTMromanianordinal{##3}\DTMromaniandaymonthsep}% + {}% + \DTMromanianmonthname{##2}% + \DTMifbool{romanian}{showyear}% + {% + \DTMromanianmonthyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{romanian}{showdayofmonth} + {% + \DTMromanianordinal{##3}\DTMromaniandaymonthsep + \DTMromanianmonthname{##2}% + }% + {% + \DTMromanianMonthname{##2}% + }% + \DTMifbool{romanian}{showyear}% + {% + \DTMromanianmonthyearsep + \number##1 + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMromanianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{romanian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMromaniantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMromaniandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMromaniantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMromaniandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMromaniantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {romanian-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{romanian}{showdayofmonth}% + {% + \number##3 % space intended + \DTMromaniandatesep + }% + {}% + \number##2 % space intended + \DTMifbool{romanian}{showyear}% + {% + \DTMromaniandatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMromaniantimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMromaniantimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMromanianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{romanian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMromaniantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMromaniandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMromaniantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMromanianzonemaps} +% 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*{\DTMromanianzonemaps}{% + \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{romanian}} +{\DTMsetstyle{romanian-numeric}} +% \end{macrocode} +% +% Redefine \cs{dateromanian} (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\dateromanian + {% do nothing + }% + {% + \def\dateromanian{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{romanian}}% + {\DTMsetstyle{romanian-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{romanian}}% + {\DTMsetstyle{romanian-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-romanian/datetime2-romanian.ins b/Master/texmf-dist/source/latex/datetime2-romanian/datetime2-romanian.ins new file mode 100644 index 00000000000..6c41ae50977 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-romanian/datetime2-romanian.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-romanian.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-romanian.dtx and + datetime2-romanian.ins and the derived files + datetime2-romanian-utf8.ldf, datetime2-romanian-ascii.ldf and + datetime2-romanian.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-romanian-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-romanian.dtx}{datetime2-romanian-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-romanian-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-romanian.dtx}{datetime2-romanian-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-romanian.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-romanian.dtx}{datetime2-romanian.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-russian/datetime2-russian.dtx b/Master/texmf-dist/source/latex/datetime2-russian/datetime2-russian.dtx new file mode 100644 index 00000000000..4eb3d6952dd --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-russian/datetime2-russian.dtx @@ -0,0 +1,640 @@ +%\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 Russian Module}]{hyperref} + +\newfontfamily\cyrillicfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{401} + +\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-russian.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Russian Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-31 (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 Russian 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-russian}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Russian. +%In particular, I don't know if the "russian" 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-russian.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-russian-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-31}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{russian-utf8}[2015/03/31 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMrussianordinal} +% \begin{macrocode} +\newcommand*{\DTMrussianordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMrussianyear} +% \begin{macrocode} +\newcommand*{\DTMrussianyear}[1]{% + \number#1 + \DTMtexorpdfstring{\protect~}{\space}г.% +} +% \end{macrocode} +%\end{macro} +% +% +%\begin{macro}{\DTMrussianmonthname} +% Russian month names. +% \begin{macrocode} +\newcommand*{\DTMrussianmonthname}[1]{% + \ifcase#1 + \or + января% + \or + февраля% + \or + марта% + \or + апреля% + \or + мая% + \or + июня% + \or + июля% + \or + августа% + \or + сентября% + \or + октября% + \or + ноября% + \or + декабря% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMrussianMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMrussianMonthname}[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-russian-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-russian-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-31}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{russian-ascii}[2015/03/31 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMrussianordinal} +% \begin{macrocode} +\newcommand*{\DTMrussianordinal}[1]{% + \number#1 +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMrussianyear} +% \begin{macrocode} +\newcommand*{\DTMrussianyear}[1]{% + \number#1 + \DTMtexorpdfstring{\protect~}{\space}\protect\cyrg.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMrussianmonthname} +% Russian month names. +% \begin{macrocode} +\newcommand*{\DTMrussianmonthname}[1]{% + \ifcase#1 + \or + \protect\cyrya\protect\cyrn\protect\cyrv\protect\cyra\protect\cyrr + \protect\cyrya + \or + \protect\cyrf\protect\cyre\protect\cyrv\protect\cyrr\protect\cyra + \protect\cyrl\protect\cyrya + \or + \protect\cyrm\protect\cyra\protect\cyrr\protect\cyrt\protect\cyra + \or + \protect\cyra\protect\cyrp\protect\cyrr\protect\cyre\protect\cyrl + \protect\cyrya + \or + \protect\cyrm\protect\cyra\protect\cyrya + \or + \protect\cyri\protect\cyryu\protect\cyrn\protect\cyrya + \or + \protect\cyri\protect\cyryu\protect\cyrl\protect\cyrya + \or + \protect\cyra\protect\cyrv\protect\cyrg\protect\cyru\protect\cyrs + \protect\cyrt\protect\cyra + \or + \protect\cyrs\protect\cyre\protect\cyrn\protect\cyrt\protect\cyrya + \protect\cyrb\protect\cyrr\protect\cyrya + \or + \protect\cyro\protect\cyrk\protect\cyrt\protect\cyrya\protect\cyrb + \protect\cyrr\protect\cyrya + \or + \protect\cyrn\protect\cyro\protect\cyrya\protect\cyrb\protect\cyrr + \protect\cyrya + \or + \protect\cyrd\protect\cyre\protect\cyrk\protect\cyra\protect\cyrb + \protect\cyrr\protect\cyrya + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMrussianMonthname} +% As above but start with a capital. +% \begin{macrocode} +\newcommand*{\DTMrussianMonthname}[1]{% +} +% \end{macrocode} +%\end{macro} +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Russian Module (\texttt{datetime2-russian.ldf})} +%\changes{1.0}{2015-03-31}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-russian.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{russian}[2015/03/31 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{russian-utf8} if either of those engines are used +% otherwise load \texttt{russian-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{russian-utf8} +\else + \ifluatex + \RequireDateTimeModule{russian-utf8} + \else + \RequireDateTimeModule{russian-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{russian} 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 "russian" and +% "russian-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}{\DTMrussiandaymonthsep} +% The separator between the day and month for the text format. +% \begin{macrocode} +\newcommand*{\DTMrussiandaymonthsep}{% + \DTMtexorpdfstring{\protect~}{\space}} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMrussianmonthyearsep} +% The separator between the month and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMrussianmonthyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMrussiandatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMrussiandatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMrussiantimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMrussiantimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMrussiandatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMrussiandatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMrussiantimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMrussiantimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{russian}{daymonthsep}{\renewcommand*{\DTMrussiandaymonthsep}{#1}} +\DTMdefkey{russian}{monthyearsep}{\renewcommand*{\DTMrussianmonthyearsep}{#1}} +\DTMdefkey{russian}{datetimesep}{\renewcommand*{\DTMrussiandatetimesep}{#1}} +\DTMdefkey{russian}{timezonesep}{\renewcommand*{\DTMrussiantimezonesep}{#1}} +\DTMdefkey{russian}{datesep}{\renewcommand*{\DTMrussiandatesep}{#1}} +\DTMdefkey{russian}{timesep}{\renewcommand*{\DTMrussiantimesep}{#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{russian}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{russian}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{russian}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{russian}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{russian}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{russian}{showyear}{true} +% \end{macrocode} +% +% Define the "russian" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {russian}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{russian}{showdayofmonth} + {\DTMrussianordinal{##3}\DTMrussiandaymonthsep}% + {}% + \DTMrussianmonthname{##2}% + \DTMifbool{russian}{showyear}% + {% + \DTMrussianmonthyearsep + \DTMrussianyear{##1}% + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMifbool{russian}{showdayofmonth} + {% + \DTMrussianordinal{##3}\DTMrussiandaymonthsep + \DTMrussianmonthname{##2}% + }% + {% + \DTMrussianMonthname{##2}% + }% + \DTMifbool{russian}{showyear}% + {% + \DTMrussianmonthyearsep + \DTMrussianyear{##1}% + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMrussianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{russian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMrussiantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMrussiandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMrussiantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMrussiandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMrussiantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {russian-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{russian}{showdayofmonth}% + {% + \number##3 % space intended + \DTMrussiandatesep + }% + {}% + \number##2 % space intended + \DTMifbool{russian}{showyear}% + {% + \DTMrussiandatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}[4]{\DTMdisplaydate{##1}{##2}{##3}{##4}}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMrussiantimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMrussiantimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMrussianzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{russian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMrussiantimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMrussiandatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMrussiantimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMrussianzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. These may need translating (in which case the definitions +% might need to be moved to the \texttt{utf8} and \texttt{ascii} ldf +% files). Daylight saving is not taken into account. +% \begin{macrocode} +\newcommand*{\DTMrussianzonemaps}{% + \DTMdefzonemap{03}{00}{MKT}% + \DTMdefzonemap{04}{00}{SAMT}% + \DTMdefzonemap{05}{00}{YEKT}% + \DTMdefzonemap{06}{00}{OMST}% + \DTMdefzonemap{07}{00}{KRAT}% + \DTMdefzonemap{08}{00}{IRKST}% + \DTMdefzonemap{09}{00}{YAKST}% + \DTMdefzonemap{10}{00}{VLAT}% + \DTMdefzonemap{11}{00}{SRET}% + \DTMdefzonemap{12}{00}{PETT}% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{russian}} +{\DTMsetstyle{russian-numeric}} +% \end{macrocode} +% +% Redefine \cs{daterussian} (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\daterussian + {% do nothing + }% + {% + \def\daterussian{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{russian}}% + {\DTMsetstyle{russian-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{russian}}% + {\DTMsetstyle{russian-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-russian/datetime2-russian.ins b/Master/texmf-dist/source/latex/datetime2-russian/datetime2-russian.ins new file mode 100644 index 00000000000..4af80e64702 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-russian/datetime2-russian.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-russian.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-russian.dtx and + datetime2-russian.ins and the derived files + datetime2-russian-utf8.ldf, datetime2-russian-ascii.ldf and + datetime2-russian.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-russian-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-russian.dtx}{datetime2-russian-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-russian-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-russian.dtx}{datetime2-russian-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-russian.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-russian.dtx}{datetime2-russian.ldf,package}% + }% +} + +\endbatchfile + diff --git a/Master/texmf-dist/source/latex/datetime2-samin/datetime2-samin.dtx b/Master/texmf-dist/source/latex/datetime2-samin/datetime2-samin.dtx new file mode 100644 index 00000000000..175dda39edf --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-samin/datetime2-samin.dtx @@ -0,0 +1,631 @@ +%\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 Northern Sami Module}]{hyperref} + +\setmainfont{Liberation Serif} +\setmonofont{Liberation Mono} + +\CheckSum{332} + +\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-samin.dtx} +\end{document} +% +%\fi +% +%\MakeShortVerb{"} +% +%\title{Northern Sami Module for datetime2 Package} +%\author{Nicola L. C. Talbot (inactive)} +%\date{2015-03-31 (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 Northern Sami 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-samin}'s \cs{today}. +% +%I don't know if these settings are correct as I can't speak Northern Sami. +%In particular, I don't know if the "samin" 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-samin.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-samin-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-31}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{samin-utf8}[2015/03/31 v1.0] +% \end{macrocode} +%\begin{macro}{\DTMsaminordinal} +% \begin{macrocode} +\newcommand*{\DTMsaminordinal}[1]{% + \number#1.\DTMtexorpdfstring{\protect~}{\space}b.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMsaminmonthname} +% Northern Sami month names. +% \begin{macrocode} +\newcommand*{\DTMsaminmonthname}[1]{% + \ifcase#1 + \or + ođđajagemánu% + \or + guovvamánu% + \or + njukčamánu% + \or + cuoŋománu% + \or + miessemánu% + \or + geassemánu% + \or + suoidnemánu% + \or + borgemánu% + \or + čakčamánu% + \or + golggotmánu% + \or + skábmamánu% + \or + juovlamánu% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMsaminMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMsaminMonthname}[1]{% + \ifcase#1 + \or + Ođđajagemánu% + \or + Guovvamánu% + \or + Njukčamánu% + \or + Cuoŋománu% + \or + Miessemánu% + \or + Geassemánu% + \or + Suoidnemánu% + \or + Borgemánu% + \or + Čakčamánu% + \or + Golggotmánu% + \or + Skábmamánu% + \or + Juovlamánu% + \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-samin-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-samin-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-31}{Initial release} +% Identify module +% \begin{macrocode} +\ProvidesDateTimeModule{samin-ascii}[2015/03/31 v1.0] +% \end{macrocode} +% +%If abbreviated dates are supported, short month names should be +%likewise provided. +%\begin{macro}{\DTMsaminordinal} +% \begin{macrocode} +\newcommand*{\DTMsaminordinal}[1]{% + \number#1.\DTMtexorpdfstring{\protect~}{\space}b.% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMsaminmonthname} +% Northern Sami month names. +% \begin{macrocode} +\newcommand*{\DTMsaminmonthname}[1]{% + \ifcase#1 + \or + o\protect\dj\protect\dj ajagem\protect\'anu% + \or + guovvam\protect\'anu% + \or + njuk\protect\v cam\protect\'anu% + \or + cuo\protect\ng om\protect\'anu% + \or + miessem\protect\'anu% + \or + geassem\protect\'anu% + \or + suoidnem\protect\'anu% + \or + borgem\protect\'anu% + \or + \protect\v cak\protect\v cam\protect\'anu% + \or + golggotm\protect\'anu% + \or + sk\protect\'abmam\protect\'anu% + \or + juovlam\protect\'anu% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMsaminMonthname} +% As above but capitalize. +% \begin{macrocode} +\newcommand*{\DTMsaminMonthname}[1]{% + \ifcase#1 + \or + O\protect\dj\protect\dj ajagem\protect\'anu% + \or + Guovvam\protect\'anu% + \or + Njuk\protect\v cam\protect\'anu% + \or + Cuo\protect\ng om\protect\'anu% + \or + Miessem\protect\'anu% + \or + Geassem\protect\'anu% + \or + Suoidnem\protect\'anu% + \or + Borgem\protect\'anu% + \or + \protect\v Cak\protect\v cam\protect\'anu% + \or + Golggotm\protect\'anu% + \or + Sk\protect\'abmam\protect\'anu% + \or + Juovlam\protect\'anu% + \fi +} +% \end{macrocode} +%\end{macro} +% +% +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +% +%\subsection{Main Northern Sami Module (\texttt{datetime2-samin.ldf})} +%\changes{1.0}{2015-03-31}{Initial release} +% +%\iffalse +% \begin{macrocode} +%<*datetime2-samin.ldf> +% \end{macrocode} +%\fi +% +% Identify Module +% \begin{macrocode} +\ProvidesDateTimeModule{samin}[2015/03/31 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{samin-utf8} if either of those engines are used +% otherwise load \texttt{samin-ascii}. +% \begin{macrocode} +\ifxetex + \RequireDateTimeModule{samin-utf8} +\else + \ifluatex + \RequireDateTimeModule{samin-utf8} + \else + \RequireDateTimeModule{samin-ascii} + \fi +\fi +% \end{macrocode} +% +% Define the \texttt{samin} 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 "samin" and +% "samin-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}{\DTMsaminmonthdaysep} +% The separator between the month and day for the text format. +% \begin{macrocode} +\newcommand*{\DTMsaminmonthdaysep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMsamindayyearsep} +% The separator between the day and year for the text format. +% \begin{macrocode} +\newcommand*{\DTMsamindayyearsep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMsamindatetimesep} +% The separator between the date and time blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMsamindatetimesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMsamintimezonesep} +% The separator between the time and zone blocks in the full format +% (either text or numeric). +% \begin{macrocode} +\newcommand*{\DTMsamintimezonesep}{\space} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMsamindatesep} +% The separator for the numeric date format. +% \begin{macrocode} +\newcommand*{\DTMsamindatesep}{.} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTMsamintimesep} +% The separator for the numeric time format. +% \begin{macrocode} +\newcommand*{\DTMsamintimesep}{:} +% \end{macrocode} +%\end{macro} +% +%Provide keys that can be used in \cs{DTMlangsetup} to set these +%separators. +% \begin{macrocode} +\DTMdefkey{samin}{monthdaysep}{\renewcommand*{\DTMsaminmonthdaysep}{#1}} +\DTMdefkey{samin}{dayyearsep}{\renewcommand*{\DTMsamindayyearsep}{#1}} +\DTMdefkey{samin}{datetimesep}{\renewcommand*{\DTMsamindatetimesep}{#1}} +\DTMdefkey{samin}{timezonesep}{\renewcommand*{\DTMsamintimezonesep}{#1}} +\DTMdefkey{samin}{datesep}{\renewcommand*{\DTMsamindatesep}{#1}} +\DTMdefkey{samin}{timesep}{\renewcommand*{\DTMsamintimesep}{#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{samin}{mapzone}[true]{} +% \end{macrocode} +% The default is to use mappings. +% \begin{macrocode} +\DTMsetbool{samin}{mapzone}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the day of month should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{samin}{showdayofmonth}[true]{} +% \end{macrocode} +% The default is to show the day of month. +% \begin{macrocode} +\DTMsetbool{samin}{showdayofmonth}{true} +% \end{macrocode} +% +% Define a boolean key that determines if the year should be +% displayed. +% \begin{macrocode} +\DTMdefboolkey{samin}{showyear}[true]{} +% \end{macrocode} +% The default is to show the year. +% \begin{macrocode} +\DTMsetbool{samin}{showyear}{true} +% \end{macrocode} +% +% Define the "samin" style. (TODO: implement day of week?) +% \begin{macrocode} +\DTMnewstyle + {samin}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMsaminmonthname{##2}% + \DTMifbool{samin}{showdayofmonth} + {% + \DTMsaminmonthdaysep + \DTMsaminordinal{##3}% + }% + {}% + \DTMifbool{samin}{showyear}% + {% + \DTMsamindayyearsep + \number##1 + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \DTMsaminMonthname{##2}% + \DTMifbool{samin}{showdayofmonth} + {% + \DTMsaminmonthdaysep + \DTMsaminordinal{##3}% + }% + {}% + \DTMifbool{samin}{showyear}% + {% + \DTMsamindayyearsep + \number##1 + }% + {}% + }% + }% + {% time style (use default) + \DTMsettimestyle{default}% + }% + {% zone style + \DTMresetzones + \DTMsaminzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{samin}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMsamintimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMsamindatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMsamintimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMsamindatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMsamintimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + }% +% \end{macrocode} +% +% Define numeric style. +% \begin{macrocode} +\DTMnewstyle + {samin-numeric}% label + {% date style + \renewcommand*\DTMdisplaydate[4]{% + \DTMifbool{samin}{showdayofmonth}% + {% + \number##3 % space intended + \DTMsamindatesep + }% + {}% + \number##2 % space intended + \DTMifbool{samin}{showyear}% + {% + \DTMsamindatesep + \number##1 % space intended + }% + {}% + }% + \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% + }% + {% time style + \renewcommand*\DTMdisplaytime[3]{% + \number##1 + \DTMsamintimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMsamintimesep\DTMtwodigits{##3}\fi + }% + }% + {% zone style + \DTMresetzones + \DTMsaminzonemaps + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{samin}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0\else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMsamintimesep\DTMtwodigits{##2}\fi + }% + }% + }% + {% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMsamindatetimesep + \fi + \DTMdisplaytime{##5}{##6}{##7}% + \ifDTMshowzone + \DTMsamintimezonesep + \DTMdisplayzone{##8}{##9}% + \fi + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% + } +% \end{macrocode} +% +%\begin{macro}{\DTMsaminzonemaps} +% The time zone mappings are set through this command, which can be +% redefined if extra mappings are required or mappings need to be +% removed. Daylight saving isn't taken into account. +% \begin{macrocode} +\newcommand*{\DTMsaminzonemaps}{% + \DTMdefzonemap{01}{00}{CET}% + \DTMdefzonemap{02}{00}{EET}% +} +% \end{macrocode} +%\end{macro} + +% Switch style according to the \opt{useregional} setting. +% \begin{macrocode} +\DTMifcaseregional +{}% do nothing +{\DTMsetstyle{samin}} +{\DTMsetstyle{samin-numeric}} +% \end{macrocode} +% +% Redefine \cs{datesamin} (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\datesamin + {% do nothing + }% + {% + \def\datesamin{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{samin}}% + {\DTMsetstyle{samin-numeric}}% + }% + }% +}% +{% + \csdef{date\CurrentTrackedDialect}{% + \DTMifcaseregional + {}% do nothing + {\DTMsetstyle{samin}}% + {\DTMsetstyle{samin-numeric}} + }% +}% +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/datetime2-samin/datetime2-samin.ins b/Master/texmf-dist/source/latex/datetime2-samin/datetime2-samin.ins new file mode 100644 index 00000000000..f8f46076da6 --- /dev/null +++ b/Master/texmf-dist/source/latex/datetime2-samin/datetime2-samin.ins @@ -0,0 +1,61 @@ +\input docstrip + +\preamble + + datetime2-samin.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-samin.dtx and + datetime2-samin.ins and the derived files + datetime2-samin-utf8.ldf, datetime2-samin-ascii.ldf and + datetime2-samin.ldf. + +\endpreamble + +\askforoverwritefalse + +\generate +{% + \file + {datetime2-samin-utf8.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-samin.dtx}{datetime2-samin-utf8.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-samin-ascii.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-samin.dtx}{datetime2-samin-ascii.ldf,package}% + }% +} + +\generate +{% + \file + {datetime2-samin.ldf}% + {% + \usepreamble\defaultpreamble + \usepostamble\defaultpostamble + \from{datetime2-samin.dtx}{datetime2-samin.ldf,package}% + }% +} + +\endbatchfile + -- cgit v1.2.3