From 9f01ea07708f5ad1434c3090d462ac7c27b6a4b5 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 21 May 2020 21:47:28 +0000 Subject: babel-italian (21may20) git-svn-id: svn://tug.org/texlive/trunk@55232 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/generic/babel-italian/italian.dtx | 116 +++++++++++++-------- 1 file changed, 70 insertions(+), 46 deletions(-) (limited to 'Master/texmf-dist/source/generic') diff --git a/Master/texmf-dist/source/generic/babel-italian/italian.dtx b/Master/texmf-dist/source/generic/babel-italian/italian.dtx index 6d5a088d6b5..da0f09ab40c 100644 --- a/Master/texmf-dist/source/generic/babel-italian/italian.dtx +++ b/Master/texmf-dist/source/generic/babel-italian/italian.dtx @@ -10,7 +10,7 @@ \preamble ------------------------------------------ The Italian support for babel: italian.ldf. -Copyright (C) 1990-2019 Claudio Beccari +Copyright (C) 1990-2020 Claudio Beccari All rights reserved License information appended. @@ -60,7 +60,7 @@ This file is a self unpacking one. % %\ProvidesLanguage{italian} %<*code> - [2019/11/16 v.1.4.03 Italian support for the babel system] + [2020/05/21 v.1.4.04 Italian support for the babel system] % %% %% Please report errors to: claudio dot beccari at gmail dot com @@ -99,7 +99,7 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % %\fi % -% \CheckSum{753} +% \CheckSum{772} % % \changes{italian-0.99}{1990/07/11}{First version, from english.doc} % \changes{italian-1.0}{1991/04/23}{Modified for babel 3.0} @@ -171,6 +171,8 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % xelatex or lualatex.} % \changes{italian-1.4.01}{2019/01/05}{Rewritten code introduced in 1.4.00, % and the documentation modified accordingly.} +% \changes{italian-1.4.04}{2020-05-21}{Added option for ordinal day~1 in +% \string\dateitalian.} % % \section{The Italian language} % \textbf{Important notice}: This language description file relies on @@ -190,7 +192,7 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % defines all the required and some optional language-specific % macros for the Italian language. % -% \begin{table}[htb]\centering +% \begin{table}[!htb]\centering % \begin{tabular}{cp{90mm}} % \toprule % |"| & inserts a compound word mark where hyphenation is legal; @@ -211,16 +213,17 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % \bottomrule % \end{tabular} % \caption{shorthands for the Italian language. These shorthands are -% available only if command \texttt{\string\setactivedoublequote} is given -% after loading \babel\ and before \texttt{\string\begin\{document\}}.} -% \label{t:itshrtct} +% available only if command \texttt{\string\setactivedoublequote} is +% given after loading \babel\ and before +% \texttt{\string\begin\{document\}}.}\label{t:itshrtct} % \end{table} % % The features of this language definition file are the following: % \begin{enumerate} % \item The Italian hyphenation is invoked, provided that the Italian % hyphenation pattern files were loaded when the specific format file -% was built. +% was built. This is normally done with the initial installation of +% \TeX\-Live, but other distributions may not do so. % \item The language dependent infix words to be inserted by such % commands as |\chapter|, |\caption|, |\tableofcontents|, % etc. are redefined in accordance with the Italian @@ -234,9 +237,6 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % |\finalhyphendemerits| is set to such a high value that % hyphenation is strongly discouraged between the last two lines % of a paragraph. -%^^A -%^^A Qui ci si potrebbero mettere le indicazioni per gli attributi e modificatori -%^^A % \item Some language specific shorthands have been defined so as to % allow etymological hyphenation, specifically |"| inserts a % break point at any word boundary that the typesetter chooses, @@ -267,8 +267,8 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % is required in the first word, them the |"-| shorthand comes in % handy; pay attention though, that if you use an en-dash or an % em-dash (both should not be used in Italian as compound words -% connectors, but\dots) then the |"-| shorthand might impeach the |--| -% or |---| ligatures, thus producing an unacceptable appearance. +% connectors, but\dots) then the |"-| shorthand might impeach the +% |--| or |---| ligatures, thus producing an unacceptable appearance. % \item The shorthand |""| introduces the raised (English) opening % double quotes; this shorthand proves its usefulness when one % reminds that the Italian keyboard misses the back tick key, and @@ -292,14 +292,17 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % The definition of |\unit| takes place only at ``begin document'' % so that it is possible to verify if some other similar % functionalities have already been defined by other packages, such -% as |units.sty| or |siunitx.sty|. In particular command |\unit| is -% deactivated by default; the user can activate it by entering the -% command |\setISOcompliance| after loading the \babel\ package and -% before the |\begin{document}| statement. The above checks will enter -% into action even if this ISO compliance is set, in order to avoid -% conflicts with the above named packages. The |\ap| and |\ped| -% commands remain available because up to now no specific conflicts -% have been reported. +% as |units.sty| or |siunitx.sty|. Command |\unit| does not +% conflict with package |SIunitx| and it may be redefined by means +% of its internals. +% Nevertheless command |\unit| is deactivated by +% default; the user can activate it by entering the command +% |\setISOcompliance| after loading the \babel\ package and before the +% |\begin{document}| statement. The above checks will enter into +% action even if this ISO compliance is set, in order to avoid +% conflicts with the above named packages. The |\ap| and |\ped| +% commands remain available because up to now no specific conflicts +% have been reported. % \item Since in all languages different from English the decimal % separator according to the ISO regulations \emph{must} be a % comma\footnote{Actually the Bureau International des Pois et @@ -311,22 +314,26 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % in mathematics it behaves correctly. % There are other packages that provide a similar functionality, for % example |icomma| and |ncccomma|; |icomma|, apparently is not in -% conflict with |dcolomn|, but requires a space after the comma all -% the times it plays the r\^ole of a punctuation mark; |ncccomma|, -% checks if the next token is a digit, but it repeats ten tests every -% time it meets a comma, irrespective from what it is followed by. -% I believe that my solution is better than that provided by both -% those packages; but I assume that if the user loads one of those -% packages, it prefers to use their functionality; in case one of those -% packages is loaded, this module excludes its intelligent comma -% functionality. By default this functionality is turned \emph{off}, -% therefore the user should turn it on by means of the -% |\IntelligentComma| command; it can turn it off by means of -% |\NoIntelligentComma|. Please, read subsection~\ref{ssec:comma} to -% see the various situations where a mathematical comma may be used -% and how to overcome the few cases when the macros of this file don't -% behave as expected. The section describes also some limitations when -% some conflicting packages are being loaded. +% conflict with |dcolumn|, but requires a space after the comma +% all the times it plays the r\^ole of a punctuation mark; +% |ncccomma| checks if the next token is a digit, but it repeats ten +% tests every time it meets a comma, irrespective from what it is +% followed by. I believe that my solution is better than that +% provided by both those packages; but I assume that +% if the user loads one of those packages, it prefers to use their +% functionality; in case one of those packages is loaded, this module +% excludes its intelligent comma functionality. +% By default this functionality is turned \emph{off}, therefore the +% user should turn it on by means of the |\IntelligentComma| command; +% it can turn it off by means of |\NoIntelligentComma|. Please, read +% subsection~\ref{ssec:comma} to see the various situations where a +% mathematical comma may be used and how to overcome the few cases +% when the macros of this file don't behave as expected. The section +% describes also some limitations when some conflicting packages are +% being loaded. Apparently there are conflicts with package +% |unicode-math| because active characters are defined with different +% codes. Therefore this functionality is not available when +% typesetting with XeLaTeX or LuaLaTeX. % \item In Italian legal documents it is common to tag list-items % with the old fashioned 21-letter Italian alphabet, that differs from % the Latin one by the omission of the letters `j', `k', `w',`x', and @@ -351,6 +358,7 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % essential with open software such as the uncountable contributions % to the \TeX\ system. Thank you very much. % +% \StopEventually{% % \begin{thebibliography}{1} % \bibitem{CBec} Beccari C., ``Computer Aided Hyphenation for % Italian and Modern Latin'', \textsf{TUGboat} vol.~13, n.~1, @@ -358,9 +366,7 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % \bibitem{Becc2} Beccari C., ``Typesetting mathematics for science % and technology according to ISO\,31/XI'', \textsf{TUGboat} % vol.~18, n.~1, pp.~39-48 (1997). -% \end{thebibliography} -% -% \StopEventually{}% +% \end{thebibliography}} % %\section{The commented code} % The macro |\LdfInit| takes care of preventing that this file is @@ -445,9 +451,27 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % The macro |\dateitalian| redefines the command % |\today| to produce Italian dates. % \changes{italian-1.0c}{1991/06/06}{Removed \cs{global} definitions} +% \changes{italian-1.4.04}{2020-05-10}{Added commands +% \cs{OrdinalDayNumberOn} and \cs{OrdinalDayNumberOff}} +% Normally in Italian day numbers a set as cardinal numbers; some +% people prefer to use the ordinal number for day~1, and use the +% cardinal number with the superscript masculine `o'. By default +% this functionality is turned off but the user can select it with +% command |\OrdinalDayNumberOn| and deselect it with +% |\OrdinalDayNumberOff|. The national official regulation require +% the cardinal numbers only with fully numerical dates; they allow, +% without prescribing, roman numbers and ordinal numbers only when +% the month name is spelled out in letters. % \begin{macrocode} +\newif\ifOrdinalDayNumber \OrdinalDayNumberfalse +\def\OrdinalDayNumberOn{\OrdinalDayNumbertrue} +\def\OrdinalDayNumberOff{\OrdinalDayNumberfalse} \def\dateitalian{% - \def\today{\number\day~\ifcase\month\or + \def\today{\ifnum\number\day=\@ne + \ifOrdinalDayNumber1\ap{o}\else1\fi + \else + \number\day + \fi~\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\space \number\year}}% @@ -502,7 +526,7 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % typesetting engines xelatelx and lualatex.} % \changes{italian 1.4.03}{2019-11-16}{Adjust the lccode for the % apostrophe so as to work also with platex and uplatex. Thanks to -% Hironobu Yamashita who spottes the +% Hironobu Yamashita who spotted the % error and suggested the correction.} % % In order to enable the hyphenation of words such as @@ -531,8 +555,8 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % lead to their proper font alternative variants being used. Apparently % the |\babelfont| command is more performant in transmitting the proper % information to |fontspec|. Of course |\babelfont| must be used after the -% |babel| package has been invoked; while there appears to be any loading -% precedence requirements when |fontspec| and |polyglossia| are used +% |babel| package has been invoked; while there appears to be no loading +% precedence requirements when |fontspec| and |polyglossia| are used. % \end{macro} % \end{macro} % @@ -618,10 +642,10 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % hyphenation} % % \subsection{Support for etymological hyphenation} - +% % In Italian etymological hyphenation is desirable with % technical terms, chemical names, and the like. - +% % \subsubsection{Some history} % In his article on Italian hyphenation \cite{CBec} Beccari pointed % out that the Italian language gets hyphenated on a phonetic -- cgit v1.2.3