1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
  
     | 
    
      %%
%% This is file `itnumpar.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% itnumpar.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2007 by Enrico Gregorio <Enrico dot Gregorio (at) univr dot it>
%% 
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.2 of this license
%% or (at your option) any later version.  The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.2 or later is part of all distributions of LaTeX version
%% 1999/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{itnumpar}
    [2007/04/03 v1.0 Numbers in words for Italian]
\def\numeroinparole#1{\expandafter\@numeroinparole\csname c@#1\endcsname}
\def\Numeroinparole#1{\expandafter\@Numeroinparole\csname c@#1\endcsname}
\def\ordinalem#1{\expandafter\@ordinalem\csname c@#1\endcsname}
\def\ordinalef#1{\expandafter\@ordinalef\csname c@#1\endcsname}
\def\Ordinalem#1{\expandafter\@Ordinalem\csname c@#1\endcsname}
\def\Ordinalef#1{\expandafter\@Ordinalef\csname c@#1\endcsname}
\begingroup
\def\np@doprintdef#1{%
  \expandafter\xdef\csname print#1\endcsname##1{%
    {\count@=##1\relax\csname @#1\endcsname{\count@}}}}
  \np@doprintdef{numeroinparole}
  \np@doprintdef{Numeroinparole}
  \np@doprintdef{ordinalem}
  \np@doprintdef{ordinalef}
  \np@doprintdef{Ordinalem}
  \np@doprintdef{Ordinalef}
\endgroup
\def\np@oa{o}
\let\@printnumeroinparole\printnumeroinparole
\def\printnumeroinparole{%
  \@ifstar{\@printnumeroinparolef}{\@printnumeroinparole}%
}
\def\@printnumeroinparolef#1{{\def\np@oa{a}\printnumeroinparole{#1}}}
\def\@numeroinparole#1{%
  \ifnum#1=0 zero% Exception
  \else
  \ifnum#1=3 tre% Exception
  \else
  \np@numeroinparole{#1}{}%
  \fi\fi}
\def\@Numeroinparole#1{%
  \ifnum#1=0 Zero% Exception
  \else
  \ifnum#1=3 Tre% Exception
  \else
  \np@Numeroinparole{#1}{}%
  \fi\fi}
\def\np@numeroinparole#1#2{%
  \ifnum#1>9999
    \@ctrerr
  \else
  \ifnum#1>999
    \expandafter\np@thousand\number#1 \np@del
  \else
  \ifnum#1>99
    \expandafter\np@hundred\number#1 \np@del
  \else
  \ifnum#1<30
    \np@small{#1}{#2}%
  \else
    \expandafter\np@large\number#1{#2}%
  \fi\fi\fi\fi}
\def\np@Numeroinparole#1#2{%
  \ifnum#1>9999
    \@ctrerr
  \else
  \ifnum#1>999
    \expandafter\np@Thousand\number#1 \np@del
  \else
  \ifnum#1>99
    \expandafter\np@Hundred\number#1 \np@del
  \else
  \ifnum#1<30
    \np@Small{#1}{#2}%
  \else
    \expandafter\np@Large\number#1{#2}%
  \fi\fi\fi\fi}
\def\np@small#1#2{#2\ifcase#1 \or
  un\np@oa\or due\or tr\'e\or quattro\or cinque\or
  sei\or sette\or otto\or nove\or dieci\or
  undici\or dodici\or tredici\or quattordici\or quindici\or
  sedici\or diciassette\or diciotto\or diciannove\or venti\or
  ventuno\or ventidue\or ventitr\'e\or ventiquattro\or venticinque\or
  ventisei\or ventisette\or ventotto\or ventinove\fi}
\def\np@Small#1#2{\ifcase#1 \or
  Uno\or Due\or\or Quattro\or Cinque\or Sei\or Sette\or
  Otto\or Nove\or Dieci\or Undici\or Dodici\or Tredici\or
  Quattordici\or Quindici\or Sedici\or Diciassette\or Diciotto\or
  Diciannove\or Venti\or Ventuno\or Ventidue\or Ventitr\'e\or
  Ventiquattro\or Venticinque\or Ventisei\or Ventisette\or
  Ventotto\or Ventinove\fi}
\def\np@large#1#2#3{%
  \ifcase#1 \or\or\or #3trent\or #3quarant\or #3cinquant\or
    #3sessant\or #3settant\or ottant\or #3novant\fi
  \ifcase#2 a\or un\np@oa\or adue\or atr\'e\or aquattro\or
    acinque\or asei\or asette\or otto\or anove\fi}
\def\np@Large#1#2#3{%
  \ifcase#1 \or\or\or Trent\or Quarant\or Cinquant\or
    Sessant\or Settant\or Ottant\or Novant\fi
  \ifcase#2 a\or uno\or adue\or atr\'e\or aquattro\or
    acinque\or asei\or asette\or otto\or anove\fi}
\def\np@hundred#1#2\np@del{%
  \ifcase#1 \or\or due\or tre\or quattro\or cinque\or
    sei\or sette\or otto\or nove\fi cent%
  \ifnum#2=0 o\else\np@numeroinparole{#2}{o}\fi}
\def\np@Hundred#1#2\np@del{%
  \ifcase#1 \or Cent\or Duecent\or Trecent\or Quattrocent\or
    Cinquecent\or Seicent\or Settecent\or Ottocent\or Novecent\fi
  \ifnum#2=0 o\else\np@numeroinparole{#2}{o}\fi}
\def\np@thousand#1#2\np@del{%
  \ifnum#1=1 mille\else
  \ifcase#1 \or\or due\or tre\or quattro\or cinque\or
    sei\or sette\or otto\or nove\fi mila\fi
  \ifnum#2=0 \else\np@numeroinparole{#2}{}\fi}
\def\np@Thousand#1#2\np@del{%
  \ifnum#1=1
    Mille%
  \else
  \ifcase#1 \or\or Due\or Tre\or Quattro\or Cinque\or
    Sei\or Sette\or Otto\or Nove\fi
    mila\fi
  \ifnum#2=0 \else\np@numeroinparole{#2}{}\fi}
\def\@ordinalem#1{\np@ordinal{#1}{}o}
\def\@ordinalef#1{\np@ordinal{#1}{}a}
\def\@Ordinalem#1{\np@Ordinal{#1}{}o}
\def\@Ordinalef#1{\np@Ordinal{#1}{}a}
\def\np@ordinal#1#2{%
  \ifnum#1=0
     \expandafter\@gobble
  \else
  \ifnum#1<11
  \ifcase#1 \or prim\or second\or terz\or quart\or quint\or
    sest\or settim\or ottav\or non\or decim\fi
  \else
    \np@ordinall{#1}{#2}%
  \fi\fi}
\def\np@ordinall#1#2{%
  \ifnum#1>999
    \@ctrerr
  \else
  \ifnum#1>99
    \expandafter\np@hundredord\number#1 \np@del
  \else
  \ifnum#1<30
    \np@smallord{#1}{#2}%
  \else
    \expandafter\np@largeord\number#1{#2}%
  \fi\fi\fi}
\def\np@Ordinal#1#2{%
  \ifnum#1=0
    \expandafter\@gobble
  \else
  \ifnum#1<11
  \ifcase#1 \or Prim\or Second\or Terz\or Quart\or Quint\or
    Sest\or Settim\or Ottav\or Non\or Decim\fi
  \else\np@Ordinall{#1}{#2}\fi\fi}
\def\np@Ordinall#1#2{%
  \ifnum#1>999
    \@ctrerr
  \else
  \ifnum#1>99
    \expandafter\np@hundredOrd\number#1 \np@del
  \else
  \ifnum#1<30
    \np@smallOrd{#1}{#2}%
  \else
    \expandafter\np@largeOrd\number#1{#2}%
  \fi\fi\fi}
\def\np@smallord#1#2{%
  \ifcase#1 \or un\or #2du\or #2tre\or #2quattr\or #2cinqu\or
    #2sei\or #2sett\or ott\or #2nov\or \or #2undic\or
    #2dodic\or #2tredic\or #2quattordic\or #2quindic\or
    #2sedic\or #2diciassett\or #2diciott\or #2diciannov\or
    #2vent\or #2ventun\or #2ventidu\or #2ventitre\or
    #2ventiquattr\or #2venticinqu\or #2ventisei\or
    #2ventisett\or #2ventott\or #2ventinov%
  \fi esim}
\def\np@largeord#1#2#3{%
  \ifcase#1 \or\or\or #3trent\or #3quarant\or #3cinquant\or
    #3sessant\or #3settant\or ottant\or #3novant\fi
  \ifcase#2 \or un\or adu\or atre\or aquattr\or
    acinqu\or asei\or asett\or ott\or anov\fi esim}
\def\np@hundredord#1#2\np@del{%
  \ifcase#1 \or\or due\or tre\or quattro\or cinque\or
    sei\or sette\or otto\or nove\fi cent%
    \ifnum#2=0 esim\else\np@ordinall{#2}{o}\fi}
\def\np@smallOrd#1{%
  \ifcase#1 \or \or \or \or \or \or  \or \or \or \or \or
    Undicesim\or Dodicesim\or Tredicesim\or Quattordicesim\or
    Quindicesim\or Sedicesim\or Diciassettesim\or Diciottesim\or
    Diciannovesim\or Ventesim\or Ventunesim\or Ventiduesim\or
    Ventitreesim\or Ventiquattresim\or Venticinquesim\or
    Ventiseiesim\or Ventisettesim\or Ventottesim\or Ventinovesim%
  \fi}
\def\np@largeOrd#1#2{%
  \ifcase#1 \or\or\or Trent\or Quarant\or Cinquant\or
    Sessant\or Settant\or Ottant\or Novant\fi
  \ifcase#2 \or un\or adu\or atre\or aquattr\or
    acinqu\or asei\or asett\or ott\or anov\fi esim}
\def\np@hundredOrd#1#2\np@del{%
  \ifcase#1 \or C\or Duec\or Trec\or Quattroc\or Cinquec\or
    Seic\or Settec\or Ottoc\or Novec\fi ent%
    \ifnum#2=0 esim\else\np@ordinall{#2}{o}\fi}
\endinput
%%
%% End of file `itnumpar.sty'.
 
     |