Debian Codegraph @

texmf-dist/tex/latex/polyglossia/gloss-piedmontese.ldf

raw
1 % !TEX encoding = UTF-8 Unicode
2 % Language definition file (part of polyglossia v2.10 -- 2026/04/18)
3 %
4 \ProvidesFile{gloss-piedmontese.ldf}[2013/02/12 v1.0 polyglossia: module for Piedmontese]
5 \makeatletter
6 \PolyglossiaSetup{piedmontese}{
7 bcp47=pms,
8 bcp47-language=pms,
9 bcp47-script=Latn,
10 hyphennames={piedmontese},
11 hyphenmins={2,2},
12 langtag=PMS,
13 frenchspacing=true,
14 }
15
16 % BCP-47 compliant aliases
17 \setlanguagealias*{piedmontese}{pms}
18
19 \DeclareKeys[polyglossia/gloss/piedmontese]
20 {
21 babelshorthands.if = piedmontese@babelshorthands,
22 babelshorthands.default:n = true
23 }
24
25 \ifsystem@babelshorthands
26 \SetGlossOptions{piedmontese}{babelshorthands=true}
27 % Register default options
28 \InitializeGlossOptions{piedmontese}{babelshorthands=true}
29 \else
30 \SetGlossOptions{piedmontese}{babelshorthands=false}
31 % Register default options
32 \InitializeGlossOptions{piedmontese}{babelshorthands=false}
33 \fi
34
35 \InitializeBabelShorthands
36
37 \def\piedmontese@shorthands{%
38 \xpg@activate@shorthands%
39 \def\language@group{piedmontese}%
40 \declare@shorthand{piedmontese}{"}{%
41 \relax\ifmmode
42 \def\xpgpms@next{''}%
43 \else
44 \def\xpgpms@next{\futurelet\xpgpms@temp\xpgpms@cwm}%
45 \fi
46 \xpgpms@next}%
47 }
48
49 \def\xpgpms@@cwm{\nobreak\discretionary{-}{}{}\nobreak\hskip\z@skip}
50 \def\xpgpms@cwm{\let\xpgpms@@next\relax
51 \ifcat\noexpand\xpgpms@temp a%
52 \def\xpgpms@@next{\pms@@cwm}%
53 \else
54 \ifx\xpgpms@temp/%
55 \def\xpgpms@@next{\bbl@allowhyphens/\bbl@allowhyphens\@gobble}%
56 \else
57 \ifx\xpgpms@temp-%
58 \def\xpgpms@@next{\bbl@allowhyphens-\bbl@allowhyphens\@gobble}%
59 \else
60 \ifx\xpgpms@temp"%
61 \def\xpgpms@@next{``\expandafter\@gobble\string}%
62 \fi
63 \fi
64 \fi
65 \xpgpms@@next}
66
67 \def\nopiedmontese@shorthands{%
68 \xpg@deactivate@shorthands%
69 }
70 \@namedef{captions\CurrentOption}{%
71 \def\prefacename{Prefassion}%
72 \def\refname{Riferiment}%
73 \def\abstractname{Somari}%
74 \def\bibname{Bibliografìa}%
75 \def\chaptername{Capìtol}%
76 \def\appendixname{Gionta}%
77 \def\contentsname{Tàula}%
78 \def\listfigurename{Lista dle figure}%
79 \def\listtablename{Lista dle tabele}%
80 \def\indexname{Tàula analìtica}%
81 \def\figurename{Figura}%
82 \def\tablename{Tabela}%
83 \def\partname{Part}%
84 \def\enclname{Gionta/e}%
85 \def\ccname{Con còpia a}%
86 \def\headtoname{Për}%
87 \def\pagename{Pàgina}%
88 \def\seename{vëd}%
89 \def\alsoname{vëd anche}%
90 \def\proofname{Dimostrassion}%
91 \def\glossaryname{Glossari}%
92 }
93 \@namedef{date\CurrentOption}{%
94 \def\today{\number\day\space\ifcase\month\or
95 ëd gené\or ëd fevré\or ëd mars\or d'avril\or ëd maj\or ëd giugn\or
96 ëd luj\or d'agost\or dë stèmber\or d'otóber\or ëd novèmber\or dë dzèmber%
97 \fi\space dal\space\number\year}}
98
99 \AddToHook{begindocument/before}{%
100 \edef\xpgpms@savedvalues{%
101 \clubpenalty=\the\clubpenalty\space
102 \@clubpenalty=\the\@clubpenalty\space
103 \widowpenalty=\the\widowpenalty\space
104 \finalhyphendemerits=\the\finalhyphendemerits}
105 }
106
107
108 \def\noextras@piedmontese{%
109 \lccode\string"2019=\z@%
110 \ifpiedmontese@babelshorthands\nopiedmontese@shorthands\fi%
111 \xpgpms@savedvalues%
112 }
113
114 \def\blockextras@piedmontese{%
115 \lccode\string"2019=\string"2019%
116 \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000%
117 \finalhyphendemerits=50000000%
118 \ifpiedmontese@babelshorthands\piedmontese@shorthands\else\nopiedmontese@shorthands\fi%
119 }
120
121 \def\inlineextras@piedmontese{%
122 \lccode\string"2019=\string"2019%
123 \ifpiedmontese@babelshorthands\piedmontese@shorthands\else\nopiedmontese@shorthands\fi%
124 }
125 %%% CHANGES END %%%
126 \endinput
127