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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
|
% \iffalse meta-comment
%
% Copyright 1989-2008 Johannes L. Braams and any individual authors
% listed elsewhere in this file. All rights reserved.
%
% This file is part of the Babel system.
% --------------------------------------
%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% The Current Maintainer of this work is Johannes Braams.
%
% The list of all files belonging to the Babel system is
% given in the file `manifest.bbl. See also `legal.bbl' for additional
% information.
%
% The list of derived (unpacked) files belonging to the distribution
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
% \fi
% \CheckSum{1382}
% \iffalse
% Tell the \LaTeX\ system who we are and write an entry on the
% transcript.
%<*dtx>
\ProvidesFile{slovak.dtx}
%</dtx>
%<+code>\ProvidesLanguage{slovak}
%\fi
%\ProvidesFile{slovak.dtx}
[2008/07/06 v3.1a Slovak support from the babel system]
%\iffalse
%% File `slovak.dtx'
%% Babel package for LaTeX version 2e
%% Copyright (C) 1989 - 2008
%% by Johannes Braams, TeXniek
%
%% Slovak Language Definition File
%% Copyright (C) 1989 - 2001
%% by Jana Chlebikova
% Department of Artificial Intelligence
% Faculty of Mathematics and Physics
% Mlynska dolina
% 84215 Bratislava
% Slovakia
% (42)(7) 720003 l. 835
% (42)(7) 725882
% chlebikj at mff.uniba.cs (Internet)
% and Johannes Braams, TeXniek
%
%% Copyright (C) 2002-2005
%% by Tobias Schlemmer
% Braunsdorfer Stra\ss e 101
% 01159 Dresden
% Deutschland
% Tobias.Schlemmer at web.de
%
%% Copyright (C) 2005-2008
%% by Petr Tesa\v r\'ik (babel at tesarici.cz)
%
% This file is also based on CSLaTeX
% by Ji\v r\'i Zlatu\v ska, Zden\v ek Wagner,
% Jaroslav \v Snajdr and Petr Ol\v s\'ak.
%
%% Please report errors to: Petr Tesa\v r\'ik
%% babel at tesarici.cz
%
% This file is part of the babel system, it provides the source
% code for the Slovak language definition file.
%<*filedriver>
\documentclass{ltxdoc}
\newcommand*\TeXhax{\TeX hax}
\newcommand*\babel{\textsf{babel}}
\newcommand*\langvar{$\langle \it lang \rangle$}
\newcommand*\note[1]{}
\newcommand*\Lopt[1]{\textsf{#1}}
\newcommand*\file[1]{\texttt{#1}}
\begin{document}
\DocInput{slovak.dtx}
\end{document}
%</filedriver>
%\fi
%
% \def\CS{$\cal C\kern-.1667em
% \lower.5ex\hbox{$\cal S$}\kern-.075em$}
%
% \GetFileInfo{slovak.dtx}
%
% \changes{slovak-1.0}{1992/07/15}{First version}
% \changes{slovak-1.2}{1994/02/27}{Update for \LaTeXe}
% \changes{slovak-1.2d}{1994/06/26}{Removed the use of \cs{filedate}
% and moved identification after the loading of \file{babel.def}}
% \changes{slovak-1.2i}{1996/10/10}{Replaced \cs{undefined} with
% \cs{@undefined} and \cs{empty} with \cs{@empty} for consistency
% with \LaTeX, moved the definition of \cs{atcatcode} right to the
% beginning.}
% \changes{slovak-1.3a}{2004/02/20}{Added contributed shorthand
% definitions}
% \changes{slovak-3.0}{2005/09/10}{Implemented the functionality of
% \CS\LaTeX's slovak.sty. The version number was bumped to 3.0
% to minimize confusion by being higher than the last version
% of \CS\LaTeX.}
%
% \section{The Slovak language}
%
% The file \file{\filename}\footnote{The file described in this
% section has version number \fileversion\ and was last revised on
% \filedate. It was originally written by Jana Chlebikova
% (\texttt{chlebik@euromath.dk}) and modified by Tobias Schlemmer
% (\texttt{Tobias.Schlemmer@web.de}). It was then rewritten by
% Petr Tesa\v r\'ik (\texttt{babel@tesarici.cz}).} defines all the
% language-specific macros for the Slovak language.
%
% For this language the macro |\q| is defined. It was used with the
% letters (\texttt{t}, \texttt{d}, \texttt{l}, and \texttt{L}) and
% adds a \texttt{'} to them to simulate a `hook' that should be
% there. The result looks like t\kern-2pt\char'47. Since the the T1
% font encoding has the corresponding characters it is mapped to |\v|.
% Therefore we recommend using T1 font encoding. If you don't want to
% use this encoding, please, feel free to redefine |\q| in your file.
% I think babel will honour this |;-)|.
%
% For this language the characters |"|, |'| and |^| are made
% active. In table~\ref{tab:slovak-quote} an overview is given of
% its purpose. Also the vertical placement of the
% umlaut can be controlled this way.
%
% \begin{table}[htb]
% \begin{center}
% \begin{tabular}{lp{8cm}}
% |"a| & |\"a|, also implemented for the other
% lowercase and uppercase vowels. \\
% |^d| & |\q d|, also implemented for l, t and L. \\
% |^c| & |\v c|, also implemented for C, D, N, n, T, Z and z. \\
% |^o| & |\^o|, also implemented for O. \\
% |'a| & |\'a|, also implemented for the other lowercase and
% uppercase l, r, y and vowels. \\
% \verb="|= & disable ligature at this position. \\
% |"-| & an explicit hyphen sign, allowing hyphenation
% in the rest of the word. \\
% |""| & like |"-|, but producing no hyphen sign
% (for compund words with hyphen, e.g.\ |x-""y|). \\
% |"~| & for a compound word mark without a breakpoint. \\
% |"=| & for a compound word mark with a breakpoint, allowing
% hyphenation in the composing words. \\
% |"`| & for German left double quotes (looks like ,,). \\
% |"'| & for German right double quotes. \\
% |"<| & for French left double quotes (similar to $<<$). \\
% |">| & for French right double quotes (similar to $>>$). \\
% \end{tabular}
% \caption{The extra definitions made
% by \file{slovak.ldf}}\label{tab:slovak-quote}
% \end{center}
% \end{table}
%
% The quotes in table~\ref{tab:slovak-quote} can also be typeset by
% using the commands in table~\ref{tab:smore-quote}.
% \begin{table}[htb]
% \begin{center}
% \begin{tabular}{lp{8cm}}
% |\glqq| & for German left double quotes (looks like ,,). \\
% |\grqq| & for German right double quotes (looks like ``). \\
% |\glq| & for German left single quotes (looks like ,). \\
% |\grq| & for German right single quotes (looks like `). \\
% |\flqq| & for French left double quotes (similar to $<<$). \\
% |\frqq| & for French right double quotes (similar to $>>$).\\
% |\flq| & for (French) left single quotes (similar to $<$). \\
% |\frq| & for (French) right single quotes (similar to $>$). \\
% |\dq| & the original quotes character (|"|). \\
% |\sq| & the original single quote (|'|). \\
% \end{tabular}
% \caption{More commands which produce quotes, defined
% by \file{slovak.ldf}}\label{tab:smore-quote}
% \end{center}
% \end{table}
%
% \subsection{Compatibility}
%
% Great care has been taken to ensure backward compatibility with
% \CS\LaTeX. In particular, documents which load this file with
% |\usepackage{slovak}| should produce identical output with no
% modifications to the source. Additionally, all the \CS\LaTeX{}
% options are recognized:
%
% \label{tab:slovak-options}
% \begin{list}{}
% {\def\makelabel#1{\sbox0{\Lopt{#1}}%
% \ifdim\wd0>\labelwidth
% \setbox0\vbox{\box0\hbox{}} \wd0=0pt \fi
% \box0\hfil}
% \setlength{\labelwidth}{2\parindent}
% \setlength{\leftmargin}{2\parindent}
% \setlength{\rightmargin}{\parindent}}
% \item[IL2, T1, OT1]
% These options set the default font encoding. Please note
% that their use is deprecated. You should use the |fontenc|
% package to select font encoding.
%
% \item[split, nosplit]
% These options control whether hyphenated words are
% automatically split according to Slovak typesetting rules.
% With the \Lopt{split} option ``je-li'' is hyphenated as
% ``je-/-li''. The \Lopt{nosplit} option disables this behavior.
%
% The use of this option is strongly discouraged, as it breaks
% too many common things---hyphens cannot be used in labels,
% negative arguments to \TeX{} primitives will not work in
% horizontal mode (use \cs{minus} as a workaround), and there are
% a few other peculiarities with using this mode.
%
% \item[nocaptions]
%
% This option was used in \CS\LaTeX{} to set up Czech/Slovak
% typesetting rules, but leave the original captions and dates.
% The recommended way to achieve this is to use English as the main
% language of the document and use the environment |otherlanguage*|
% for Czech text.
%
% \item[olduv]
% There are two version of \cs{uv}. The older one allows the use
% of \cs{verb} inside the quotes but breaks any respective kerning
% with the quotes (like that in \CS{} fonts). The newer one honors
% the kerning in the font but does not allow \cs{verb} inside the
% quotes.
%
% The new version is used by default in \LaTeXe{} and the old version
% is used with plain \TeX. You may use \Lopt{olduv} to override the
% default in \LaTeXe.
%
% \item[cstex]
% This option was used to include the commands \cs{csprimeson} and
% \cs{csprimesoff}. Since these commands are always included now,
% it has been removed and the empty definition lasts for compatibility.
% \end{list}
%
% \StopEventually{}
%
% \subsection{Implementation}
%
% The macro |\LdfInit| takes care of preventing that this file is
% loaded more than once, checking the category code of the
% \texttt{@} sign, etc.
% \changes{slovak-1.2i}{1996/11/03}{Now use \cs{LdfInit} to perform
% initial checks}
% \begin{macrocode}
%<*code>
\LdfInit\CurrentOption{date\CurrentOption}
% \end{macrocode}
%
% When this file is read as an option, i.e. by the |\usepackage|
% command, \texttt{slovak} will be an `unknown' language in which
% case we have to make it known. So we check for the existence of
% |\l@slovak| to see whether we have to do something here.
%
% \changes{slovak-1.2d}{1994/06/26}{Now use \cs{@nopatterns} to
% produce the warning}
% \begin{macrocode}
\ifx\l@slovak\@undefined
\@nopatterns{Slovak}
\adddialect\l@slovak0\fi
% \end{macrocode}
%
% We need to define these macros early in the process.
%
% \begin{macrocode}
\def\cs@iltw@{IL2}
\newif\ifcs@splithyphens
\cs@splithyphensfalse
% \end{macrocode}
%
% If Babel is not loaded, we provide compatibility with \CS\LaTeX.
% However, if macro \cs{@ifpackageloaded} is not defined, we assume
% to be loaded from plain and provide compatibility with csplain.
% Of course, this does not work well with \LaTeX$\:$2.09, but I
% doubt anyone will ever want to use this file with \LaTeX$\:$2.09.
%
% \begin{macrocode}
\ifx\@ifpackageloaded\@undefined
\let\cs@compat@plain\relax
\message{csplain compatibility mode}
\else
\@ifpackageloaded{babel}{}{%
\let\cs@compat@latex\relax
\message{cslatex compatibility mode}}
\fi
\ifx\cs@compat@latex\relax
\ProvidesPackage{slovak}[2008/07/06 v3.1a CSTeX Slovak style]
% \end{macrocode}
%
% Declare \CS\LaTeX{} options (see also the descriptions on page
% \pageref{tab:slovak-options}).
%
% \begin{macrocode}
\DeclareOption{IL2}{\def\encodingdefault{IL2}}
\DeclareOption {T1}{\def\encodingdefault {T1}}
\DeclareOption{OT1}{\def\encodingdefault{OT1}}
\DeclareOption{nosplit}{\cs@splithyphensfalse}
\DeclareOption{split}{\cs@splithyphenstrue}
\DeclareOption{nocaptions}{\let\cs@nocaptions=\relax}
\DeclareOption{olduv}{\let\cs@olduv=\relax}
\DeclareOption{cstex}{\relax}
% \end{macrocode}
%
% Make |IL2| encoding the default. This can be overriden with
% the other font encoding options.
% \begin{macrocode}
\ExecuteOptions{\cs@iltw@}
% \end{macrocode}
%
% Now, process the user-supplied options.
% \begin{macrocode}
\ProcessOptions
% \end{macrocode}
%
% Standard \LaTeXe{} does not include the IL2 encoding in the format.
% The encoding can be loaded later using the fontenc package, but
% \CS\LaTeX{} included IL2 by default. This means existing documents
% for \CS\LaTeX{} do not load that package, so load the encoding
% ourselves in compatibility mode.
%
% \begin{macrocode}
\ifx\encodingdefault\cs@iltw@
\input il2enc.def
\fi
% \end{macrocode}
%
% Restore the definition of \cs{CurrentOption}, clobbered by processing
% the options.
%
% \begin{macrocode}
\def\CurrentOption{slovak}
\fi
% \end{macrocode}
%
% The next step consists of defining commands to switch to (and
% from) the Slovak language.
%
% \begin{macro}{\captionsslovak}
% The macro \cs{captionsslovak} defines all strings used in the four
% standard documentclasses provided with \LaTeX.
% \changes{slovak-1.2g}{1995/07/04}{Added \cs{proofname} for
% AMS-\LaTeX}
% \changes{slovak-1.2k}{1999/02/28}{Repaired a few spelling mistakes}
% \changes{slovak-1.2l}{2000/09/20}{Added \cs{glossaryname}}
% \changes{slovak-3.0}{2005/12/22}{Updated some translations. Former
% translations were: `\'Uvod' for \cs{prefacename}, `Referencie' for
% \cs{refname}, `Index' for \cs{indexname}, `Obr\'azok' for
% \cs{figurename}, `Pr\'ilohy' for \cs{enclname}, `CC' for \cs{ccname},
% `Komu' for \cs{headtoname}, `Strana' for \cs{pagename}}
% \begin{macrocode}
\@namedef{captions\CurrentOption}{%
\def\prefacename{Predhovor}%
\def\refname{Literat\'ura}%
\def\abstractname{Abstrakt}%
\def\bibname{Literat\'ura}%
\def\chaptername{Kapitola}%
\def\appendixname{Dodatok}%
\def\contentsname{Obsah}%
\def\listfigurename{Zoznam obr\'azkov}%
\def\listtablename{Zoznam tabuliek}%
\def\indexname{Register}%
\def\figurename{Obr.}%
\def\tablename{Tabu\v{l}ka}%
\def\partname{\v{C}as\v{t}}%
\def\enclname{Pr\'{\i}loha}%
\def\ccname{cc.}%
\def\headtoname{Pre}%
\def\pagename{Str.}%
\def\seename{vi\v{d}}%
\def\alsoname{vi\v{d} tie\v{z}}%
\def\proofname{D\^okaz}%
\def\glossaryname{Slovn\'{\i}k}%
}%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dateslovak}
% The macro \cs{dateslovak} redefines the command \cs{today}
% to produce Slovak dates.
% \changes{slovak-1.2j}{1997/10/01}{Use \cs{edef} to define
% \cs{today} to save memory}
% \changes{slovak-1.2j}{1998/03/28}{use \cs{def} instead of \cs{edef}}
% \changes{slovak-1.2k}{1999/02/28}{Repaired a spelling mistake}
% \begin{macrocode}
\@namedef{date\CurrentOption}{%
\def\today{\number\day.~\ifcase\month\or
janu\'ara\or febru\'ara\or marca\or apr\'{\i}la\or m\'aja\or
j\'una\or j\'ula\or augusta\or septembra\or okt\'obra\or
novembra\or decembra\fi
\space \number\year}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\extrasslovak}
% \begin{macro}{\noextrasslovak}
% The macro \cs{extrasslovak} will perform all the extra definitions
% needed for the Slovak language. The macro \cs{noextrasslovak} is
% used to cancel the actions of \cs{extrasslovak}.
%
% For Slovak texts \cs{frenchspacing} should be in effect. Language
% group for shorthands is also set here.
% \changes{slovak-3.0}{1995/04/21}{now use \cs{bbl@frenchspacing} and
% \cs{bbl@nonfrenchspacing}}
% \changes{slovak-3.1}{2006/10/07}{move \cs{languageshorthands} here,
% so that the language group is always initialized correctly}
% \begin{macrocode}
\expandafter\addto\csname extras\CurrentOption\endcsname{%
\bbl@frenchspacing
\languageshorthands{slovak}}
\expandafter\addto\csname noextras\CurrentOption\endcsname{%
\bbl@nonfrenchspacing}
% \end{macrocode}
%
% \changes{slovak-1.2e}{1995/05/28}{Use \LaTeX's \cs{v} accent
% command}
% \begin{macrocode}
\expandafter\addto\csname extras\CurrentOption\endcsname{%
\babel@save\q\let\q\v}
% \end{macrocode}
%
% For Slovak three characters are used to define shorthands, they
% need to be made active.
% \changes{slovak-1.3a}{2004/02/20}{Make three characters available
% for shorthands}
% \begin{macrocode}
\ifx\cs@compat@latex\relax\else
\initiate@active@char{^}
\addto\extrasslovak{\bbl@activate{^}}
\addto\noextrasslovak{\bbl@deactivate{^}}
\initiate@active@char{"}
\addto\extrasslovak{\bbl@activate{"}\umlautlow}
\addto\noextrasslovak{\bbl@deactivate{"}\umlauthigh}
\initiate@active@char{'}
\@ifpackagewith{babel}{activeacute}{%
\addto\extrasslovak{\bbl@activate{'}}
\addto\noextrasslovak{\bbl@deactivate{'}}%
}{}
\fi
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\sq}
% \begin{macro}{\dq}
% We save the original single and double quote characters in
% \cs{sq} and \cs{dq} to make them available later. The math
% accent |\"| can now be typed as |"|.
% \begin{macrocode}
\begingroup\catcode`\"=12\catcode`\'=12
\def\x{\endgroup
\def\sq{'}
\def\dq{"}}
\x
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \changes{slovak-1.2b}{1994/06/04}{Added setting of left- and
% righthyphenmin}
%
% The slovak hyphenation patterns should be used with
% |\lefthyphenmin| set to~2 and |\righthyphenmin| set to~3.
% \changes{slovak-1.2e}{1995/05/28}{Now use \cs{slovakhyphenmins}}
% \changes{slovak-1.2l}{2000/09/22}{Now use \cs{providehyphenmins} to
% provide a default value}
% \changes{slovak-3.0}{2005/12/22}{Changed default \cs{righthyphenmin}
% to 3 characters.}
% \begin{macrocode}
\providehyphenmins{\CurrentOption}{\tw@\thr@@}
% \end{macrocode}
%
% In order to prevent problems with the active |^| we add a
% shorthand on system level which expands to a `normal |^|.
% \begin{macrocode}
\ifx\cs@compat@latex\relax\else
\declare@shorthand{system}{^}{\csname normal@char\string^\endcsname}
% \end{macrocode}
%
% Now we can define the doublequote macros: the umlauts,
% \begin{macrocode}
\declare@shorthand{slovak}{"a}{\textormath{\"{a}\allowhyphens}{\ddot a}}
\declare@shorthand{slovak}{"o}{\textormath{\"{o}\allowhyphens}{\ddot o}}
\declare@shorthand{slovak}{"u}{\textormath{\"{u}\allowhyphens}{\ddot u}}
\declare@shorthand{slovak}{"A}{\textormath{\"{A}\allowhyphens}{\ddot A}}
\declare@shorthand{slovak}{"O}{\textormath{\"{O}\allowhyphens}{\ddot O}}
\declare@shorthand{slovak}{"U}{\textormath{\"{U}\allowhyphens}{\ddot U}}
% \end{macrocode}
% tremas,
% \begin{macrocode}
\declare@shorthand{slovak}{"e}{\textormath{\"{e}\allowhyphens}{\ddot e}}
\declare@shorthand{slovak}{"E}{\textormath{\"{E}\allowhyphens}{\ddot E}}
\declare@shorthand{slovak}{"i}{\textormath{\"{\i}\allowhyphens}%
{\ddot\imath}}
\declare@shorthand{slovak}{"I}{\textormath{\"{I}\allowhyphens}{\ddot I}}
% \end{macrocode}
% other slovak characters
% \begin{macrocode}
\declare@shorthand{slovak}{^c}{\textormath{\v{c}\allowhyphens}{\check{c}}}
\declare@shorthand{slovak}{^d}{\textormath{\q{d}\allowhyphens}{\check{d}}}
\declare@shorthand{slovak}{^l}{\textormath{\q{l}\allowhyphens}{\check{l}}}
\declare@shorthand{slovak}{^n}{\textormath{\v{n}\allowhyphens}{\check{n}}}
\declare@shorthand{slovak}{^o}{\textormath{\^{o}\allowhyphens}{\hat{o}}}
\declare@shorthand{slovak}{^s}{\textormath{\v{s}\allowhyphens}{\check{s}}}
\declare@shorthand{slovak}{^t}{\textormath{\q{t}\allowhyphens}{\check{t}}}
\declare@shorthand{slovak}{^z}{\textormath{\v{z}\allowhyphens}{\check{z}}}
\declare@shorthand{slovak}{^C}{\textormath{\v{C}\allowhyphens}{\check{C}}}
\declare@shorthand{slovak}{^D}{\textormath{\v{D}\allowhyphens}{\check{D}}}
\declare@shorthand{slovak}{^L}{\textormath{\q{L}\allowhyphens}{\check{L}}}
\declare@shorthand{slovak}{^N}{\textormath{\v{N}\allowhyphens}{\check{N}}}
\declare@shorthand{slovak}{^O}{\textormath{\^{O}\allowhyphens}{\hat{O}}}
\declare@shorthand{slovak}{^S}{\textormath{\v{S}\allowhyphens}{\check{S}}}
\declare@shorthand{slovak}{^T}{\textormath{\v{T}\allowhyphens}{\check{T}}}
\declare@shorthand{slovak}{^Z}{\textormath{\v{Z}\allowhyphens}{\check{Z}}}
% \end{macrocode}
% acute accents,
% \begin{macrocode}
\@ifpackagewith{babel}{activeacute}{%
\declare@shorthand{slovak}{'a}{\textormath{\'a\allowhyphens}{^{\prime}a}}
\declare@shorthand{slovak}{'e}{\textormath{\'e\allowhyphens}{^{\prime}e}}
\declare@shorthand{slovak}{'i}{\textormath{\'\i{}\allowhyphens}{^{\prime}i}}
\declare@shorthand{slovak}{'l}{\textormath{\'l\allowhyphens}{^{\prime}l}}
\declare@shorthand{slovak}{'o}{\textormath{\'o\allowhyphens}{^{\prime}o}}
\declare@shorthand{slovak}{'r}{\textormath{\'r\allowhyphens}{^{\prime}r}}
\declare@shorthand{slovak}{'u}{\textormath{\'u\allowhyphens}{^{\prime}u}}
\declare@shorthand{slovak}{'y}{\textormath{\'y\allowhyphens}{^{\prime}y}}
\declare@shorthand{slovak}{'A}{\textormath{\'A\allowhyphens}{^{\prime}A}}
\declare@shorthand{slovak}{'E}{\textormath{\'E\allowhyphens}{^{\prime}E}}
\declare@shorthand{slovak}{'I}{\textormath{\'I\allowhyphens}{^{\prime}I}}
\declare@shorthand{slovak}{'L}{\textormath{\'L\allowhyphens}{^{\prime}l}}
\declare@shorthand{slovak}{'O}{\textormath{\'O\allowhyphens}{^{\prime}O}}
\declare@shorthand{slovak}{'R}{\textormath{\'R\allowhyphens}{^{\prime}R}}
\declare@shorthand{slovak}{'U}{\textormath{\'U\allowhyphens}{^{\prime}U}}
\declare@shorthand{slovak}{'Y}{\textormath{\'Y\allowhyphens}{^{\prime}Y}}
\declare@shorthand{slovak}{''}{%
\textormath{\textquotedblright}{\sp\bgroup\prim@s'}}
}{}
% \end{macrocode}
% and some additional commands:
% \begin{macrocode}
\declare@shorthand{slovak}{"-}{\nobreak\-\bbl@allowhyphens}
\declare@shorthand{slovak}{"|}{%
\textormath{\penalty\@M\discretionary{-}{}{\kern.03em}%
\bbl@allowhyphens}{}}
\declare@shorthand{slovak}{""}{\hskip\z@skip}
\declare@shorthand{slovak}{"~}{\textormath{\leavevmode\hbox{-}}{-}}
\declare@shorthand{slovak}{"=}{\cs@splithyphen}
\fi
% \end{macrocode}
%
% \begin{macro}{\v}
% \LaTeX's normal |\v| accent places a caron over the letter that
% follows it (\v{o}). This is not what we want for the letters d,
% t, l and L; for those the accent should change shape. This is
% acheived by the following.
% \begin{macrocode}
\AtBeginDocument{%
\DeclareTextCompositeCommand{\v}{OT1}{t}{%
t\kern-.23em\raise.24ex\hbox{'}}
\DeclareTextCompositeCommand{\v}{OT1}{d}{%
d\kern-.13em\raise.24ex\hbox{'}}
\DeclareTextCompositeCommand{\v}{OT1}{l}{\lcaron{}}
\DeclareTextCompositeCommand{\v}{OT1}{L}{\Lcaron{}}}
% \end{macrocode}
%
% \begin{macro}{\lcaron}
% \begin{macro}{\Lcaron}
% For the letters \texttt{l} and \texttt{L} we want to disinguish
% between normal fonts and monospaced fonts.
% \begin{macrocode}
\def\lcaron{%
\setbox0\hbox{M}\setbox\tw@\hbox{i}%
\ifdim\wd0>\wd\tw@\relax
l\kern-.13em\raise.24ex\hbox{'}\kern-.11em%
\else
l\raise.45ex\hbox to\z@{\kern-.35em '\hss}%
\fi}
\def\Lcaron{%
\setbox0\hbox{M}\setbox\tw@\hbox{i}%
\ifdim\wd0>\wd\tw@\relax
L\raise.24ex\hbox to\z@{\kern-.28em'\hss}%
\else
L\raise.45ex\hbox to\z@{\kern-.40em '\hss}%
\fi}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% Initialize active quotes. \CS\LaTeX{} provides a way of
% converting English-style quotes into Slovak-style ones. Both
% single and double quotes are affected, i.e. |``text''| is
% converted to something like |,,text``| and |`text'| is converted
% to |,text`|. This conversion can be switched on and off with
% \cs{csprimeson} and \cs{csprimesoff}.\footnote{By the way, the
% names of these macros are misleading, because the handling of
% primes in math mode is rather marginal, the most important thing
% being the handling of quotes\ldots}
%
% These quotes present various troubles, e.g. the kerning is broken,
% apostrophes are converted to closing single quote, some primitives
% are broken (most notably the |\catcode`\|\meta{char} syntax will
% not work any more), and writing them to \file{.aux} files cannot
% be handled correctly. For these reasons, these commands are only
% available in \CS\LaTeX{} compatibility mode.
%
% \begin{macrocode}
\ifx\cs@compat@latex\relax
\let\cs@ltxprim@s\prim@s
\def\csprimeson{%
\catcode``\active \catcode`'\active \let\prim@s\bbl@prim@s}
\def\csprimesoff{%
\catcode``12 \catcode`'12 \let\prim@s\cs@ltxprim@s}
\begingroup\catcode``\active
\def\x{\endgroup
\def`{\futurelet\cs@next\cs@openquote}
\def\cs@openquote{%
\ifx`\cs@next \expandafter\cs@opendq
\else \expandafter\clq
\fi}%
}\x
\begingroup\catcode`'\active
\def\x{\endgroup
\def'{\textormath{\futurelet\cs@next\cs@closequote}
{^\bgroup\prim@s}}
\def\cs@closequote{%
\ifx'\cs@next \expandafter\cs@closedq
\else \expandafter\crq
\fi}%
}\x
\def\cs@opendq{\clqq\let\cs@next= }
\def\cs@closedq{\crqq\let\cs@next= }
% \end{macrocode}
%
% The way I recommend for typesetting quotes in Slovak documents
% is to use shorthands similar to those used in German.
%
% \changes{3.0}{2006/04/21}{|"`| and |"'| changed from German quotes
% to Slovak quotes}
% \begin{macrocode}
\else
\declare@shorthand{slovak}{"`}{\clqq}
\declare@shorthand{slovak}{"'}{\crqq}
\declare@shorthand{slovak}{"<}{\flqq}
\declare@shorthand{slovak}{">}{\frqq}
\fi
% \end{macrocode}
%
% \begin{macro}{\clqq}
% This is the CS opening quote, which is similar to the German
% quote (\cs{glqq}) but the kerning is different.
%
% For the OT1 encoding, the quote is constructed from the right
% double quote (i.e. the ``Opening quotes'' character) by moving
% it down to the baseline and shifting it to the right, or to the
% left if italic correction is positive.
%
% For T1, the ``German Opening quotes'' is used. It is moved to
% the right and the total width is enlarged. This is done in an
% attempt to minimize the difference between the OT1 and T1
% versions.
%
% \changes{3.0}{2006/04/20}{Added \cs{leavevmode} to allow an opening
% quote at the beginning of a paragraph}
% \begin{macrocode}
\ProvideTextCommand{\clqq}{OT1}{%
\set@low@box{\textquotedblright}%
\setbox\@ne=\hbox{l\/}\dimen\@ne=\wd\@ne
\setbox\@ne=\hbox{l}\advance\dimen\@ne-\wd\@ne
\leavevmode
\ifdim\dimen\@ne>\z@\kern-.1em\box\z@\kern.1em
\else\kern.1em\box\z@\kern-.1em\fi\allowhyphens}
\ProvideTextCommand{\clqq}{T1}
{\kern.1em\quotedblbase\kern-.0158em\relax}
\ProvideTextCommandDefault{\clqq}{\UseTextSymbol{OT1}\clqq}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\crqq}
% For OT1, the CS closing quote is basically the same as
% \cs{grqq}, only the \cs{textormath} macro is not used, because
% as far as I know, \cs{grqq} does not work in math mode anyway.
%
% For T1, the character is slightly wider and shifted to the
% right to match its OT1 counterpart.
%
% \begin{macrocode}
\ProvideTextCommand{\crqq}{OT1}
{\save@sf@q{\nobreak\kern-.07em\textquotedblleft\kern.07em}}
\ProvideTextCommand{\crqq}{T1}
{\save@sf@q{\nobreak\kern.06em\textquotedblleft\kern.024em}}
\ProvideTextCommandDefault{\crqq}{\UseTextSymbol{OT1}\crqq}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\clq}
% \begin{macro}{\crq}
%
% Single CS quotes are similar to double quotes (see the
% discussion above).
%
% \begin{macrocode}
\ProvideTextCommand{\clq}{OT1}
{\set@low@box{\textquoteright}\box\z@\kern.04em\allowhyphens}
\ProvideTextCommand{\clq}{T1}
{\quotesinglbase\kern-.0428em\relax}
\ProvideTextCommandDefault{\clq}{\UseTextSymbol{OT1}\clq}
\ProvideTextCommand{\crq}{OT1}
{\save@sf@q{\nobreak\textquoteleft\kern.17em}}
\ProvideTextCommand{\crq}{T1}
{\save@sf@q{\nobreak\textquoteleft\kern.17em}}
\ProvideTextCommandDefault{\crq}{\UseTextSymbol{OT1}\crq}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\uv}
% There are two versions of \cs{uv}. The older one opens a group
% and uses \cs{aftergroup} to typeset the closing quotes. This
% version allows using \cs{verb} inside the quotes, because the
% enclosed text is not passed as an argument, but unfortunately
% it breaks any kerning with the quotes. Although the kerning
% with the opening quote could be fixed, the kerning with the
% closing quote cannot.
%
% The newer version is defined as a command with one parameter.
% It preserves kerning but since the quoted text is passed as an
% argument, it cannot contain \cs{verb}.
%
% Decide which version of \cs{uv} should be used. For sake
% of compatibility, we use the older version with plain \TeX{}
% and the newer version with \LaTeXe.
% \begin{macrocode}
\ifx\cs@compat@plain\@undefined\else\let\cs@olduv=\relax\fi
\ifx\cs@olduv\@undefined
\DeclareRobustCommand\uv[1]{{\leavevmode\clqq#1\crqq}}
\else
\DeclareRobustCommand\uv{\bgroup\aftergroup\closequotes
\leavevmode\clqq\let\cs@next=}
\def\closequotes{\unskip\crqq\relax}
\fi
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cs@wordlen}
% Declare a counter to hold the length of the word after the
% hyphen.
%
% \begin{macrocode}
\newcount\cs@wordlen
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cs@hyphen}
% \begin{macro}{\cs@endash}
% \begin{macro}{\cs@emdash}
% Store the original hyphen in a macro. Ditto for the ligatures.
%
% \changes{slovak-3.1}{2006/10/07}{ensure correct catcode for the
% saved hyphen}
% \begin{macrocode}
\begingroup\catcode`\-12
\def\x{\endgroup
\def\cs@hyphen{-}
\def\cs@endash{--}
\def\cs@emdash{---}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\cs@boxhyphen}
% Provide a non-breakable hyphen to be used when a compound word
% is too short to be split, i.e. the second part is shorter than
% \cs{righthyphenmin}.
%
% \begin{macrocode}
\def\cs@boxhyphen{\hbox{-}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cs@splithyphen}
% The macro \cs{cs@splithyphen} inserts a split hyphen, while
% allowing both parts of the compound word to be hyphenated at
% other places too.
%
% \begin{macrocode}
\def\cs@splithyphen{\kern\z@
\discretionary{-}{\char\hyphenchar\the\font}{-}\nobreak\hskip\z@}
}\x
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{-}
% To minimize the effects of activating the hyphen character,
% the active definition expands to the non-active character
% in all cases where hyphenation cannot occur, i.e. if not
% typesetting (check \cs{protect}), not in horizontal mode,
% or in inner horizontal mode.
%
% \begin{macrocode}
\initiate@active@char{-}
\declare@shorthand{slovak}{-}{%
\ifx\protect\@typeset@protect
\ifhmode
\ifinner
\bbl@afterelse\bbl@afterelse\bbl@afterelse\cs@hyphen
\else
\bbl@afterfi\bbl@afterelse\bbl@afterelse\cs@firsthyphen
\fi
\else
\bbl@afterfi\bbl@afterelse\cs@hyphen
\fi
\else
\bbl@afterfi\cs@hyphen
\fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cs@firsthyphen}
% \begin{macro}{\cs@firsthyph@n}
% \begin{macro}{\cs@secondhyphen}
% \begin{macro}{\cs@secondhyph@n}
% If we encounter a hyphen, check whether it is followed
% by a second or a third hyphen and if so, insert the
% corresponding ligature.
%
% If we don't find a hyphen, the token found will be placed
% in \cs{cs@token} for further analysis, and it will also stay
% in the input.
%
% \begin{macrocode}
\begingroup\catcode`\-\active
\def\x{\endgroup
\def\cs@firsthyphen{\futurelet\cs@token\cs@firsthyph@n}
\def\cs@firsthyph@n{%
\ifx -\cs@token
\bbl@afterelse\cs@secondhyphen
\else
\bbl@afterfi\cs@checkhyphen
\fi}
\def\cs@secondhyphen ##1{%
\futurelet\cs@token\cs@secondhyph@n}
\def\cs@secondhyph@n{%
\ifx -\cs@token
\bbl@afterelse\cs@emdash\@gobble
\else
\bbl@afterfi\cs@endash
\fi}
}\x
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\cs@checkhyphen}
% Check that hyphenation is enabled, and if so, start analyzing
% the rest of the word, i.e. initialize \cs{cs@word} and \cs{cs@wordlen}
% and start processing input with \cs{cs@scanword}.
%
% \begin{macrocode}
\def\cs@checkhyphen{%
\ifnum\expandafter\hyphenchar\the\font=`\-
\def\cs@word{}\cs@wordlen\z@
\bbl@afterelse\cs@scanword
\else
\cs@hyphen
\fi}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cs@scanword}
% \begin{macro}{\cs@continuescan}
% \begin{macro}{\cs@gettoken}
% \begin{macro}{\cs@gett@ken}
% Each token is first analyzed with \cs{cs@scanword}, which expands
% the token and passes the first token of the result to
% \cs{cs@gett@ken}. If the expanded token is not identical to the
% unexpanded one, presume that it might be expanded further and
% pass it back to \cs{cs@scanword} until you get an unexpandable
% token. Then analyze it in \cs{cs@examinetoken}.
%
% The \cs{cs@continuescan} macro does the same thing as
% \cs{cs@scanword}, but it does not require the first token to be
% in \cs{cs@token} already.
%
% \begin{macrocode}
\def\cs@scanword{\let\cs@lasttoken= \cs@token\expandafter\cs@gettoken}
\def\cs@continuescan{\let\cs@lasttoken\@undefined\expandafter\cs@gettoken}
\def\cs@gettoken{\futurelet\cs@token\cs@gett@ken}
\def\cs@gett@ken{%
\ifx\cs@token\cs@lasttoken \def\cs@next{\cs@examinetoken}%
\else \def\cs@next{\cs@scanword}%
\fi \cs@next}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{cs@examinetoken}
% Examine the token in \cs{cs@token}:
%
% \begin{itemize}
% \item
% If it is a letter (catcode 11) or other (catcode 12), add it
% to \cs{cs@word} with \cs{cs@addparam}.
%
% \item
% If it is the \cs{char} primitive, add it with \cs{cs@expandchar}.
%
% \item
% If the token starts or ends a group, ignore it with
% \cs{cs@ignoretoken}.
%
% \item
% Otherwise analyze the meaning of the token with
% \cs{cs@checkchardef} to detect primitives defined with
% \cs{chardef}.
%
% \end{itemize}
%
% \begin{macrocode}
\def\cs@examinetoken{%
\ifcat A\cs@token
\def\cs@next{\cs@addparam}%
\else\ifcat 0\cs@token
\def\cs@next{\cs@addparam}%
\else\ifx\char\cs@token
\def\cs@next{\afterassignment\cs@expandchar\let\cs@token= }%
\else\ifx\bgroup\cs@token
\def\cs@next{\cs@ignoretoken\bgroup}%
\else\ifx\egroup\cs@token
\def\cs@next{\cs@ignoretoken\egroup}%
\else\ifx\begingroup\cs@token
\def\cs@next{\cs@ignoretoken\begingroup}%
\else\ifx\endgroup\cs@token
\def\cs@next{\cs@ignoretoken\endgroup}%
\else
\def\cs@next{\expandafter\expandafter\expandafter\cs@checkchardef
\expandafter\meaning\expandafter\cs@token\string\char\end}%
\fi\fi\fi\fi\fi\fi\fi\cs@next}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cs@checkchardef}
% Check the meaning of a token and if it is a primitive defined
% with \cs{chardef}, pass it to \cs{\cs@examinechar} as if it were
% a \cs{char} sequence. Otherwise, there are no more word characters,
% so do the final actions in \cs{cs@nosplit}.
%
% \begin{macrocode}
\expandafter\def\expandafter\cs@checkchardef
\expandafter#\expandafter1\string\char#2\end{%
\def\cs@token{#1}%
\ifx\cs@token\@empty
\def\cs@next{\afterassignment\cs@examinechar\let\cs@token= }%
\else
\def\cs@next{\cs@nosplit}%
\fi \cs@next}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cs@ignoretoken}
% Add a token to \cs{cs@word} but do not update the \cs{cs@wordlen}
% counter. This is mainly useful for group starting and ending
% primitives, which need to be preserved, but do not affect the word
% boundary.
%
% \begin{macrocode}
\def\cs@ignoretoken#1{%
\edef\cs@word{\cs@word#1}%
\afterassignment\cs@continuescan\let\cs@token= }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{cs@addparam}
% Add a token to \cs{cs@word} and check its lccode. Note that
% this macro can only be used for tokens which can be passed as
% a parameter.
%
% \begin{macrocode}
\def\cs@addparam#1{%
\edef\cs@word{\cs@word#1}%
\cs@checkcode{\lccode`#1}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cs@expandchar}
% \begin{macro}{\cs@examinechar}
% Add a \cs{char} sequence to \cs{cs@word} and check its lccode.
% The charcode is first parsed in \cs{cs@expandchar} and then the
% resulting \cs{chardef}-defined sequence is analyzed in
% \cs{cs@examinechar}.
%
% \begin{macrocode}
\def\cs@expandchar{\afterassignment\cs@examinechar\chardef\cs@token=}
\def\cs@examinechar{%
\edef\cs@word{\cs@word\char\the\cs@token\space}%
\cs@checkcode{\lccode\cs@token}}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\cs@checkcode}
% Check the lccode of a character. If it is zero, it does not count
% to the current word, so finish it with \cs{cs@nosplit}. Otherwise
% update the \cs{cs@wordlen} counter and go on scanning the word
% with \cs{cs@continuescan}. When enough characters are gathered in
% \cs{cs@word} to allow word break, insert the split hyphen and
% finish.
%
% \begin{macrocode}
\def\cs@checkcode#1{%
\ifnum0=#1
\def\cs@next{\cs@nosplit}%
\else
\advance\cs@wordlen\@ne
\ifnum\righthyphenmin>\the\cs@wordlen
\def\cs@next{\cs@continuescan}%
\else
\cs@splithyphen
\def\cs@next{\cs@word}%
\fi
\fi \cs@next}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cs@nosplit}
% Insert a non-breakable hyphen followed by the saved word.
%
% \begin{macrocode}
\def\cs@nosplit{\cs@boxhyphen\cs@word}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cs@hyphen}
% The \cs{minus} sequence can be used where the active hyphen
% does not work, e.g. in arguments to \TeX{} primitives in outer
% horizontal mode.
%
% \begin{macrocode}
\let\minus\cs@hyphen
% \end{macrocode}
% \end{macro}
% \begin{macro}{\standardhyphens}
% \begin{macro}{\splithyphens}
% These macros control whether split hyphens are allowed in Czech
% and/or Slovak texts. You may use them in any language, but the
% split hyphen is only activated for Czech and Slovak.
%
% \changes{slovak-3.1}{2006/10/07}{activate with split hyphens and
% deactivate with standard hyphens, not vice versa}
% \begin{macrocode}
\def\standardhyphens{\cs@splithyphensfalse\cs@deactivatehyphens}
\def\splithyphens{\cs@splithyphenstrue\cs@activatehyphens}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\cs@splitattr}
% Now we declare the |split| language attribute. This is
% similar to the |split| package option of cslatex, but it
% only affects Slovak, not Czech.
%
% \changes{slovak-3.1}{2006/10/07}{attribute added}
% \begin{macrocode}
\def\cs@splitattr{\babel@save\ifcs@splithyphens\splithyphens}
\bbl@declare@ttribute{slovak}{split}{%
\addto\extrasslovak{\cs@splitattr}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\cs@activatehyphens}
% \begin{macro}{\cs@deactivatehyphens}
% These macros are defined as \cs{relax} by default to prevent
% activating/deactivating the hyphen character. They are redefined
% when the language is switched to Czech/Slovak. At that moment
% the hyphen is also activated if split hyphens were requested with
% \cs{splithyphens}.
%
% When the language is de-activated, de-activate the hyphen and
% restore the bogus definitions of these macros.
%
% \begin{macrocode}
\let\cs@activatehyphens\relax
\let\cs@deactivatehyphens\relax
\expandafter\addto\csname extras\CurrentOption\endcsname{%
\def\cs@activatehyphens{\bbl@activate{-}}%
\def\cs@deactivatehyphens{\bbl@deactivate{-}}%
\ifcs@splithyphens\cs@activatehyphens\fi}
\expandafter\addto\csname noextras\CurrentOption\endcsname{%
\cs@deactivatehyphens
\let\cs@activatehyphens\relax
\let\cs@deactivatehyphens\relax}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\cs@looseness}
% \begin{macro}{\looseness}
% One of the most common situations where an active hyphen will not
% work properly is the \cs{looseness} primitive. Change its definition
% so that it deactivates the hyphen if needed.
%
% \begin{macrocode}
\let\cs@looseness\looseness
\def\looseness{%
\ifcs@splithyphens
\cs@deactivatehyphens\afterassignment\cs@activatehyphens \fi
\cs@looseness}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\cs@selectlanguage}
% \begin{macro}{\cs@main@language}
% Specifying the |nocaptions| option means that captions and dates
% are not redefined by default, but they can be switched on later
% with \cs{captionsslovak} and/or \cs{dateslovak}.
%
% We mimic this behavior by redefining \cs{selectlanguage}. This
% macro is called once at the beginning of the document to set the
% main language of the document. If this is \cs{cs@main@language},
% it disables the macros for setting captions and date. In any
% case, it restores the original definition of \cs{selectlanguage}
% and expands it.
%
% The definition of \cs{selectlanguage} can be shared between Czech
% and Slovak; the actual language is stored in \cs{cs@main@language}.
%
% \begin{macrocode}
\ifx\cs@nocaptions\@undefined\else
\edef\cs@main@language{\CurrentOption}
\ifx\cs@origselect\@undefined
\let\cs@origselect=\selectlanguage
\def\selectlanguage{%
\let\selectlanguage\cs@origselect
\ifx\bbl@main@language\cs@main@language
\expandafter\cs@selectlanguage
\else
\expandafter\selectlanguage
\fi}
\def\cs@selectlanguage{%
\cs@tempdisable{captions}%
\cs@tempdisable{date}%
\selectlanguage}
% \end{macrocode}
%
% \begin{macro}{\cs@tempdisable}
% \cs{cs@tempdisable} disables a language setup macro temporarily,
% i.e. the macro with the name of \meta{\#1}|\bbl@main@language|
% just restores the original definition and purges the saved macro
% from memory.
%
% \begin{macrocode}
\def\cs@tempdisable#1{%
\def\@tempa{cs@#1}%
\def\@tempb{#1\bbl@main@language}%
\expandafter\expandafter\expandafter\let
\expandafter \csname\expandafter \@tempa \expandafter\endcsname
\csname \@tempb \endcsname
\expandafter\edef\csname \@tempb \endcsname{%
\let \expandafter\noexpand \csname \@tempb \endcsname
\expandafter\noexpand \csname \@tempa \endcsname
\let \expandafter\noexpand\csname \@tempa \endcsname
\noexpand\@undefined}}
% \end{macrocode}
% \end{macro}
%
% These macros are not needed, once the initialization is over.
%
% \begin{macrocode}
\@onlypreamble\cs@main@language
\@onlypreamble\cs@origselect
\@onlypreamble\cs@selectlanguage
\@onlypreamble\cs@tempdisable
\fi
\fi
% \end{macrocode}
% \end{macro}
% \end{macro}
%
% The encoding of mathematical fonts should be changed to IL2. This
% allows to use accented letter in some font families. Besides,
% documents do not use CM fonts if there are equivalents in CS-fonts,
% so there is no need to have both bitmaps of CM-font and CS-font.
%
% \cs{@font@warning} and \cs{@font@info} are temporarily redefined
% to avoid annoying font warnings.
%
% \begin{macrocode}
\ifx\cs@compat@plain\@undefined
\ifx\cs@check@enc\@undefined\else
\def\cs@check@enc{
\ifx\encodingdefault\cs@iltw@
\let\cs@warn\@font@warning \let\@font@warning\@gobble
\let\cs@info\@font@info \let\@font@info\@gobble
\SetSymbolFont{operators}{normal}{\cs@iltw@}{cmr}{m}{n}
\SetSymbolFont{operators}{bold}{\cs@iltw@}{cmr}{bx}{n}
\SetMathAlphabet\mathbf{normal}{\cs@iltw@}{cmr}{bx}{n}
\SetMathAlphabet\mathit{normal}{\cs@iltw@}{cmr}{m}{it}
\SetMathAlphabet\mathrm{normal}{\cs@iltw@}{cmr}{m}{n}
\SetMathAlphabet\mathsf{normal}{\cs@iltw@}{cmss}{m}{n}
\SetMathAlphabet\mathtt{normal}{\cs@iltw@}{cmtt}{m}{n}
\SetMathAlphabet\mathbf{bold}{\cs@iltw@}{cmr}{bx}{n}
\SetMathAlphabet\mathit{bold}{\cs@iltw@}{cmr}{bx}{it}
\SetMathAlphabet\mathrm{bold}{\cs@iltw@}{cmr}{bx}{n}
\SetMathAlphabet\mathsf{bold}{\cs@iltw@}{cmss}{bx}{n}
\SetMathAlphabet\mathtt{bold}{\cs@iltw@}{cmtt}{m}{n}
\let\@font@warning\cs@warn \let\cs@warn\@undefined
\let\@font@info\cs@info \let\cs@info\@undefined
\fi
\let\cs@check@enc\@undefined}
\AtBeginDocument{\cs@check@enc}
\fi
\fi
% \end{macrocode}
%
% \begin{macro}{cs@undoiltw@}
%
% The thing is that \LaTeXe{} core only supports the T1 encoding
% and does not bother changing the uc/lc/sfcodes when encoding
% is switched. :( However, the IL2 encoding \emph{does} change
% these codes, so if encoding is switched back from IL2, we must
% also undo the effect of this change to be compatible with
% \LaTeXe. OK, this is not the right\textsuperscript{TM} solution
% but it works. Cheers to Petr Ol\v s\'ak.
%
% \begin{macrocode}
\def\cs@undoiltw@{%
\uccode158=208 \lccode158=158 \sfcode158=1000
\sfcode159=1000
\uccode165=133 \lccode165=165 \sfcode165=1000
\uccode169=137 \lccode169=169 \sfcode169=1000
\uccode171=139 \lccode171=171 \sfcode171=1000
\uccode174=142 \lccode174=174 \sfcode174=1000
\uccode181=149
\uccode185=153
\uccode187=155
\uccode190=0 \lccode190=0
\uccode254=222 \lccode254=254 \sfcode254=1000
\uccode255=223 \lccode255=255 \sfcode255=1000}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{@@enc@update}
%
% Redefine the \LaTeXe{} internal function \cs{@@enc@update} to
% change the encodings correctly.
%
% \begin{macrocode}
\ifx\cs@enc@update\@undefined
\ifx\@@enc@update\@undefined\else
\let\cs@enc@update\@@enc@update
\def\@@enc@update{\ifx\cf@encoding\cs@iltw@\cs@undoiltw@\fi
\cs@enc@update
\expandafter\ifnum\csname l@\languagename\endcsname=\the\language
\expandafter\ifx
\csname l@\languagename:\f@encoding\endcsname\relax
\else
\expandafter\expandafter\expandafter\let
\expandafter\csname
\expandafter l\expandafter @\expandafter\languagename
\expandafter\endcsname\csname l@\languagename:\f@encoding\endcsname
\fi
\language=\csname l@\languagename\endcsname\relax
\fi}
\fi\fi
% \end{macrocode}
% \end{macro}
%
% The macro |\ldf@finish| takes care of looking for a
% configuration file, setting the main language to be switched on
% at |\begin{document}| and resetting the category code of
% \texttt{@} to its original value.
% \changes{slovak-1.2i}{1996/11/03}{Now use \cs{ldf@finish} to wrap up}
% \begin{macrocode}
\ldf@finish\CurrentOption
%</code>
% \end{macrocode}
%
% \Finale
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
\endinput
|