diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-06-25 12:55:51 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-06-25 12:55:51 +0000 |
commit | 038b125b57620c4bc3d908e8e22035040d2583cf (patch) | |
tree | 3caa209dbdd7984a7f71a69bb369bb4653a7d2ef /Master/texmf-dist/source/latex | |
parent | 1d22fff444d6ffab84d65b382c0780d893b5bf59 (diff) |
isodate update, entring tlpkg-ctan-check
git-svn-id: svn://tug.org/texlive/trunk@9042 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/isodate/isodate.dtx | 211 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/isodate/isodate.ins | 1 |
2 files changed, 191 insertions, 21 deletions
diff --git a/Master/texmf-dist/source/latex/isodate/isodate.dtx b/Master/texmf-dist/source/latex/isodate/isodate.dtx index 6d419e12145..6d657256e9b 100644 --- a/Master/texmf-dist/source/latex/isodate/isodate.dtx +++ b/Master/texmf-dist/source/latex/isodate/isodate.dtx @@ -44,7 +44,7 @@ \DoNotIndex{\begingroup,\endgroup,\begin,\end,\CurrentOption} \CodelineNumbered \RecordChanges -\CheckSum{2244} +\CheckSum{2471} \begin{document} \DocInput{isodate.dtx} \end{document} @@ -86,7 +86,7 @@ % Zealand English,\footnote{In order to use Australian or New Zealand, % you need a version of babel that supports the used language. It % should be available, soon.} -% French, Danish, Swedish, and Norwegian. +% French, Italian, Danish, Swedish, and Norwegian. % % The idea for this package was taken from the akletter class. % \end{abstract} @@ -103,7 +103,7 @@ % \verb|babel|. He also helped me to improve the documentation and % sent me a link to the ISO 8601 norm \cite{iso8601a}. % Svend Tollak Munkejord has added the Norwegian language, Christian -% Schlauer has added Swedish. +% Schlauer has added Swedish, Philip Ratcliffe has added Italian. % % \section*{Requirements} % @@ -174,7 +174,7 @@ % \end{tabular} % % This package supports German (old and new rules, Austrian), US -% English, French, Danish, Swedish, and Norwegian. +% English, French, Danish, Italian, Swedish, and Norwegian. % Switching the language by using \verb|\selectlanguage| does \emph{not} % switch back to the original date format. So the current date format % stays active when changing the language. @@ -328,6 +328,28 @@ % and ``|~|'' in the long format. % % +% \subsection{Changing the English format} +% +% \changes{2.28}{2005/04/15}{Introduce option cleanlook for English +% date format}% +% By default, the English date format looks like ``24th December +% 2000''. +% During the last years, a change has occured in many documents +% towards ``24 December 2000''. +% This new format is called ``clean look''. +% \DescribeMacro{\cleanlookdateon}% +% \DescribeMacro{\cleanlookdateoff}% +% Isodate's behaviour can be changed towards it using +% \cs{cleanlookdateon} and \cs{cleanlookdateoff}. +% This can also be done globally using the |cleanlook| package option. +% +% At the moment, the ``clean look'' functionality only affects British +% English. +% If this trend also counts for different languages, please tell it me +% that I can add support for them. +% +% +% % \subsection{User defined month formatting} % % Internally, the formats using Roman numerals for the month are just @@ -479,6 +501,7 @@ % \verb|german|&support German date format\\ % \verb|naustrian|&support new Austrian date format\\ % \verb|ngerman|&support new German date format\\ +% \verb|italian|&support Italian date format\\ % \verb|norsk|&support Norwegian date format\\ % \verb|norwegian|&support Norwegian date format\\ % \verb|swedish|&support Swedish date format\\ @@ -495,6 +518,9 @@ % \verb|inputlatex|& \TeX\ date input format\\ % \verb|inputLaTeX|& \TeX\ date input format\\ % \hline +% \verb|cleanlook|&use ``clean look'' for English dates\\ +% \verb|nocleanlook|&don't use ``clean look'' for English dates\\ +% \hline % \end{tabular} % \end{minipage} % \end{table} @@ -630,10 +656,11 @@ %<english>\ProvidesFile{english.idf} %<french>\ProvidesFile{french.idf} %<german>\ProvidesFile{german.idf} +%<italian>\ProvidesFile{italian.idf} %<norsk>\ProvidesFile{norsk.idf} %<swedish>\ProvidesFile{swedish.idf} -%<isodate> [2005/03/11 v2.27 Print dates with different formats (HH)] -%<language> [2005/03/11 v2.27 Language definitions for isodate package (HH)] +%<isodate> [2005/04/15 v2.28 Print dates with different formats (HH)] +%<language> [2005/04/15 v2.28 Language definitions for isodate package (HH)] % \end{macrocode} % The package: % \begin{macrocode} @@ -662,6 +689,8 @@ \DeclareOption{roman}{\AtEndOfPackage{\romandate}} \DeclareOption{shortRoman}{\AtEndOfPackage{\shortRomandate}} \DeclareOption{shortroman}{\AtEndOfPackage{\shortromandate}} +\DeclareOption{cleanlook}{\AtEndOfPackage{\cleanlookdateon}} +\DeclareOption{nocleanlook}{\AtEndOfPackage{\cleanlookdateoff}} % \end{macrocode} % \changes{2.26}{2005/03/10}{Support different input formats % containing slashes}% @@ -678,7 +707,7 @@ \DeclareOption{inputLaTeX}{\AtEndOfPackage{\dateinputformat{tex}}} % \end{macrocode} % Declare the options for language support. -% \changes{2.07}{2003/07/29}{Added Swedish language}% +% \changes{2.07}{2003/07/29}{Add Swedish language}% % \changes{2.20}{2003/12/06}{Add Australian and New Zealand}% % \changes{2.24}{2005/02/17}{Add option frenchb}% % \changes{2.26}{2005/03/10}{Add option british}% @@ -692,6 +721,7 @@ \DeclareOption{french}{\input{french.idf}} \DeclareOption{frenchb}{\input{french.idf}} \DeclareOption{german}{\input{german.idf}} +\DeclareOption{italian}{\input{italian.idf}} \DeclareOption{naustrian}{\input{german.idf}} \DeclareOption{newzealand}{\input{english.idf}} \DeclareOption{ngerman}{\input{german.idf}} @@ -713,7 +743,7 @@ % \end{macrocode} % Set default option to \verb|orig|. % \begin{macrocode} -\ExecuteOptions{orig} +\ExecuteOptions{orig,nocleanlook} % \end{macrocode} % Process the options. % \begin{macrocode} @@ -1013,6 +1043,20 @@ % \end{macrocode} % \end{macro} % \end{macro} +% \begin{macro}{\cleanlookdateoff} +% \begin{macro}{\cleanlookdateon} +% \changes{2.28}{2005/04/15}{Introduce option cleanlook for English +% date format}% +% Switch on or off ``clean look'' for English dates. +% Default is not to use ``clean look''. +% \begin{macrocode} +\newif\ifiso@cleanlook +\DeclareRobustCommand*\cleanlookdateon{\iso@cleanlooktrue} +\DeclareRobustCommand*\cleanlookdateoff{\iso@cleanlookfalse} +\cleanlookdateoff +% \end{macrocode} +% \end{macro} +% \end{macro} % \begin{macro}{\iso@printdate} % Defines the command \verb|iso@printdate| which takes three arguments % (year, month, day) and prints the date by using the \cs{today} command. @@ -1027,7 +1071,7 @@ \@ifundefined{iso@printdate@\iso@languagename}{% \PackageWarning{isodate}{Language \iso@languagename\space unknown to isodate.\MessageBreak - Using default format.}% + Using default format}% }{}% % \end{macrocode} % \changes{2.25}{2005/02/21}{Changed \cs{year}, \cs{month}, and @@ -1237,7 +1281,8 @@ \@ifundefined{iso@daterange@\iso@languagename}{% \PackageWarning{isodate}{Language \iso@languagename\space unknown to isodate.\MessageBreak - Using default date range with range sign --.}% + Using default date range\MessageBreak + with range sign --}% \expandafter\def\csname iso@printdate@\iso@languagename\endcsname{}% % \end{macrocode} % \changes{2.25}{2005/02/21}{Fall-back format for unknown languages}% @@ -1271,7 +1316,8 @@ \@ifundefined{iso@daterange@\iso@languagename}{% \PackageWarning{isodate}{Language \iso@languagename\space unknown to isodate.\MessageBreak - Using default date range with range sign --.}% + Using default date range\MessageBreak + with range sign --}% \expandafter\def\csname iso@printdate@\iso@languagename\endcsname{}% % \end{macrocode} % \changes{2.25}{2005/02/21}{Fall-back format for unknown languages}% @@ -1305,7 +1351,8 @@ \@ifundefined{iso@daterange@\iso@languagename}{% \PackageWarning{isodate}{Language \iso@languagename\space unknown to isodate.\MessageBreak - Using default date range with range sign --.}% + Using default date range\MessageBreak + with range sign --}% \expandafter\def\csname iso@printdate@\iso@languagename\endcsname{}% % \end{macrocode} % \changes{2.26}{2005/03/10}{Support different input formats @@ -1634,16 +1681,25 @@ \typeout{Define commands for English date format} % \end{macrocode} % \begin{macro}{\day@english} +% \changes{2.28}{2005/04/15}{Introduce option cleanlook for English +% date format}% % Prints today's day for the original date format. % \begin{macrocode} - \def\day@english{\ifcase\day\or - 1st\or 2nd\or 3rd\or 4th\or 5th\or - 6th\or 7th\or 8th\or 9th\or 10th\or - 11th\or 12th\or 13th\or 14th\or 15th\or - 16th\or 17th\or 18th\or 19th\or 20th\or - 21st\or 22nd\or 23rd\or 24th\or 25th\or - 26th\or 27th\or 28th\or 29th\or 30th\or - 31st\fi} + \def\day@english{% + \ifiso@cleanlook + \day + \else + \ifcase\day\or + 1st\or 2nd\or 3rd\or 4th\or 5th\or + 6th\or 7th\or 8th\or 9th\or 10th\or + 11th\or 12th\or 13th\or 14th\or 15th\or + 16th\or 17th\or 18th\or 19th\or 20th\or + 21st\or 22nd\or 23rd\or 24th\or 25th\or + 26th\or 27th\or 28th\or 29th\or 30th\or + 31st% + \fi + \fi + } % \end{macrocode} % \end{macro} % \begin{macro}{\iso@printmonthday@english} @@ -2519,6 +2575,119 @@ %</german> % \end{macrocode} % +% \subsection{Language definition file italian.idf} +% \changes{2.28}{2005/04/15}{Add Italian language by Philip Ratcliffe}% +% +% \begin{macro}{\iso@languageloaded} +% Define the command \verb|\iso@languageloaded| in order to enable +% \verb|isodate.sty| to determine if at least one language is loaded. +% \begin{macrocode} +%<*italian> +\let\iso@languageloaded\active +\typeout{Define commands for Italian date format} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\def\month@italian{\ifcase\month\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} +% \begin{macrocode} +\def\iso@printmonthday@italian#1#2{% + \ifthenelse{\equal{\iso@dateformat}{numeric}\or% + \equal{\iso@dateformat}{short}}{% + \iso@printday{#2}/\iso@printmonth{#1}\ifiso@printyear/\fi}{% + \ifthenelse{\equal{\iso@dateformat}{iso}}{% + \ifiso@printyear\iso@isodash\fi\iso@printmonth{#1}% + \iso@isodash\iso@printday{#2}}{% + \ifthenelse{\equal{\iso@dateformat}{TeX}}{% + \ifiso@printyear/\fi\iso@printmonth{#1}/\iso@printday{#2}}{% + \ifthenelse{\equal{\iso@dateformat}{orig}\or + \equal{\iso@dateformat}{shortorig}}{% + \begingroup + \edef\lday{#2}\edef\day{\lday}% + \edef\lmonth{#1}\def\month{\lmonth}% + \number\day\ifnum1=\day \noexpand\textordmasculine\fi~\month@italian% + \endgroup + }{}}}}% + } +% \end{macrocode} +% \begin{macrocode} +\def\iso@printdate@italian#1#2#3{% + \ifthenelse{\equal{\iso@dateformat}{iso}\or% + \equal{\iso@dateformat}{TeX}}{% + \ifiso@printyear\iso@yearfour{\number#1}\fi}{}% + \iso@printmonthday@italian{\number#2}{\number#3}% + \ifiso@printyear + \ifthenelse{\equal{\iso@dateformat}{numeric}}{\iso@yearfour{\number#1}}{% + \ifthenelse{\equal{\iso@dateformat}{orig}}{~\iso@yearfour{\number#1}}{% + \ifthenelse{\equal{\iso@dateformat}{shortorig}}{% + ~\iso@twodigitsign\iso@yeartwo{\number#1}}{% + \ifthenelse{\equal{\iso@dateformat}{short}}{% + \iso@yeartwo{\number#1}}{}}}}% + \fi +} +% \end{macrocode} +% \begin{macrocode} +\def\iso@dateitalian{% + \def\today{\iso@printdate@italian{\year}{\month}{\day}}}% +% \end{macrocode} +% \begin{macro}{\iso@daterange@...} +% Define date-range commands for dialects. +% \begin{macrocode} + \expandafter\def\csname iso@daterange@\CurrentOption\endcsname{% + \iso@daterange@italian}% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\def\iso@daterange@italian#1#2#3#4#5#6{% + \ifthenelse{\equal{\iso@dateformat}{iso}\or% + \equal{\iso@dateformat}{TeX}}{% + \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}% + \iso@rangesign% + \ifthenelse{\equal{\number#1}{\number#4}}{% + \ifthenelse{\equal{\number#2}{\number#5}}{\iso@printday{#6}% + }{\iso@printmonthday@italian{#5}{#6}}}{% + \csname iso@printdate@\iso@languagename\endcsname{#4}{#5}{#6}}}{% +% \end{macrocode} +% \begin{macrocode} + \ifthenelse{\equal{\number#1}{\number#4}}{% + \ifthenelse{\equal{\number#2}{\number#5}}{% + \ifthenelse{\equal{\iso@dateformat}{orig}}{% + \begingroup + \edef\lday{#3}\edef\day{\lday}% + \number\day\ifnum1=\day \noexpand\textordmasculine\fi + \endgroup}{\iso@printday{#3}}% + }{\iso@printmonthday@italian{#2}{#3}}}{% + \csname iso@printdate@\iso@languagename\endcsname{#1}{#2}{#3}}% + \iso@rangesign\csname iso@printdate@\iso@languagename\endcsname{% + #4}{#5}{#6}% +}{% + }% +} +% \end{macrocode} +% \begin{macrocode} +\expandafter\def\csname iso@rangesign@\CurrentOption\endcsname{~al~} +% \end{macrocode} +% Define the language name that will the active language for isodate +% if none of the packages babel.sty, german.sty, and ngerman.sty is +% loaded and if this is the last language that is used for isodate. +% If one of the above packages is used this definition will be +% overridden by the command \verb|\languagename| that will always +% return the current used language. +% \begin{macrocode} +\def\iso@languagename{italian}% +% \end{macrocode} +% \begin{macrocode} +\AtBeginDocument{% + \ifx\undefined\iso@dateitalian\else + \def\dateitalian{\iso@dateitalian}% + \fi +} +%</italian> +% \end{macrocode} +% % \changes{2.02}{2001/04/30}{Added Norwegian language by Svend Tollak % Munkejord} % \subsection{Language definition file norsk.idf} @@ -2709,7 +2878,7 @@ %</norsk> % \end{macrocode} % -% \changes{2.07}{2003/07/29}{Added Swedish language by Christian +% \changes{2.07}{2003/07/29}{Add Swedish language by Christian % Schlauer} % \subsection{Language definition file swedish.idf} % \changes{2.26}{2005/03/10}{Force year in four digits for long formats}% diff --git a/Master/texmf-dist/source/latex/isodate/isodate.ins b/Master/texmf-dist/source/latex/isodate/isodate.ins index d7e2099d71d..81aff73ea62 100644 --- a/Master/texmf-dist/source/latex/isodate/isodate.ins +++ b/Master/texmf-dist/source/latex/isodate/isodate.ins @@ -24,6 +24,7 @@ \file{english.idf}{\from{isodate.dtx}{language,english}}% \file{french.idf}{\from{isodate.dtx}{language,french}}% \file{german.idf}{\from{isodate.dtx}{language,german}}% + \file{italian.idf}{\from{isodate.dtx}{language,italian}}% \file{norsk.idf}{\from{isodate.dtx}{language,norsk}}% \file{swedish.idf}{\from{isodate.dtx}{language,swedish}}% \file{isodateo.sty}{\from{isodateo.dtx}{package}}% |