diff options
author | Karl Berry <karl@freefriends.org> | 2019-11-08 21:40:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-11-08 21:40:42 +0000 |
commit | 69e924ee6c8d31ad1ad84dfe14dd724fe50553df (patch) | |
tree | b372d481d5f427c625dcfd6c1973586e76b25649 /Master/texmf-dist/tex/latex/datetime2-serbian/datetime2-serbian.ldf | |
parent | bfcf758cb4ba89da72962112f6f71036abd8a1ee (diff) |
datetime2-serbian (8nov19)
git-svn-id: svn://tug.org/texlive/trunk@52695 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/datetime2-serbian/datetime2-serbian.ldf')
-rw-r--r-- | Master/texmf-dist/tex/latex/datetime2-serbian/datetime2-serbian.ldf | 401 |
1 files changed, 250 insertions, 151 deletions
diff --git a/Master/texmf-dist/tex/latex/datetime2-serbian/datetime2-serbian.ldf b/Master/texmf-dist/tex/latex/datetime2-serbian/datetime2-serbian.ldf index 6ff1d487e51..a41aef2f6d7 100644 --- a/Master/texmf-dist/tex/latex/datetime2-serbian/datetime2-serbian.ldf +++ b/Master/texmf-dist/tex/latex/datetime2-serbian/datetime2-serbian.ldf @@ -7,6 +7,7 @@ %% datetime2-serbian.dtx (with options: `datetime2-serbian.ldf,package') %% %% datetime2-serbian.dtx +%% Copyright 2019 Andrej Radović %% Copyright 2019 Nicola Talbot %% %% This work may be distributed and/or modified under the @@ -17,12 +18,26 @@ %% 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 Andrej Radović. %% %% This work consists of the files datetime2-serbian.dtx and -%% datetime2-serbian.ins and the derived files -%% datetime2-serbian-utf8.ldf, datetime2-serbian-ascii.ldf and -%% datetime2-serbian.ldf. +%% datetime2-serbian.ins and the derived files are as follows: +%% datetime2-serbian-base.ldf +%% datetime2-serbian-base-utf8.ldf +%% datetime2-serbian-base-ascii.ldf +%% datetime2-serbian.ldf +%% datetime2-sr-Latn.ldf +%% datetime2-sr-Latn-RS.ldf +%% datetime2-sr-Latn-ME.ldf +%% datetime2-sr-Latn-BA.ldf +%% datetime2-serbianc.ldf +%% datetime2-sr-Cyrl.ldf +%% datetime2-sr-Cyrl-RS.ldf +%% datetime2-sr-Cyrl-ME.ldf +%% datetime2-sr-Cyrl-BA.ldf +%% %% %% \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 @@ -39,189 +54,273 @@ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\ProvidesDateTimeModule{serbian}[2019/09/14 v1.0] -\RequirePackage{ifxetex,ifluatex} -\ifxetex - \RequireDateTimeModule{serbian-utf8} -\else - \ifluatex - \RequireDateTimeModule{serbian-utf8} - \else - \RequireDateTimeModule{serbian-ascii} - \fi -\fi +\ProvidesDateTimeModule{serbian}[2019/11/07 v2.0] +\RequireDateTimeModule{serbian-base} +\newcommand*{\DTMserbiandowdaysep}{,\space} \newcommand*{\DTMserbiandaymonthsep}{% - \DTMtexorpdfstring{\protect~}{\space}% + \DTMtexorpdfstring{\protect~}{\space}% } \newcommand*{\DTMserbianmonthyearsep}{\space} \newcommand*{\DTMserbiandatetimesep}{\space} \newcommand*{\DTMserbiantimezonesep}{\space} \newcommand*{\DTMserbiandatesep}{.} \newcommand*{\DTMserbiantimesep}{.} -\DTMdefkey{serbian}{daymonthsep}{\renewcommand*{\DTMserbiandaymonthsep}{#1}} -\DTMdefkey{serbian}{monthyearsep}{\renewcommand*{\DTMserbianmonthyearsep}{#1}} -\DTMdefkey{serbian}{datetimesep}{\renewcommand*{\DTMserbiandatetimesep}{#1}} -\DTMdefkey{serbian}{timezonesep}{\renewcommand*{\DTMserbiantimezonesep}{#1}} -\DTMdefkey{serbian}{datesep}{\renewcommand*{\DTMserbiandatesep}{#1}} -\DTMdefkey{serbian}{timesep}{\renewcommand*{\DTMserbiantimesep}{#1}} -\newcommand*{\DTMserbianmonthname}{\DTMserbiancyrmonthname} -\newcommand*{\DTMserbianMonthname}{\DTMserbiancyrMonthname} -\DTMdefchoicekey{serbian}{alphabet}[\val\nr]{cyrillic,latin}{% - \ifcase\nr\relax - \renewcommand*{\DTMserbianmonthname}{\DTMserbiancyrmonthname}% - \renewcommand*{\DTMserbianMonthname}{\DTMserbiancyrMonthname}% - \or - \renewcommand*{\DTMserbianmonthname}{\DTMserbianlatinmonthname}% - \renewcommand*{\DTMserbianMonthname}{\DTMserbianlatinMonthname}% - \fi +\DTMdefkey{serbian}{dowdaysep}% + {\renewcommand*{\DTMserbiandowdaysep}{#1}} +\DTMdefkey{serbian}{daymonthsep}% + {\renewcommand*{\DTMserbiandaymonthsep}{#1}} +\DTMdefkey{serbian}{monthyearsep}% + {\renewcommand*{\DTMserbianmonthyearsep}{#1}} +\DTMdefkey{serbian}{datetimesep}% + {\renewcommand*{\DTMserbiandatetimesep}{#1}} +\DTMdefkey{serbian}{timezonesep}% + {\renewcommand*{\DTMserbiantimezonesep}{#1}} +\DTMdefkey{serbian}{datesep}% + {\renewcommand*{\DTMserbiandatesep}{#1}} +\DTMdefkey{serbian}{timesep}% + {\renewcommand*{\DTMserbiantimesep}{#1}} +\newcommand*{\DTMserbianweekdayname}% +{\DTMserbianlatekweekdayname} + +\newcommand*{\DTMserbianWeekdayname}% + {\DTMserbianlatekWeekdayname} +\DTMdefchoicekey{serbian}% + {pronunciation}[\@dtm@val\@dtm@nr]{ekavian,ijekavian}{% + \ifcase\@dtm@nr\relax + \renewcommand*{\DTMserbianweekdayname}% + {\DTMserbianlatekweekdayname}% + \renewcommand*{\DTMserbianWeekdayname}% + {\DTMserbianlatekWeekdayname}% + \or% + \renewcommand*{\DTMserbianweekdayname}% + {\DTMserbianlatijweekdayname}% + \renewcommand*{\DTMserbianWeekdayname} + {\DTMserbianlatijWeekdayname}% + \fi } +\DTMdefboolkey{serbian}{monthi}[true]{} +\DTMsetbool{serbian}{monthi}{false} +\DTMdefboolkey{serbian}{leadingzero}[true]{} +\DTMsetbool{serbian}{leadingzero}{false} + \newcommand*{\DTMserbiandayordinal}[1]{% + \DTMifbool{serbian}{leadingzero}% + {\DTMtwodigits{#1}}% + {\number#1}\DTMserbiandatesep}% + \newcommand*{\DTMserbianyearordinal}[1]{% + \number#1\DTMserbiandatesep}% +\newcommand*{\DTMserbiannoimonthname}{\DTMserbianlatnoimonthname} +\newcommand*{\DTMserbiannoiMonthname}{\DTMserbianlatnoiMonthname} +\newcommand*{\DTMserbianimonthname}{\DTMserbianlatimonthname} +\newcommand*{\DTMserbianiMonthname}{\DTMserbianlatiMonthname} \DTMdefboolkey{serbian}{mapzone}[true]{} \DTMsetbool{serbian}{mapzone}{true} \DTMdefboolkey{serbian}{showdayofmonth}[true]{} \DTMsetbool{serbian}{showdayofmonth}{true} \DTMdefboolkey{serbian}{showyear}[true]{} \DTMsetbool{serbian}{showyear}{true} -\DTMnewstyle - {serbian}% label - {% date style - \renewcommand*\DTMdisplaydate[4]{% - \DTMifbool{serbian}{showdayofmonth} - {\DTMserbianordinal{##3}\DTMserbiandaymonthsep}% - {}% - \DTMserbianmonthname{##2}% - \DTMifbool{serbian}{showyear}% - {% - \DTMserbianmonthyearsep - \number##1 - }% - {}% - }% - \renewcommand*\DTMDisplaydate[4]{% - \DTMifbool{serbian}{showdayofmonth} - {% - \DTMserbianordinal{##3}\DTMserbiandaymonthsep - \DTMserbianmonthname{##2}% - }% - {% - \DTMserbianMonthname{##2}% - }% - \DTMifbool{serbian}{showyear}% - {% - \DTMserbianmonthyearsep - \number##1 - }% - {}% - }% - }% - {% time style (use default) - \DTMsettimestyle{default}% - }% - {% zone style - \DTMresetzones - \DTMserbianzonemaps - \renewcommand*{\DTMdisplayzone}[2]{% - \DTMifbool{serbian}{mapzone}% - {\DTMusezonemapordefault{##1}{##2}}% - {% - \ifnum##1<0 \else+\fi\DTMtwodigits{##1}% - \ifDTMshowzoneminutes\DTMserbiantimesep\DTMtwodigits{##2}\fi - }% - }% - }% - {% full style - \renewcommand*{\DTMdisplay}[9]{% - \ifDTMshowdate - \DTMdisplaydate{##1}{##2}{##3}{##4}% - \DTMserbiandatetimesep +\DTMnewstyle% +{serbian}% label +{% date style + \renewcommand*\DTMdisplaydate[4]{% + \ifDTMshowdow% + \ifnum##4>-1 + \DTMserbianweekdayname{##4}% + \DTMserbiandowdaysep% + \fi + \fi + \DTMifbool{serbian}{showdayofmonth} + {\DTMserbiandayordinal{##3}\DTMserbiandaymonthsep}% + {}% + \DTMifbool{serbian}{monthi}% + {\DTMserbianimonthname{##2}}% + {\DTMserbiannoimonthname{##2}}% + \DTMifbool{serbian}{showyear}% + {% + \DTMserbianmonthyearsep% + \DTMserbianyearordinal{##1}% + }% + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \ifDTMshowdow% + \ifnum##4>-1 + \DTMserbianWeekdayname{##4}% + \DTMserbiandowdaysep% + \fi + \fi + \DTMifbool{serbian}{showdayofmonth} + {% + \DTMserbiandayordinal{##3}\DTMserbiandaymonthsep% + \DTMifbool{serbian}{monthi}% + {\DTMserbianimonthname{##2}}% + {\DTMserbiannoimonthname{##2}}% + }% + {% + \DTMifbool{serbian}{monthi}% + {\DTMserbianiMonthname{##2}}% + {\DTMserbiannoiMonthname{##2}}% + }% + \DTMifbool{serbian}{showyear}% + {% + \DTMserbianmonthyearsep% + \DTMserbianyearordinal{##1}% + }% + {}% + }% +}% +{% time style + \renewcommand*\DTMdisplaytime[3]{% + \DTMifbool{serbian}{leadingzero}{\DTMtwodigits{##1}}{\number##1}% + \DTMserbiantimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMserbiantimesep\DTMtwodigits{##3}\fi + }% +}% +{% zone style + \DTMresetzones% + \DTMserbianzonemaps% + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{serbian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0 + \else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMserbiantimesep\DTMtwodigits{##2}\fi + }% + }% +}% +{% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate% + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMserbiandatetimesep% \fi \DTMdisplaytime{##5}{##6}{##7}% - \ifDTMshowzone - \DTMserbiantimezonesep - \DTMdisplayzone{##8}{##9}% + \ifDTMshowzone% + \DTMserbiantimezonesep% + \DTMdisplayzone{##8}{##9}% \fi - }% - \renewcommand*{\DTMDisplay}[9]{% - \ifDTMshowdate - \DTMDisplaydate{##1}{##2}{##3}{##4}% - \DTMserbiandatetimesep + }% + \renewcommand*{\DTMDisplay}[9]{% + \ifDTMshowdate% + \DTMDisplaydate{##1}{##2}{##3}{##4}% + \DTMserbiandatetimesep% \fi \DTMdisplaytime{##5}{##6}{##7}% - \ifDTMshowzone - \DTMserbiantimezonesep - \DTMdisplayzone{##8}{##9}% + \ifDTMshowzone% + \DTMserbiantimezonesep% + \DTMdisplayzone{##8}{##9}% \fi - }% - }% -\DTMnewstyle - {serbian-numeric}% label - {% date style - \renewcommand*\DTMdisplaydate[4]{% - \DTMifbool{serbian}{showdayofmonth}% - {% - \number##3 % space intended - \DTMserbiandatesep - }% - {}% - \number##2 % space intended - \DTMifbool{serbian}{showyear}% - {% - \DTMserbiandatesep - \number##1 % space intended - }% - {}% + }% +}% + \newcommand*{\DTMserbianmonthordinal}[1]{% + \DTMifbool{serbian}{leadingzero}{\DTMtwodigits{#1}}{\number#1}.}% +\DTMdefchoicekey{serbian}{monthord}% +[\@dtm@val\@dtm@nr]{arabic,roman,romanlsc}{% + \ifcase\@dtm@nr\relax + \renewcommand*{\DTMserbianmonthordinal}[1]{% + \DTMifbool{serbian}{leadingzero}% + {\DTMtwodigits{##1}}{\number##1}\DTMserbiandatesep}% + \or% + \renewcommand*{\DTMserbianmonthordinal}[1]{% + \DTMtexorpdfstring{\protect\DTMserbianordinalROMAN{##1}}% + {serbianordinalROMAN{##1}}}% + \or% + \renewcommand*{\DTMserbianmonthordinal}[1]{% + \DTMtexorpdfstring{\textsc{\protect\DTMserbianordinalroman{##1}}}% + {serbianordinalROMAN{##1}}}% + \fi +} +\DTMnewstyle% +{serbian-numeric}% label +{% date style + \renewcommand*\DTMdisplaydate[4]{% + \ifDTMshowdow% + \ifnum##4>-1 + \DTMserbianweekdayname{##4}% + \DTMserbiandowdaysep% + \fi + \fi + \DTMifbool{serbian}{showdayofmonth}% + {\DTMserbiandayordinal{##3}\DTMserbiandaymonthsep}% + {}% + \DTMserbianmonthordinal{##2}% + \DTMifbool{serbian}{showyear}% + {% + \DTMserbianmonthyearsep% + \DTMserbianyearordinal{##1}% }% - \renewcommand*{\DTMDisplaydate}{\DTMdisplaydate}% - }% - {% time style - \renewcommand*\DTMdisplaytime[3]{% - \number##1 - \DTMserbiantimesep\DTMtwodigits{##2}% - \ifDTMshowseconds\DTMserbiantimesep\DTMtwodigits{##3}\fi + {}% + }% + \renewcommand*\DTMDisplaydate[4]{% + \ifDTMshowdow% + \ifnum##4>-1 + \DTMserbianWeekdayname{##4}% + \DTMserbiandowdaysep% + \fi + \fi + \DTMifbool{serbian}{showdayofmonth}% + {\DTMserbiandayordinal{##3}\DTMserbiandaymonthsep}% + {}% + \DTMserbianmonthordinal{##2}% + \DTMifbool{serbian}{showyear}% + {% + \DTMserbianmonthyearsep% + \DTMserbianyearordinal{##1}% }% - }% - {% zone style - \DTMresetzones - \DTMserbianzonemaps - \renewcommand*{\DTMdisplayzone}[2]{% - \DTMifbool{serbian}{mapzone}% - {\DTMusezonemapordefault{##1}{##2}}% - {% - \ifnum##1<0 \else+\fi\DTMtwodigits{##1}% - \ifDTMshowzoneminutes\DTMserbiantimesep\DTMtwodigits{##2}\fi - }% - }% - }% - {% full style - \renewcommand*{\DTMdisplay}[9]{% - \ifDTMshowdate - \DTMdisplaydate{##1}{##2}{##3}{##4}% - \DTMserbiandatetimesep + {}% + }% +}% +{% time style + \renewcommand*\DTMdisplaytime[3]{% + \DTMifbool{serbian}{leadingzero}{\DTMtwodigits{##1}}{\number##1}% + \DTMserbiantimesep\DTMtwodigits{##2}% + \ifDTMshowseconds\DTMserbiantimesep\DTMtwodigits{##3}\fi + }% +}% +{% zone style + \DTMresetzones% + \DTMserbianzonemaps% + \renewcommand*{\DTMdisplayzone}[2]{% + \DTMifbool{serbian}{mapzone}% + {\DTMusezonemapordefault{##1}{##2}}% + {% + \ifnum##1<0 + \else+\fi\DTMtwodigits{##1}% + \ifDTMshowzoneminutes\DTMserbiantimesep\DTMtwodigits{##2}\fi + }% + }% +}% +{% full style + \renewcommand*{\DTMdisplay}[9]{% + \ifDTMshowdate% + \DTMdisplaydate{##1}{##2}{##3}{##4}% + \DTMserbiandatetimesep% \fi \DTMdisplaytime{##5}{##6}{##7}% - \ifDTMshowzone - \DTMserbiantimezonesep - \DTMdisplayzone{##8}{##9}% + \ifDTMshowzone% + \DTMserbiantimezonesep% + \DTMdisplayzone{##8}{##9}% \fi - }% - \renewcommand*{\DTMDisplay}{\DTMdisplay}% - } + }% + \renewcommand*{\DTMDisplay}{\DTMdisplay}% +} \newcommand*{\DTMserbianzonemaps}{% \DTMdefzonemap{01}{00}{CET}% \DTMdefzonemap{02}{00}{CEST}% } -\DTMifcaseregional +\DTMifcaseregional% {}% do nothing -{\DTMsetstyle{serbian}} -{\DTMsetstyle{serbian-numeric}} +{\DTMsetstyle{serbian}}% +{\DTMsetstyle{serbian-numeric}}% \ifcsundef{date\CurrentTrackedDialect} {% - \ifundef\dateserbian + \ifundef\dateserbian% {% do nothing }% {% \def\dateserbian{% - \DTMifcaseregional + \DTMifcaseregional% {}% do nothing {\DTMsetstyle{serbian}}% {\DTMsetstyle{serbian-numeric}}% @@ -230,7 +329,7 @@ }% {% \csdef{date\CurrentTrackedDialect}{% - \DTMifcaseregional + \DTMifcaseregional% {}% do nothing {\DTMsetstyle{serbian}}% {\DTMsetstyle{serbian-numeric}}% |