diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf')
-rw-r--r-- | Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf | 47 |
1 files changed, 19 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf index 6dbd8df9130..a2a5d7c420f 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-catalan.ldf @@ -1,5 +1,6 @@ \ProvidesFile{gloss-catalan.ldf}[polyglossia: module for catalan] \PolyglossiaSetup{catalan}{ + bcp47=ca, hyphennames={catalan}, hyphenmins={2,2}, langtag=CAT, @@ -8,6 +9,9 @@ fontsetup=true, } +% BCP-47 compliant aliases +\setlanguagealias*{catalan}{ca} + \define@boolkey{catalan}[catalan@]{babelshorthands}[true]{} \ifsystem@babelshorthands \setkeys{catalan}{babelshorthands=true} @@ -15,6 +19,9 @@ \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{"}% @@ -23,33 +30,21 @@ %%% 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 % - } + \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\/}% - \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 % + \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% @@ -63,21 +58,16 @@ \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 % + \xpg@if@char@available{00B7}% + {\setbox2\hbox{\char"00B7}}% + {\setbox2\hbox{.}}% \advance\raiselldim by .5\ht0% \advance\raiselldim by -.5\ht2% \leftllkern=-.125\wd0% @@ -92,6 +82,7 @@ \kern\rightllkern\hbox{L}}\allowhyphens \fi } + \AtBeginDocument{% \let\lslash\l \let\Lslash\L |