summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/third/french/t-french.mkiv
blob: 9d7bf2b714299086ebaafcdab4913936c14d06e3 (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
%D \module
%D   [     file=t-french,
%D      version=2011.11.08,
%D        title=\CONTEXT\ User Module,
%D     subtitle=For French documents,
%D       author=Peter Münster,
%D         date=\currentdate,
%D    copyright=Peter Münster,
%D        email=pmrb@free.fr,
%D      license=GNU General Public License]

%C Copyright (C) 2011  Peter Münster
%C
%C This program is free software: you can redistribute it and/or modify
%C it under the terms of the GNU General Public License as published by
%C the Free Software Foundation, either version 3 of the License, or
%C any later version.
%C
%C This program is distributed in the hope that it will be useful,
%C but without any warranty; without even the implied warranty of
%C merchantability or fitness for a particular purpose.  See the
%C GNU General Public License for more details.
%C
%C You should have received a copy of the GNU General Public License
%C along with this program.  If not, see <http://www.gnu.org/licenses/>.

%D This module tries to do similar things as the frenchb.ldf in \LaTeX:
%D \startitemize
%D \item automatic space before » and after «, :, ?, ; and ! 
%D \item changing symbol for itemize environment
%D \stopitemize
%D
%D If I remember right, the \LaTeX\ babel package does a much better job at
%D language switching, but I don't know, how this is possible in \ConTeXt.

\writestatus{loading}{Typesetting French documents}

\startsetups french
  % This shoud be also active in footnotes, headers and footers, and not
  % active in verbatim text:
  \setcharacterspacing[frenchpunctuation]
  % A question of style:
  \setupitemize[symbol=2]
  % What is this? I don't remember where this comes from:
  \lccode`\'=`\'
\stopsetups
\startsetups not-french
  \setcharacterspacing[reset]
  \setupitemize[symbol=\currentitemlevel]
\stopsetups
\setuplanguage [default] [setups=not-french]
\setuplanguage [fr]      [setups=french]
\mainlanguage  [fr]

\ifx \ieme  \undefined \def\ieme  {\highordinalstr{e}}   \fi
\ifx \iemes \undefined \def\iemes {\highordinalstr{es}}  \fi
\ifx \ier   \undefined \def\ier   {\highordinalstr{er}}  \fi
\ifx \iere  \undefined \def\iere  {\highordinalstr{re}}  \fi
\ifx \iers  \undefined \def\iers  {\highordinalstr{ers}} \fi
\ifx \ieres \undefined \def\ieres {\highordinalstr{res}} \fi

\doifnotmode{demo}{\endinput}

%D Usage example:
\def\myItems{%
  \startitemize
  \item test
  \item test
    \startitemize
    \item test
    \item test
      \startitemize
      \item test
      \item test
      \stopitemize
    \stopitemize
  \stopitemize}

\usemodule[french]

\starttext
\startbuffer
  Voilà: Voilà? Voilà! Voilà;
  \start
    \language[en]
    some English text: «English» or \quotation{French}, ok?
  \stop
  «voilà» \quote{voilà} \quotation{voilà}
  \myItems
  \start
    \language[en]
    \myItems
  \stop
\stopbuffer
\typebuffer
\getbuffer
\stoptext