1
2
3
4
5
6
7
8
9
10
11
12
13
14\writestatus { loading }{ ConTeXt Core Macros Conversion }
15
16\registerctxluafile { core con }{}
17
18
19
20\unprotect
21
22\ifdefined \currentlanguage \else \let \currentlanguage \empty \fi
23\ifdefined \labeltext \else \let \labeltext \firstofoneargument \fi
24
25
26
27
28
29\let \spr \firstofoneargument
30\let \stp \firstofoneargument
31
32
33
34\unexpanded \def \isolateseparators
35 { \def \spr ## 1 {{ ## 1 }}
36 \def \stp ## 1 {{ ## 1 }}}
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57\def \numbers # 1 { \purenumber { # 1 }}
58\def \Numbers # 1 { \purenumber { # 1 }}
59
60
61
62
63
64
65
66
67
68
69
70\def \romannumerals # 1 { \clf_romannumerals \numexpr # 1 \relax }
71\def \Romannumerals # 1 { \clf_Romannumerals \numexpr # 1 \relax }
72
73
74
75\def \abjadnumerals # 1 { \clf_abjadnumerals \numexpr # 1 \relax }
76\def \abjadnodotnumerals # 1 { \clf_abjadnodotnumerals \numexpr # 1 \relax }
77\def \abjadnaivenumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { arabic }}
78
79\def \hebrewnumerals # 1 { \clf_hebrewnumerals \numexpr # 1 \relax }
80\let \yiddishnumerals \hebrewnumerals
81
82\def \languagecharacters # 1 { \clf_alphabetic \numexpr # 1 \relax { \currentlanguage }}
83\def \languageCharacters # 1 { \clf_Alphabetic \numexpr # 1 \relax { \currentlanguage }}
84
85\def \alphabeticnumerals # 1 { \clf_alphabetic \numexpr # 1 \relax {}}
86\def \Alphabeticnumerals # 1 { \clf_Alphabetic \numexpr # 1 \relax {}}
87
88\def \thainumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { thai }}
89\def \devanagarinumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { devanagari }}
90\def \gurmurkhinumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { gurmurkhi }}
91\def \gujaratinumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { gujarati }}
92\def \tibetannumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { tibetan }}
93\def \greeknumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { greek }}
94\def \Greeknumerals # 1 { \clf_Alphabetic \numexpr # 1 \relax { greek }}
95\def \arabicnumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { arabic }}
96\def \persiannumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { persian }}
97\def \arabicdecimals # 1 { \clf_decimals \numexpr # 1 \relax { arabic }}
98\def \persiandecimals # 1 { \clf_decimals \numexpr # 1 \relax { persian }}
99
100\let \arabicexnumerals \persiannumerals
101
102\def \koreannumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { korean }}
103\def \koreannumeralsp # 1 { \clf_alphabetic \numexpr # 1 \relax { korean parenthesis }}
104\def \koreannumeralsc # 1 { \clf_alphabetic \numexpr # 1 \relax { korean circle }}
105
106\let \koreanparentnumerals \koreannumeralsp
107\let \koreanparenthesisnumerals \koreannumeralsp
108\let \koreancirclenumerals \koreannumeralsc
109
110\def \chinesenumerals # 1 { \clf_chinesenumerals \numexpr # 1 \relax { normal }}
111\def \chinesecapnumerals # 1 { \clf_chinesenumerals \numexpr # 1 \relax { cap }}
112\def \chineseallnumerals # 1 { \clf_chinesenumerals \numexpr # 1 \relax { all }}
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130\def \unknowncharacter { }
131
132\def \character # 1 { \clf_character \numexpr # 1 \relax }
133\def \Character # 1 { \clf_Character \numexpr # 1 \relax }
134
135
136
137
138
139
140
141
142
143
144\def \characters # 1 { \clf_characters \numexpr # 1 \relax }
145\def \Characters # 1 { \clf_Characters \numexpr # 1 \relax }
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160\unexpanded \def \oldstylenumerals # 1
161 { \begingroup
162 \os \number # 1
163 \endgroup }
164
165\unexpanded \def \oldstyleromannumerals # 1
166 { \dontleavehmode
167 \hbox \bgroup
168 \ss \txx
169 \setbox \scratchbox \hbox \s!spread . 1 5 \emwidth { \hss \uppercased { \romannumerals { # 1 }} \hss }
170 \scratchwidth \wd \scratchbox
171 \scratchheight \ht \scratchbox
172 \scratchdimen . 1 \exheight
173 \vrule \s!width \scratchwidth \s!height \dimexpr \scratchheight \scratchdimen \relax \s!depth \dimexpr \scratchheight \scratchdimen \relax
174 \hskip \scratchwidth
175 \vrule \s!width \scratchwidth \s!height \scratchdimen \s!depth \scratchdimen
176 \hskip \scratchwidth
177 \box \scratchbox
178 \egroup }
179
180
181
182
183
184
185
186\unexpanded \def \protectconversion
187 { \let \doconvertcharacters \firstofoneargument }
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\unexpanded \def \monthlong # 1 { \clf_monthname \numexpr # 1 \relax }
215\unexpanded \def \monthshort # 1 { \clf_monthmnem \numexpr # 1 \relax }
216\unexpanded \def \daylong # 1 { \clf_dayname \numexpr # 1 \relax }
217\unexpanded \def \dayshort # 1 { \clf_daymnem \numexpr # 1 \relax }
218
219\let \convertmonth\monthlong
220
221
222
223
224
225
226\let\month \monthlong
227
228\unexpanded \def \MONTH # 1 { \WORD { \clf_monthname \numexpr # 1 \relax }}
229\unexpanded \def \MONTHLONG # 1 { \WORD { \clf_monthname \numexpr # 1 \relax }}
230\unexpanded \def \MONTHSHORT # 1 { \WORD { \clf_monthmnem \numexpr # 1 \relax }}
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250\unexpanded \def \weekday # 1 { \clf_dayname \numexpr # 1 \relax }
251\unexpanded \def \WEEKDAY # 1 { \WORD { \clf_dayname \numexpr # 1 \relax }}
252\unexpanded \def \DAYLONG # 1 { \WORD { \clf_dayname \numexpr # 1 \relax }}
253\unexpanded \def \DAYSHORT # 1 { \WORD { \clf_daymnem \numexpr # 1 \relax }}
254
255
256
257
258\newcount \normalweekday
259
260 \def \dayoftheweek # 1 # 2 # 3 { \clf_weekdayname \numexpr # 1 \relax\numexpr # 2 \relax\numexpr # 3 \relax }
261\unexpanded \def \getdayoftheweek # 1 # 2 # 3 { \normalweekday \clf_weekday \numexpr # 1 \relax\numexpr # 2 \relax\numexpr # 3 \relax\relax }
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\def \doifelseleapyear # 1
307 { \clf_doifelseleapyear \numexpr # 1 \relax }
308
309\let \doifleapyearelse\doifelseleapyear
310
311\unexpanded \def \getdayspermonth # 1 # 2
312 { \edef \numberofdays { \clf_nofdays \numexpr # 1 \relax\numexpr # 2 \relax }}
313
314\def \dayspermonth # 1 # 2
315 { \clf_nofdays \numexpr # 1 \relax\numexpr # 2 \relax }
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\installcorenamespace { date }
426
427\unexpanded \def \definedate
428 { \dodoubleargument \syst_converters_define_date }
429
430\def \syst_converters_define_date [# 1 ][# 2 ]
431 { \setvalue { \??date # 1 }{ # 2 }}
432
433\def \syst_converters_check_date_specification # 1
434 { \ifcsname \??date # 1 \endcsname
435 \edef # 1 { \lastnamedcs }
436 \fi }
437
438\newtoks \everycurrentdate
439
440\unexpanded \def \currentdate
441 { \dosingleempty \syst_converters_current_date }
442
443\def \syst_converters_current_date [# 1 ]
444 { \dontleavehmode
445 \begingroup
446 \the \everycurrentdate
447 \edef \forceddatespecification { # 1 }
448 \syst_converters_check_date_specification \forceddatespecification
449 \syst_converters_check_date_specification \currentdatespecification
450 \clf_currentdate
451 { \forceddatespecification }{ \currentdatespecification }{ \labellanguage }
452 \normalyear\normalmonth\normalday
453 \endgroup }
454
455\unexpanded \def \date
456 { \dodoubleempty \syst_converters_date }
457
458\def \syst_converters_date [# 1 ][# 2 ]
459 { \dontleavehmode
460 \iffirstargument
461 \begingroup
462 \letdummyparameter \c!d \normalday
463 \letdummyparameter \c!m \normalmonth
464 \letdummyparameter \c!y \normalyear
465 \getdummyparameters [# 1 ]
466 \normalexpanded
467 { \endgroup
468 \normalday \number \directdummyparameter \c!d \relax
469 \normalmonth\number \directdummyparameter \c!m \relax
470 \normalyear \number \directdummyparameter \c!y \relax }
471 \fi
472 \begingroup
473 \the \everycurrentdate
474 \edef \forceddatespecification { # 2 }
475 \syst_converters_check_date_specification \forceddatespecification
476 \syst_converters_check_date_specification \currentdatespecification
477 \clf_currentdate
478 { \forceddatespecification }{ \currentdatespecification }{ \labellanguage }
479 \normalyear\normalmonth\normalday
480 \endgroup }
481
482\def \rawdate [# 1 ]
483 { \clf_currentdate
484 { # 1 }{ \currentdatespecification }{}
485 \normalyear\normalmonth\normalday }
486
487
488
489
490
491
492
493\unexpanded \def \calculatecurrenttime
494 { \edef \currenthour { \clf_hour }
495 \edef \currentminute { \clf_minute }
496 \edef \currentsecond { \clf_second }}
497
498\let \currenthour \!!plusone
499\let \currentminute \!!plusone
500\let \currentsecond \!!plusone
501
502
503
504\unexpanded \def \currenttime
505 { \doifelsenextoptional \syst_converters_current_time_yes \syst_converters_current_time_nop }
506
507\unexpanded \def \syst_converters_current_time_yes [# 1 ]
508 { \calculatecurrenttime
509 \processallactionsinset [# 1 ][ h => \currenthour , m => \currentminute , \s!unknown => \commalistelement ] }
510
511\unexpanded \def \syst_converters_current_time_nop
512 { \normalexpanded { \syst_converters_current_time_yes [ \currenttimespecification ] }}
513
514
515
516
517
518
519
520
521
522
523
524\unexpanded \def \processmonth # 1 # 2 # 3
525 { \begingroup
526 \getdayspermonth { # 1 }{ # 2 }
527 \dostepwiserecurse \plusone \numberofdays \plusone
528 { \normalyear # 1 \relax
529 \normalmonth # 2 \relax
530 \normalday \recurselevel \relax
531 # 3 }
532 \endgroup }
533
534\def \lastmonth { 1 2 }
535
536\unexpanded \def \processyear # 1 # 2 # 3 # 4
537 { \begingroup
538 \dorecurse \lastmonth
539 { \normalyear # 1 \relax
540 \normalmonth \recurselevel \relax
541 # 3 \processmonth \normalyear\normalmonth { # 2 } # 4 }
542 \endgroup }
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566\installcorenamespace { conversion }
567\installcorenamespace { conversionarguments }
568\installcorenamespace { conversionwords }
569
570
571
572
573
574
575
576
577\unexpanded \def \defineconversion
578 { \dotripleempty \syst_converters_define_conversion }
579
580\def \syst_converters_define_conversion [# 1 ][# 2 ][# 3 ]
581 { \ifthirdargument
582 \syst_converters_define_conversion_indeed { # 1 # 2 }{ # 1 : # 2 }{ # 3 }
583 \else
584 \syst_converters_define_conversion_indeed { # 1 }{ # 1 }{ # 2 }
585 \fi }
586
587\def \syst_converters_define_conversion_indeed # 1 # 2 # 3
588 { \doifelseinstring { , }{ \detokenize { # 3 }}
589 { \clf_defineconversion { # 2 }{ \detokenize { # 3 }}
590 \setgvalue { \??conversion # 1 }{ \syst_converters_checked_conversion { # 2 }}}
591 { \setgvalue { \??conversion # 1 }{ # 3 }}}
592
593\def \syst_converters_checked_conversion # 1 # 2
594 { \clf_checkedconversion { # 1 } \numexpr # 2 \relax }
595
596
597
598
599
600\def \convertnumber # 1 # 2
601 { \csname \??conversionarguments
602 \ifcsname \??conversion \currentlanguage # 1 \endcsname 1 \else
603 \ifcsname \??conversion # 1 \endcsname 2 \else
604 3 \fi\fi
605 \endcsname { # 1 }{ \number # 2 }}
606
607\unexpanded \def \uconvertnumber
608 { \convertnumber }
609
610\setvalue { \??conversionarguments 1 } # 1 { \csname \??conversion \currentlanguage # 1 \endcsname }
611\setvalue { \??conversionarguments 2 } # 1 { \csname \??conversion # 1 \endcsname }
612\letvalue { \??conversionarguments 3 } \syst_converters_checked_conversion
613
614
615
616
617
618\def \doifelseconversiondefined # 1
619 { \ifcsname \??conversion \currentlanguage # 1 \endcsname
620 \expandafter \firstoftwoarguments
621 \else\ifcsname \??conversion # 1 \endcsname
622 \doubleexpandafter\firstoftwoarguments
623 \else
624 \doubleexpandafter\secondoftwoarguments
625 \fi\fi }
626
627\def \doifelseconversionnumber # 1 # 2
628 { \ifnum # 2 > \numexpr \clf_nofconversions { # 1 } \relax
629 \expandafter \secondoftwoarguments
630 \else
631 \expandafter \firstoftwoarguments
632 \fi }
633
634\let \doifconversiondefinedelse\doifelseconversiondefined
635\let \doifconversionnumberelse \doifelseconversionnumber
636
637
638
639\setvalue { \??conversionwords\v!one }{ 1 }
640\setvalue { \??conversionwords\v!two }{ 2 }
641\setvalue { \??conversionwords\v!three }{ 3 }
642\setvalue { \??conversionwords\v!four }{ 4 }
643\setvalue { \??conversionwords\v!five }{ 5 }
644
645
646\def \wordtonumber # 1 # 2 { \ifcsname \??conversionwords # 1 \endcsname\lastnamedcs\else # 2 \fi }
647
648
649
650
651
652
653
654
655
656
657
658\def \highordinalstr # 1 { \high { \notsmallcapped { # 1 }}}
659\def \ordinalstr # 1 { \notsmallcapped { # 1 }}
660\def \ordinalnumber # 1 { \clf_ordinal \numexpr # 1 \relax { \currentlanguage }}
661\def \Ordinalnumber # 1 { \Words { \clf_ordinal \numexpr # 1 \relax { \currentlanguage }}}
662
663\def \verbosenumber # 1 { \clf_verbose \numexpr # 1 \relax { \currentlanguage }}
664\def \VerboseNumber # 1 { \Words { \clf_verbose \numexpr # 1 \relax { \currentlanguage }}}
665
666
667
668
669
670
671\def \smallcappedromannumerals # 1 { \smallcapped { \romannumerals { # 1 }}}
672\def \smallcappedcharacters # 1 { \smallcapped { \characters { # 1 }}}
673
674\defineconversion [] [ \numbers ]
675\defineconversion [ \v!empty ] [ \gobbleoneargument ]
676\defineconversion [ \v!none ] [ \numbers ]
677\defineconversion [ \s!default ] [ \numbers ]
678
679\defineconversion [ month ] [ \monthlong ]
680\defineconversion [ month : mnem ] [ \monthshort ]
681
682\defineconversion [ \v!character ] [ \character ]
683\defineconversion [ \v!Character ] [ \Character ]
684
685\defineconversion [ \v!characters ] [ \characters ]
686\defineconversion [ \v!Characters ] [ \Characters ]
687
688\defineconversion [ a ] [ \alphabeticnumerals ]
689\defineconversion [ A ] [ \Alphabeticnumerals ]
690\defineconversion [ AK ] [ \smallcappedcharacters ]
691\defineconversion [ KA ] [ \smallcappedcharacters ]
692
693\defineconversion [ \v!alphabetic ] [ \alphabeticnumerals ]
694\defineconversion [ \v!Alphabetic ] [ \Alphabeticnumerals ]
695
696\defineconversion [ \v!number ] [ \numbers ]
697\defineconversion [ \v!numbers ] [ \numbers ]
698\defineconversion [ \v!Numbers ] [ \Numbers ]
699\defineconversion [ \v!mediaeval ] [ \mediaeval ]
700
701\defineconversion [ \v!word ] [ \verbosenumber ]
702\defineconversion [ \v!words ] [ \verbosenumber ]
703
704\defineconversion [ \v!Word ] [ \VerboseNumber ]
705\defineconversion [ \v!Words ] [ \VerboseNumber ]
706
707\defineconversion [ \v!ordinal ] [ \ordinalnumber ]
708\defineconversion [ \v!Ordinal ] [ \Ordinalnumber ]
709
710\defineconversion [ n ] [ \numbers ]
711\defineconversion [ N ] [ \Numbers ]
712\defineconversion [ m ] [ \mediaeval ]
713\defineconversion [ o ] [ \oldstylenumerals ]
714\defineconversion [ O ] [ \oldstylenumerals ]
715\defineconversion [ or ] [ \oldstyleromannumerals ]
716
717\defineconversion [ \v!romannumerals ] [ \romannumerals ]
718\defineconversion [ \v!Romannumerals ] [ \Romannumerals ]
719
720\defineconversion [ i ] [ \romannumerals ]
721\defineconversion [ I ] [ \Romannumerals ]
722\defineconversion [ r ] [ \romannumerals ]
723\defineconversion [ R ] [ \Romannumerals ]
724
725\defineconversion [ KR ] [ \smallcappedromannumerals ]
726\defineconversion [ RK ] [ \smallcappedromannumerals ]
727
728\defineconversion [ \v!greek ] [ \greeknumerals ]
729\defineconversion [ \v!Greek ] [ \Greeknumerals ]
730
731\defineconversion [ g ] [ \greeknumerals ]
732\defineconversion [ G ] [ \Greeknumerals ]
733
734
735
736
737\defineconversion [ abjadnumerals ] [ \abjadnumerals ]
738\defineconversion [ abjadnodotnumerals ] [ \abjadnodotnumerals ]
739\defineconversion [ abjadnaivenumerals ] [ \abjadnaivenumerals ]
740
741\defineconversion [ hebrewnumerals ] [ \hebrewnumerals ]
742\defineconversion [ yiddishnumerals ] [ \yiddishnumerals ]
743
744
745
746
747\defineconversion [ thainumerals ] [ \thainumerals ]
748\defineconversion [ devanagarinumerals ] [ \devanagarinumerals ]
749\defineconversion [ gurmurkhinumerals ] [ \gurmurkhinumerals ]
750\defineconversion [ gujaratinumerals ] [ \gujaratinumerals ]
751\defineconversion [ tibetannumerals ] [ \tibetannumerals ]
752\defineconversion [ greeknumerals ] [ \greeknumerals ]
753\defineconversion [ Greeknumerals ] [ \Greeknumerals ]
754\defineconversion [ arabicnumerals ] [ \arabicnumerals ]
755\defineconversion [ persiannumerals ] [ \persiannumerals ]
756\defineconversion [ arabicexnumerals ] [ \arabicexnumerals ]
757\defineconversion [ arabicdecimals ] [ \arabicdecimals ]
758\defineconversion [ persiandecimals ] [ \persiandecimals ]
759
760\defineconversion [ koreannumerals ] [ \koreannumerals ]
761\defineconversion [ koreanparennumerals ] [ \koreanparenthesisnumerals ]
762\defineconversion [ koreanparenthesisnumerals ]
763 [ \koreanparenthesisnumerals ]
764\defineconversion [ koreancirclenumerals ] [ \koreancirclenumerals ]
765
766\defineconversion [ kr ] [ \koreannumerals ]
767\defineconversion [ kr p ] [ \koreanparentnumerals ]
768\defineconversion [ kr c ] [ \koreancirclenumerals ]
769
770\defineconversion [ chinesenumerals ] [ \chinesenumerals ]
771\defineconversion [ chinesecapnumerals ] [ \chinesecapnumerals ]
772\defineconversion [ chineseallnumerals ] [ \chineseallnumerals ]
773
774\defineconversion [ cn ] [ \chinesenumerals ]
775\defineconversion [ cn c ] [ \chinesecapnumerals ]
776\defineconversion [ cn a ] [ \chineseallnumerals ]
777
778
779
780
781
782
783
784
785
786\def \sloveniannumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { sl }}
787\def \slovenianNumerals # 1 { \clf_Alphabetic \numexpr # 1 \relax { sl }}
788
789\def \spanishnumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { es }}
790\def \spanishNumerals # 1 { \clf_Alphabetic \numexpr # 1 \relax { es }}
791
792\def \russiannumerals # 1 { \clf_alphabetic \numexpr # 1 \relax { ru }}
793\def \russianNumerals # 1 { \clf_Alphabetic \numexpr # 1 \relax { ru }}
794
795
796
797
798
799
800\defineconversion [ \s!sl ] [ alphabetic ] [ \sloveniannumerals ]
801\defineconversion [ \s!sl ] [ Alphabetic ] [ \slovenianNumerals ]
802
803\defineconversion [ \s!sl ] [ a ] [ \sloveniannumerals ]
804\defineconversion [ \s!sl ] [ A ] [ \slovenianNumerals ]
805\defineconversion [ \s!sl ] [ AK ] [ \smallcapped \sloveniannumerals ]
806\defineconversion [ \s!sl ] [ KA ] [ \smallcapped \sloveniannumerals ]
807
808
809
810
811
812
813\defineconversion [ \s!es ] [ alphabetic ] [ \spanishnumerals ]
814\defineconversion [ \s!es ] [ Alphabetic ] [ \spanishNumerals ]
815
816\defineconversion [ \s!es ] [ a ] [ \spanishnumerals ]
817\defineconversion [ \s!es ] [ A ] [ \spanishNumerals ]
818\defineconversion [ \s!es ] [ AK ] [ \smallcapped \spanishnumerals ]
819\defineconversion [ \s!es ] [ KA ] [ \smallcapped \spanishnumerals ]
820
821
822
823
824
825
826\defineconversion [ \s!ru ] [ alphabetic ] [ \russiannumerals ]
827\defineconversion [ \s!ru ] [ Alphabetic ] [ \russianNumerals ]
828
829\defineconversion [ \s!ru ] [ a ] [ \russiannumerals ]
830\defineconversion [ \s!ru ] [ A ] [ \russianNumerals ]
831\defineconversion [ \s!ru ] [ AK ] [ \smallcapped \russiannumerals ]
832\defineconversion [ \s!ru ] [ KA ] [ \smallcapped \russiannumerals ]
833
834\defineconversion [ sloveniannumerals ] [ \sloveniannumerals ]
835\defineconversion [ slovenianNumerals ] [ \slovenianNumerals ]
836
837\defineconversion [ spanishnumerals ] [ \spanishnumerals ]
838\defineconversion [ spanishNumerals ] [ \spanishNumerals ]
839
840\defineconversion [ russiannumerals ] [ \russiannumerals ]
841\defineconversion [ russianNumerals ] [ \russianNumerals ]
842
843
844
845\defineconversion [ mathgreek ]
846 [ \m { α } , \m { β } , \m { γ } , \m { δ } , \m { ε } , \m { ζ } ,
847 \m { η } , \m { θ } , \m { ι } , \m { κ } , \m { λ } , \m { μ } ,
848 \m { ν } , \m { ξ } , \m { ο } , \m { π } , \m { ρ } , \m { σ } ,
849 \m { τ } , \m { υ } , \m { φ } , \m { χ } , \m { ψ } , \m { ω } ]
850
851
852
853\def \unihex # 1 { \clf_unihex \numexpr # 1 \relax }
854
855
856
857\ifdefined \symbol \else \def \symbol [# 1 ] { # 1 } \fi
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\defineconversion
917 [ set 0 ]
918 [ \symbol { bullet } ,
919 \symbol { dash } ,
920 \symbol { star } ,
921 \symbol { triangle } ,
922 \symbol { circle } ,
923 \symbol { medcircle } ,
924 \symbol { bigcircle } ,
925 \symbol { square } ,
926 \symbol { checkmark } ]
927
928\defineconversion
929 [ set 1 ]
930 [ \textormathchars { ⋆ } ,
931 \textormathchars { ⋆⋆ } ,
932 \textormathchars { ⋆⋆⋆ } ,
933 \textormathchars { ‡ } ,
934 \textormathchars { ‡‡ } ,
935 \textormathchars { ‡‡‡ } ,
936 \textormathchars { ∗ } ,
937 \textormathchars { ∗∗ } ,
938 \textormathchars { ∗∗∗ } ]
939
940\defineconversion
941 [ set 2 ]
942 [ \textormathchars { ∗ } ,
943 \textormathchars { † } ,
944 \textormathchars { ‡ } ,
945 \textormathchars { ∗∗ } ,
946 \textormathchars { †† } ,
947 \textormathchars { ‡‡ } ,
948 \textormathchars { ∗∗∗ } ,
949 \textormathchars { ††† } ,
950 \textormathchars { ‡‡‡ } ,
951 \textormathchars { ∗∗∗∗ } ,
952 \textormathchars { †††† } ,
953 \textormathchars { ‡‡‡‡ } ]
954
955\defineconversion
956 [ set 3 ]
957 [ \textormathchars { ⋆ } ,
958 \textormathchars { ⋆⋆ } ,
959 \textormathchars { ⋆⋆⋆ } ,
960 \textormathchars { ‡ } ,
961 \textormathchars { ‡‡ } ,
962 \textormathchars { ‡‡‡ } ,
963 \textormathchars { ¶ } ,
964 \textormathchars { ¶¶ } ,
965 \textormathchars { ¶¶¶ } ,
966 \textormathchars { § } ,
967 \textormathchars { §§ } ,
968 \textormathchars { §§§ } ,
969 \textormathchars { ∗ } ,
970 \textormathchars { ∗∗ } ,
971 \textormathchars { ∗∗∗ } ]
972
973
974
975
976
977
978
979\unexpanded \def \continuednumber # 1
980 { \labeltext { \ifcase # 1 \or\else \v!continued \fi }}
981
982\defineconversion
983 [ \v!continued ]
984 [ \continuednumber ]
985
986
987
988\let \spaceddigitsmethod \empty
989\let \spaceddigitssymbol \empty
990\let \spaceddigitsseparator \empty
991
992\unexpanded \def \spaceddigits # 1
993 { \clf_spaceddigits
994 method { \spaceddigitsmethod }
995 symbol { \spaceddigitssymbol }
996 separator { \spaceddigitsseparator }
997 data { # 1 }
998 \relax }
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015\def \zeronumberconversion # 1 { \number\numexpr # 1 \plusone \relax }
1016
1017\defineconversion [ zero ] [ \zeronumberconversion ]
1018
1019\protect \endinput
1020 |