summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf')
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf153
1 files changed, 153 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf
new file mode 100644
index 00000000000..feba1f98128
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf
@@ -0,0 +1,153 @@
+\ProvidesFile{gloss-catalan.ldf}[polyglossia: module for catalan]
+\PolyglossiaSetup{catalan}{
+ hyphennames={catalan},
+ hyphenmins={2,2},
+ frenchspacing=true,
+ indentfirst=true,
+ fontsetup=true,
+}
+
+\define@boolkey{catalan}[catalan@]{babelshorthands}[true]{}
+\ifsystem@babelshorthands
+ \setkeys{catalan}{babelshorthands=true}
+\else
+ \setkeys{catalan}{babelshorthands=false}
+\fi
+\ifcsundef{initiate@active@char}{%
+\input{babelsh.def}%
+\initiate@active@char{"}%
+}{}
+
+%%% 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{%
+ \ifluatex %
+ \expandafter\ifnum\directlua{polyglossia.check_char(183)} > 0\hbox{\char"00B7}%
+ \else\raise\raiselldim\hbox{.}%
+ \fi %
+ \else %
+ \ifnum\XeTeXcharglyph"00B7 > 0\hbox{\char"00B7}% why a hbox here?
+ \else\raise\raiselldim\hbox{.}%
+ \fi %
+ \fi %
+ }
+\def\lgem{%
+ \ifmmode
+ \csname normal@char\string"\endcsname l%
+ \else
+ \leftllkern=0pt\rightllkern=0pt\raiselldim=0pt%
+ \setbox0\hbox{l}\setbox1\hbox{l\/}%
+ \ifluatex %
+ \expandafter\ifnum\directlua{polyglossia.check_char(183)} > 0\setbox2\hbox{\char"00B7}%
+ \else\setbox2\hbox{.}%
+ \fi %
+ \else %
+ \ifnum\XeTeXcharglyph"00B7 > 0\setbox2\hbox{\char"00B7}%
+ \else\setbox2\hbox{.}%
+ \fi %
+ \fi %
+ \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\/}%
+ \ifluatex %
+ \expandafter\ifnum\directlua{polyglossia.check_char(183)} > 0\setbox2\hbox{\char"00B7}%
+ \else\setbox2\hbox{.}%
+ \fi %
+ \else %
+ \ifnum\XeTeXcharglyph"00B7 > 0\setbox2\hbox{\char"00B7}%
+ \else\setbox2\hbox{.}%
+ \fi %
+ \fi %
+ \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