summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/babel-italian/italian.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-09-30 22:16:42 +0000
committerKarl Berry <karl@freefriends.org>2013-09-30 22:16:42 +0000
commit9d155da090955e2c64b8d6ad5c461e972e5803d9 (patch)
treeb7484c41503f51253603e71d273a9d205269a206 /Master/texmf-dist/source/generic/babel-italian/italian.dtx
parent60b5596f568a026a7b457e62c5a274d5adcb1b00 (diff)
babel-italian (30sep13)
git-svn-id: svn://tug.org/texlive/trunk@31799 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic/babel-italian/italian.dtx')
-rw-r--r--Master/texmf-dist/source/generic/babel-italian/italian.dtx828
1 files changed, 549 insertions, 279 deletions
diff --git a/Master/texmf-dist/source/generic/babel-italian/italian.dtx b/Master/texmf-dist/source/generic/babel-italian/italian.dtx
index d054726438b..3e0a6059e20 100644
--- a/Master/texmf-dist/source/generic/babel-italian/italian.dtx
+++ b/Master/texmf-dist/source/generic/babel-italian/italian.dtx
@@ -1,11 +1,11 @@
% \iffalse meta-comment
%
-% Copyright 1989-2008 Johannes L. Braams and any individual authors
+% Copyright 1989-2004 Johannes L. Braams and any individual authors
% listed elsewhere in this file. All rights reserved.
-%
+%
% This file is part of the Babel system.
% --------------------------------------
-%
+%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
@@ -13,20 +13,21 @@
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
-%
+%
% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Johannes Braams.
-%
-% The list of all files belonging to the Babel system is
+%
+% The Current Maintainer of the babel system is Javier Bezos
+% The current maintainer of Italian language support is Claudio Beccari
+%
+% The list of all files belonging to the LaTeX base distribution is
% given in the file `manifest.bbl. See also `legal.bbl' for additional
% information.
-%
+%
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
% \fi
-% \CheckSum{424}
+% \CheckSum{611}
% \iffalse
% Tell the \LaTeX\ system who we are and write an entry on the
% transcript.
@@ -36,25 +37,29 @@
%<code>\ProvidesLanguage{italian}
%\fi
%\ProvidesFile{italian.dtx}
- [2008/03/14 v1.2t Italian support from the babel system]
+ [2013/09/27 v1.3 Italian support from the babel system]
%\iffalse
%% File `italian.dtx'
%% Babel package for LaTeX version 2e
-%% Copyright (C) 1989 - 2008
+%% Copyright (C) 1989 - 2004
%% by Johannes Braams, TeXniek
%
-%% Please report errors to: J.L. Braams
-%% babel at braams.xs4all.nl
-%% Claudio Beccari
-%% claudio.beccari at gmail.it
+%% Italian support for the babel package
+%% Copyright (C) 2013
+%% by Claudio Beccari
+%%
+%% Please report errors to: claudio dot beccari at gmail dot com
%
% This file is part of the babel system, it provides the source
% code for the Italian language definition file.
% The original version of this file was written by Maurizio
-% Codogno, (mau@beatles.cselt.stet.it). Several features were added
-% by Claudio Beccari, (beccari@polito.it).
+% Codogno, (mau@beatles.cselt.stet.it).
+% The package was completely rewritten by Claudio Beccari, who added
+% several features.
%<*filedriver>
\documentclass{ltxdoc}
+\usepackage[T1]{fontenc}
+\usepackage{lmodern}
\newcommand*\TeXhax{\TeX hax}
\newcommand*\babel{\textsf{babel}}
\newcommand*\langvar{$\langle \it lang \rangle$}
@@ -99,24 +104,57 @@
% with package units.sty; adjusted caporali functionality, since
% the previous one did not work with the standard (although obsolete)
% slides class file}
-% \changes{italian-1.2s}{2007/01/12}{Corrected email of CB}
+% \changes{italian-1.3}{2013/09/29}{Completely changed the Italian
+% guillemet functionality in order to simplify their handling}
+% \changes{italian-1.3}{2013/09/30}{Eliminated the \emph{traditional} attribute;
+% the same functionality is obtained with the declaration \cs{XXIletters}}
+% \changes{italian-1.3}{2-13/09/30}{Command \cs{unit} is disabled if packages
+% units, SIunits, or siunitx have been loaded; this control is now deferred
+% at the end of the preamble, when all packages have already been loaded}
+%
% \section{The Italian language}
%
+% \textbf{Important notice:} This language description file relies on
+% functionalities provided by a modern TeX system distribution with
+% pdfLATeX working in extended mode (eTeX commands available); it
+% should perform correctly also with XeLaTeX and LuaLaTeX; tests have
+% been made also with the latter programs, but it was really tested in
+% depth with |babel| and pdfLaTeX.
+%
+% \bigskip
+%
% The file \file{\filename}\footnote{The file described in this
% section has version number \fileversion\ and was last revised on
% \filedate. The original author is Maurizio Codogno,
-% (\texttt{mau@beatles.cselt.stet.it}). It has been largely revised
-% by Johannes Braams and Claudio Beccari} defines all the
-% language-specific macros for the Italian language.
+% (\texttt{mau@beatles.cselt.stet.it}). It was initially revised
+% by Johannes Braams and then completely rewritten by Claudio Beccari}
+% defines all the language-specific macros for the Italian language.
+%
+% \begin{table}[htb]\centering
+% \begin{tabular}{cp{80mm}}
+% |"| & inserts a compound word mark where hyphenation is legal;
+% it allows etymological hyphenation which is recommended
+% for technical terms, chemical names and the like; it
+% does not work if the next character is represented with
+% a control sequence or is an accented character.\\
+% \texttt{\string"\string|}
+% & the same as the above without the limitation on
+% characters represented with control sequences or accented
+% ones.\\
+% |""| & inserts open quotes ``.\\ %^^A'' emacs matching
+% |"<| & inserts open guillemets.\\
+% |">| & inserts closed guillemets.\\
+% |"/| & equivalent to |\slash|
+% \end{tabular}
+% \caption{Shortcuts for the Italian language}\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 file
-% \texttt{ithyph.tex} was loaded when the \LaTeXe\ format was
-% built; in case it was not, read the information coming with your
-% distribution of the \TeX\ software, and the \babel\
-% documentation.
-% \item The language dependent fixed words to be inserted by such
+% \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.
@@ -127,69 +165,76 @@
% 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 prohibited between the last two lines of a
-% paragraph. In orer to make it consistent, also |\@clubpenalty|
-% is set to the same value; actualy the latter value is the
-% reset value after every sectioning command, so that after the
-% first section, |\clubpenalty| is reset to the low default value.
-% Thanks to Enrico Gregorio for spotting this serious bug.
+% hyphenation is strongly discouraged between the last two lines
+% of a paragraph.
% \item Some language specific shortcuts have been defined so as to
% allow etymological hyphenation, specifically |"| inserts a
% break point in any word boundary that the typesetter chooses,
-% provided it is not followed by and accented letter (very unlikely
+% 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 may take place with compound words
+% 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.
+% point falls before an accented letter.
% \item The shortcut |""| introduces the raised (English) opening
% double quotes; this shortcut 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 inputting the numerical code
-% 0096; very, very annoying!
-% \item The shortcuts |"<| and |">| insert the French guillemots,
-% sometimes used in Italian typography; with the T1 font encoding
+% pressing the \texttt{Alt} key while keying the numerical code
+% 0096 in the numeric keypad; very, very annoying!
+% \item The shortcuts |"<| 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 guillemots; with the OT1 encoding
-% the guillemots are not available and must be faked in some
+% 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 |">| shortcuts (even with the T1
% encoding) the necessary tests are performed and in case the
-% suitable glyphs are taken from other fonts normally available
-% with any good, modern \LaTeX\ distribution.
+% 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.\footnote{At
+% the date of writing actually there are some problems with LuaLaTeX,
+% in the sense that the real guillemets << and >> work as they
+% should, while the \texttt{<{}<} and \texttt{>{}>} ligatures don't;
+% the bug is due to the lack of some lines in the features description
+% file of OpenType fonts for LuaLaTeX; the bug has already been
+% submitted to the LuaTeX Team; is is very likely that when you use
+% this Italian language description file, the bug has already been
+% corrected.}
% \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. |\unit|
-% does not get redefined if the \babel\ package is loaded \emph{after}
-% the package \texttt{units.sty} whose homonymous command plays
-% a different role and follows a different syntax.
+% 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 functionalites
+% have already been defined by other packages, such as |unit.sty|
+% or |siunitx.sty|.
+% \item Since in all languages different from English the decimal separator
+% according to the ISO regulations \emph{must} be a comma, and since
+% no language description file nor the \babel\ package itself provides
+% for this deficiency, a 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|; I believe that my solution is better
+% than that provided by both those packages; but, since this
+% functionality may be turned on or off at the user will, those
+% packages may still be used By default this functionality is turned
+% off, therefore the user should turn it on by means of the
+% |\IntelligentComma| command; it can turn it off by means of
+% |\NoIntelligentComma|.
+% \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 limited number of shortcuts has been defined,
+% For this language a few shortcuts have been defined,
% table~\ref{t:itshrtct}, some of which are used 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.
%
-% \begin{table}[htb]\centering
-% \begin{tabular}{cp{80mm}}
-% |"| & inserts a compound word mark where hyphenation is legal;
-% it allows etymological hyphenation which is recommended
-% for technical terms, chemical names and the like; it
-% does not work if the next character is represented with
-% a control sequence or is an accented character.\\
-% \texttt{\string"\string|}
-% & the same as the above without the limitation on
-% characters represented with control sequences or accented
-% ones.\\
-% |""| & inserts open quotes ``.\\ %^^A'' emacs matching
-% |"<| & inserts open guillemots.\\
-% |">| & inserts closed guillemots.\\
-% |"/| & equivalent to |\slash|
-% \end{tabular}
-% \caption{Shortcuts for the Italian language}\label{t:itshrtct}
-% \end{table}
-%
% \StopEventually{%
% \begin{thebibliography}{1}
% \bibitem{CBec} Beccari C., ``Computer Aided Hyphenation for
@@ -207,8 +252,10 @@
% initial checks}
% \changes{italian-1.2j}{1996/12/29}{Added braces around second arg of
% \cs{LdfInit}}
-% \begin{macrocode}
+%\iffalse
%<*code>
+%\fi
+% \begin{macrocode}
\LdfInit{italian}{captionsitalian}%
% \end{macrocode}
%
@@ -268,7 +315,7 @@
\def\enclname{Allegati}%
\def\ccname{e~p.~c.}%
\def\headtoname{Per}%
- \def\pagename{Pag.}% % in Italian the abbreviation is preferred
+ \def\pagename{Pag.}%
\def\seename{vedi}%
\def\alsoname{vedi anche}%
\def\proofname{Dimostrazione}%
@@ -309,9 +356,6 @@
% \changes{italian-1.2b}{1994/05/19}{Added setting of club- and
% widowpenalty}
% Lower the chance that clubs or widows occur.
-% \changes{italian-1.2t}{2007/12/10}{Added \cs{@clubpenalty} to the
-% italian specific settings, otherwise any sectioning command restores
-% it to the default value valid for english and most other languages}
% \begin{macrocode}
\addto\extrasitalian{%
\babel@savevariable\clubpenalty
@@ -349,11 +393,90 @@
% \end{macro}
% \end{macro}
%
+% \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}{20101/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 posssibility 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.
+% \begin{macrocode}
+\newcount\it@lettering \it@lettering=\@ne
+\newcommand*\XXIletters{\it@lettering=\z@}
+\newcommand*\XXVIletters{\it@lettering=\@ne}
+\let\bbl@alph\@alph \let\bbl@Alph\@Alph
+\addto\extrasitalian{\babel@savevariable\it@lettering
+ \let\@alph\it@alph \let\@Alph\it@Alph}
+\addto\noextrasitalian{\let\@alph\bbl@alph\let\@Alph\bbl@Alph}
+% \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:
+% \begin{macrocode}
+\def\it@alph#1{%
+\ifcase\it@lettering
+ \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or
+ l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or
+ z\else\@ctrerr\fi
+\or
+ \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or
+ j\or k\or l\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or
+ w\or x\or y\or z\else\@ctrerr\fi
+\fi}%
+\def\it@Alph#1{%
+\ifcase\it@lettering
+ \ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or
+ L\or M\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or
+ Z\else\@ctrerr\fi
+\or
+ \ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or
+ J\or K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or U\or V\or
+ W\or X\or Y\or Z\else\@ctrerr\fi
+\fi}%
+% \end{macrocode}
+%
+% In order to have a complete description, the situation is this:
+% \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, therefore that the Italian language is the
+% default one); in this way the setting is global while you use
+% the Italian language.
+% \item The |XXLIletter| 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 taggingg 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}
-%
+
+% In Italian such 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
% basis, although etymological hyphenation is allowed; this is in
@@ -370,8 +493,8 @@
% languages, that \babel\ from the very beginning developed
% the tradition of making the |"| character active so as to perform
% several actions that turned useful with every language.
-% One of these actions consisted in defining the shortcut \verb="|=
-% that was extensively used in German and in many other languages
+% One of these actions consisted in defining the shortcut \verb="|=,
+% that was extensively used in German and in many other languages,
% in order to insert a discretionary hyphen such that hyphenation
% would not be precluded in the rest of the word as it happens with
% the standard \TeX\ command |\-|.
@@ -381,30 +504,31 @@
% less standard and are widely used by virtually all Europeans that
% write languages with many special national characters; by so
% doing they avoid the use of the |\accent| primitive which would
-% be required with the standard \texttt{cm} fonts; with the latter
-% fonts the primitive command |\accent| is such that hyphenation
-% becomes almost impossible, in any case strongly impeached.
-%
-% The \texttt{ec} fonts contain a special character, named
-% ``compound word mark'', that occupies position 23 in the font
-% scheme and may be input with the sequence |^^W|. Up to now,
-% apparently, this special character has never been used in a
-% practical way for the typesetting of languages rich of compound
-% words; also it has never been inserted in the hyphenation pattern
+% be required with the standard OT1 encoded \texttt{cm} fonts;
+% with such OT1 encoded fonts the primitive command |\accent| is such
+% that hyphenation becomes almost impossible, in any case strongly
+% impeached.
+%
+% The T1 encoded fonts contain a special character, named
+% ``compound word mark'', that occupies slot 23 (or |'27| or |"17|
+% in the font scheme and may be input with the sequence |^^W|.
+% Up to now, apparently, this special character has never been used
+% in a practical way for typesetting languages rich of compound
+% words; moreover it has never been inserted in the hyphenation pattern
% files of any language. Beccari modified his pattern file
% \file{ithyph.tex v4.8b} for Italian so as to contain five new
% patterns that involve |^^W|, and he tried to give the
-% \babel\ active character |"| a new shortcut definition,
+% \babel\ active character |"| a new shortcut definition,
% so as to allow the insertion of the ``compound word mark'' in the
% proper place within any word where two semantic fragments join
% up. With such facility for marking the compound word boundaries,
% etymological hyphenation becomes possible even if the patterns
% know nothing about etymology (but the typesetter hopefully
% does!).
-% In Italian such etymological hyphenation is desirable with
-% technical terms, chemical names, and the like.
%
-% Even this solution proved to be inconvenient on certain UN*X
+% \subsubsection{The current solution}
+%
+% Even this solution proved to be inconvenient on certain *NIX
% platforms, so Beccari resorted to another approach that uses the
% \babel\ active character |"| and relies on the category
% code of the character that follows |"|.
@@ -438,14 +562,14 @@
% execution a temporary variable \cs{it@temp} is made equivalent to
% the next token in the input list without actually removing
% it. Such temporary token is then tested by the macro \cs{it@cwm}
-% and if it is found to be a letter token, then it introduces a
+% and if it is found to be a letter token (cathode=11), then it introduces a
% compound word separator control sequence \cs{it@allowhyphens}
% whose expansion introduces a discretionary hyphen and an
-% unbreakable space; in case the token is not a letter, then it is
+% unbreakable null space; in case the token is not a letter, then it is
% tested against \verb=|=$_{12}$: if so a compound word separator
% is inserted and the \verb=|= token is removed, otherwise another
% test is performed so as to see if another double quote sign
-% follows: in this case a double open quote mark is inserted,
+% follows: in this case a double open quote mark is inserted;
% otherwise two other tests are performed so as to see if
% guillemets have to be inserted, otherwise nothing is done.
% The double quote shortcut for inserting a double open quote sign
@@ -454,10 +578,8 @@
% backtick key.
% By this shortcut |""| becomes equivalent to |``| for inserting
% raised open high double quotes.
-% \changes{italian-1.2r}{2005/11/17}{Added \cs{nobreak} to
-% \cs{it@@cwm} and corrected \cs{it@next}}
% \begin{macrocode}
-\def\it@@cwm{\nobreak\discretionary{-}{}{}\nobreak\hskip\z@skip}%
+\def\it@@cwm{\nobreak\discretionary{-}{}{}\hskip\z@skip}%
\def\it@@ocap#1{\it@ocap}\def\it@@ccap#1{\it@ccap}%
\DeclareRobustCommand*{\it@cwm}{\let\it@@next\relax
\ifcat\noexpand\it@temp a%
@@ -473,7 +595,7 @@
\def\it@@next{\it@@ccap}%
\else
\if\noexpand\it@temp\string/%
- \def\it@@next{\slash\@gobble}%
+ \def\it@next{\slash\@gobble}%
\else
\ifx\it@temp"%
\def\it@@next{``\@gobble}%
@@ -497,7 +619,7 @@
% not taken as a unit.
% A chemical name such as \texttt{des"clor"fenir"amina"cloridrato}
% is breakable as \textsf{des-clor-fe-nir-ami-na-clo-ri-dra-to}
-% instead of \textsf{de-sclor-fe-ni-ra-mi-na-...}
+% instead of \textsf{de-sclor-fe-ni-ra-mi-na-\dots}
%
% In other language description files a shortcut is defined so as
% to allow a break point without actually inserting any hyphen
@@ -524,24 +646,39 @@
% used that performs exactly as |"| normally does, except that the
% \verb!|! sign is removed from the token input list:
% \verb!kilo"|{\"o}rsted! gets hyphenated as
-% \texttt{ki-lo-\"or-sted}.
+% \texttt{ki-lo-\"or-sted}; but also
+% \texttt{kilo\string"\string|\"orsted} gets hyphenated correctly
+% as \texttt{ki-lo-\"or-sted} The \verb="|= macro is necessary
+% because, even with a suitable option specified to the |inputenc|
+% package, the letter `\"o' does not have category code 11, as the ASCII
+% letters do, because of the intermediate passages that have to be done
+% in order to fetch the proper glyph in the output font.
%
% \changes{italian-1.2l}{1999/04/05}{Added useful macros for
% fulfilling ISO 31/XI regulations}
%
% \subsection{Facilities required by the ISO 31/XI regulations}
% The ISO 31/XI regulations require that units of measure are
-% typeset in upright font in any circumstance, math or text, and
+% typeset in upright font in both math and text, and
% that in text mode they are separated from the numerical
% indication of the measure with an unbreakable (thin) space.
% The command |\unit| that was defined for achieving this
-% goal happened to conflict with the homonymous command defined by
-% the package \texttt{units.sty}; we therefore need to test if that
-% package has already been loaded so as to avoid conflicts; we assume
-% that if the user loads that package, s/he wants to use that package
+% goal happened to conflict with the homonymous command defined by the
+% \texttt{units.sty}; we therefore need to test if that package
+% has already been loaded so as to avoid conflicts; we assume that
+% if the user loads that package, s/he wants to use that package
% facilities and command syntax.
+%
+% Actually there are around several packages that help to typeset
+% units of measure in the proper way; besides |units.sty| there is also
+% |siunitx.sty| that nowadays offers the best performances in this
+% domain. Therefore we keep controlling the possibility that
+% |units.sty| has been loaded just for backwards compatibility, but
+% we must do the same with |siunitx.sty|. In order to avoid the
+% necessity o loading packages in a certain order, we delay the test
+% until |\begin{document}|.
%
-% The same regulations require also that super and subscripts
+% The same ISO regulations require also that super and subscripts
% (apices and pedices) are in upright font, \emph{not in math
% italics}, when they represent ``adjectives'' or appositions to
% mathematical or physical variables that do not represent
@@ -567,16 +704,21 @@
% \begin{macro}{\ped}
% First we define the new (internal) commands |\bbl@unit|, |\bbl@ap|,
% and |\bbl@ped| as robust ones.
-% \changes{italian-1.2q}{2005/02/05}{Added testing for avoiding conflicts
-% with the units.sty package}
+% \changes{italian-1.3}{2013/09/27}{Added testing to avoid conflicts
+% with the units.sty and siunitx.sty packages}
% \begin{macrocode}
-\@ifpackageloaded{units}{}{%
- \DeclareRobustCommand*{\bbl@unit}[1]{%
- \textormath{\,\mbox{#1}}{\,\mathrm{#1}}}%
- }%
-\DeclareRobustCommand*{\bbl@ap}[1]{%
+\def\activate@it@unit{\DeclareRobustCommand*{\bbl@it@unit}[1]{%
+ \textormath{\,\textup{##1}}{\,\mathrm{##1}}}}
+\AtBeginDocument{%
+\@ifpackageloaded{units}{}{\@ifpackageloaded{siunitx}{}{%
+ \@ifpackageloaded{SIunits}{}{%
+ \activate@it@unit\addto\extrasitalian{%
+ \babel@save\unit\let\unit\bbl@it@unit}\selectlanguage{italian}%
+ }}}%
+}
+\DeclareRobustCommand*{\bbl@it@ap}[1]{%
\textormath{\textsuperscript{#1}}{^{\mathrm{#1}}}}%
-\DeclareRobustCommand*{\bbl@ped}[1]{%
+\DeclareRobustCommand*{\bbl@it@ped}[1]{%
\textormath{$_{\mbox{\fontsize\sf@size\z@
\selectfont#1}}$}{_\mathrm{#1}}}%
% \end{macrocode}
@@ -585,19 +727,168 @@
% in Italian mode typesetting, we first memorize their meaning so
% as to restore them on exit.
% \begin{macrocode}
-\@ifpackageloaded{units}{}{%
- \addto\extrasitalian{%
- \babel@save\unit\let\unit\bbl@unit}%
- }%
\addto\extrasitalian{%
- \babel@save\ap\let\ap\bbl@ap
- \babel@save\ped\let\ped\bbl@ped
+ \babel@save\ap\let\ap\bbl@it@ap
+ \babel@save\ped\let\ped\bbl@it@ped
}%
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
+% \section{Intelligent comma}
+%
+% \begin{macro}{\IntelligentComma}
+% \begin{macro}{\NoINtellgentComma}
+% This feature is optional, in the sense that it is necessary to issue
+% a specific command to activate it; actually it sets a switch and according
+% to this switch the functionality is activated or dismissed.
+% \begin{macrocode}
+\newcount\Virgola
+\Virgola=\z@
+\newcommand*\IntelligentComma{\Virgola=\@ne}
+\newcommand*\NoIntelligentComma{\Virgola=\z@}
+\addto\extrasitalian{\babel@savevariable\Virgola}
+% \end{macrocode}
+% In order to have this functionality work properly with pdfLaTeX,
+% XeLaTeX, and LuaLaTeX, it is necessary to discover which engine
+% is being used, or better, wichich language handling package is
+% being used: |babel| or |polyglossia|? Let us remember that testing
+% the actual engine, as it would be possible with package |iftex|,
+% does not tell the whole truth, because in the case of LuaLaTeX, that
+% is similar to XeLaTeX for what concerns handling of OpenType fonts,
+% it uses the same engine as pdfLATeX and can use either |babel| or
+% |polyglossia|, so this is the real discriminant factor, not the
+% typesetting engine.
+%
+% At the same time we need to perform some tests that require some
+% smart control-sequence handling; therefore we call the |etoolbox|
+% package that allow us more testing functionality. There are no problems
+% with this package that can be invoked also by other ones before or
+% after |babel| is called; the |\RequirePackage| mechanism is sufficiently
+% smart to avoid reloading of the same package more than once. But we
+% have to delay this call, because |italian.ldf| is being read while
+% processing the options passed to |babel|, and this is forbidden; we
+% delay it at the end of processing the |babel| package itself.
+% \begin{macrocode}
+\AtEndOfPackage{\RequirePackage{etoolbox}}
+% \end{macrocode}
+%
+% \begin{macro}{\virgola}
+% \begin{macro}{\virgoladecimale}
+% We need two kind of commas, one that is a decimal separator, and
+% a second one that is a punctuation mark.
+% \begin{macrocode}
+ \DeclareMathSymbol{\virgola}{\mathpunct}{letters}{"3B}
+ \DeclareMathSymbol{\virgoladecimale}{\mathord}{letters}{"3B}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Then we need a command to set the comma as an active charter only
+% in math mode; the special |\mathcode| that classifies an active
+% character in math is the exadecimal value |"8000|. But we have
+% to set this value only when the current lagguage is not English
+% or one of its varieties.
+% \begin{macrocode}
+\AtEndOfPackage{%
+\AtEndPreamble{%
+ \@ifpackageloaded{polyglossia}{%
+ \ifcsstring{xpg@main@language}{english}{\relax}{%
+ \mathcode`\,=\string"8000}
+ }{%
+ \ifcsstring{languagename}{english}{\relax}{%
+ \mathcode`\,=\string"8000}
+ }
+}}
+% \end{macrocode}
+% Math comma activation is done only after the preamble has
+% been completed, that is after the |\begin{document}| statement has been
+% completely executed. Now we must give a definition to the active comma:
+% \begin{macrocode}
+{\catcode `,=\active \gdef,{\futurelet\let@token\m@thcomma}}%
+% \end{macrocode}
+% The real work shall be performed by |\m@thcomma|. This follows after
+% a few words of explanation; the above statement stores the token that
+% follows the |\m@thcomma| macro into a temporary control sequence that
+% behaves as an implicit character if that token is a single character,
+% even a space, or behaves as an alias of a macro otherwise. So first
+% we test if the comma must act intelligently; if the counter |\Virgola|
+% contains zero, we assume that the comma must always perform as a punctuation
+% mark; but if we want to distinguish if it must behave as a decimal
+% separator we have to perform more delicate tests.
+%
+% In particular we must test if the next char has category code 12,
+% that is ``other character'', not a letter, nor other special signs,
+% as the space for example. In this case the comma must act as a
+% punctuation mark; but if it has category code 12, it might be a
+% digit, or another character; so we have to test the nature of a
+% digit; the simplest way I found to test if a token is a digit is
+% to test its ASCII code against the ASCII codes of `0' (zero) and 9.
+% The typesetting engines give the backtick, |`|, the property that
+% when a number is required, it yields the ASCII code if the following
+% token in an explicit character or a macro argument; this is why we
+% can't use the temporary implicit token we just tested, but we must
+% examine the first non blank token that follows the |\m@thcomma|
+% macro. Only if the token is a digit, we use the decimal comma,
+% otherwise the punctuation mark. This is therefore the definition of
+% the |\m@thcomma| macro which is not that simple, although the testing
+% macros have clear meanings:
+% \begin{macrocode}
+\AtEndOfPackage{%
+\AtEndPreamble{%
+\gdef\m@thcomma#1{%
+\ifnumequal{\Virgola}{\z@}{\virgola#1}{%
+ \unless\ifcat\noexpand\let@token*%
+ \virgola
+ \else
+ \ifcsundef{\expandafter\@gobble\string #1}{%
+ \ifnumless{`#1}{`0}{\virgola}%
+ {\ifnumgreater{`#1}{`9}{\virgola}%
+ {\virgoladecimale}%
+ }%
+ }{\virgola}%
+ \fi#1}}%
+}}
+% \end{macrocode}
+% This definition is pretty intelligent, but the context does not
+% give enough informations to this `intelligence' in just one case:
+% when the comma plays the r\^ole of a serial separator in expressions
+% such as $i=1, 2, 3,\dots,\infty$, entered as
+% \verb*?$i=1, 2, 3,\dots,\infty$?. In this case and only in this
+% case the comma must be followed by an explicit space, otherwise
+% the macro takes the following non blank token as a digit, and
+% actually it is a digit, and uses the decimal comma instead, which
+% would be wrong. The control sequences |\dots| and |\infty| are
+% tested to see if they are undefined, and since they are defined, the macro
+% inserts a punctuation mark, instead of a decimal separator.
+%
+% Notice the this macro appears to be inconsistent with the contents
+% of a language description file. I don't agree: matter of facts even
+% math is part of typesetting a text in a certain language; does this
+% set of macros influence other language description files? May be,
+% but I think that the clever use of the macros |\IntelligentComma|
+% and |\NoIntellingentComma| may solve any interference; they allow to
+% use the proper mark even if the Italian language is not the main
+% language, the important point is to turn the switch on and off.
+% By default it is off, so there should not be any interference even
+% with legacy documents typeset in Italian.
+%
+% Notice that there are other packages that contain facilities for
+% using the decimal comma as the correct decimal separator; for
+% example |siunitx| defines a command |\num| that not only correctly
+% spaces the decimal separator, but also can change the input glyph
+% with another one, so that it is possible to copy and paste numbers
+% from texts in English (with the decimal point) and paste them
+% into the argument of the |\num| macro in an Italian document where
+% the decimal point is changed automatically into a decimal comma. Of
+% course |siunitx| does much more than that; if it's being loaded,
+% then the default |\NoIntelligentComma| declaration disables the
+% functionality defined in this language description file and the
+% user can do what he desires with the many functionalities of that
+% package.
+% \end{macro}
+% \end{macro}
% \subsection{Accents}\label{s:itkbd}
% Most of the other language description files introduce a number
% of shortcuts for inserting accents and other language specific
@@ -607,7 +898,7 @@
% limitations that up to now no convenient shortcuts have been
% developed; the reason lies in the fact that the Italian keyboard
% lacks the grave accent (also known as ``backtick''), which is
-% compulsory on all accented vowels except the `e', but, on the
+% compulsory on all accented vowels, but, on the
% opposite, it carries the keys with all the accented lowercase
% vowels; the keyboard lacks also the tie |~| (tilde) key, while
% the curly braces require pressing three keys simultaneously.
@@ -631,9 +922,12 @@
% noticed that the shortcut |""| described above completely solves
% the problem for \textit{double} raised open quotes; according to
% the traditions of particular publishing houses, since there are
-% no compulsory regulations on the matter, the French guillemets
+% no compulsory regulations on the matter, the guillemets
% may be used; in this case the T1 font encoding solves the problem
-% by means of its built in ligatures |<<| and |>>|. But\dots
+% by means of its built in ligatures |<<| and |>>|; such ligatures
+% are also available when using OpenType fonts with XeLaTeX and
+% LuaLaTeX, provided they are loaded with the option
+% \texttt{Ligatures = TeX}. But\dots
%
% \subsection{\emph{Caporali} or French double quotes}
% Although the T1 font encoding ligatures solve the problem, there
@@ -642,59 +936,72 @@
% OT1 encoding, or because s/he uses a font set that does
% not comply completely with the T1 font encoding; some virtual
% fonts, for example, are supposed to implement the double Cork
-% font encoding but actually miss some glyphs; one such virtual
+% font encoding but actually miss some glyphs; one such virtual
% font set is given by the \texttt{ae} virtual fonts, because they
-% are supposed to implement such double font encoding simply using
-% the \texttt{cm} fonts, of which the type~1 PostScript version
-% exists and is freely available. Since guillemets (in Italian
-% \emph{caporali}) do not exist in any \texttt{cm} latin font,
-% their glyphs must be substituted with something else that
-% approaches them.
+% are supposed to implement such double font encoding by using
+% virtual fonts that map the |CM| fonts to a T1 font scheme; the
+% type~1 PostScript version of the |CM| fonts do exist, therefore
+% one believes to be able of using them with pdfLaTeX; but since
+% the |CM| fonts do not contain the guillemets, neither the |AM|
+% ones do.
+% Since guillemets (in Italian \emph{caporali}) do not exist in
+% any OT1 encoded \texttt{cm} Latin font, their glyphs must be
+% substituted with something else that fakes them.
%
% \changes{italian-1.2q}{2005/02/05}{Redefined the caporali machinery
% so as to avoid incompatibilities with the slides class, as there
-% are no Cyrillic slides fonts as there are for Latins script}
-%
-% Since in French typesetting guillemets are compulsory, the French
-% language definition file resorts to a clever font substitution;
-% such file exploits the \LaTeXe\ font selection machinery so as to
-% get the guillemets from the Cyrillic fonts, because it suffices
-% to locally change the default encoding. There are several sets of
-% Cyrillic fonts, but the ones that obey the OT2 font encoding are
-% generally distributed with all recent implementations of the
-% \TeX\ software; they are part of the American Mathematical
-% Society fonts and come both as \textsf{METAFONT} source files and
-% Type~1 PostScript \texttt{.pfb} files. The availability of such
-% fonts should be guaranteed by the presence of the
-% \texttt{OT2cmr.fd} font description file. Actually the presence
-% of this file does not guarantee the completeness of your \TeX\
-% implementation; should \LaTeX\ complain about a missing Cyrillic
-% \texttt{.tfm} file (that kind of file that contains the font
-% metric parameters) and/or about missing Cyrillic \texttt(.mf)
-% files, then your \TeX\ system is \emph{incomplete} and you should
-% download such fonts from the \textsc{ctan} archives. Temporarily
-% you may issue the command |\LtxSymbCaporali| so as to approximate
-% the missing glyphs with the \LaTeX\ symbol fonts. In some case
-% warning messages are issued so as to inform the typesetter about
-% the necessity of resorting to some \emph{poor man} solution.
-%
-% In spite of these alternate fonts, we must avoid invoking unusual
-% fonts if the available encoding allows to use built in caporali.
-% As far as I know (CB) the only T1-encoded font families that miss
-% the guillemets are the AE ones; we therefore first test if the
-% default encoding id the T1 one and in this case if the AE families
-% are the default ones; in order for this to work properly it is
-% necessary to load these optional packages \emph{before} \babel.
-% If the T1 encoding is not the default one when the Italian language
-% is specified, then some substitutions must be done.
+% are no Cyrillic slides fonts as there are for Latin script}
+% \changes{italian-1.3}{2013/09/30}{The slide font fix up is not any
+% more necessary with the new caporal handling method.}
+%
+% In the previous versions of this language description file the
+% absent guillemets were faked with other fonts, by taking example
+% from the solution the French had found for their language
+% description file; they would get suitable guillemets from the
+% cyrillic fonts; This solution was good in most cases, except when
+% the ``slides fonts'' were used, because there is no Cyryllic slide
+% font around.
+%
+% This might seem a negligible ``feature'' because the modern classes
+% or extension modules to produce slides mostly avoid the ``old'' fonts
+% for slides created by Leslie Lamport when he made available to the
+% TeX community the macro package LaTeX.
+%
+% Since I designed renewed slide fonts extending those
+% created by Leslie Lamport to the T1 encoding, the Text Companion
+% fonts, and the most frequent ``regular'' and AMS math fonts with the same
+% graphic style and excellent legibility (LXfonts), I thought that
+% this feature is not so negligible. It's true that nowadays nobody
+% should use the old OT1 encoding when typesetting in any language,
+% English included, because independently form the document main
+% language, it is very frequent to quote passages in other languages,
+% or to type foreign proper names of persons or places; nevertheless
+% having in mind a minimum of backwards compatibility and hoping
+% that the deliberate use of OT1 encoding (still necessary to typeset
+% mathematics) is being abandoned, I decided to simplify the previous
+% handling of guillemets.
+%
+% Therefore here I will test at ``begin document'' only if the OT1
+% encoding is the default one, while if the T1 encoding is the default
+% one, that the font collection |AE| is not being used; should
+% it be the case, I will substitute the guillemets with the LaTeX
+% special symbols reduced to script size, and I will not try to fake
+% the guillemets with better solutions; evidently if OpenType fonts
+% are being used, nothing is done; so the tests that follow concern
+% only typesetting old documents or the lack of a wiser choice of fonts
+% and their encodings; an info message is issued and output to the
+% |.log| file.
%
% \begin{macro}{\LtxSymbCaporali}
% \begin{macro}{\it@ocap}
% \begin{macro}{\it@ccap}
-% We define some macros for substituting the default guillemets; first the
-% emulation by means of the \LaTeX\ symbols; each one of these macro sets
+% First the macro |\LtxSymvCaporali| is defined so as to assign a
+% default definition of the faked guillemets: each one of these macro sets
% actually redefines the control sequences |\it@ocap| and |\it@ccap| that
-% are the ones effectively activated by the shortcuts |"<| and |">|.
+% are the ones effectively activated by the shortcuts |"<| and |">|.
+% By default the caporali glyphs are taken from T1-encoded fonts; at
+% the end of the preamble some tests are performed to control if the
+% default fonts contain such glyphs, and in case a different font is chosen.
% \begin{macrocode}
\def\LtxSymbCaporali{%
\DeclareRobustCommand*{\it@ocap}{\mbox{%
@@ -704,38 +1011,31 @@
\mbox{%
\fontencoding{U}\fontfamily{lasy}\selectfont)\kern-0.20em)}}%
}%
+\def\T@unoCaporali{\DeclareRobustCommand*{\it@ocap}{<<\ignorespaces}%
+ \DeclareRobustCommand*{\it@ccap}{\ifdim\lastskip>\z@\unskip\fi>>}}%
+\T@unoCaporali
% \end{macrocode}
-% Then the substitution with any specific font that contains such
-% glyphs; it might be the CBgreek fonts, the Cyrillic one, the
-% super-cm ones, the lm ones, or any other the user might prefer
-% (the code is adapted from the one that appears in the
-% \texttt{frenchb.ld} file; thanks to Daniel Flipo).
-% By default if the user did not select the T1 encoding, the
-% existence of the CBgreek fonts is tested; if they exist the
-% guillemets are taken from this font, and since its families are a
-% superset of the default CM ones and they apply also to typeset
-% slides with the standard class \texttt{slides}. If the CBgreek
-% fonts are not found, then the existence of the Cyrillic ones is
-% tested, although this choice is not suited for typesetting
-% slides; otherwise the poor man solution of the \LaTeX\ special
-% symbols is used. In any case the user can force the use of the
-% Cyrillic guillemets substitution by issuing the declaration
-% |\CyrillicCaporali| just before the |\begin{document}| statement;
-% in alternative the user can specify with
-% \begin{flushleft}
-% |\CaporaliFrom|\marg{encoding}\marg{family}\marg{opening number}\marg{closing number}
-% \end{flushleft}
-% the encoding and family of the font s/he prefers, and the slot
-% numbers of the opening and closing guillemets respectively. For
-% example if the T1-encoded Latin Modern fonts are desired the
-% specific command should be
+% Nevertheless a macro for choosing where to get glyphs for real guillemets
+% is offered; the syntax is the following:
% \begin {flushleft}
-% |\CaporaliFrom{T1}{lmr}{19}{20}|
+% |\CaporaliFrom|\marg{encoding}\marg{family}\marg{open guill. slot}%
+% \marg{close guill. slot}
% \end{flushleft}
-% These user choices might be necessary for assuring the correct
-% typesetting with fonts that contain the required glyphs and are
-% available also in PostScript form so as to use them directly with
-% \texttt{pdflatex}, for example.
+% where \meta{encoding} and \meta{family} identify the font family
+% name of that particular encoding from which to get the missing
+% guillemets; \meta{open guill. slot} and \meta{close guill. slot}
+% are the (preferably) decimal slot addresses of the opening and
+% closing guillemets the user wants to use. For example if the
+% T1-encoded Latin Modern fonts are desired, the specific command
+% should be
+% \begin {flushleft}
+% |\CaporaliFrom{T1}{lmr}{19}{20}|
+% \end{flushleft}
+% These user choices might be necessary for assuring the correct
+% typesetting
+% with fonts that contain the required glyphs and are available
+% also in PostScript form so as to use them directly with {pdfLaTeX},
+% for example.
% \begin{macrocode}
\def\CaporaliFrom#1#2#3#4{%
\DeclareFontEncoding{#1}{}{}%
@@ -748,96 +1048,64 @@
\DeclareTextCommand{\it@ccap}{OT1}{\ifdim\lastskip>\z@\unskip\fi%
{\fontencoding{#1}\fontfamily{#2}\selectfont\char#4}}}
% \end{macrocode}
-% Then we set a boolean variable and test the default family;
-% if such family has a name that starts with the letters ``ae''
-% then we have no built in guillemets; of course if the AE font
-% family is chosen after the \babel\ package is loaded, the test
-% does not perform as required.
+% Notice that the above macro is strictly tied to the T1 encoding;
+% it won't do anything if the default encoding is not the T1 one.
+% Therefore if the |AE| font collection is being used it would be
+% good idea to issue the command shown above as an example in order
+% to get the proper guillemets\footnote{Actually the \texttt{AE}
+% fonts should not be used at all; the same results, more or less
+% are obtained by using the Latin Modern ones, that are not virtual
+% fonts and contain the whole T1 font scheme. Nevertheless the faked
+% glyphs are not so bad, so the solution I restored from old versions
+% of they language description file i acceptable}.
+
+% Then we set a boolean variable and test the default family;
+% if such family has a name that starts with the letters ``ae''
+% then we have no built in guillemets; of course if the AE font family is chosen
+% after the \babel\ package is loaded, the test does not perform as required.
% \begin{macrocode}
\def\get@ae#1#2#3!{\def\bbl@ae{#1#2}}%
\def\@ifT@one@noCap{\expandafter\get@ae\f@family!%
\def\bbl@temp{ae}\ifx\bbl@ae\bbl@temp\expandafter\@firstoftwo\else
\expandafter\@secondoftwo\fi}%
% \end{macrocode}
-% We set another couple of boolean variables for testing the
-% existence of the CBgreek or the Cyrillic fonts
-% \begin{macrocode}
-\newif\if@CBgreekEncKnown
-\IfFileExists{lgrcmr.fd}%
- {\@CBgreekEncKnowntrue}{\@CBgreekEncKnownfalse}
-\newif\if@CyrEncKnown
-\IfFileExists{ot2cmr.fd}%
- {\@CyrEncKnowntrue}{\@CyrEncKnownfalse}%
-% \end{macrocode}
-% \begin {macro}{\CBgreekCaporali}
-% \begin {macro}{\CyrillicCaporali}
-% \begin {macro}{\T@unoCaporali}
-% Next we define the macros |\CBgreekCaporali|, |\T@unoCaporali|,
-% and |\CyrillicCaporali|; with the latter one we test the loaded
-% class, and if it's \texttt{slides} nothing gets done. In any case
-% each one of these declarations, if used, must be specified in the
-% preamble.
+% Now we can set some real settings; first we start by testing
+% the encoding; if the encoding is OT1 we set the faked caporali
+% with LaTeX symbols and issue a warning; then we test if the font
+% family is the AE one we set again the faked caporali and issue
+% another warning\footnote{Notice the it is impossible to check
+% if the slots 19 and 20 of the AE fonts are defined by means of
+% the eTeX macro \texttt{\char92iffontchar}, because they are
+% actually defined as black squares!}; otherwise we set the commands
+% valid for the T1 encoding, that work well also with the TeX
+% Ligatures of the OpenType fonts.
% \begin{macrocode}
-\def\CBgreekCaporali{\@ifclassloaded{slides}{%
- \IfFileExists{lgrlcmss.fd}{\DeclareFontEncoding{LGR}{}{}%
- \DeclareRobustCommand*{\it@ccap}%
- {\ifdim\lastskip>\z@\unskip\fi
- {\fontencoding{LGR}\selectfont))}}%
- \DeclareRobustCommand*{\it@ocap}%
- {{\fontencoding{LGR}\selectfont((}\ignorespaces}}%
- {\LtxSymbCaporali}}%
- {\DeclareFontEncoding{LGR}{}{}%
- \DeclareRobustCommand*{\it@ccap}%
- {\ifdim\lastskip>\z@\unskip
- \fi{\fontencoding{LGR}\selectfont))}}%
- \DeclareRobustCommand*{\it@ocap}%
- {{\fontencoding{LGR}\selectfont((}\ignorespaces}}%
+\AtBeginDocument{\normalfont\def\bbl@temp{OT1}%
+ \ifx\cf@encoding\bbl@temp
+ \LtxSymbCaporali
+ \GenericWarning{italian.ldf\space}{%
+ File italian.ldf warning: \MessageBreak\space\space\space
+ With OT1 encoding guillemets are poorly faked\MessageBreak
+ \space\space\space
+ Use T1 encoding\MessageBreak\space\space\space
+ or specify a font with command \string\CaporaliFrom\MessageBreak
+ \space\space\space
+ See the documentation concerning the babel-italian typesetting
+ \MessageBreak\space\space}%
+ \else
+ \ifx\cf@encoding\bbl@t@one
+ \@ifT@one@noCap{%
+ \LtxSymbCaporali
+ \GenericWarning{italian.ldf\space}{%
+ File italian.ldf warning: \MessageBreak\space\space\space
+ The AE font collection does not contain the guillemets
+ \MessageBreak\space\space\space
+ Use the Latin Modern font collection instead
+ \MessageBreak\space}
}%
-\def\CyrillicCaporali{\@ifclassloaded{slides}{\relax}%
- {\DeclareFontEncoding{OT2}{}{}%
- \DeclareRobustCommand*{\it@ccap}%
- {\ifdim\lastskip>\z@\unskip\fi
- {\fontencoding{OT2}\selectfont\char62\relax}}%
- \DeclareRobustCommand*{\it@ocap}%
- {{\fontencoding{OT2}\selectfont\char60\relax}\ignorespaces}}}%
-\@onlypreamble{\CBgreekCaporali}\@onlypreamble{\CyrillicCaporali}%
-\def\T@unoCaporali{\DeclareRobustCommand*{\it@ocap}{<<\ignorespaces}%
- \DeclareRobustCommand*{\it@ccap}{\ifdim\lastskip>\z@\unskip\fi>>}}%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% Now we can do some real setting; first we start testing the encoding;
-% if the encoding is T1 we test if the font family is the AE one; if so,
-% we further test for other possibilities
-% \begin{macrocode}
-\ifx\cf@encoding\bbl@t@one
- \@ifT@one@noCap{%
- \if@CBgreekEncKnown
- \CBgreekCaporali
- \else
- \if@CyrEncKnown
- \CyrilicCaporali
- \else
- \LtxSymbCaporali
- \fi
- \fi}%
- {\T@unoCaporali}%
-% \end{macrocode}
-% But if the default encoding is not the T1 one, then the
-% substitutions must be performed.
-% \begin{macrocode}
-\else
- \if@CBgreekEncKnown
- \CBgreekCaporali
- \else
- \if@CyrEncKnown
- \CyrilicCaporali
- \else
- \LtxSymbCaporali
- \fi
- \fi
-\fi
+ {\T@unoCaporali}\fi
+ \fi
+}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -852,8 +1120,10 @@
% up}
% \begin{macrocode}
\ldf@finish{italian}%
-%</code>
% \end{macrocode}
+%\iffalse
+%</code>
+%\fi
%
% \Finale
%%