- Questo topic ha 1 risposta, 2 partecipanti ed è stato aggiornato l'ultima volta 21 anni, 7 mesi fa da .
-
Topic
-
Ciao
Forse sono un po’ fissato con fncychap, ma mi piaceva questo pacchetto e così, a parte il problema per ora ancora in auge su questa cosa, ho provato a tradurre i nomi utilizzati dall’opzione Bjarne, considerando che per le cifre che terminano per uno od otto (ventUno, trentUno etc e ventOtto, trentOtto etc) si elide la i della cifra decimale.Non sono molto esperto ma se qualcuno è interessato ho fatto una piccola modifica a fncychap, chiamandola fncychapit (o meglio itfncychap?), in cui viene eseguito il controllo e la correzione:
`%%%%%%% BJARNE DEF
\DeclareOption{Bjarne}{%
\ChNameUpperCase
\ChTitleUpperCase
\ChNameVar{\raggedleft\normalsize\rm}
\ChNumVar{\raggedleft \bfseries\Large}
\ChTitleVar{\raggedleft \Large\rm}
\ChRuleWidth{1pt}%% Note thechapter -> c@chapter fix appendix bug
\newcounter{AlphaCnt}
\newcounter{AlphaDecCnt}
\newcommand{\AlphaNo}{%
\ifcase\number\theAlphaCnt
\ifnum\c@chapter=0
ZERO\else{}\fi
\or UNO\or DUE\or TRE\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\fi
}\newcommand{\AlphaDecNo}{%
\setcounter{AlphaDecCnt}{0}
\@whilenum\number\theAlphaCnt>0\do
{\addtocounter{AlphaCnt}{-10}
\addtocounter{AlphaDecCnt}{1}}
\ifnum\number\theAlphaCnt=0
\else
\addtocounter{AlphaDecCnt}{-1}
\addtocounter{AlphaCnt}{10}
\fi\ifcase\number\theAlphaDecCnt
\or DIECI
\or \ifnum\number\theAlphaCnt=1
VENT\else
\ifnum\number\theAlphaCnt=8
VENT\else
VENTI\fi\fi
\or \ifnum\number\theAlphaCnt=1
TRENT\else
\ifnum\number\theAlphaCnt=8
TRENT\else
TRENTA\fi\fi
\or \ifnum\number\theAlphaCnt=1
QUARANT\else
\ifnum\number\theAlphaCnt=8
QUARANT\else
QUARANTA\fi\fi
\or \ifnum\number\theAlphaCnt=1
CINQUANT\else
\ifnum\number\theAlphaCnt=8
CINQUANT\else
CINQUANTA\fi\fi
\or \ifnum\number\theAlphaCnt=1
SESSANT\else
\ifnum\number\theAlphaCnt=8
SESSANT\else
SESSANTA\fi\fi
\or \ifnum\number\theAlphaCnt=1
SETTANT\else
\ifnum\number\theAlphaCnt=8
SETTANT\else
SETTANTA\fi\fi
\or \ifnum\number\theAlphaCnt=1
OTTANT\else
\ifnum\number\theAlphaCnt=8
OTTANT\else
OTTANTA\fi\fi
\or \ifnum\number\theAlphaCnt=1
NOVANT\else
\ifnum\number\theAlphaCnt=8
NOVANT\else
NOVANTA\fi\fi\fi%%%%%%%%%% Triplice fischio finale 🙂
}
\newcommand{\TheAlphaChapter}{%\ifinapp
\thechapter
\else
\setcounter{AlphaCnt}{\c@chapter}
\ifnum\c@chapter<20
\AlphaNo
\else
\AlphaDecNo\AlphaNo
\fi
\fi
}
\renewcommand{\DOCH}{%
\mghrulefill{\RW}\par\nobreak
\CNV\FmN{\@chapapp}\par\nobreak
\CNoV\TheAlphaChapter\par\nobreak
\vskip -1\baselineskip\vskip 5pt\mghrulefill{\RW}\par\nobreak
\vskip 20\p@
}
\renewcommand{\DOTI}[1]{%
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@
}
\renewcommand{\DOTIS}[1]{%
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@
}
}
`da sostituire all’intera sezione Bjarne.
Magari non è fatto nella maniera migliore ma funziona.
Ciao a tutti
Rob
- Devi essere connesso per rispondere a questo topic.