% \iffalse meta-comment
%
% Copyright 1989-1999 Johannes L. Braams and any individual authors
% listed elsewhere in this file.  All rights reserved.
% 
% This file is part of the Babel system release 3.6.
% --------------------------------------------------
% 
% It may be distributed under the terms of the LaTeX Project Public
% License, as described in lppl.txt in the base LaTeX distribution.
% Either version 1.0 or, at your option, any later version.
% \fi
% \CheckSum{137}
% \iffalse
%    Tell the \LaTeX\ system who we are and write an entry on the
%    transcript.
%<*dtx>
\ProvidesFile{italian.dtx}
%</dtx>
%<code>\ProvidesLanguage{italian}
%\fi
%\ProvidesFile{italian.dtx}
        [1999/05/01 v1.2l Italian support from the babel system]
%\iffalse
%% File `italian.dtx'
%% Babel package for LaTeX version 2e
%% Copyright (C) 1989 - 1999
%%           by Johannes Braams, TeXniek
%
%% Please report errors to: J.L. Braams
%%                          JLBraams@cistron.nl
%
%    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).
%<*filedriver>
\documentclass{ltxdoc}
\newcommand*\TeXhax{\TeX hax}
\newcommand*\babel{\textsf{babel}}
\newcommand*\langvar{$\langle \it lang \rangle$}
\newcommand*\note[1]{}
\newcommand*\Lopt[1]{\textsf{#1}}
\newcommand*\file[1]{\texttt{#1}}
\begin{document}
 \DocInput{italian.dtx}
\end{document}
%</filedriver>
%\fi
% \GetFileInfo{italian.dtx}
%
% \changes{italian-0.99}{1990/07/11}{First version, from english.doc}
% \changes{italian-1.0}{1991/04/23}{Modified for babel 3.0}
% \changes{italian-1.0a}{1991/05/23}{removed typo}
% \changes{italian-1.0b}{1991/05/29}{Removed bug found by van der Meer}
% \changes{italian-1.0e}{1991/07/15}{Renamed \file{babel.sty} in
%    \file{babel.com}}
% \changes{italian-1.1}{1992/02/16}{Brought up-to-date with babel 3.2a}
% \changes{italian-1.2}{1994/02/09}{Update for\ LaTeXe}
% \changes{italian-1.2e}{1994/06/26}{Removed the use of \cs{filedate}
%    and moved identification after the loading of \file{babel.def}}
% \changes{italian-1.2f}{1995/05/28}{Updated for babel 3.5}
% \changes{italian-1.2i}{1996/10/10}{Replaced \cs{undefined} with
%    \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency
%    with \LaTeX, moved the definition of \cs{atcatcode} right to the
%    beginning.}
% \changes{italian-1.2l}{1999/04/28}{Added \cs{unit}, \cs{ap}, and
%    \cs{ped} macros}
%
%  \section{The Italian language}
%
%    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 largely been revised by
%    Johannes Braams and Claudio Beccari.}  It defines all the
%    language-specific macros for the Italian language.
%
%    For this language the |\clubpenalty|, |\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.
%
%    Claudio Beccari (\texttt{beccari@polito.it}) added
%    ^^Asupport for etymological hyphenation and 
%    some specific extras for typesetting
%    units according to ISO 31/XI and apices and pedices (superscripts and
%    subscripts) for both text and math, in the latter case allowing
%    correct application of ISO 31/XI.
%
% \StopEventually{}
%
%    The macro |\LdfInit| takes care of preventing that this file is
%    loaded more than once, checking the category code of the
%    \texttt{@} sign, etc.
% \changes{italian-1.2i}{1996/11/03}{Now use \cs{LdfInit} to perform
%    initial checks}
% \changes{italian-1.2j}{1996/12/29}{Added braces around second arg of
%    \cs{LdfInit}}
%    \begin{macrocode}
%<*code>
\LdfInit{italian}{captionsitalian}
%    \end{macrocode}
%
%    When this file is read as an option, i.e. by the |\usepackage|
%    command, \texttt{italian} will be an `unknown' language in which
%    case we have to make it known.  So we check for the existence of
%    |\l@italian| to see whether we have to do something here.
%
% \changes{italian-1.0}{1991/04/23}{Now use \cs{adddialect} if
%    language undefined}
% \changes{italian-1.0h}{1991/10/08}{Removed use of \cs{@ifundefined}}
% \changes{italian-1.1}{1992/02/16}{Added a warning when no
%    hyphenation patterns were loaded.}
% \changes{italian-1.2e}{1994/06/26}{Now use \cs{@nopatterns} to
%    produce the warning}
%    \begin{macrocode}
\ifx\l@italian\@undefined
    \@nopatterns{Italian}
    \adddialect\l@italian0\fi
%    \end{macrocode}
%
%    The next step consists of defining commands to switch to (and
%    from) the Italian language.
%
% \begin{macro}{\captionsitalian}
%    The macro |\captionsitalian| defines all strings used
%    in the four standard documentclasses provided with \LaTeX.
% \changes{italian-1.0c}{1991/06/06}{Removed \cs{global} definitions}
% \changes{italian-1.0c}{1991/06/06}{\cs{pagename} should be
%    \cs{headpagename}}
% \changes{italian-1.0d}{1991/07/01}{`contine' substitued by `Allegati'
%    as suggested by Marco Bozzo (\texttt{BOZZO@CERNVM}).}
% \changes{italian-1.1}{1992/02/16}{Added \cs{seename}, \cs{alsoname}
%    and \cs{prefacename}}
% \changes{italian-1.1}{1993/07/15}{\cs{headpagename} should be
%    \cs{pagename}}
% \changes{italian-1.2b}{1994/05/19}{Changed some of the words
%    following suggestions from Claudio Beccari}
% \changes{italian-1.2g}{1995/07/04}{Added \cs{proofname} for
%    AMS-\LaTeX}
% \changes{italian-1.2h}{1995/07/27}{Added translation of `Proof'}
%    \begin{macrocode}
\addto\captionsitalian{%
  \def\prefacename{Prefazione}%
  \def\refname{Riferimenti bibliografici}%
  \def\abstractname{Sommario}%
  \def\bibname{Bibliografia}%
  \def\chaptername{Capitolo}%
  \def\appendixname{Appendice}%
  \def\contentsname{Indice}%
  \def\listfigurename{Elenco delle figure}%
  \def\listtablename{Elenco delle tabelle}%
  \def\indexname{Indice analitico}%
  \def\figurename{Figura}%
  \def\tablename{Tabella}%
  \def\partname{Parte}%
  \def\enclname{Allegati}%
  \def\ccname{e~p.~c.}%
  \def\headtoname{Per}%
  \def\pagename{Pag.}%    % in Italian abbreviation is preferred
  \def\seename{vedi}%
  \def\alsoname{vedi anche}%
  \def\proofname{Dimostrazione}%
  }
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dateitalian}
%    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.2k}{1997/10/01}{Use \cs{edef} to define
%    \cs{today} to save memory}
% \changes{italian-1.2k}{1998/03/28}{use \cs{def} instead of \cs{edef}}
%    \begin{macrocode}
\def\dateitalian{%
  \def\today{\number\day~\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}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\italianhyphenmins}
% \changes{italian-1.2b}{1994/05/19}{Added setting of left and
%    righthyphenmin according to Claudio Beccari's suggestion}
%
%    The italian hyphenation patterns can be used with both
%    |\lefthyphenmin| and |\righthyphenmin| set to~2.
%    \begin{macrocode}
\def\italianhyphenmins{\tw@\tw@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\extrasitalian}
% \begin{macro}{\noextrasitalian}
%
% \changes{italian-1.2b}{1994/05/19}{Added setting of club- and
%    widowpenalty}
%    Lower the chance that clubs or widows occur.
%    \begin{macrocode}
\addto\extrasitalian{%
  \babel@savevariable\clubpenalty
  \babel@savevariable\widowpenalty
  \clubpenalty3000\widowpenalty3000}
%    \end{macrocode}
%
% \changes{italian-1.2b}{1994/05/19}{Added setting of
%    finalhyphendemerits}
%
%    Never ever break a word between the last two lines of a paragraph
%    in italian texts.
%    \begin{macrocode}
\addto\extrasitalian{%
  \babel@savevariable\finalhyphendemerits
  \finalhyphendemerits50000000}
%    \end{macrocode}
%
% \changes{italian-1.2h}{1995/11/10}{Now give the apostrophe a
%    lowercase code}
% \changes{italian-1.2l}{1999/04/5}{Changed example ``begl'italiani''
%    (obsolete spelling) with another, ``nell'altezza'', that behaves
%    the same way}
%    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
%    points |nel-l'al-tez-za| instead of none.
%    \begin{macrocode}
\addto\extrasitalian{%
  \lccode`'=`'}
\addto\noextrasitalian{%
  \lccode`'=0}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%  \changes{italian-1.2l}{1999/04/05}{Added useful macros for
%    fulfilling 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
%    that in text mode they are separated from the numerical
%    indication of the measure with an unbreakable (thin) space.
%
%    The same regulations require also that super (apices) and
%    subscripts (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
%    countable or measurable entities such as, for example,
%    $V_{\mathrm{max}}$ or $V_{\mathrm{rms}}$ for a maximum or a root
%    mean square voltage, compared to $V_i$ or $V_T$ as the $i$-th
%    voltage in a set, or a voltage that depends on the thermodynamic
%    temperature $T$.
%
%    More rarely it happens to use superscripts that are not
%    mathematical variables, such as the notation
%    $\mathbf{A}^{\!\mathrm{T}}$ to denote the transpose of matrix
%    $\mathbf{A}$; upright superscripts are useful also as ordinals or
%    in old fashioned abbreviations in text mode; for example the
%    feminine ordinal $1^{\mathrm{a}}$ or the old fashioned obsolete
%    abbreviation F$^{\mathrm{lli}}$ for \mbox{Fratelli} in company
%    names (compare with ``Bros.'' for brothers in American English).
%
%  \begin{macro}{\unit}
%  \begin{macro}{\ap}
%  \begin{macro}{\ped}
%    In case the macros already have a different meaning before
%    entering in Italian mode typesetting, we first memorize their
%    meaning so as to restore them on exit. At the same time we define
%    the new commands |\unit|, |\ap|, and |\ped| as robust ones:
%    \begin{macrocode}
\DeclareRobustCommand*{\bbl@unit}[1]{%
  \textormath{\,\mbox{#1}}{\,\mathrm{#1}}}%
\DeclareRobustCommand*{\bbl@ap}[1]{%
  \textormath{\textsuperscript{#1}}{^{\mathrm{#1}}}}%
\DeclareRobustCommand*{\bbl@ped}[1]{%
  \textormath{$_{\mbox{\fontshape{n}\fontsize\sf@size\z@
          \selectfont#1}}$}{_\mathrm{#1}}}%
\addto\extrasitalian{%
  \babel@save\unit\let\unit\bbl@unit
  \babel@save\ap\let\ap\bbl@ap
  \babel@save\ped\let\ped\bbl@ped
  }%
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%  \end{macro}
%
%    Most of the other language description files introduce a number
%    of shortcuts for inserting accents and other language specific
%    diacritical marks in a more comfortable way as compared with the
%    lengthy standard \TeX\ conventions. For Italians using an Italian
%    keyboard the limitations are such that non convenient shortcuts
%    are available up to now; the reason lies in the fact that the
%    Italian keyboard lacks the grave accent, which is compulsory on
%    all accented vowels except the `e' but it carries the keys with
%    all the accented lowercase vowels; the keyboard lacks also the
%    tie |~| (tilde) key and the curly braces require pressing three
%    keys simultaneously.
%
%    The best solution Italians have found so far is to use a smart
%    editor that accepts shortcut definitions such that, for example,
%    by striking |"(| one gets directly |{| on the screen; the same
%    smart editor should be capable of translating the accented
%    characters into the standard \TeX\ sequences when writing a file
%    to disk (for the sake of file portability), and to transform the
%    standard \TeX\ sequences into the corresponding signs when
%    loading a \file{.tex} file from disk to memory. Such smart
%    editors do exist and can be downloaded from the \textsc{ctan}
%    archives.
%
%    The macro |\ldf@finish| takes care of looking for a
%    configuration file, setting the main language to be switched on
%    at |\begin{document}| and resetting the category code of
%    \texttt{@} to its original value.
% \changes{italian-1.2i}{1996/11/03}{Now use \cs{ldf@finish} to wrap
%    up}
%    \begin{macrocode}
\ldf@finish{italian}
%</code>
%    \end{macrocode}
%
% \Finale
%%
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
\endinput
