summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/datetime2-basque
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-09-03 23:59:51 +0000
committerKarl Berry <karl@freefriends.org>2015-09-03 23:59:51 +0000
commitef724de0a3026a180d48d923ab9fd796c48b3605 (patch)
tree3a62eef2e1b8a2a4c49455df66881fa7b8c54695 /Master/texmf-dist/source/latex/datetime2-basque
parent5763fa78ed0911c4b107c00cd612eb0ea380d949 (diff)
datetime2-basque (3sep15)
git-svn-id: svn://tug.org/texlive/trunk@38287 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/datetime2-basque')
-rw-r--r--Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.dtx123
-rw-r--r--Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.ins4
2 files changed, 90 insertions, 37 deletions
diff --git a/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.dtx b/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.dtx
index 1c7245a5680..e779ebc511f 100644
--- a/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.dtx
+++ b/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.dtx
@@ -20,7 +20,7 @@
% \iffalse
% Doc-Source file to use with LaTeX2e
% Copyright (C) 2015 Nicola Talbot, all rights reserved.
-% (New maintainer add relevant lines here.)
+% Maintainer Zunbeltz Izaola. Based on the basque-date package by Edorta Ibarra.
% \fi
% \iffalse
%<*driver>
@@ -37,7 +37,7 @@
pdftitle={datetime2.sty Basque Module}]{hyperref}
-\CheckSum{204}
+\CheckSum{377}
\renewcommand*{\usage}[1]{\hyperpage{#1}}
\renewcommand*{\main}[1]{\hyperpage{#1}}
@@ -60,13 +60,10 @@
%\MakeShortVerb{"}
%
%\title{Basque Module for datetime2 Package}
-%\author{Nicola L. C. Talbot (inactive)}
-%\date{2015-03-29 (v1.0)}
+%\author{Zunbeltz Izaola \and Nicola L. C. Talbot (inactive)}
+%\date{2015-03-29 (v1.2)}
%\maketitle
%
-%This module is currently unmaintained and may be subject to change.
-%If you want to volunteer to take over maintanance, contact me at
-%\url{http://www.dickimaw-books.com/contact.html}
%
%\begin{abstract}
%This is the Basque language module for the \sty{datetime2}
@@ -79,26 +76,28 @@
% 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.
+% Currently there is only a regionless style.
%\end{abstract}
%
-%I've copied the date style from \texttt{babel-basque}'s \cs{today}.
+% \section{Introduction}
%
-%I don't know if these settings are correct.
-%In particular, I don't know if the "basque" time style is
-%correct. Currently this just uses the "default" time style. Please
-%be aware that this may change. Whoever takes over maintanance
-%of this module may can change it as appropriate.
-%
-%The new maintainer should add the line:
-%\begin{verbatim}
-% The Current Maintainer of this work is Name.
-%\end{verbatim}
-%to the preamble part in \texttt{datetime2-basque.ins} where Name
-%is the name of the maintainer(s) and replace
-%the `inactive' status to `maintained'.
-%
-%Currently there is only a regionless style.
+% According to The Basque Language Academy (\textit{Euskaltzaindia}), there
+% are various correct forms to display the date in Basque.\footnote{\textit{37.
+% araua. Data nola adierazi}: \url{http://euskaltzaindia.net/dok/arauak/Araua\_0037.pdf}}
+% The most used form, which includes the name of the location where the document or
+% text has been written, is the following:
%
+% \begin{center}
+% \textit{Durango(n), 1983ko martxoaren 7a(n)},
+% \end{center}
+% where the inessive case \textit{``n''} is optional. It must be taken into account
+% that the declination of numbers in Basque is not straightforward.
+% The inessive case is deactivated by default. To activate it, set the
+% \sty{inessive} boolean option to \sty{true} with \cs{DTMlangsetup}:
+% \begin{verbatim}
+% \DTMlangsetup[basque]{inessive=true}
+% \end{verbatim}
+
%\StopEventually{%
%\clearpage
%\phantomsection
@@ -106,6 +105,7 @@
%\PrintChanges
%\addcontentsline{toc}{section}{\indexname}%
%\PrintIndex}
+%
%\section{The Code}
%At the moment there is only the one ".ldf" file.
%
@@ -122,18 +122,35 @@
% \begin{macrocode}
\ProvidesDateTimeModule{basque}[2015/03/29 v1.0]
% \end{macrocode}
+%
+% Define a boolean to use the inessive case. It is not used by default.
+%
+% \begin{macrocode}
+\DTMdefboolkey{basque}{inessive}[false]{}
+% \end{macrocode}
+
%\begin{macro}{\DTMbasqueordinal}
-% I don't know if this is correct, but it's provided in case
-% a suffix is required.
+% Numbers are declined according to to the case.
% \begin{macrocode}
\newcommand*{\DTMbasqueordinal}[1]{%
- \number#1 % space intended
+ \number#1%
+ \DTMifbool{basque}{inessive}{%
+ \ifcase\number#1 %declination for the day (inessive case)
+ \or ean\or an\or an\or an\or ean\or an\or an\or an\or an\or ean\or
+ n\or an\or an\or an\or ean\or an\or an\or an\or an\or an\or ean\or
+ an\or an\or an\or ean\or an\or an\or an\or an\or ean\or n\fi%
+ }{%
+ \ifcase\number#1 %declination for the day (absolutive case)
+ \or a\or a\or a\or a\or a\or a\or a\or a\or a\or a\or \or
+ a\or a\or a\or a\or a\or a\or a\or a\or a\or a\or a\or a\or
+ a\or a\or a\or a\or a\or a\or a\or\fi%
+ }%
}
% \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMbasquemonthname}
-% Basque month names.
+% Basque declined month names.
% \begin{macrocode}
\newcommand*{\DTMbasquemonthname}[1]{%
\ifcase#1
@@ -220,8 +237,37 @@
%
%\begin{macro}{\DTMbasqueyearmonthsep}
% The separator between the month and year for the text format.
+% According to the Basque declination rules for year
% \begin{macrocode}
-\newcommand*{\DTMbasqueyearmonthsep}{.eko\space}
+\newcommand*{\DTMbasqueyearmonthsep}{\ifcase\DTMtwodigits{\@dtm@currentyear}
+ %Declination for the year
+ %00-20
+ ko \or eko \or ko \or ko \or ko \or eko \or ko
+ \or ko \or ko \or ko \or eko \or ko \or ko
+ \or ko \or ko \or eko \or ko \or ko \or ko
+ \or ko \or ko \or
+ %21-40
+ eko \or ko \or ko \or ko \or eko \or ko
+ \or ko \or ko \or ko \or eko \or ko \or ko
+ \or ko \or ko \or eko \or ko \or ko \or ko
+ \or ko \or ko \or
+ %41-60
+ eko \or ko \or ko \or ko \or eko \or ko
+ \or ko \or ko \or ko \or eko \or ko \or ko
+ \or ko \or ko \or eko \or ko \or ko \or ko
+ \or ko \or ko \or
+ %61-80
+ eko \or ko \or ko \or ko \or eko \or ko
+ \or ko \or ko \or ko \or eko \or ko \or ko
+ \or ko \or ko \or eko \or ko \or ko \or ko
+ \or ko \or ko \or
+ %81-100
+ eko \or ko \or ko \or ko \or eko \or ko
+ \or ko \or ko \or ko \or eko \or ko \or ko
+ \or ko \or ko \or eko \or ko \or ko \or ko
+ \or ko \or eko
+ \fi%
+}
% \end{macrocode}
%\end{macro}
%
@@ -243,8 +289,13 @@
%
%\begin{macro}{\DTMbasquedatesep}
% The separator for the numeric date format.
+%
+% There is no clear tradition for the puctuation mark to separe the numbers.
+% Spanish tradition will use either slash (/) or en-dash (-). I couldn't find typographic guidelines on the french tradition.
+% I choose the slash over the en-dash because I found that more compact dates are nicer.
+%
% \begin{macrocode}
-\newcommand*{\DTMbasquedatesep}{.}
+\newcommand*{\DTMbasquedatesep}{/}
% \end{macrocode}
%\end{macro}
%
@@ -308,7 +359,7 @@
\renewcommand*\DTMdisplaydate[4]{%
\DTMifbool{basque}{showyear}%
{%
- \number##1 % space intended
+ \number##1%
\DTMbasqueyearmonthsep
}%
{}%
@@ -320,7 +371,7 @@
\renewcommand*\DTMDisplaydate[4]{%
\DTMifbool{basque}{showyear}%
{%
- \number##1 % space intended
+ \number##1%
\DTMbasqueyearmonthsep
\DTMbasquemonthname{##2}%
}%
@@ -379,17 +430,17 @@
{basque-numeric}% label
{% date style
\renewcommand*\DTMdisplaydate[4]{%
- \DTMifbool{basque}{showdayofmonth}%
+ \DTMifbool{basque}{showyear}%
{%
- \number##3 % space intended
+ \number##1%
\DTMbasquedatesep
}%
{}%
- \number##2 % space intended
- \DTMifbool{basque}{showyear}%
+ \number##2%
+ \DTMifbool{basque}{showdayofmonth}%
{%
\DTMbasquedatesep
- \number##1 % space intended
+ \number##3 % space intended
}%
{}%
}%
diff --git a/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.ins b/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.ins
index 28be67cf402..45445409205 100644
--- a/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.ins
+++ b/Master/texmf-dist/source/latex/datetime2-basque/datetime2-basque.ins
@@ -13,7 +13,9 @@
and version 1.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.
- This work has the LPPL maintenance status `inactive'.
+ This work has the LPPL maintenance status `maintained'.
+
+ The Current Maintainer of this work is Zunbeltz Izaola.
This work consists of the files datetime2-basque.dtx and
datetime2-basque.ins and the derived file