summaryrefslogtreecommitdiff
path: root/tex/context/base/lang-sla.mkiv
blob: 3bcf04c570cf042d6301f3736a4709665c31e1b7 (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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
%D \module
%D   [       file=lang-sla,
%D        version=1999.09.13, % 1997.09.03
%D          title=\CONTEXT\ Language Macros,
%D       subtitle=Slavic Languages,
%D         author=Hans Hagen / Tobias Burnus,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

% Todo: replace \'.. by \namedglyph

%D The framework of this module is set up by Hans Hagen while
%D many of the first translations were done by Tobias. Later
%D on, corrections were made by users. If you have suggestions,
%D or feel that your name missing here, don't hesitate to send
%D us an email.
%D
%D \starttabulate[|lB|l|]
%D \NC Czech     \NC Tom Hudec, Petr Sojka \NC \NR
%D \NC Polish    \NC Grzegorz Sapijaszko   \NC \NR
%D \NC Croatian  \NC \Zcaron eljko Vrba    \NC \NR
%D \NC Slovenian \NC Mojca Miklavec        \NC \NR
%D \NC Cz and Sk \NC Richard Gabriel       \NC \NR
%D \stoptabulate

%  Belarussian, Russian, Ukrainian, Bulgarian, Macedonian,
%  Serbian, Croatian, Slovenian, Czech, Kushubian,
%  Lusatian/Sorbian/Wendish, Polish, Slovak, Albanian,
%  Illyrian, Armenian

\writestatus{loading}{ConTeXt Language Macros / Slavic Languages}

\unprotect

\installlanguage
  [\s!pl]
  [\c!spacing=\v!packed,
   \c!leftsentence=---,
   \c!rightsentence=---,
   \c!leftsubsentence=---,
   \c!rightsubsentence=---,
   \c!leftquote=\lowerleftsingleninequote,
   \c!rightquote=\upperrightsingleninequote,
   \c!leftquotation=\lowerleftdoubleninequote,
   \c!rightquotation=\upperrightdoubleninequote,
   \c!date={\v!day,{.},\ ,\v!month,\ ,\v!year}]

\installlanguage
  [\s!cs]
  [\c!spacing=\v!packed,
   \c!leftsentence=\thickglue--\thickglue\penalty-20\relax, % hh, \relax added
   \c!rightsentence=\thickglue--\thickglue\penalty-20\relax,
   \c!leftsubsentence=~---~\penalty-20\relax,
   \c!rightsubsentence=~---~\penalty-20\relax,
   \c!leftquote=\lowerleftsingleninequote,
   \c!rightquote=\upperrightsinglesixquote,
   \c!leftquotation=\lowerleftdoubleninequote,
   \c!rightquotation=\upperrightdoublesixquote,
   \c!date={\v!day,{.\,},\v!month,\ ,\v!year}]

\installlanguage
  [\s!sk]
  [\c!spacing=\v!packed,
   \c!leftsentence=---,
   \c!rightsentence=---,
   \c!leftsubsentence=---,
   \c!rightsubsentence=---,
   \c!leftquote=\upperleftsinglesixquote,
   \c!rightquote=\upperrightsingleninequote,
   \c!leftquotation=\upperleftdoublesixquote,
   \c!rightquotation=\upperrightdoubleninequote,
   \c!date={\v!day,{.\,},\v!month,\ ,\v!year}]

\installlanguage
  [\s!hr]
  [\c!spacing=\v!packed,
   \c!leftsentence=---,
   \c!rightsentence=---,
   \c!leftsubsentence=---,
   \c!rightsubsentence=---,
   \c!leftquote=\lowerleftsingleninequote,
   \c!rightquote=\upperrightsingleninequote,
   \c!leftquotation=\lowerleftdoubleninequote,
   \c!rightquotation=\upperrightdoubleninequote,
   \c!date={\v!day,{.},\ ,\v!month,\ ,\v!year}]

%D The default quotation marks for Slovenian were chosen as
%D \lowerleftdoubleninequote these ones\upperrightdoublesixquote\
%D which was probably due to the strong influence computers
%D had on typesetting, but \rightguillemot these ones\leftguillemot\
%D are \quotation{more correct}.
%D
%D If you still want the other quotation marks, use this:
%D
%D \starttyping
%D \installlanguage
%D   [sl]
%D   [leftquote=\lowerleftsingleninequote,
%D    rightquote=\upperrightsinglesixquote,
%D    leftquotation=\lowerleftdoubleninequote,
%D    rightquotation=\upperrightdoublesixquote]
%D \stoptyping
%D
%D If you disagree with the change, please send an email to Mojca, but
%D best use some pretty strong arguments because she loves S{\sl love}nia
%D too much to compromise on this.
%D
%D German faces approximately the same problem. I (MM) would prefer to
%D have something like:
%D
%D \starttyping
%D \mainlanguage[sl][quotationstyle=guillemot|doublequote] % better name needed
%D \stoptyping
%D
%D but users are expected to respect the rules of nice and correct
%D typography anyway.

\installlanguage
 [\s!sl]
 [\c!spacing=\v!packed,
  \c!leftsentence={\hbox{--~}},
  \c!rightsentence={\hbox{~--}},
  \c!leftsubsentence={--},
  \c!rightsubsentence={--},
  %\c!leftquote=\lowerleftsingleninequote,
  %\c!rightquote=\upperrightsinglesixquote,
  %\c!leftquotation=\lowerleftdoubleninequote,
  %\c!rightquotation=\upperrightdoublesixquote,
  \c!leftquote=\guilsingleright,
  \c!rightquote=\guilsingleleft,
  \c!leftquotation=\rightguillemot,
  \c!rightquotation=\leftguillemot,
  \c!date={\v!day,{.},\ ,\v!month,\ ,\v!year}]

\installlanguage [polish]    [\s!pl]
\installlanguage [czech]     [\s!cs]
\installlanguage [slovak]    [\s!sk]
\installlanguage [croatian]  [\s!hr]
\installlanguage [slovenian] [\s!sl]
\installlanguage [slovene]   [\s!sl] % both possible (mojca: still needed?)

\installlanguage [cz]        [\s!cs]

\def\doconvertsloveniancharacters{\dodoconvertcharacters{25}}

\def\sloveniancharacters{\doconvertsloveniancharacters\sloveniancharacter}
\def\slovenianCharacters{\doconvertsloveniancharacters\slovenianCharacter}

%D Define general-purpose macros for Slovenian character enumerations:

\defineconversion [sloveniancharacter]  [\sloveniancharacter]
\defineconversion [slovenianCharacter]  [\slovenianCharacter]

\defineconversion [sloveniancharacters] [\sloveniancharacters]
\defineconversion [slovenianCharacters] [\slovenianCharacters]

%D Define these as the general character enumeration when
%D language is Slovenian. If you feel uncomfortable with this,
%D mail Mojca, since she promised to to take the heat.

\defineconversion [sl] [character]  [\sloveniancharacter]
\defineconversion [sl] [Character]  [\slovenianCharacter]

\defineconversion [sl] [characters] [\sloveniancharacters]
\defineconversion [sl] [Characters] [\slovenianCharacters]

\defineconversion [sl] [a]          [\sloveniancharacters]
\defineconversion [sl] [A]          [\slovenianCharacters]
\defineconversion [sl] [AK]         [\smallcapped\sloveniancharacters]
\defineconversion [sl] [KA]         [\smallcapped\sloveniancharacters]

\def\sloveniancharacters#1{\ctxlua{converters.alphabetic(\number#1,"sl")}}
\def\slovenianCharacters#1{\ctxlua{converters.Alphabetic(\number#1,"sl")}}

\protect \endinput