diff options
author | Karl Berry <karl@freefriends.org> | 2019-12-04 22:18:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-12-04 22:18:51 +0000 |
commit | a45bfe1119575b988dea4695f66acdb2c4329382 (patch) | |
tree | 6ccce43eee9476c29e4eacd5389e7c82c3a9cbdb /Master/texmf-dist/source/generic | |
parent | 752141b3dfdcb4571a6da91cad4fa587b8316a0a (diff) |
babel-italian (4dec19)
git-svn-id: svn://tug.org/texlive/trunk@53019 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic')
-rw-r--r-- | Master/texmf-dist/source/generic/babel-italian/italian.dtx | 359 |
1 files changed, 190 insertions, 169 deletions
diff --git a/Master/texmf-dist/source/generic/babel-italian/italian.dtx b/Master/texmf-dist/source/generic/babel-italian/italian.dtx index a7a234fea11..6d5a088d6b5 100644 --- a/Master/texmf-dist/source/generic/babel-italian/italian.dtx +++ b/Master/texmf-dist/source/generic/babel-italian/italian.dtx @@ -60,7 +60,7 @@ This file is a self unpacking one. %</driver> %<code>\ProvidesLanguage{italian} %<*code> - [2019/01/05 v.1.4.01 Italian support for the babel system] + [2019/11/16 v.1.4.03 Italian support for the babel system] %</code> %% %% Please report errors to: claudio dot beccari at gmail dot com @@ -99,7 +99,7 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} %</driver> %\fi % -% \CheckSum{755} +% \CheckSum{753} % % \changes{italian-0.99}{1990/07/11}{First version, from english.doc} % \changes{italian-1.0}{1991/04/23}{Modified for babel 3.0} @@ -217,127 +217,130 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % \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. -% \item The language dependent infix words to be inserted by such -% commands as |\chapter|, |\caption|, |\tableofcontents|, -% etc. are redefined in accordance with the Italian -% typographical practice. -% \item Since Italian can be easily hyphenated and Italian practice -% allows to break a word before the last two letters, hyphenation -% parameters have been set accordingly, but a very high demerit -% value has been set in order to avoid word breaks in the -% penultimate line of a paragraph. Specifically the |\clubpenalty|, -% and the |\widowpenalty| are set to rather high values and -% |\finalhyphendemerits| is set to such a high value that -% hyphenation is strongly discouraged between the last two lines -% of a paragraph. +% \begin{enumerate} +% \item The Italian hyphenation is invoked, provided that the Italian +% hyphenation pattern files were loaded when the specific format file +% was built. +% \item The language dependent infix words to be inserted by such +% commands as |\chapter|, |\caption|, |\tableofcontents|, +% etc. are redefined in accordance with the Italian +% typographical practice. +% \item Since Italian can be easily hyphenated and Italian practice +% allows to break a word before the last two letters, hyphenation +% parameters have been set accordingly, but a very high demerit +% value has been set in order to avoid word breaks in the +% penultimate line of a paragraph. Specifically the |\clubpenalty|, +% and the |\widowpenalty| are set to rather high values and +% |\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, -% provided it is not followed by an accented letter (very unlikely -% in Italian, where compulsory accents fall only on the last and -% ending vowel of a word, but it may take place with compound words -% that include foreign roots), and \verb="|= when the desired break -% point falls before an accented letter. As you can read in -% table~\ref{t:itshrtct}, these shorthands are available only if -% they get activated with |\setactivedoublequote| after -% loading \babel\ but before the |\begin{docuemnt}| statement. This -% is done in order to preserve the user from package conflicts: -% if s/he wants to use these facilities s/he must remember that -% conflicts may arise unless active characters are deactivated; -% this can be done with the \babel\ command |\shorthadsoff{"}| -% (and reactivated with |\shorthandson{"}|) when its wise to do -% so; conflicts have been reported with package \file{xypic} and -% with \texttt{TikZ}, but the latter has its own library to -% deactivate all active characters, not just the double quotes, -% the only Italian language possibly activated character. -% \item Some Italian compound words have a connecting short dash (a -% hyphen sign) between them without any space between the component -% words and the short dash; in this situation standard \LaTeX\ allows -% a line break only just after the short dash; this may lead to -% paragraphs with protruding lines or with ugly looking wide inter -% word spaces. If a break point is desired in the second word, one -% may use a |"| sign just after the short dash; but if a line break -% 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. -% \item The shorthand |""| introduces the raised (English) opening -% double quotes; this shorthand proves its usefulness when one -% reminds that the Italian keyboard misses the backtick key, and -% the backtick on a Windows based platform may be obtained only by -% pressing the \texttt{Alt} key while keying the numerical code -% 0096 in the numeric keypad; very, very annoying! -% \item The shorthands |"<| and |">| insert the guillemets sometimes -% used also in Italian typography; with the T1 font encoding -% the ligatures |<<| and |>>| should insert such signs directly, -% but not all the virtual fonts that claim to follow the T1 font -% encoding actually contain the guillemets; with the OT1 encoding -% the guillemets are not available and must be faked in some -% way. By using the |"<| and |">| shorthands (even with the T1 -% encoding) the necessary tests are performed and in case the -% guillemets are faked by means of the special LaTeX math symbols. -% At the same time if OpenType fonts are being used with XeLaTeX -% or LuaLaTeX, there are no problems with guillemets. -% \item Three new specific commands |\unit|, |\ped|, and |\ap| are -% introduced so as to enable the correct composition of technical -% mathematics according to the ISO~31/XI recommendations. -% 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. -% \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 M\'esures allows also the point -% as a decimal separator without mentioning any language, but recommends -% to follow the national typographical traditions}; since -% no language description file nor the \babel\ package itself provides -% for this functionality, a not so simple intelligent comma definition is -% provided such that at least 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 repeated 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 on of those packages, it prefers to use that -% functionality; In case one of those pachages 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 cong=flicting packages are being loaded. -% \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 -% `y'. This applies for both upper and lower case tags. -% This feature is obtained by using the commands |\XXIletters| and -% |\XXVIletters| that allow to switch back and forth -% between 21- and 26-letter tagging. -% \end{enumerate} -% -% For this language a few shorthands have been defined, -% table~\ref{t:itshrtct}, some of which are introduced to overcome -% certain limitations of the Italian keyboard; in -% section~\ref{s:itkbd} there are other comments and hints in order -% to overcome some other keyboard limitations. +% \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, +% provided it is not followed by an accented letter (very unlikely +% in Italian, where compulsory accents fall only on the last and +% ending vowel of a word, but it may take place with compound words +% that include foreign roots), and \verb="|= when the desired break +% point falls before an accented letter. As you can read in +% table~\ref{t:itshrtct}, these shorthands are available only if +% they get activated with |\setactivedoublequote| after +% loading \babel\ but before the |\begin{docuemnt}| statement. This +% is done in order to preserve the user from package conflicts: +% if s/he wants to use these facilities s/he must remember that +% conflicts may arise unless active characters are deactivated; +% this can be done with the \babel\ command |\shorthadsoff{"}| +% (and reactivated with |\shorthandson{"}|) when its wise to do +% so; conflicts have been reported with package \file{xypic} and +% with \texttt{TikZ}, but the latter has its own library to +% deactivate all active characters, not just the double quotes, +% the only Italian language possibly activated character. +% \item Some Italian compound words have a connecting short dash (a +% hyphen sign) between them without any space between the component +% words and the short dash; in this situation standard \LaTeX\ allows +% a line break only just after the short dash; this may lead to +% paragraphs with protruding lines or with ugly looking wide inter +% word spaces. If a break point is desired in the second word, one +% may use a |"| sign just after the short dash; but if a line break +% 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. +% \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 +% the back tick on a Windows based platform may be obtained only by +% pressing the \texttt{Alt} key while keying the numerical code +% 0096 in the numeric keypad; very, very annoying! +% \item The shorthands |"<| and |">| insert the guillemets sometimes +% used also in Italian typography; with the T1 font encoding +% the ligatures |<<| and |>>| should insert such signs directly, +% but not all the virtual fonts that claim to follow the T1 font +% encoding actually contain the guillemets; with the OT1 encoding +% the guillemets are not available and must be faked in some +% way. By using the |"<| and |">| shorthands (even with the T1 +% encoding) the necessary tests are performed and in case the +% guillemets are faked by means of the special LaTeX math symbols. +% At the same time if OpenType fonts are being used with XeLaTeX +% or LuaLaTeX, there are no problems with guillemets. +% \item Three new specific commands |\unit|, |\ped|, and |\ap| are +% introduced so as to enable the correct composition of technical +% mathematics according to the ISO~31/XI recommendations. +% 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. +% \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 +% M\'esures allows also the point as a decimal separator without +% mentioning any language, but recommends to follow the national +% typographical traditions.}; since no language description file nor +% the \babel\ package itself provides for this functionality, a not so +% simple intelligent comma definition is provided such that at least +% 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. +% \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 +% `y'. This applies for both upper and lower case tags. +% This feature is obtained by using the commands |\XXIletters| and +% |\XXVIletters| that allow to switch back and forth +% between 21- and 26-letter tagging. +% \end{enumerate} +% +% For this language a few shorthands have been defined, +% table~\ref{t:itshrtct}, some of which are introduced to overcome +% certain limitations of the Italian keyboard; in +% section~\ref{s:itkbd} there are other comments and hints in order +% to overcome some other keyboard limitations. % % \subsection*{Acknowlegements} % It is my pleasure to acknowledge the contributions of Giovanni Dore, @@ -359,7 +362,7 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % % \StopEventually{}% % -%\subsection{The commented code} +%\section{The commented code} % The macro |\LdfInit| takes care of preventing that this file is % loaded more than once, checking the category code of the % \texttt{@} sign, etc. @@ -494,47 +497,64 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % \changes{italian-1.2l}{1999/04/5}{Changed example ``begl'italiani'' % (obsolete spelling) with another, ``nell'altezza'', that behaves % the same way} +% \changes{italian 1.4.01}{2019-01-05}{Set the lccode of the apostrophe +% that should be valid for both the pdflatex and the OpentType aware +% 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 <h.y.acetaminophen@gmail.com> who spottes the +% error and suggested the correction.} +% % In order to enable the hyphenation of words such as % ``nell'altezza'' we give the \texttt{'} a non-zero lower case -% code. When we do that \TeX\ finds the following hyphenation +% code. When we do that, \TeX\ finds the following hyphenation % points |nel-l'al-tez-za| instead of none. If this |italian.ldf| is -% (improperly) used with |babel| when typesetting with |xelatex| or +% used with |babel| when typesetting with |xelatex| or % |lualatex| the apostrophe must receive a unicode code point. -% Therefore we use the same test that is being used by the |iftex| -% package in order to check if this option to |babel| is used while -% typesetting with |pdflatex| or another typesetting engine. +% Therefore we use a special test that was suggested by Hironobu +% Yamashita\footnote{Thanks to Hironobu Yamashita +% <h.y.acetaminophen@gmail.com>} if this |babel| language option +% is used while using either |pdflatex| or a Unicode aware +% typesetting engine. % \begin{macrocode} \addto\extrasitalian{% -\lccode\string`'=`' \unless\ifcsname pdfmatch\endcsname +\lccode\string`'=`' \ifcsname Umathcode\endcsname \lccode\string"2019=\string"2019\fi} \addto\noextrasitalian{% -\lccode\string`'=0 \unless\ifcsname pdfmatch\endcsname +\lccode\string`'=0 \ifcsname Umathcode\endcsname \lccode\string"2019=0\fi} % \end{macrocode} -% Notice, though, that if you use |babel| when typesetting with |lualatex| or |xelatex| using the |fontspec| usual commands and options may not lead to their proper font alternative variants being used. Apparently the |\balefont| 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 |polyglossa| are used +% Notice, though, that if you use |babel| when typesetting with |lualatex| +% or |xelatex| using the |fontspec| usual commands and options may not +% 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 % \end{macro} % \end{macro} % % \subsection{Traditionally labelled enumerate environment} % \changes{italian-1.2v}{2010/01/02}{Support for traditional Italian} -% In some traditional texts, especially of legal nature, enumerations labelled -% with lower or upper case letters use the reduced Latin alphabet that omits -% the so called ``non Italian letters'': j, k, w, x, and y. -% -% \changes{italian-1.2w}{2011/01/03}{Added switching mechanism between normal -% and traditional enumeration labelling} -% \changes{italian-1.3}{2013/09/27}{The |traditional| language attribute has -% been dropped while the commands to switch back and forth from 21- to -% 26-letter alphabet are retained} +% In some traditional texts, especially of legal nature, enumerations +% labelled with lower or upper case letters use the reduced Latin +% alphabet that omits the so called ``non Italian letters'': j, k, w, +% x, and y. +% +% \changes{italian-1.2w}{2011/01/03}{Added switching mechanism between +% normal and traditional enumeration labelling} +% \changes{italian-1.3}{2013/09/27}{The |traditional| language attribute +% has been dropped while the commands to switch back and forth from +% 21- to 26-letter alphabet are retained} % \begin{macro}{\XXIletters} % \begin{macro}{\XXVIletters} % At the same time it is considered useful to have the possibility of -% switching back and forth from the 21-letter tagging and the 26-letter one. -% This requires a counter that keeps the switching status (0 for 21 letters -% and 1 for 26 letters) and commands |\XXIletters| and |\XXVIletters| -% to set the switch. Default is 26 letter tagging. +% switching back and forth from the 21-letter tagging and the 26-letter +% one. This requires a counter that keeps the switching status (0 for 21 +% letters and 1 for 26 letters) and commands |\XXIletters| and +% |\XXVIletters| to set the switch. Default is 26 letter tagging. % \begin{macrocode} \newcount\it@lettering \it@lettering=\@ne \newcommand*\XXIletters{\it@lettering=\z@} @@ -546,8 +566,8 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % \end{macrocode} % \end{macro} % \end{macro} -% To make this feasible it's necessary to redefine the way the \LaTeX\ |\@alph| -% and |\@Alph| work. Let's make the alternate definitions: +% To make this feasible it's necessary to redefine the way the \LaTeX\ +% |\@alph| and |\@Alph| work. Let's make the alternate definitions: % \begin{macrocode} \def\it@alph#1{% \ifcase\it@lettering @@ -572,31 +592,32 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % \end{macrocode} % % In order to have a complete description, the situation is as such: -% \begin{enumerate} -% \item If you want to always use the 21-letter item tagging, simply -% use the |\XXIletters| declaration just after |\begin{document}| -% and this setting remains global (provided, of course, that the -% declaration is defined, i.e. that the Italian language is the -% default one); in this way the setting is global while you use -% the Italian language. -% \item The |XXVIletter| command, issued outside any environment sets -% the 26-letter item tagging in a global way; this setting is the default one. -% \item If you specify |\XXIletters| just before entering an -% environment that uses alphabetic tagging, this environment will -% be tagged with the 21-letter alphabet, but this is a local setting, -% because the letter tagging takes place only from the second level -% of enumeration. -% \item The declarations |\XXIletters| and |\XXVIletters| let you -% switch back and forth between the two kinds of tagging, But this -% kind of tagging, the 21-letter one, is meaningful only in Italian -% and when you change language, letter tagging reverts to the 26-letter -% one. -% \end{enumerate} +% \begin{enumerate} +% \item If you want to always use the 21-letter item tagging, simply +% use the |\XXIletters| declaration just after |\begin{document}| +% and this setting remains global (provided, of course, that the +% declaration is defined, i.e. that the Italian language is the +% default one); in this way the setting is global while you use +% the Italian language. +% \item The |XXVIletter| command, issued outside any environment sets +% the 26-letter item tagging in a global way; this setting is the +% default one. +% \item If you specify |\XXIletters| just before entering an +% environment that uses alphabetic tagging, this environment will +% be tagged with the 21-letter alphabet, but this is a local setting, +% because the letter tagging takes place only from the second level +% of enumeration. +% \item The declarations |\XXIletters| and |\XXVIletters| let you +% switch back and forth between the two kinds of tagging, But this +% kind of tagging, the 21-letter one, is meaningful only in Italian +% and when you change language, letter tagging reverts to the +% 26-letter one. +% \end{enumerate} % % \changes{italian-1.2m}{2000/01/05}{Support for etymological % hyphenation} % -% \subsection{Support for etymological hyphenation} +% \subsection{Support for etymological hyphenation} % In Italian etymological hyphenation is desirable with % technical terms, chemical names, and the like. @@ -663,10 +684,10 @@ mail: \texttt{claudio dot beccari at gmail dot com}}} % \changes{italian-1.3g}{2014/01/22}{The active double straight % quote conflicts with other packages; set as an optional facility.} % Instead of a boolean switch we use a private counter so as to check -% at |\begin{document}| if this facility has to be activated. The default -% value is zero; anything different from zero means that the facility -% has to be activated; this is done with command |\setactivedoublequote| -% to be issued before |\begin{document}| +% at |\begin{document}| if this facility has to be activated. The +% default value is zero; anything different from zero means that the +% facility has to be activated; this is done with command +% |\setactivedoublequote| to be issued before |\begin{document}| % % \begin{macrocode} \newcount\it@doublequoteactive \it@doublequoteactive=\z@ |