You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
147 lines
3.9 KiB
147 lines
3.9 KiB
\ProvidesFile{gloss-catalan.ldf}[polyglossia: module for catalan]
|
|
\PolyglossiaSetup{catalan}{
|
|
bcp47=ca,
|
|
hyphennames={catalan},
|
|
hyphenmins={2,2},
|
|
langtag=CAT,
|
|
frenchspacing=true,
|
|
indentfirst=true,
|
|
fontsetup=true,
|
|
}
|
|
|
|
% BCP-47 compliant aliases
|
|
\setlanguagealias*{catalan}{ca}
|
|
|
|
\define@boolkey{catalan}[catalan@]{babelshorthands}[true]{}
|
|
\ifsystem@babelshorthands
|
|
\setkeys{catalan}{babelshorthands=true}
|
|
\else
|
|
\setkeys{catalan}{babelshorthands=false}
|
|
\fi
|
|
|
|
% Register default options
|
|
\xpg@initialize@gloss@options{catalan}{babelshorthands=false}
|
|
|
|
\ifcsundef{initiate@active@char}{%
|
|
\input{babelsh.def}%
|
|
\initiate@active@char{"}%
|
|
\shorthandoff{"}%
|
|
}{}
|
|
|
|
%%% adapted from Babel's catalan.ldf
|
|
\newdimen\leftllkern \newdimen\rightllkern \newdimen\raiselldim
|
|
|
|
% we check if char · exists, and use it instead of raised dot:
|
|
\def\xpg@raiseddot{%
|
|
\charifavailable{00B7}{\raise\raiselldim\hbox{.}}%
|
|
}
|
|
|
|
\def\lgem{%
|
|
\ifmmode
|
|
\csname normal@char\string"\endcsname l%
|
|
\else
|
|
\leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
|
|
\setbox0\hbox{l}\setbox1\hbox{l\/}%
|
|
\xpg@if@char@available{00B7}%
|
|
{\setbox2\hbox{\char"00B7}}%
|
|
{\setbox2\hbox{.}}%
|
|
\advance\raiselldim by \the\fontdimen5\the\font
|
|
\advance\raiselldim by -\ht2%
|
|
\leftllkern=-.25\wd0%
|
|
\advance\leftllkern by \wd1%
|
|
\advance\leftllkern by -\wd0%
|
|
\rightllkern=-.25\wd0%
|
|
\advance\rightllkern by -\wd1%
|
|
\advance\rightllkern by \wd0%
|
|
\allowhyphens\discretionary{l-}{l}%
|
|
{\hbox{l}\kern\leftllkern\xpg@raiseddot%
|
|
\kern\rightllkern\hbox{l}}\allowhyphens
|
|
\fi
|
|
}
|
|
|
|
\def\Lgem{%
|
|
\ifmmode
|
|
\csname normal@char\string"\endcsname L%
|
|
\else
|
|
\leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
|
|
\setbox0\hbox{L}\setbox1\hbox{L\/}%
|
|
\xpg@if@char@available{00B7}%
|
|
{\setbox2\hbox{\char"00B7}}%
|
|
{\setbox2\hbox{.}}%
|
|
\advance\raiselldim by .5\ht0%
|
|
\advance\raiselldim by -.5\ht2%
|
|
\leftllkern=-.125\wd0%
|
|
\advance\leftllkern by \wd1%
|
|
\advance\leftllkern by -\wd0%
|
|
\rightllkern=-\wd0%
|
|
\divide\rightllkern by 6%
|
|
\advance\rightllkern by -\wd1%
|
|
\advance\rightllkern by \wd0%
|
|
\allowhyphens\discretionary{L-}{L}%
|
|
{\hbox{L}\kern\leftllkern\xpg@raiseddot%
|
|
\kern\rightllkern\hbox{L}}\allowhyphens
|
|
\fi
|
|
}
|
|
|
|
\AtBeginDocument{%
|
|
\let\lslash\l
|
|
\let\Lslash\L
|
|
\DeclareRobustCommand\l{\@ifnextchar.\bbl@l{\@ifnextchar·\bbl@l\lslash}}
|
|
\DeclareRobustCommand\L{\@ifnextchar.\bbl@L{\@ifnextchar·\bbl@L\Lslash}}}
|
|
\def\bbl@l#1#2{\lgem}
|
|
\def\bbl@L#1#2{\Lgem}
|
|
|
|
\def\catalan@shorthands{%
|
|
\bbl@activate{"}%
|
|
\def\language@group{catalan}%
|
|
\declare@shorthand{catalan}{"l}{\lgem{}}
|
|
\declare@shorthand{catalan}{"L}{\Lgem{}}
|
|
}
|
|
|
|
\def\nocatalan@shorthands{%
|
|
\@ifundefined{initiate@active@char}{}{\bbl@deactivate{"}}%
|
|
}
|
|
|
|
\def\captionscatalan{%
|
|
\def\refname{Referències}%
|
|
\def\abstractname{Resum}%
|
|
\def\bibname{Bibliografia}%
|
|
\def\prefacename{Pròleg}%
|
|
\def\chaptername{Capítol}%
|
|
\def\appendixname{Apèndix}%
|
|
\def\contentsname{Índex}%
|
|
\def\listfigurename{Índex de figures}%
|
|
\def\listtablename{Índex de taules}%
|
|
\def\indexname{Índex alfabètic}%
|
|
\def\figurename{Figura}%
|
|
\def\tablename{Taula}%
|
|
%\def\thepart{}%
|
|
\def\partname{Part}%
|
|
\def\pagename{Pàgina}%
|
|
\def\seename{Vegeu}%
|
|
\def\alsoname{Vegeu també}%
|
|
\def\enclname{Adjunt}%
|
|
\def\ccname{Còpies a}%
|
|
\def\headtoname{A}%
|
|
\def\proofname{Demostració}%
|
|
\def\glossaryname{Glossari}%
|
|
}
|
|
\def\datecatalan{%
|
|
\def\today{\number\day~\ifcase\month\or
|
|
de gener\or de febrer\or de març\or d'abril\or de maig\or
|
|
de juny\or de juliol\or d'agost\or de setembre\or d'octubre\or
|
|
de novembre\or de desembre\fi
|
|
\space de~\number\year}}
|
|
|
|
\def\noextras@catalan{%
|
|
\nocatalan@shorthands%
|
|
}
|
|
|
|
\def\blockextras@catalan{%
|
|
\ifcatalan@babelshorthands\catalan@shorthands\fi%
|
|
}
|
|
|
|
\def\inlineextras@catalan{%
|
|
\ifcatalan@babelshorthands\catalan@shorthands\fi%
|
|
}
|
|
\endinput
|
|
|