Debian Codegraph @

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

raw
1 % Language definition file (part of polyglossia v2.10 -- 2026/04/18)
2 %
3 %%
4 %% This is file `gloss-occitan.ldf',
5 %% generated with the docstrip utility.
6 %%
7 %% The original source files were:
8 %%
9 %% gloss-occitan.dtx (with options: `ldf')
10 %% ------------------------------------------------------------------
11 %% The gloss-occitan module for polyglossia
12 %% Copyright (C) 2016 Cédric Valmary
13 %% All rights reserved
14 %%
15 %% Licence information appended
16 %%
17 %% Created by Cédric Valmary: cvalmary at yahoo dot fr
18 %% of Tot en òc <http://www.totenoc.eu/>
19 %%
20 \ProvidesFile{gloss-occitan.ldf}[polyglossia: module for Occitan]
21
22 \PolyglossiaSetup{occitan}{
23 bcp47=oc,
24 bcp47-language=oc,
25 bcp47-script=Latn,
26 hyphennames={occitan},
27 langtag=OCI,
28 hyphenmins={2,2},
29 frenchspacing=true,
30 indentfirst=true,
31 }
32
33 % BCP-47 compliant aliases
34 \setlanguagealias*{occitan}{oc}
35
36 \DeclareKeys[polyglossia/gloss/occitan]
37 {
38 babelshorthands.if = occitan@babelshorthands,
39 babelshorthands.default:n = true
40 }
41
42 \ifsystem@babelshorthands
43 \SetGlossOptions{occitan}{babelshorthands=true}
44 % Register default options
45 \InitializeGlossOptions{occitan}{babelshorthands=true}
46 \else
47 \SetGlossOptions{occitan}{babelshorthands=false}
48 % Register default options
49 \InitializeGlossOptions{occitan}{babelshorthands=false}
50 \fi
51
52 \InitializeBabelShorthands
53
54 \def\occitan@shorthands{%
55 \xpg@activate@shorthands%
56 \def\language@group{occitan}%
57 \declare@shorthand{occitan}{"}{%
58 \relax\ifmmode
59 \def\xpgoc@next{''}%
60 \else
61 \def\xpgoc@next{\futurelet\xpgoc@temp\xpgoc@cwm}%
62 \fi
63 \xpgoc@next}%
64 }
65 \def\xpgoc@@cwm{\nobreak\discretionary{-}{}{}\nobreak\hskip\z@skip}
66 \def\xpgoc@ponchinterior{%
67 \nobreak\discretionary{-}{}{\mbox{$\cdot$}}\nobreak\hskip\z@skip}
68 \def\xpgoc@cwm{\let\xpgoc@@next\relax
69 \ifcat\noexpand\xpgoc@temp a%
70 \def\xpgoc@@next{\xpgoc@@cwm}%
71 \else
72 \if\noexpand\xpgoc@temp \string|%
73 \def\xpgoc@@next##1{\xpgoc@@cwm}%
74 \else
75 \if\noexpand\xpgoc@temp \string<%
76 \def\xpgoc@@next##1{«\ignorespaces}%
77 \else
78 \if\noexpand\xpgoc@temp \string>%
79 \def\xpgoc@@next##1{\unskip»}%
80 \else
81 \if\noexpand\xpgoc@temp\string/%
82 \def\xpgoc@@next##1{\slash}%
83 \else
84 \if\noexpand\xpgoc@temp\string.%
85 \def\xpgoc@@next##1{\xpgoc@ponchinterior}%
86 \fi
87 \fi
88 \fi
89 \fi
90 \fi
91 \fi
92 \xpgoc@@next%
93 }
94
95 \def\nooccitan@shorthands{%
96 \xpg@deactivate@shorthands%
97 }
98 \def\captionsoccitan{%
99 \def\refname{Referéncias}%
100 \def\abstractname{Resumit}%
101 \def\bibname{Bibliografia}%
102 \def\prefacename{Prefaci}%
103 \def\chaptername{Capítol}%
104 \def\appendixname{Annèx}%
105 \def\contentsname{Ensenhador}%
106 \def\listfigurename{Taula de las figuras}%
107 \def\listtablename{Taula dels tablèus}%
108 \def\indexname{Indèx}%
109 \def\figurename{Figura}%
110 \def\tablename{Tablèu}%
111 %\def\thepart{}%
112 \def\partname{Partida}%
113 \def\pagename{Pagina}%
114 \def\seename{vejatz}%
115 \def\alsoname{vejatz tanben}%
116 \def\enclname{Pèça junta}%
117 \def\ccname{còpia a}%
118 \def\headtoname{A}%
119 \def\proofname{Demostracion}%
120 \def\glossaryname{Glossari}%
121 }
122 \def\dateoccitan{%
123 \def\occitanmonth{\ifcase\month\or
124 de~genièr\or
125 de~febrièr\or
126 de~març\or
127 d'abril\or
128 de~mai\or
129 de~junh\or
130 de~julhet\or
131 d'agost\or
132 de~setembre\or
133 d'octobre\or
134 de~novembre\or
135 de~decembre\fi
136 }%
137 \def\occitanday{\ifcase\day\or
138 1èr\else% primièr
139 \number\day\fi% all other numbers
140 }%
141 \def\today{\occitanday\space \occitanmonth\space de~\number\year}%
142 }
143 \let\xpgoc@savedvalues\empty
144 \AddToHook{begindocument/before}{% the user or the class might define different values
145 \edef\xpgoc@savedvalues{%
146 \clubpenalty=\the\clubpenalty\space
147 \@clubpenalty=\the\@clubpenalty\space
148 \widowpenalty=\the\widowpenalty\space
149 \finalhyphendemerits=\the\finalhyphendemerits}
150 }
151 \def\noextras@occitan{%
152 \lccode\string"2019=\z@%
153 \ifoccitan@babelshorthands\nooccitan@shorthands\fi%
154 \xpgoc@savedvalues%
155 }
156 \def\blockextras@occitan{%
157 \lccode\string"2019=\string"2019%
158 \clubpenalty=3000 \@clubpenalty=3000 \widowpenalty=3000%
159 \finalhyphendemerits=50000000%
160 \ifoccitan@babelshorthands\occitan@shorthands\else\nooccitan@shorthands\fi%
161 }
162
163 \def\inlineextras@occitan{%
164 \lccode\string"2019=\string"2019%
165 \ifoccitan@babelshorthands\occitan@shorthands\else\nooccitan@shorthands\fi%
166 }
167 %% Distributable under the LaTeX Project Public License,
168 %% version 1.3c or higher (your choice). The latest version of
169 %% this license is at: http://www.latex-project.org/lppl.txt
170 %%
171 %% This work is "author-maintained"
172 %% The maintainer is Cédric Valmary
173 %%
174 %%
175 %% End of file `gloss-occitan.ldf'.