summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/polyglossia/gloss-french.ldf
blob: 612094c57b6b6aaabe73db6bf89e56dbfe1bde5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
\ProvidesFile{gloss-french.ldf}[polyglossia: module for french]

\PolyglossiaSetup{french}{%
  language=French,
  script=Latin,
  hyphennames={french,francais},
  frenchspacing=true,
  indentfirst=true,
  hyphenmins={2,2},
  fontsetup=true}

\newXeTeXintercharclass\french@punctthin % ! ? ; et autres
\newXeTeXintercharclass\french@punctthick % :
\newXeTeXintercharclass\french@punctguillstart % « ‹
\newXeTeXintercharclass\french@punctguillend % » ›

\def\xpg@unskip{\ifhmode\ifdim\lastskip>\z@\unskip\fi\fi}
\def\xpg@nospace#1{#1}

\def\french@punctuation{%
    \lccode"2019="2019
    \XeTeXinterchartokenstate=1
    \XeTeXcharclass `\! \french@punctthin
    \XeTeXcharclass `\? \french@punctthin
    \XeTeXcharclass `\‼ \french@punctthin
    \XeTeXcharclass `\⁇ \french@punctthin
    \XeTeXcharclass `\⁈ \french@punctthin
    \XeTeXcharclass `\⁉ \french@punctthin
    \XeTeXcharclass `\; \french@punctthin
    \XeTeXcharclass `\: \french@punctthick
    \XeTeXcharclass `\« \french@punctguillstart
    \XeTeXcharclass `\» \french@punctguillend
    \XeTeXcharclass `\‹ \french@punctguillstart
    \XeTeXcharclass `\› \french@punctguillend
    \XeTeXinterchartoks \z@ \french@punctthin = {\nobreak\thinspace}%
    \XeTeXinterchartoks \z@ \french@punctthick = {\nobreakspace}%
    \XeTeXinterchartoks 255 \french@punctthin = {\xpg@unskip\nobreak\thinspace}%
    \XeTeXinterchartoks 255 \french@punctthick = {\xpg@unskip\nobreakspace}%
    \XeTeXinterchartoks \french@punctguillstart \z@ = {\nobreakspace}% "«a" -> "« a"
%   \XeTeXinterchartoks \z@ \french@punctguillstart = {\nobreakspace}% "a«" unchanged?
%   \XeTeXinterchartoks \french@punctguillend \z@ = {\nobreakspace}% "»a" unchanged?
    \XeTeXinterchartoks \z@ \french@punctguillend = {\nobreakspace}% "a»" -> "a »"
    \XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace}% "«  " -> "«~"
    \XeTeXinterchartoks 255 \french@punctguillend = {\xpg@unskip\nobreakspace}% "  »" -> "~»"
    \XeTeXinterchartoks \french@punctguillend \french@punctthin = {\nobreak\thinspace}% "»;" -> "» ;"
    \XeTeXinterchartoks \french@punctguillend \french@punctthick = {\nobreakspace}% "»:" -> "» :"
    \XeTeXinterchartoks \french@punctthin \french@punctguillend  = {\nobreakspace}% "?»" -> "? »"
    }

\def\nofrench@punctuation{%
    \lccode"2019=\z@
    \XeTeXcharclass `\! \z@
    \XeTeXcharclass `\? \z@
    \XeTeXcharclass `\‼ \z@
    \XeTeXcharclass `\⁇ \z@
    \XeTeXcharclass `\⁈ \z@
    \XeTeXcharclass `\⁉ \z@
    \XeTeXcharclass `\; \z@
    \XeTeXcharclass `\: \z@
    \XeTeXcharclass `\« \z@
    \XeTeXcharclass `\» \z@
    \XeTeXcharclass `\‹ \z@
    \XeTeXcharclass `\› \z@
    \XeTeXinterchartokenstate=0
    }

\def\captionsfrench{%
   \def\refname{Références}%
   \def\abstractname{Résumé}%
   \def\bibname{Bibliographie}%
   \def\prefacename{Préface}%
   \def\chaptername{Chapitre}%
   \def\appendixname{Annexe}%
   \def\contentsname{Table des matières}%
   \def\listfigurename{Table des figures}%
   \def\listtablename{Liste des tableaux}%
   \def\indexname{Index}%
   \def\figurename{\textsc{Fig.}}%
   \def\tablename{\textsc{Tab.}}%
   \def\@Fpt{\ifcase\value{part}\or Première\or Deuxième\or
   Troisième\or Quatrième\or Cinquième\or Sixième\or
   Septième\or Huitième\or Neuvième\or Dixième\or Onzième\or
   Douzième\or Treizième\or Quatorzième\or Quinzième\or
   Seizième\or Dix-septième\or Dix-huitième\or Dix-neuvième\or
   Vingtième\fi\space}%
   \def\thepart{}%
   \def\partname{\protect\@Fpt partie}%
   \def\pagename{page}%
   \def\seename{\emph{voir}}%
   \def\alsoname{\emph{voir aussi}}%
   \def\enclname{P.~J. }%
   \def\ccname{Copie à }%
   \def\headtoname{}%
   \def\proofname{Démonstration}%
   }
\def\datefrench{%
   \def\today{\ifx\ier\undefined\def\ier{er}\fi
      \ifnum\day=1\relax 1\ier%
      \else \number\day\fi
      \space \ifcase\month%
      \or janvier\or février\or mars\or avril\or mai\or juin\or
      juillet\or août\or septembre\or octobre\or novembre\or
      décembre\fi
      \space \number\year}}

\def\noextras@french{%
   \nofrench@punctuation%
   }

\def\blockextras@french{%
   \french@punctuation%
   }

\def\inlineextras@french{%
   \french@punctuation%
   }

\endinput