summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.dtx518
-rw-r--r--Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.ins4
2 files changed, 310 insertions, 212 deletions
diff --git a/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.dtx b/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.dtx
index 6f5c3ea0bf4..df151199e0e 100644
--- a/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.dtx
+++ b/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.dtx
@@ -20,7 +20,8 @@
% \iffalse
% Doc-Source file to use with LaTeX2e
% Copyright (C) 2015 Nicola Talbot, all rights reserved.
-% (New maintainer add relevant lines here.)
+%
+% I have added dates in formed short e ampm format
% \fi
% \iffalse
%<*driver>
@@ -37,7 +38,7 @@
pdftitle={datetime2.sty Italian Module}]{hyperref}
-\CheckSum{311}
+\CheckSum{414}
\renewcommand*{\usage}[1]{\hyperpage{#1}}
\renewcommand*{\main}[1]{\hyperpage{#1}}
@@ -80,25 +81,6 @@
% \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-italian}'s \cs{today}.
-%
-%I don't know if these settings are correct.
-%In particular, I don't know if the "italian" 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-italian.ins} where Name
-%is the name of the maintainer(s) and replace
-%the `inactive' status to `maintained'.
-%
-%Currently there is only a regionless style. New maintainers may
-%want to add regional variants. This style currently doesn't check the
%\opt{showdow} setting.
%
%\StopEventually{%
@@ -121,7 +103,7 @@
%\changes{1.0}{2015-03-27}{Initial release}
% Identify module
% \begin{macrocode}
-\ProvidesDateTimeModule{italian-utf8}[2015/03/27 v1.0]
+\ProvidesDateTimeModule{italian-utf8}[2015/04/10 v1.1]
% \end{macrocode}
%\begin{macro}{\DTMitalianordinal}
% \begin{macrocode}
@@ -136,7 +118,6 @@
% \begin{macrocode}
\newcommand*{\DTMitalianmonthname}[1]{%
\ifcase#1
- \or
gennaio%
\or
febbraio%
@@ -165,50 +146,14 @@
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\DTMitalianMonthname}
-% As above but start with a capital.
-% \begin{macrocode}
-\newcommand*{\DTMitalianMonthname}[1]{%
- \ifcase#1
- \or
- Gennaio%
- \or
- Febbraio%
- \or
- Marzo%
- \or
- Aprile%
- \or
- Maggio%
- \or
- Giugno%
- \or
- Luglio%
- \or
- Agosto%
- \or
- Settembre%
- \or
- Ottobre%
- \or
- Novembre%
- \or
- Dicembre%
- \fi
-}
-% \end{macrocode}
-%\end{macro}
%
-%If abbreviated dates are supported, short month names should be
-%likewise provided.
+
%
%\begin{macro}{\DTMitalianweekdayname}
%These are provided here but not currently used in the date format.
% \begin{macrocode}
\newcommand*{\DTMitalianweekdayname}[1]{%
\ifcase#1
- domenica%
- \or
lunedì%
\or
martedì%
@@ -220,34 +165,68 @@
venerdì%
\or
sabato%
+ \or
+ domenica%
\fi
}
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\DTMitalianWeekdayname}
-%As above but start with a capital.
-% \begin{macrocode}
-\newcommand*{\DTMitalianWeekdayname}[1]{%
- \ifcase#1
- Domenica%
- \or
- Lunedì%
- \or
- Martedì%
- \or
- Mercoledì%
- \or
- Giovedì%
- \or
- Venerdì%
- \or
- Sabato%
- \fi
+%
+%\begin{macro}{\DTMitalianshortmonthname}
+%short mont.
+% \begin{macrocode}
+\newcommand*{\DTMitalianshortmonthname}[1]{%
+ \ifcase#1
+ gen.%
+ \or
+ feb.%
+ \or
+ mar.%
+ \or
+ apr.%
+ \or
+ mag.%
+ \or
+ giun.%
+ \or
+ lug.%
+ \or
+ aug.%
+ \or
+ set.%
+ \or
+ ott.%
+ \or
+ nov.%
+ \or
+ dic.%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\DTMitalianshortweekdayname}
+%short week day.
+% \begin{macrocode}
+\newcommand*{\DTMitalianshortweekdayname}[1]{%
+ \ifcase#1
+ lun.%
+ \or
+ mar.%
+ \or
+ mer.%
+ \or
+ gio.%
+ \or
+ ven.%
+ \or
+ sab.%
+ \or
+ dom.%
+ \fi
}
% \end{macrocode}
%\end{macro}
-%
%\iffalse
% \begin{macrocode}
%</datetime2-italian-utf8.ldf>
@@ -269,7 +248,7 @@
%\changes{1.0}{2015-03-27}{Initial release}
% Identify module
% \begin{macrocode}
-\ProvidesDateTimeModule{italian-ascii}[2015/03/27 v1.0]
+\ProvidesDateTimeModule{italian-ascii}[2015/04/10 v1.1]
% \end{macrocode}
%
%If abbreviated dates are supported, short month names should be
@@ -316,47 +295,12 @@
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\DTMitalianMonthname}
-% As above but start with a capital.
-% \begin{macrocode}
-\newcommand*{\DTMitalianMonthname}[1]{%
- \ifcase#1
- \or
- Gennaio%
- \or
- Febbraio%
- \or
- Marzo%
- \or
- Aprile%
- \or
- Maggio%
- \or
- Giugno%
- \or
- Luglio%
- \or
- Agosto%
- \or
- Settembre%
- \or
- Ottobre%
- \or
- Novembre%
- \or
- Dicembre%
- \fi
-}
-% \end{macrocode}
-%\end{macro}
%
%\begin{macro}{\DTMitalianweekdayname}
%These are provided here but not currently used in the date format.
% \begin{macrocode}
\newcommand*{\DTMitalianweekdayname}[1]{%
\ifcase#1
- domenica%
- \or
luned\protect\`i%
\or
marted\protect\`i%
@@ -368,34 +312,69 @@
venerd\protect\`i%
\or
sabato%
+ \or
+ domenica%
\fi
}
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\DTMitalianWeekdayname}
-%As above but start with a capital.
-% \begin{macrocode}
-\newcommand*{\DTMitalianWeekdayname}[1]{%
- \ifcase#1
- Domenica%
- \or
- Luned\protect\`i%
- \or
- Marted\protect\`i%
- \or
- Mercoled\protect\`i%
- \or
- Gioved\protect\`i%
- \or
- Venerd\protect\`i%
- \or
- Sabato%
- \fi
+%
+%\begin{macro}{\DTMitalianshortmonthname}
+%short mont.
+% \begin{macrocode}
+\newcommand*{\DTMitalianshortmonthname}[1]{%
+ \ifcase#1
+ \or
+ gen.%
+ \or
+ feb.%
+ \or
+ mar.%
+ \or
+ apr.%
+ \or
+ mag.%
+ \or
+ giun.%
+ \or
+ lug.%
+ \or
+ aug.%
+ \or
+ set.%
+ \or
+ ott.%
+ \or
+ nov.%
+ \or
+ dic.%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\DTMitalianshortweekdayname}
+%short week day.
+% \begin{macrocode}
+\newcommand*{\DTMitalianshortweekdayname}[1]{%
+ \ifcase#1
+ lun.%
+ \or
+ mar.%
+ \or
+ mer.%
+ \or
+ gio.%
+ \or
+ ven.%
+ \or
+ sab.%
+ \or
+ dom.%
+ \fi
}
% \end{macrocode}
%\end{macro}
-%
%
%\iffalse
% \begin{macrocode}
@@ -404,8 +383,8 @@
%\fi
%
%\subsection{Main Italian Module (\texttt{datetime2-italian.ldf})}
-%\changes{1.0}{2015-03-27}{Initial release}
-%
+%\changes{1.0}{2015-03-10}{Initial release}
+%\changes{1.1}{2015-04-10}{updating}
%\iffalse
% \begin{macrocode}
%<*datetime2-italian.ldf>
@@ -414,7 +393,7 @@
%
% Identify Module
% \begin{macrocode}
-\ProvidesDateTimeModule{italian}[2015/03/27 v1.0]
+\ProvidesDateTimeModule{italian}[2015/04/10 v1.1]
% \end{macrocode}
% Need to find out if XeTeX or LuaTeX are being used.
% \begin{macrocode}
@@ -497,10 +476,16 @@
\DTMdefkey{italian}{datesep}{\renewcommand*{\DTMitaliandatesep}{#1}}
\DTMdefkey{italian}{timesep}{\renewcommand*{\DTMitaliantimesep}{#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 shortened form
+% should be used.
+% \begin{macrocode}
+\DTMdefboolkey{italian}{abbr}[true]{}
+% \end{macrocode}
+% The default is to use abbr
+% \begin{macrocode}
+\DTMsetbool{italian}{abbr}{false}
+% \end{macrocode}
%
% Define a boolean key that determines if the time zone mappings
% should be used.
@@ -532,77 +517,116 @@
\DTMsetbool{italian}{showyear}{true}
% \end{macrocode}
%
+% \begin{macrocode}
+\newcommand*\DTMitalianam{am}%
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\DTMitalianpm{pm}%
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\DTMitalianmidnight{mezzanotte}%
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*\DTMitaliannoon{mezzogiorno}%
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*{\DTMitalianampmfmt}[1]{#1}
+% \end{macrocode}
% Define the "italian" style. (TODO: implement day of week?)
% \begin{macrocode}
\DTMnewstyle
- {italian}% label
- {% date style
- \renewcommand*\DTMdisplaydate[4]{%
- \DTMifbool{italian}{showdayofmonth}
- {\DTMitalianordinal{##3}\DTMitaliandaymonthsep}%
- {}%
- \DTMitalianmonthname{##2}%
- \DTMifbool{italian}{showyear}%
- {%
- \DTMitalianmonthyearsep
- \number##1 % space intended
- }%
- {}%
- }%
- \renewcommand*\DTMDisplaydate[4]{%
- \DTMifbool{italian}{showdayofmonth}
- {%
- \DTMitalianordinal{##3}\DTMitaliandaymonthsep
- \DTMitalianmonthname{##2}%
- }%
- {\DTMitalianMonthname{##2}}%
- \DTMifbool{italian}{showyear}%
- {%
- \DTMitalianmonthyearsep
- \number##1 % space intended
- }%
- {}%
- }%
- }%
- {% time style (use default)
- \DTMsettimestyle{default}%
- }%
- {% zone style
- \DTMresetzones
- \DTMitalianzonemaps
- \renewcommand*{\DTMdisplayzone}[2]{%
- \DTMifbool{italian}{mapzone}%
- {\DTMusezonemapordefault{##1}{##2}}%
- {%
- \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
- \ifDTMshowzoneminutes\DTMitaliantimesep\DTMtwodigits{##2}\fi
- }%
- }%
- }%
- {% full style
- \renewcommand*{\DTMdisplay}[9]{%
- \ifDTMshowdate
- \DTMdisplaydate{##1}{##2}{##3}{##4}%
- \DTMitaliandatetimesep
- \fi
- \DTMdisplaytime{##5}{##6}{##7}%
- \ifDTMshowzone
- \DTMitaliantimezonesep
- \DTMdisplayzone{##8}{##9}%
- \fi
- }%
- \renewcommand*{\DTMDisplay}[9]{%
- \ifDTMshowdate
- \DTMDisplaydate{##1}{##2}{##3}{##4}%
- \DTMitaliandatetimesep
- \fi
- \DTMdisplaytime{##5}{##6}{##7}%
- \ifDTMshowzone
- \DTMitaliantimezonesep
- \DTMdisplayzone{##8}{##9}%
- \fi
- }%
- }%
+{italian}% label
+{% date style
+% \renewcommand*{\DTMitalianfmtordsuffix}{\DTMitalianfmtordsuffix}%
+ \renewcommand*\DTMdisplaydate[4]{%
+ \ifDTMshowdow
+ \ifnum##4>-1%
+ \DTMifbool{italian}{abbr}%
+ {\DTMitalianshortweekdayname{##4}}%
+ {\DTMitalianweekdayname{##4}}%
+ \space
+ \fi
+ \fi
+ \DTMifbool{italian}{showdayofmonth}%
+ {%
+ \DTMitalianordinal{##3}%
+ \DTMitaliandaymonthsep
+ }%
+ {}%
+ \DTMifbool{italian}{abbr}%
+ {\DTMitalianshortmonthname{##2}}%
+ {\DTMitalianmonthname{##2}}%
+ \DTMifbool{italian}{showyear}%
+ {%
+ \DTMitalianmonthyearsep\number##1 % space intended
+ }%
+ {}%
+ }%
+ \renewcommand*\DTMDisplaydate[4]{%
+ \ifDTMshowdow
+ \ifnum##4>-1%
+ \DTMifbool{italian}{abbr}%
+ {\DTMitalianshortweekdayname{##4}}%
+ {\DTMitalianweekdayname{##4}}%
+ \space
+ \fi
+ \fi
+ \DTMifbool{italian}{showdayofmonth}%
+ {%
+ \DTMitalianordinal{##3}%
+ \DTMitaliandaymonthsep
+ }%
+ {}%
+ \DTMifbool{italian}{abbr}%
+ {\DTMitalianshortmonthname{##2}}%
+ {\DTMitalianmonthname{##2}}%
+ \DTMifbool{italian}{showyear}%
+ {%
+ \DTMitalianmonthyearsep\number##1 % space intended
+ }%
+ {}%
+ }%
+}%
+{% time style
+ \renewcommand*\DTMitaliantimesep{\DTMitaliantimesep}%
+ \DTMsettimestyle{default}%ampm
+}%
+{% zone style
+ \DTMresetzones
+ \DTMitalianzonemaps
+ \renewcommand*{\DTMdisplayzone}[2]{%
+ \DTMifbool{italian}{mapzone}%
+ {\DTMusezonemapordefault{##1}{##2}}%
+ {%
+ \ifnum##1<0\else+\fi\DTMtwodigits{##1}%
+ \ifDTMshowzoneminutes\DTMitaliantimesep\DTMtwodigits{##2}\fi
+ }%
+ }%
+}%
+{% full style
+ \renewcommand*{\DTMdisplay}[9]{%
+ \ifDTMshowdate
+ \DTMdisplaydate{##1}{##2}{##3}{##4}%
+ \DTMitaliandatetimesep
+ \fi
+ \DTMdisplaytime{##5}{##6}{##7}%
+ \ifDTMshowzone
+ \DTMitaliantimezonesep
+ \DTMdisplayzone{##8}{##9}%
+ \fi
+ }%
+ \renewcommand*{\DTMDisplay}[9]{%
+ \ifDTMshowdate
+ \DTMDisplaydate{##1}{##2}{##3}{##4}%
+ \DTMitaliandatetimesep
+ \fi
+ \DTMdisplaytime{##5}{##6}{##7}%
+ \ifDTMshowzone
+ \DTMitaliantimezonesep
+ \DTMdisplayzone{##8}{##9}%
+ \fi
+ }%
+}%
% \end{macrocode}
%
% Define numeric style.
@@ -662,6 +686,78 @@
}
% \end{macrocode}
%
+% Define am pm style.
+% \begin{macrocode}
+ \DTMnewtimestyle
+ {italianampm}% label
+ {%
+ \renewcommand*\DTMdisplaytime[3]{%
+ \ifnum##2=0
+ \ifnum##1=12
+ \DTMtexorpdfstring
+ {\DTMitalianampmfmt{\DTMitaliannoon}}%
+ {\DTMitaliannoon}%
+ \else
+ \ifnum##1=0
+ \DTMtexorpdfstring
+ {\DTMitalianampmfmt{\DTMitalianmidnight}}%
+ {\DTMitalianmidnight}%
+ \else
+ \ifnum##1=24
+ \DTMtexorpdfstring
+ {\DTMitalianampmfmt{\DTMitalianmidnight}}%
+ {\DTMitalianmidnight}%
+ \else
+ \ifnum##1<12
+ \number##1
+ \DTMtexorpdfstring
+ {\DTMitalianampmfmt{\DTMitalianam}}%
+ {\DTMitalianam}%
+ \else
+ \number\numexpr##1-12\relax
+ \DTMtexorpdfstring
+ {\DTMitalianampmfmt{\DTMitalianpm}}%
+ {\DTMitalianpm}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \else
+ \ifnum##1<13
+ \ifnum##1=0
+ 12%
+ \else
+ \number##1
+ \fi
+ \DTMitaliantimesep\DTMtwodigits{##2}%
+ \ifnum##1=12
+ \DTMtexorpdfstring
+ {\DTMitalianampmfmt{\DTMitalianam}}%
+ {\DTMitalianpm}%
+ \else
+ \DTMtexorpdfstring
+ {\DTMitalianampmfmt{\DTMitalianam}}%
+ {\DTMitalianam}%
+ \fi
+ \else
+ \number\numexpr##1-12\relax
+ \DTMitaliantimesep\DTMtwodigits{##2}%
+ \ifnum##1=24
+ \DTMtexorpdfstring
+ {\DTMitalianampmfmt{\DTMitalianpm}}%
+ {\DTMitalianam}%
+ \else
+ \DTMtexorpdfstring
+ {\DTMitalianampmfmt{\DTMitalianpm}}%
+ {\DTMitalianpm}%
+ \fi
+ \fi
+ \fi
+ }%
+ }%
+% \end{macrocode}
+%
+%
%\begin{macro}{\DTMitalianzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
diff --git a/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.ins b/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.ins
index 4a170febf35..28ed287cf2c 100644
--- a/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.ins
+++ b/Master/texmf-dist/source/latex/datetime2-italian/datetime2-italian.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'.
+ The Current Maintainer of this work is Claudio Duchi
+
+ This work has the LPPL maintenance status `maintained'.
This work consists of the files datetime2-italian.dtx and
datetime2-italian.ins and the derived files