In multilingual documents, some typographic rules must depend on the current language (e.g., hyphenation, typesetting of numbers, spacing before double punc- tuation. . . ), others should, IMHO, be kept global to the document: especially the layout of lists (see30.8) and footnotes (see30.10), and the indentation of the first paragraph of sections (see30.9).
From version 2.0 on, two flags control the global layout, their values are chosen in \frenchbsetup{} (see section 30.13). The default behaviour of frenchb is to customise the layout (i.e. lists, indentation of the first paragraphs of sections) only when the current language is French. Unifying the layout can be done in two ways:
frenchb will leave the standard layout provided by the LATEX class untouched in French when the option StandardLayout is made true in \frenchbsetup{} or frenchb will (try to) force the layout outside French to be the same as in French when the option GlobalLayoutFrench is made true in \frenchbsetup{}. Of course, the second option only works if the other languages do not alter the layout.
The former commands \FrenchLayout and \StandardLayout are kept for compatibility reasons but should no longer be used.
30.489\newcommand*{\FrenchLayout}{\FBGlobalLayoutFrenchtrue
30.490 \PackageWarning{frenchb.ldf}%
30.491 {\protect\FrenchLayout\space is obsolete. Please use\MessageBreak
30.492 \protect\frenchbsetup{GlobalLayoutFrench} instead.}%
30.493}
30.494\newcommand*{\StandardLayout}{\FBStandardLayouttrue
30.495 \PackageWarning{frenchb.ldf}%
30.496 {\protect\StandardLayout\space is obsolete. Please use\MessageBreak
30.497 \protect\frenchbsetup{StandardLayout} instead.}%
30.498}
30.499\@onlypreamble\FrenchLayout
30.500\@onlypreamble\StandardLayout
30.12 Dots. . .
\FBtextellipsis LATEX 2ε’s standard definition of \dots in text-mode is \textellipsis which includes a \kern at the end; this space is not wanted in some cases (before a closing brace for instance) and \kern breaks hyphenation of the next word. We define\FBtextellipsisfor French (in LATEX 2ε only).
The\ifconstruction in the LATEX 2ε definition of\dotsdoesn’t allow the use of xspace (xspace is always followed by a \fi), so we use the AMS-LATEX con- struction of\dots; this has to be done ‘AtBeginDocument’ not to be overwritten whenamsmath.styis loaded afterbabel.
LY1 has a ready made character for \textellipsis, it should be used in French too (pointed out by Bruno Voisin).
30.501\DeclareTextSymbol{\FBtextellipsis}{LY1}{133}
30.502\DeclareTextCommandDefault{\FBtextellipsis}{%
30.503 .\kern\fontdimen3\font.\kern\fontdimen3\font.\xspace}
\Mdots@and \Tdots@ORI hold the definitions of\dots in Math and Text mode.
They default to those of amsmath-2.0, and will revert to standard LATEX definitions
‘AtBeginDocument’, if amsmath has not been loaded. \Mdots@ doesn’t change when switching from/to French, while \Tdots@ is \FBtextellipsis in French and\Tdots@ORI otherwise.
30.504\newcommand*{\Tdots@ORI}{\@xp\textellipsis}
30.505\newcommand*{\Tdots@}{\Tdots@ORI}
30.506\newcommand*{\Mdots@}{\@xp\mdots@}
30.507\AtBeginDocument{\DeclareRobustCommand{\dots}{\relax
30.508 \csname\ifmmode M\else T\fi dots@\endcsname}%
30.509 \@ifundefined{@xp}{\let\@xp\relax}{}%
30.510 \@ifundefined{mdots@}{\let\Tdots@ORI\textellipsis
30.511 \let\Mdots@\mathellipsis}{}}
30.512\def\bbl@frenchdots{\let\Tdots@\FBtextellipsis}
30.513\def\bbl@nonfrenchdots{\let\Tdots@\Tdots@ORI}
30.514\expandafter\addto\csname extras\CurrentOption\endcsname{%
30.515 \bbl@frenchdots}
30.516\expandafter\addto\csname noextras\CurrentOption\endcsname{%
30.517 \bbl@nonfrenchdots}
30.13 Setup options: keyval stuff
\frenchbsetup From version 2.0 on, all setup options are handled byonecommand\frenchbsetup using the keyval syntax.
We first define a collection of conditionals with their defaults (true or false).
30.518\newif\ifFBStandardLayout \FBStandardLayoutfalse
30.519\newif\ifFBGlobalLayoutFrench \FBGlobalLayoutFrenchfalse
30.520\newif\ifFBAutoSpacePunctuation \FBAutoSpacePunctuationtrue
30.521\newif\ifFBThinColonSpace \FBThinColonSpacefalse
30.522\newif\ifFBReduceListSpacing \FBReduceListSpacingtrue
30.523\newif\ifFBCompactItemize \FBCompactItemizetrue
30.524\newif\ifFBStandardItemLabels \FBStandardItemLabelsfalse
30.525\newif\ifFBStandardLists \FBStandardListsfalse
30.526\newif\ifFBIndentFirst \FBIndentFirsttrue
30.527\newif\ifFBFrenchFootnotes \FBFrenchFootnotestrue
30.528\newif\ifFBAutoSpaceFootnotes \FBAutoSpaceFootnotestrue
30.529\newif\ifFBThinSpaceInFrenchNumbers \FBThinSpaceInFrenchNumbersfalse
30.530\newif\ifFBPartNameFull \FBPartNameFulltrue
30.531\newif\ifFBShowOptions \FBShowOptionsfalse
Let’s now define the main configuration command\frenchbsetupwhich reads and sets the options which will be processed later (at\begin{document}). It can only be called in the preamble.
30.532\newcommand*{\frenchbsetup}[1]{%
30.533 \setkeys{FB}{#1}%
30.534}%
30.535\@onlypreamble\frenchbsetup
frenchb being an option of babel, it cannot load a package (keyval) while frenchb.ldf is read, so we defer the loading of keyval and the options setup at the end of babel’s loading.
StandardLayout resets the layout in French to the standard layout defined par the LATEX class and packages loaded. It deals with lists, indentation of first paragraphs of sections and footnotes. Other keys, enteredafter StandardLayout in \frenchbsetup, can overrule some of theStandardLayoutsettings.
30.536\AtEndOfPackage{%
30.537 \RequirePackage{keyval}%
30.538 \define@key{FB}{StandardLayout}[true]%
30.539 {\csname FBStandardLayout#1\endcsname
30.540 \ifFBStandardLayout
30.541 \FBStandardListstrue
30.542 \FBIndentFirstfalse
30.543 \FBFrenchFootnotesfalse
30.544 \FBAutoSpaceFootnotesfalse
30.545 \fi}%
30.546 \define@key{FB}{GlobalLayoutFrench}[true]%
30.547 {\csname FBGlobalLayoutFrench#1\endcsname}%
30.548 \define@key{FB}{AutoSpacePunctuation}[true]%
30.549 {\csname FBAutoSpacePunctuation#1\endcsname}%
30.550 \define@key{FB}{ThinColonSpace}[true]%
30.551 {\csname FBThinColonSpace#1\endcsname}%
30.552 \define@key{FB}{ReduceListSpacing}[true]%
30.553 {\csname FBReduceListSpacing#1\endcsname}%
30.554 \define@key{FB}{CompactItemize}[true]%
30.555 {\csname FBCompactItemize#1\endcsname}%
30.556 \define@key{FB}{StandardItemLabels}[true]%
30.557 {\csname FBStandardItemLabels#1\endcsname}%
30.558 \define@key{FB}{ItemLabels}{%
30.559 \renewcommand*{\FrenchLabelItem}{#1}}%
30.560 \define@key{FB}{ItemLabeli}{%
30.561 \renewcommand*{\Frlabelitemi}{#1}}%
30.562 \define@key{FB}{ItemLabelii}{%
30.563 \renewcommand*{\Frlabelitemii}{#1}}%
30.564 \define@key{FB}{ItemLabeliii}{%
30.565 \renewcommand*{\Frlabelitemiii}{#1}}%
30.566 \define@key{FB}{ItemLabeliv}{%
30.567 \renewcommand*{\Frlabelitemiv}{#1}}%
30.568 \define@key{FB}{StandardLists}[false]%
30.569 {\csname FBStandardLayout#1\endcsname
30.570 \ifFBStandardLists
30.571 \FBReduceListSpacingfalse
30.572 \FBCompactItemizefalse
30.573 \FBStandardItemLabelstrue
30.574 \fi}%
30.575 \define@key{FB}{IndentFirst}[true]%
30.576 {\csname FBIndentFirst#1\endcsname}%
30.577 \define@key{FB}{FrenchFootnotes}[true]%
30.578 {\csname FBFrenchFootnotes#1\endcsname}%
30.579 \define@key{FB}{AutoSpaceFootnotes}[true]%
30.580 {\csname FBAutoSpaceFootnotes#1\endcsname}%
30.581 \define@key{FB}{ThinSpaceInFrenchNumbers}[true]%
30.582 {\csname FBThinSpaceInFrenchNumbers#1\endcsname}%
30.583 \define@key{FB}{PartNameFull}[true]%
30.584 {\csname FBPartNameFull#1\endcsname}%
30.585 \define@key{FB}{ShowOptions}[true]%
30.586 {\csname FBShowOptions#1\endcsname}%
Inputing French quotes as single characters when they are available on the key- board (through a compose key for instance) is more comfortable than typing
\og and \fg. The purpose of the following code is to map the French quote characters to \og\ignorespaces and {\fg} respectively when the current lan- guage is French, and to \guillemotleftand\guillemotrightotherwise (think of German quotes); thus correct unbreakable spaces will be added automatically to French quotes. The quote characters typed in depend on the input encoding, it can be single-byte (latin1, latin9, applemac,. . . ) or multi-bytes (utf-8, utf8x). We first check whether XeTeX is used or not, if not the package inputenchas to be loaded before the\begin{document}with the proper coding option, so we check if\DeclareInputTextis defined.
30.587 \define@key{FB}{og}{%
30.588 \newcommand*{\FB@@og}{\iflanguage{french}%
30.589 {\FB@og\ignorespaces}{\guillemotleft}}%
30.590 \expandafter\ifx\csname XeTeXrevision\endcsname\relax
30.591 \AtBeginDocument{%
30.592 \@ifundefined{DeclareInputText}%
30.593 {\PackageWarning{frenchb.ldf}%
30.594 {Option ‘og’ requires package inputenc.\MessageBreak}%
30.595 }%
30.596 {\@ifundefined{uc@dclc}%
if\uc@dclcis undefined, utf8x is not loaded. . .
30.597 {\@ifundefined{DeclareUnicodeCharacter}%
if \DeclareUnicodeCharacter is undefined, utf8 is not loaded either, we as- sume 8-bit character input encoding. Package MULEenc.sty (from CJK) defines
\mule@defto map characters to control sequences.
30.598 {\@tempcnta‘#1\relax
30.599 \@ifundefined{mule@def}%
30.600 {\DeclareInputText{\the\@tempcnta}{\FB@@og}}%
30.601 {\mule@def{11}{{\FB@@og}}}%
30.602 }%
utf8 loaded, use\DeclareUnicodeCharacter,
30.603 {\DeclareUnicodeCharacter{00AB}{\FB@@og}}%
30.604 }%
utf8x loaded, use\uc@dclc,
30.605 {\uc@dclc{171}{default}{\FB@@og}}%
30.606 }%
30.607 }%
XeTeX in use, the following trick for defining the active quote character is borrowed frominputenc.dtx.
30.608 \else
30.609 \catcode‘#1=\active
30.610 \bgroup
30.611 \uccode‘\~‘#1%
30.612 \uppercase{%
30.613 \egroup
30.614 \def~%
30.615 }{\FB@@og}%
30.616 \fi
30.617 }%
Same code for the closing quote.
30.618 \define@key{FB}{fg}{%
30.619 \newcommand*{\FB@@fg}{\iflanguage{french}%
30.620 {\FB@fg}{\guillemotright}}%
30.621 \expandafter\ifx\csname XeTeXrevision\endcsname\relax
30.622 \AtBeginDocument{%
30.623 \@ifundefined{DeclareInputText}%
30.624 {\PackageWarning{frenchb.ldf}%
30.625 {Option ‘fg’ requires package inputenc.\MessageBreak}%
30.626 }%
30.627 {\@ifundefined{uc@dclc}%
30.628 {\@ifundefined{DeclareUnicodeCharacter}%
30.629 {\@tempcnta‘#1\relax
30.630 \@ifundefined{mule@def}%
30.631 {\DeclareInputText{\the\@tempcnta}{{\FB@@fg}}}%
30.632 {\mule@def{27}{{\FB@@fg}}}%
30.633 }%
30.634 {\DeclareUnicodeCharacter{00BB}{{\FB@@fg}}}%
30.635 }%
30.636 {\uc@dclc{187}{default}{{\FB@@fg}}}%
30.637 }%
30.638 }%
30.639 \else
30.640 \catcode‘#1=\active
30.641 \bgroup
30.642 \uccode‘\~‘#1%
30.643 \uppercase{%
30.644 \egroup
30.645 \def~%
30.646 }{{\FB@@fg}}%
30.647 \fi
30.648 }%
30.649}
\FBprocess@optionsprocesses the options, it is calledonceat\begin{document}.
30.650\newcommand*{\FBprocess@options}{%
Nothing has to be done here forStandardLayout(the involved flags have already been set in\frenchbsetup{}).
AutoSpacePunctuationadds an unbreakable space (in French only) before the four active characters (:;!?) even if none has been typed before them.
30.651 \ifFBAutoSpacePunctuation
30.652 \AutoSpaceBeforeFDP
30.653 \else
30.654 \NoAutoSpaceBeforeFDP
30.655 \fi
ThinColonSpacechanges the normal unbreakable space typeset in French be- fore ‘:’ to a thin space.
30.656 \ifFBThinColonSpace\renewcommand*{\Fcolonspace}{\thinspace}\fi The next three options deal with the layout of lists in French.
ReduceListSpacing reduces the vertical spaces between list items in French (done by changing \list to \listFB). When GlobalLayoutFrench is true the same is done outside French.
30.657 \ifFBReduceListSpacing
30.658 \addto\extrasfrench{\let\list\listFB
30.659 \let\endlist\endlistFB}%
30.660 \addto\noextrasfrench{\ifFBGlobalLayoutFrench
30.661 \let\list\listFB
30.662 \let\endlist\endlistFB
30.663 \else
30.664 \let\list\listORI
30.665 \let\endlist\endlistORI
30.666 \fi}%
30.667 \else
30.668 \addto\extrasfrench{\let\list\listORI
30.669 \let\endlist\endlistORI}%
30.670 \addto\noextrasfrench{\let\list\listORI
30.671 \let\endlist\endlistORI}%
30.672 \fi
CompactItemizesuppresses the vertical spacing between list items in French (done by changing\itemizeto\itemizeFB). WhenGlobalLayoutFrenchis true the same is done outside French.
30.673 \ifFBCompactItemize
30.674 \addto\extrasfrench{\let\itemize\itemizeFB
30.675 \let\enditemize\enditemizeFB}%
30.676 \addto\noextrasfrench{\ifFBGlobalLayoutFrench
30.677 \let\itemize\itemizeFB
30.678 \let\enditemize\enditemizeFB
30.679 \else
30.680 \let\itemize\itemizeORI
30.681 \let\enditemize\enditemizeORI
30.682 \fi}%
30.683 \else
30.684 \addto\extrasfrench{\let\itemize\itemizeORI
30.685 \let\enditemize\enditemizeORI}%
30.686 \addto\noextrasfrench{\let\itemize\itemizeORI
30.687 \let\enditemize\enditemizeORI}%
30.688 \fi
StandardItemLabelsresets labelitems in French to their standard values set by the LATEX class and packages loaded. WhenGlobalLayoutFrench is true la- belitems are identical inside and outside French.
30.689 \ifFBStandardItemLabels
30.690 \addto\extrasfrench{\bbl@nonfrenchlabelitems}%
30.691 \addto\noextrasfrench{\bbl@nonfrenchlabelitems}%
30.692 \else
30.693 \addto\extrasfrench{\bbl@frenchlabelitems}%
30.694 \addto\noextrasfrench{\ifFBGlobalLayoutFrench
30.695 \bbl@frenchlabelitems
30.696 \else
30.697 \bbl@nonfrenchlabelitems
30.698 \fi}%
30.699 \fi
IndentFirstforces the first paragraphs of sections to be indented just like the other ones in French. WhenGlobalLayoutFrenchis true the same is done outside French.
30.700 \ifFBIndentFirst
30.701 \addto\extrasfrench{\bbl@frenchindent}%
30.702 \addto\noextrasfrench{\ifFBGlobalLayoutFrench
30.703 \bbl@frenchindent
30.704 \else
30.705 \bbl@nonfrenchindent
30.706 \fi}%
30.707 \else
30.708 \addto\extrasfrench{\bbl@nonfrenchindent}%
30.709 \addto\noextrasfrench{\bbl@nonfrenchindent}%
30.710 \fi
The layout of footnotes is handled at the\begin{document}depending on the values of flags FrenchFootnotes and AutoSpaceFootnotes (see section 30.10), nothing has to be done here for footnotes.
Whentrue,ThinSpaceInFrenchNumbersredefinesnumprint.sty’s\npstylefrench command to set\npthousandsepto \,(thinspace) instead of~(default) . This option has no effect if packagenumprint.styis not loaded with ‘autolanguage’.
As old versions ofnumprint.stydid not define\npstylefrench, we have to pro- vide this command.
30.711 \@ifpackageloaded{numprint}%
30.712 {\ifnprt@autolanguage
30.713 \providecommand*{\npstylefrench}{}%
30.714 \ifFBThinSpaceInFrenchNumbers
30.715 \renewcommand*\npstylefrench{%
30.716 \npthousandsep{\,}%
30.717 \npdecimalsign{,}%
30.718 \npproductsign{\cdot}%
30.719 \npunitseparator{\,}%
30.720 \npdegreeseparator{}%
30.721 \nppercentseparator{\nprt@unitsep}%
30.722 }%
30.723 \else
30.724 \renewcommand*\npstylefrench{%
30.725 \npthousandsep{~}%
30.726 \npdecimalsign{,}%
30.727 \npproductsign{\cdot}%
30.728 \npunitseparator{\,}%
30.729 \npdegreeseparator{}%
30.730 \nppercentseparator{\nprt@unitsep}%
30.731 }%
30.732 \fi
30.733 \npaddtolanguage{french}{french}%
30.734 \fi}{}%
PartNameFull: iffalse, redefine\partname.
30.735 \ifFBPartNameFull
30.736 \else\addto\captionsfrench{\def\partname{Partie}}\fi
ShowOptions: iftrue, print the list of all options to the.logfile.
30.737 \ifFBShowOptions
30.738 \GenericWarning{* }{%
30.739 * **** List of possible options for frenchb ****\MessageBreak
30.740 [Default values between brackets]\MessageBreak
30.741 ShowOptions=true [false]\MessageBreak
30.742 StandardLayout=true [false]\MessageBreak
30.743 GlobalLayoutFrench=true [false]\MessageBreak
30.744 AutoSpacePunctuation=false [true]\MessageBreak
30.745 ThinColonSpace=true [false]\MessageBreak
30.746 StandardLists=true [false]\MessageBreak
30.747 ReduceListSpacing=false [true]\MessageBreak
30.748 CompactItemize=false [true]\MessageBreak
30.749 StandardItemLabels=true [false]\MessageBreak
30.750 ItemLabels=\textemdash, \textbullet,
30.751 \protect\ding{43},... [\textendash]\MessageBreak
30.752 ItemLabeli=\textemdash, \textbullet,
30.753 \protect\ding{43},... [\textendash]\MessageBreak
30.754 ItemLabelii=\textemdash, \textbullet,
30.755 \protect\ding{43},... [\textendash]\MessageBreak
30.756 ItemLabeliii=\textemdash, \textbullet,
30.757 \protect\ding{43},... [\textendash]\MessageBreak
30.758 ItemLabeliv=\textemdash, \textbullet,
30.759 \protect\ding{43},... [\textendash]\MessageBreak
30.760 IndentFirst=false [true]\MessageBreak
30.761 FrenchFootnotes=false [true]\MessageBreak
30.762 AutoSpaceFootnotes=false [true]\MessageBreak
30.763 ThinSpaceInFrenchNumbers=true [false]\MessageBreak
30.764 PartNameFull=false [true]\MessageBreak
30.765 og= <left quote character>, fg= <right quote character>
30.766 \MessageBreak
30.767 *********************************************
30.768 \MessageBreak\protect\frenchbsetup{ShowOptions}}
30.769 \fi
30.770}
At\begin{document}we save again the definitions of the ‘list’ and ‘itemize’
environments and the values of labelitems so that all changes made in the preamble are taken into account in languages other than French and in French with the StandardLayout option. We also have to provide an \xspace command in case thexspace.stypackage is not loaded.
30.771\AtBeginDocument{%
30.772 \let\listORI\list
30.773 \let\endlistORI\endlist
30.774 \let\itemizeORI\itemize
30.775 \let\enditemizeORI\enditemize
30.776 \let\@ltiORI\labelitemi
30.777 \let\@ltiiORI\labelitemii
30.778 \let\@ltiiiORI\labelitemiii
30.779 \let\@ltivORI\labelitemiv
30.780 \providecommand*{\xspace}{\relax}%
It is time to process the options set with \frenchboptions{}. Then execute ei- ther\extrasfrenchand\captionsfrenchor\noextrasfrenchaccording to the current language at the\begin{document} (these three commands are updated by\FBprocess@options).
30.781 \FBprocess@options
30.782 \iflanguage{french}{\extrasfrench\captionsfrench}{\noextrasfrench}%
Some warnings are issued when output font encodings are not properly set. With XeLaTeX, fontspec.styandxunicode.styshould be loaded; with (pdf)LATEX, a warning is issued when OT1 encoding is in use at the\begin{document}. Mind that\encodingdefaultis defined as ‘long’, defining\FBOTonewith\newcommand*
would fail!
30.783 \expandafter\ifx\csname XeTeXrevision\endcsname\relax
30.784 \begingroup \newcommand{\FBOTone}{OT1}%
30.785 \ifx\encodingdefault\FBOTone
30.786 \PackageWarning{frenchb.ldf}%
30.787 {OT1 encoding should not be used for French.
30.788 \MessageBreak
30.789 Add \protect\usepackage[T1]{fontenc} to the
30.790 preamble\MessageBreak of your document,}
30.791 \fi
30.792 \endgroup
30.793 \else
30.794 \@ifundefined{DeclareUTFcharacter}%
30.795 {\PackageWarning{frenchb.ldf}%
30.796 {Add \protect\usepackage{fontspec} *and*\MessageBreak
30.797 \protect\usepackage{xunicode} to the preamble\MessageBreak
30.798 of your document,}}%
30.799 {}%
30.800 \fi
30.801}
30.14 Clean up and exit
Loadfrenchb.cfg(should do nothing, just for compatibility).
30.802\loadlocalcfg{frenchb}
Final cleaning. The macro \ldf@quit takes care for setting the main language to be switched on at \begin{document} and resetting the category code of @ to its original value. The config file searched for has to be ‘frenchb.cfg’, and
\CurrentOptionhas been set to ‘french’, so\ldf@finish\CurrentOptioncannot be used: we first load ‘frenchb.cfg’, then call\ldf@quit\CurrentOption.
30.803\FBclean@on@exit
30.804\ldf@quit\CurrentOption
31 The Italian language
The file italian.dtx27 defines all the language-specific macros for the Italian language.
The features of this language definition file are the following:
1. The Italian hyphenation is invoked, provided that file ithyph.tex was loaded when the LATEX 2ε format was built; in case it was not, read the information coming with your distribution of the TEX software, and the babel documentation.
2. The language dependent fixed words to be inserted by such commands as
\chapter, \caption, \tableofcontents, etc. are redefined in accordance with the Italian typographical practice.
3. 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
\finalhyphendemeritsis set to such a high value that hyphenation is pro- hibited between the last two lines of a paragraph. In orer to make it consis- tent, also \@clubpenaltyis 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.
4. Some language specific shortcuts have been defined so as to allow etymolog- ical hyphenation, specifically "inserts a break point in any word boundary that the typesetter chooses, provided it is not followed by and accented let- ter (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 that include foreign roots), and "|when the desired break point falls before an accented letter.
5. 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 theAltkey while inputting the numerical code 0096; very, very annoying!
6. The shortcuts "< and "> insert the French guillemots, sometimes used 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 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.
7. 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. \unitdoes not get redefined if thebabelpack- age is loaded after the package units.sty whose homonymous command plays a different role and follows a different syntax.
27The file described in this section has version number v1.2t and was last revised on 2008/03/14. The original author is Maurizio Codogno, ([email protected]). It has been largely revised by Johannes Braams and Claudio Beccari
For this language a limited number of shortcuts has been defined, table 6, some of which are used to overcome certain limitations of the Italian keyboard; in section31.3there are other comments and hints in order to overcome some other keyboard limitations.
" 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.
"| the same as the above without the limitation on char- acters represented with control sequences or accented ones.
"" inserts open quotes “.
"< inserts open guillemots.
"> inserts closed guillemots.
"/ equivalent to\slash
Table 6: Shortcuts for the Italian language
The macro\LdfInittakes care of preventing that this file is loaded more than once, checking the category code of the@sign, etc.
31.1h∗codei
31.2\LdfInit{italian}{captionsitalian}%
When this file is read as an option, i.e. by the\usepackagecommand,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.
31.3\ifx\l@italian\@undefined
31.4 \@nopatterns{Italian}%
31.5 \adddialect\l@italian0\fi
The next step consists of defining commands to switch to (and from) the Italian language.
\captionsitalian The macro\captionsitaliandefines all strings used in the four standard docu- ment classes provided with LATEX.
31.6\addto\captionsitalian{%
31.7 \def\prefacename{Prefazione}%
31.8 \def\refname{Riferimenti bibliografici}%
31.9 \def\abstractname{Sommario}%
31.10 \def\bibname{Bibliografia}%
31.11 \def\chaptername{Capitolo}%
31.12 \def\appendixname{Appendice}%
31.13 \def\contentsname{Indice}%
31.14 \def\listfigurename{Elenco delle figure}%
31.15 \def\listtablename{Elenco delle tabelle}%
31.16 \def\indexname{Indice analitico}%
31.17 \def\figurename{Figura}%
31.18 \def\tablename{Tabella}%
31.19 \def\partname{Parte}%
31.20 \def\enclname{Allegati}%
31.21 \def\ccname{e~p.~c.}%
31.22 \def\headtoname{Per}%
31.23 \def\pagename{Pag.}% % in Italian the abbreviation is preferred
31.24 \def\seename{vedi}%
31.25 \def\alsoname{vedi anche}%
31.26 \def\proofname{Dimostrazione}%
31.27 \def\glossaryname{Glossario}%
31.28 }%
\dateitalian The macro\dateitalianredefines the command\todayto produce Italian dates.
31.29\def\dateitalian{%
31.30 \def\today{\number\day~\ifcase\month\or
31.31 gennaio\or febbraio\or marzo\or aprile\or maggio\or giugno\or
31.32 luglio\or agosto\or settembre\or ottobre\or novembre\or
31.33 dicembre\fi\space \number\year}}%
\italianhyphenmins The italian hyphenation patterns can be used with both \lefthyphenmin and
\righthyphenminset to 2.
31.34\providehyphenmins{\CurrentOption}{\tw@\tw@}
\extrasitalian
\noextrasitalian
Lower the chance that clubs or widows occur.
31.35\addto\extrasitalian{%
31.36 \babel@savevariable\clubpenalty
31.37 \babel@savevariable\widowpenalty
31.38 \babel@savevariable\@clubpenalty
31.39 \clubpenalty3000\widowpenalty3000\@clubpenalty\clubpenalty}%
Never ever break a word between the last two lines of a paragraph in italian texts.
31.40\addto\extrasitalian{%
31.41 \babel@savevariable\finalhyphendemerits
31.42 \finalhyphendemerits50000000}%
In order to enable the hyphenation of words such as “nell’altezza” we give the’ a non-zero lower case code. When we do that TEX finds the following hyphenation pointsnel-l’al-tez-zainstead of none.
31.43\addto\extrasitalian{%
31.44 \lccode‘’=‘’}%
31.45\addto\noextrasitalian{%
31.46 \lccode‘’=0}%
31.1 Support for etymological hyphenation
In his article on Italian hyphenation [1] Beccari pointed out that the Italian lan- guage gets hyphenated on a phonetic basis, although etymological hyphenation is allowed; this is in contrast with what happens in Latin, for example, where etymological hyphenation is always used. Since the patterns for both languages would become too complicated in order to cope with etymological hyphenation, in his paper Beccari proposed the definition of an active character ‘_’ such that it could insert a “soft” discretionary hyphen at the compound word boundary. For several reasons that idea and the specific active character proved to be unpractical and was abandoned.
This problem is so important with the majority of the European 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 "| 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\-.
Meanwhile theec fonts with the double Cork encoding (thus formerly called thedcfonts) have become more or 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 standardcmfonts; with the latter fonts the primitive command\accentis such that hyphenation becomes almost impossible, in any case strongly impeached.
Theecfonts contain a special character, named “compound word mark”, that occupies position 23 in the font scheme and may be input with the sequence^^W.