summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/xecjk/xunicode-addon.sty
blob: 7a8df75c301368a829f764fc15c8353d7c58ed3d (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
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
%%
%% This is file `xunicode-addon.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% xeCJK.dtx  (with options: `xunicode')
%% 
%% $Id: xeCJK.dtx 533 2013-12-05 10:52:12Z sobenlee $
%% $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
%% -----------------------------------------------------------------
%%    Author:
%%             Wenchang Sun    <sunwch@nankai.edu.cn>
%%    Current Maintainers:
%%             Leo Liu         <leoliu.pku@gmail.com>
%%             Qing Lee        <sobenlee@gmail.com>
%% 
%%    Copyright (C) 2007--2013 Wenchang Sun
%%              (C) 2009--2013 Leo Liu
%%              (C) 2012--2013 Qing Lee
%% 
%%    This file 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 2005/12/01 or later.
%% 
%%    This work has the LPPL maintenance status "maintained".
%%    The Current Maintainer of this work are Leo Liu and Qing Lee.
%% -----------------------------------------------------------------
%% 
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
\GetIdInfo$Id: xeCJK.dtx 533 2013-12-05 10:52:12Z sobenlee $
  {addon file for xunicode}
\ProvidesExplPackage
  {xunicode-addon}
  {\ExplFileDate}{3.2.8}{\ExplFileDescription}
\pdftex_if_engine:T
  {
    \msg_new:nnnn { xunicode-addon } { cannot-use-pdftex }
      { This~package~requires~either~XeTeX~or~LuaTeX~to~function.}
      {
        You~must~change~your~typesetting~engine~to,~e.g.,\\
        "xelatex"~or~"lualatex"~instead~of~plain~"latex"~or~"pdflatex".
      }
    \msg_critical:nn { xunicode-addon } { cannot-use-pdftex }
  }
\RequirePackage { xparse }
\clist_new:N \g__xunadd_encname_clist
\DeclareOption*
  { \clist_gput_left:NV \g__xunadd_encname_clist \CurrentOption }
\ProcessOptions \scan_stop:
\tl_if_exist:NT \UTFencname
  { \clist_gput_left:Nx \g__xunadd_encname_clist { \UTFencname } }
\@ifpackageloaded { xunicode } { }
  {
    \clist_get:NNF \g__xunadd_encname_clist \UTFencname
      {
        \xetex_if_engine:TF
          { \tl_set:Nn \UTFencname { EU1 } }
          { \tl_set:Nn \UTFencname { EU2 } }
        \clist_set_eq:NN \g__xunadd_encname_clist \UTFencname
      }
    \xetex_if_engine:TF
      { \RequirePackage { xunicode } }
      {
        \cs_set_eq:NN \__xunadd_tmp:w \XeTeXpicfile
        \cs_set_eq:NN \XeTeXpicfile \prg_do_nothing:
        \RequirePackage { xunicode }
        \cs_set_eq:NN \XeTeXpicfile \__xunadd_tmp:w
      }
  }
\AtEndOfPackage { \ReloadXunicode { \g__xunadd_encname_clist } }
\RenewDocumentCommand \ReloadXunicode { m }
  {
    \clist_set:Nx \l__xunadd_encname_clist {#1}
    \clist_remove_duplicates:N \l__xunadd_encname_clist
    \use:x
      {
        \bool_if:NT \l__kernel_expl_bool { \ExplSyntaxOff }
        \char_set_catcode_letter:n { 64 }
        \__xunadd_reload:N \exp_not:N \l__xunadd_encname_clist
        \char_set_catcode:nn { 64 } { \char_value_catcode:n { 64 } }
        \bool_if:NT \l__kernel_expl_bool { \ExplSyntaxOn }
      }
  }
\cs_new_protected:Npn \__xunadd_reload:N #1
  {
    \cs_set_eq:NN \__xunadd_tmp:w \iftipaonetoken
    \cs_set_eq:NN \iftipaonetoken \scan_stop:
    \clist_map_inline:Nn #1
      {
        \cs_if_exist:cTF { T@ ##1 }
          {
            \tl_set:Nx \UTFencname {##1}
            \clist_gput_right:Nx \g__xunadd_encname_clist {##1}
            \file_input:n { xunicode.sty }
            \__xunadd_declare_textcircled:n { \UTFencname }
            \__xunadd_declare_math_symbols:n { \UTFencname }
          }
          { \msg_error:nnn { xunicode-addon } { encoding-unknown } {##1} }
      }
    \cs_set_eq:NN \iftipaonetoken \__xunadd_tmp:w
    \clist_gremove_duplicates:N \g__xunadd_encname_clist
  }
\clist_new:N \l__xunadd_encname_clist
\msg_new:nnnn { xunicode-addon } { encoding-unknown }
  { Encoding~scheme~"#1"~unknown. }
  {
    You~may~use \\\\
    \token_to_str:N \usepackage [ #1 , \encodingdefault ] {fontenc} \\\\
    before~xunicode-addon~or~xunicode.
  }
\cs_new_protected_nopar:Npn \__xunadd_declare_math_symbols:n #1
  {
    \__xunadd_declare_character:Nnn \textFinv   {#1} { x2132 }
    \__xunadd_declare_character:Nnn \textaleph  {#1} { x2135 }
    \__xunadd_declare_character:Nnn \textbeth   {#1} { x2136 }
    \__xunadd_declare_character:Nnn \textgimel  {#1} { x2137 }
    \__xunadd_declare_character:Nnn \textdaleth {#1} { x2138 }
    \__xunadd_declare_character:Nnn \textGame   {#1} { x2141 }
  }
\RenewDocumentCommand \DeclareUTFmathsymbols { m }
  {
    \bool_if:NT \l__xunadd_math_as_UTF_text_bool
      {
        \seq_map_inline:Nn \l__xunadd_math_as_UTF_text_seq
          { \__xunadd_declare_math_as_UTF_text:n {##1} }
        \bool_set_false:N \l__xunadd_math_as_UTF_text_bool
      }
  }
\seq_new:N \l__xunadd_math_as_UTF_text_seq
\seq_set_from_clist:Nn \l__xunadd_math_as_UTF_text_seq
  { hbar , Finv , aleph , beth , gimel , daleth , Game }
\bool_new:N \l__xunadd_math_as_UTF_text_bool
\RenewDocumentCommand \UseMathAsText { }
  {
    \math@s@text@true
    \bool_set_true:N \l__xunadd_math_as_UTF_text_bool
  }
\@onlypreamble \UseMathAsText
\cs_new_protected_nopar:Npn \__xunadd_declare_math_as_UTF_text:n #1
  {
    \cs_if_exist:cTF {#1}
      {
        \cs_new_eq:cc { keepmathUTF #1 } {#1}
        \cs_gset_protected_nopar:cpx {#1}
          {
            \exp_not:N \mode_if_math:TF
              { \exp_not:c { keepmathUTF #1 } }
              { \exp_not:c { text #1 } }
          }
        \tl_put_right:Nx \l__xunadd_hyperref_hook_tl
          { \cs_set_eq:NN \exp_not:c {#1} \exp_not:c { text #1 } }
      }
      { \cs_new_nopar:cpx {#1} { \exp_not:c { text #1 } } }
  }
\tl_new:N \l__xunadd_hyperref_hook_tl
\AtBeginDocument
  {
    \cs_if_free:NF \pdfstringdefDisableCommands
      { \pdfstringdefDisableCommands { \l__xunadd_hyperref_hook_tl } }
  }
\prg_new_conditional:Npnn \__xunadd_glyph_if_exist:n #1 { p , T , F , TF }
  {
    \etex_iffontchar:D \tex_font:D \etex_numexpr:D #1 \scan_stop:
      \prg_return_true: \else: \prg_return_false: \fi:
  }
\RenewDocumentCommand \UndeclareUTFcharacter { O { \UTFencname } m m }
  {
    \__xunadd_if_csname:nTF {#3}
      { \UndeclareTextCommand {#3} }
      { \exp_args:Nc \UndeclareTextCommand { \tl_to_str:n {#3} } }
      {#1}
  }
\RenewDocumentCommand \UndeclareUTFcomposite { O { \UTFencname } m m m }
  {
    \__xunadd_if_csname:nTF {#3}
      { \__xunadd_undeclare_composite:Nnnn #3 }
      { \exp_args:Nc \__xunadd_undeclare_composite:Nnnn { \tl_to_str:n {#3} } }
      {#1} {#4} {#2}
  }
\cs_new_protected:Npn \__xunadd_undeclare_composite:Nnnn #1#2#3#4
  { \cs_undefine:c { \token_to_str:c {#2} \token_to_str:N #1 - \tl_to_str:n {#3} } }
\prg_new_conditional:Npnn \__xunadd_if_csname:n #1 { TF }
  {
    \tl_if_single_token:nTF {#1}
      {
        \if_predicate:w
          \bool_if_p:n { \token_if_cs_p:N #1 || \token_if_active_p:N #1 }
          \prg_return_true: \else: \prg_return_false: \fi:
      }
      { \prg_return_false: }
  }
\RenewDocumentCommand \DeclareUTFcharacter { O { \UTFencname } m m }
  {
    \str_if_eq:nnTF {#3} { \hbar }
      { \__xunadd_restore_hbar: }
      {
        \__xunadd_if_csname:nTF {#3}
          { \__xunadd_declare_character:Nnn #3 }
          { \__xunadd_declare_character:cnn { \tl_to_str:n {#3} } }
        {#1} {#2}
      }
  }
\cs_new_protected_nopar:Npn \__xunadd_restore_hbar:
  {
    \cs_if_free:cF { ? - \token_to_str:N \hbar }
      { \__xunadd_restore_hbar:c { ? - \token_to_str:N \hbar } }
  }
\cs_new_protected_nopar:Npn \__xunadd_restore_hbar:N #1
  {
    \cs_gset_eq:NN \hbar #1
    \cs_undefine:N #1
  }
\cs_generate_variant:Nn \__xunadd_restore_hbar:N { c }
\cs_new_protected:Npn \__xunadd_declare_character:Nnn #1#2#3
  {
    \__xunadd_provide_text_command_default:N #1
    \group_begin:
    \char_set_lccode:nn { `0 } { \__xunadd_check_slot:n {#3} }
    \tl_to_lowercase:n
      {
        \group_end:
        \__xunadd_declare_character:NNxn 0
      }
      #1 { \token_to_str:N #1 } {#2}
  }
\cs_generate_variant:Nn \__xunadd_declare_character:Nnn { c }
\cs_new_protected:Npn \__xunadd_provide_text_command_default:N #1
  {
    \bool_if:nF
      {
        \cs_if_exist_p:c { ?   \token_to_str:N #1 } ||
        \cs_if_free_p:c  { ? - \token_to_str:N #1 }
      }
      { \exp_args:NNv \ProvideTextCommandDefault #1 { ? - \token_to_str:N #1 } }
  }
\cs_new_protected:Npn \__xunadd_declare_character:NNnn #1#2#3#4
  { \DeclareTextCommand #2 {#4} { \__xunadd_text_character:nN {#3} {#1} } }
\cs_new_protected:Npn \__xunadd_text_character:nN #1#2
  {
    \__xunadd_begin_hook:nn {#1} {#2}
    \__xunadd_glyph_if_exist:nTF { `#2 }
      {#2} { \cs_if_exist_use:cF { ? #1 } {#2} }
    \__xunadd_end_hook:nn {#1} {#2}
  }
\cs_generate_variant:Nn \__xunadd_declare_character:NNnn { NNx }
\cs_new_nopar:Npn \__xunadd_check_slot:n #1
  {
    \int_eval:n
      {
        \tl_if_head_eq_charcode:nNTF {#1} x
          { " \use_none:n #1 } {#1}
      }
  }
\RenewDocumentCommand \DeclareUTFcomposite { O { \UTFencname } m m m }
  {
    \__xunadd_if_csname:nTF {#3}
      { \__xunadd_declare_composite:Nnnn #3 }
      { \__xunadd_declare_composite:cnnn { \tl_to_str:n {#3} } }
      {#1} {#4} {#2}
  }
\cs_new_protected:Npn \__xunadd_declare_composite:Nnnn #1#2#3#4
  {
    \tex_afterassignment:D \use_none_delimit_by_q_stop:w
    \__xunadd_chardef:cn
      { \token_to_str:c {#2} \token_to_str:N #1 - \tl_to_str:n {#3} }
      { \__xunadd_check_slot:n {#4} }
    \q_stop
  }
\cs_new_protected:Npn \__xunadd_chardef:Nn #1#2
  { \tex_chardef:D #1 = \etex_numexpr:D #2 \scan_stop: }
\cs_generate_variant:Nn \__xunadd_chardef:Nn { c }
\cs_generate_variant:Nn \__xunadd_declare_composite:Nnnn { c }
\AtEndOfPackage
  {
    \DeclareUTFCompositeCommand \tonebar { 25 } { \tonebar { 2 } \tonebar { 5 } }
    \DeclareUTFCompositeCommand \tonebar { 52 } { \tonebar { 5 } \tonebar { 2 } }
  }
\NewDocumentCommand \DeclareUTFCompositeCommand { O { \UTFencname } m m m }
  {
    \__xunadd_if_csname:nTF {#2}
      { \__xunadd_declare_composite_command:Nnnn #2 }
      { \__xunadd_declare_composite_command:cnnn { \tl_to_str:n {#2} } }
      {#1} {#3} {#4}
  }
\cs_new_protected:Npn \__xunadd_declare_composite_command:Nnnn #1#2#3#4
  {
    \cs_set_protected:cpn
      { \token_to_str:c {#2} \token_to_str:N #1 - \tl_to_str:n {#3} }
      {#4}
  }
\cs_generate_variant:Nn \__xunadd_declare_composite_command:Nnnn { c }
\RenewDocumentCommand \DeclareEncodedCompositeCharacter { m m m m }
  {
    \__xunadd_if_csname:nTF {#2}
      { \__xunadd_declare_accent:Nnnn #2 }
      { \__xunadd_declare_accent:cnnn { \tl_to_str:n {#2} } }
      {#1} {#3} {#4}
  }
\RenewDocumentCommand \DeclareEncodedCompositeAccents { m m m m }
  {
    \__xunadd_if_csname:nTF {#2}
      { \__xunadd_declare_accent:Nnnn #2 }
      { \__xunadd_declare_accent:cnnn { \tl_to_str:n {#2} } }
      {#1} {#4} {#3}
  }
\cs_new_protected:Npn \__xunadd_declare_accent:Nnnn #1#2#3#4
  {
    \group_begin:
    \char_set_lccode:nn { `3 } { "#3 }
    \char_set_lccode:nn { `4 } { \tl_if_blank:nTF {#4} { "#3 } { "#4 } }
    \tl_to_lowercase:n
      {
        \group_end:
        \__xunadd_declare_accent:NNNxxn 3 4
      }
      #1 { \token_to_str:c {#2} } { \token_to_str:N #1 } {#2}
  }
\cs_new_protected:Npn \__xunadd_declare_accent:NNNnnn #1#2#3#4#5#6
  {
    \DeclareTextCommand #3 {#6}
      { \__xunadd_text_composite:nnNNn {#4} {#5} {#1} {#2} }
  }
\cs_generate_variant:Nn \__xunadd_declare_accent:Nnnn { c }
\cs_generate_variant:Nn \__xunadd_declare_accent:NNNnnn { NNNxx }
\cs_new_protected:Npn \__xunadd_text_composite:nnNNn #1#2#3#4#5
  {
    \__xunadd_begin_hook:nn {#2} {#5}
    \cs_if_exist:cTF { #1#2 - \tl_to_str:n {#5} }
      {
        \__xunadd_text_composite_aux:cnNNn
          { #1#2 - \tl_to_str:n {#5} } {#2} {#3} {#4} {#5}
      }
      { \__xunadd_add_accent:nnNN {#5} {#2} {#3} {#4} }
    \__xunadd_end_hook:nn {#2} {#5}
  }
\cs_new_protected:Npn \__xunadd_text_composite_aux:NnNNn #1#2#3#4#5
  {
    \token_if_chardef:NTF #1
      {
        \__xunadd_glyph_if_exist:nTF {#1}
          {#1} { \__xunadd_add_accent:nnNN {#5} {#2} {#3} {#4} }
      }
      {#1}
  }
\cs_generate_variant:Nn \__xunadd_text_composite_aux:NnNNn { c }
\cs_new_protected:Npn \__xunadd_add_accent:nnNN #1#2#3#4
  {
    \tl_if_blank:nTF {#1}
      {
        \__xunadd_glyph_if_exist:nTF { `#4 }
          {#4}
          { \cs_if_exist_use:cTF { ? #2 } { {#1} } {#4} }
      }
      {
        \bool_if:NTF \l__xunadd_add_circle_bool
          {
            \bool_set_false:N \l__xunadd_add_circle_bool
            \__xunadd_glyph_if_exist:nTF { `#4 }
              { \__xunadd_add_circle:nn {#4} {#1} }
          }
          {
            \__xunadd_glyph_if_exist:nTF { `#3 }
              { #1#3 }
              {
                \__xunadd_glyph_if_exist:nTF { `#4 }
                  { \add@accent { `#4 } {#1} }
              }
          }
          { \cs_if_exist_use:cTF { ? #2 } { {#1} } {#1} }
      }
  }
\cs_new_protected:Npn \__xunadd_add_circle:nn #1#2
  {
    \hcoffin_set:Nn \l__xunadd_circle_coffin {#1}
    \hcoffin_set:Nn \l__xunadd_tmp_coffin {#2}
    \dim_set:Nn \l__xunadd_circle_width_dim
      { \fp_use:N \l__xunadd_circle_ratio_fp \coffin_wd:N \l__xunadd_circle_coffin }
    \coffin_resize:Nnn \l__xunadd_tmp_coffin
      { \l__xunadd_circle_width_dim }
      {
        ( \coffin_ht:N \l__xunadd_tmp_coffin + \coffin_dp:N \l__xunadd_tmp_coffin )
        * \tex_number:D \l__xunadd_circle_width_dim
        / \tex_number:D \coffin_wd:N \l__xunadd_tmp_coffin
      }
    \coffin_attach:NnnNnnnn
      \l__xunadd_circle_coffin { hc } { vc }
      \l__xunadd_tmp_coffin    { hc } { vc }
      { \c_zero_dim } { \c_zero_dim }
    \coffin_typeset:Nnnnn \l__xunadd_circle_coffin
      { H } { l } { \c_zero_dim } { \c_zero_dim }
  }
\dim_new:N \l__xunadd_circle_width_dim
\coffin_new:N \l__xunadd_tmp_coffin
\coffin_new:N \l__xunadd_circle_coffin
\NewDocumentCommand \settextcircledratio { m }
  { \fp_set:Nn \l__xunadd_circle_ratio_fp {#1} }
\fp_new:N \l__xunadd_circle_ratio_fp
\settextcircledratio { 0.7 }
\NewDocumentCommand \AtBeginUTFCommand { s O { } +m }
  {
    \tl_if_blank:nTF {#2}
      {
        \IfBooleanTF {#1}
          { \tl_set:Nn \l__xunadd_begin_hook_tl {#3} }
          { \tl_put_right:Nn \l__xunadd_begin_hook_tl {#3} }
      }
      { \__xunadd_set_cmd_hook:nnn { begin } {#2} {#3} }
  }
\NewDocumentCommand \AtEndUTFCommand { s O { } +m }
  {
    \tl_if_blank:nTF {#2}
      {
        \IfBooleanTF {#1}
          { \tl_set:Nn \l__xunadd_end_hook_tl {#3} }
          { \tl_put_right:Nn \l__xunadd_end_hook_tl {#3} }
      }
      { \__xunadd_set_cmd_hook:nnn { end } {#2} {#3} }
  }
\tl_new:N \l__xunadd_begin_hook_tl
\tl_new:N \l__xunadd_end_hook_tl
\cs_new_protected:Npn \__xunadd_set_cmd_hook:nnn #1#2#3
  {
    \cs_set_protected:cpn
      {
        \tl_if_single:nTF {#2}
          { \use:c { __xunadd_#1_csname:n } { \token_to_str:N #2 } }
          { \__xunadd_set_cmd_hook_aux:Nnwn #2 \q_stop {#1} }
      } ##1
      {#3}
  }
\cs_new:Npn \__xunadd_set_cmd_hook_aux:Nnwn #1#2 \q_stop #3
  { \use:c { __xunadd_#3_csname:n } { \token_to_str:N #1 - \tl_to_str:n {#2} } }
\cs_new_nopar:Npn \__xunadd_begin_csname:n #1 { __xunadd_begin_#1_hook:n }
\cs_new_nopar:Npn \__xunadd_end_csname:n #1   { __xunadd_end_#1_hook:n }
\cs_new_protected:Npn \__xunadd_begin_hook:nn #1#2
  {
    \tl_use:N \l__xunadd_begin_hook_tl
    \cs_if_exist_use:cF { \__xunadd_begin_csname:n { #1 - \tl_to_str:n {#2} } }
      { \cs_if_exist_use:cF { \__xunadd_begin_csname:n {#1} } { \use_none:n } }
      {#2}
  }
\cs_new_protected:Npn \__xunadd_end_hook:nn #1#2
  {
    \cs_if_exist_use:cF { \__xunadd_end_csname:n { #1 - \tl_to_str:n {#2} } }
      { \cs_if_exist_use:cF { \__xunadd_end_csname:n {#1} } { \use_none:n } }
      {#2}
    \tl_use:N \l__xunadd_end_hook_tl
  }
\AtBeginUTFCommand [ \textcircled ]
  { \bool_set_true:N  \l__xunadd_add_circle_bool }
\bool_new:N \l__xunadd_add_circle_bool
\cs_new_protected_nopar:Npn \__xunadd_declare_textcircled:n #1
  {
    \__xunadd_declare_character:Nnn \textbigcircle {#1} { x25EF }
    \__xunadd_declare_accent:Nnnn \textcircled {#1} { 20DD } { 25EF }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} {  0 } { x24EA }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} {  1 } { x2460 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} {  2 } { x2461 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} {  3 } { x2462 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} {  4 } { x2463 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} {  5 } { x2464 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} {  6 } { x2465 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} {  7 } { x2466 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} {  8 } { x2467 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} {  9 } { x2468 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 10 } { x2469 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 11 } { x246A }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 12 } { x246B }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 13 } { x246C }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 14 } { x246D }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 15 } { x246E }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 16 } { x246F }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 17 } { x2470 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 18 } { x2471 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 19 } { x2472 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 20 } { x2473 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 21 } { x3251 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 22 } { x3252 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 23 } { x3253 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 24 } { x3254 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 25 } { x3255 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 26 } { x3256 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 27 } { x3257 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 28 } { x3258 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 29 } { x3259 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 30 } { x325A }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 31 } { x325B }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 32 } { x325C }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 33 } { x325D }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 34 } { x325E }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 35 } { x325F }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 36 } { x32B1 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 37 } { x32B2 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 38 } { x32B3 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 39 } { x32B4 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 40 } { x32B5 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 41 } { x32B6 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 42 } { x32B7 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 43 } { x32B8 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 44 } { x32B9 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 45 } { x32BA }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 46 } { x32BB }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 47 } { x32BC }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 48 } { x32BD }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 49 } { x32BE }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { 50 } { x32BF }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { A } { x24B6 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { B } { x24B7 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { C } { x24B8 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { D } { x24B9 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { E } { x24BA }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { F } { x24BB }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { G } { x24BC }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { H } { x24BD }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { I } { x24BE }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { J } { x24BF }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { K } { x24C0 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { L } { x24C1 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { M } { x24C2 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { N } { x24C3 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { O } { x24C4 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { P } { x24C5 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { Q } { x24C6 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { R } { x24C7 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { S } { x24C8 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { T } { x24C9 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { U } { x24CA }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { V } { x24CB }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { W } { x24CC }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { X } { x24CD }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { Y } { x24CE }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { Z } { x24CF }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { a } { x24D0 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { b } { x24D1 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { c } { x24D2 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { d } { x24D3 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { e } { x24D4 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { f } { x24D5 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { g } { x24D6 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { h } { x24D7 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { i } { x24D8 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { j } { x24D9 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { k } { x24DA }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { l } { x24DB }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { m } { x24DC }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { n } { x24DD }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { o } { x24DE }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { p } { x24DF }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { q } { x24E0 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { r } { x24E1 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { s } { x24E2 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { t } { x24E3 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { u } { x24E4 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { v } { x24E5 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { w } { x24E6 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { x } { x24E7 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { y } { x24E8 }
    \__xunadd_declare_composite:Nnnn \textcircled {#1} { z } { x24E9 }
  }
%% 
%%    This package consists of the file  xeCJK.dtx,
%%                                       full-stop.map,
%%                                       fullwidth-stop.map,
%%                                       han-simp.map,
%%                                       han-trad.map,
%%                 and the derived files xeCJK.pdf,
%%                                       xeCJK.sty,
%%                                       xeCJK.cfg,
%%                                       xeCJK.ins,
%%                                       xeCJKfntef.sty,
%%                                       xeCJK-listings.sty,
%%                                       xunicode-addon.sty,
%%                                       xeCJK-example-autofake.tex,
%%                                       xeCJK-example-fallback.tex,
%%                                       xeCJK-example-subCJKblock.tex,
%%                                       xeCJK-example-CJKecglue.tex,
%%                                       xeCJK-example-checksingle.tex,
%%                                       xeCJK-example-CJKfntef.tex,
%%                                       xeCJK-example-punctstyle.tex,
%%                                       xeCJK-example-verbatim.tex,
%%                                       xeCJK-example-IVS.tex,
%%                                       xeCJK-example-listings.tex,
%%                                       full-stop.tec,
%%                                       fullwidth-stop.tec,
%%                                       han-simp.tec,
%%                                       han-trad.tec, and
%%                                       README.txt.
%%
%% End of file `xunicode-addon.sty'.