-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathl3basics-ja.tex
1671 lines (1553 loc) · 78.3 KB
/
l3basics-ja.tex
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
% +++
% sequence = ["latex", "dvipdf"]
% latex = "uplatex"
% clean_files = [
% "%B.aux", "%B.dvi", "%B.glo", "%B.hd", "%B.idx", "%B.ind",
% "%B.ilg", "%B.log", "%B.out", "%B.synctex.gz",
% ]
% +++
\documentclass[uplatex,dvipdfmx,full,kernel]{wtpl3doc}
\RequirePackage{interface3-ja}
\begin{document}
%\title{The \pkg{l3basics} package\\ Basic definitions}
\title{\pkg{l3basics}パッケージ\\ 基本的な定義}
%\author{%
% The \LaTeX3 Project\thanks
% {%
% E-mail:
% \href{mailto:latex-team@latex-project.org}
% {latex-team@latex-project.org}%
% }%
%}
\author{%
\LaTeX3プロジェクト\thanks
{%
E-mail:
\href{mailto:latex-team@latex-project.org}
{latex-team@latex-project.org}%
}%
}
%\date{Released 2020-01-22}
\date{バージョン 2020-01-22}
\maketitle
\begin{documentation}
%As the name suggest this package holds some basic definitions which
%are needed by most or all other packages in this set.
名前が示すとおり,このモジュールは\pkg{expl3}に含まれるほとんどの
パッケージが必要とするいくつかの基本的な定義を行うものです.
%Here we describe those functions that are used all over the place. With
%that we mean functions dealing with the construction and testing of
%control sequences. Furthermore the basic parts of conditional
%processing are covered; conditional processing dealing with specific
%data types is described in the modules specific for the respective
%data types.
ここで\pkg{expl3}全体で用いられるそれらの基本的な関数を説明します.
具体的には,制御綴の作成やテストに関わる関数です.加えて,このモジュール
は基本的な条件分岐の機能提供も行います.ただし特定のデータ型に固有の
条件分岐については,ここではなくそれぞれのデータ型を扱うモジュールに
おいて説明されます.
%\section{No operation functions}
\section{ノーオペレーション関数}
\begin{function}[EXP]{\prg_do_nothing:}
\begin{syntax}
\cs{prg_do_nothing:}
\end{syntax}
% An expandable function which does nothing at all: leaves nothing
% in the input stream after a single expansion.
完全に何もしない,展開可能な関数です.1回展開すると空文字列になり,
入力ストリームには何も残しません.
\end{function}
\begin{function}{\scan_stop:}
\begin{syntax}
\cs{scan_stop:}
\end{syntax}
% A non-expandable function which does nothing. Does not vanish on
% expansion but produces no typeset output.
何もしない展開不能な関数です.展開操作で消えることはありませんが,
組版結果には何も作用しません.
\end{function}
%\section{Grouping material}
\section{グループ}
\begin{function}{\group_begin:, \group_end:}
\begin{syntax}
\cs{group_begin:}
\cs{group_end:}
\end{syntax}
% These functions begin and end a group for definition purposes.
% Assignments are local to groups unless carried out in a global
% manner. (A small number of exceptions to this rule will be noted
% as necessary elsewhere in this document.) Each \cs{group_begin:}
% must be matched by a \cs{group_end:}, although this does not have
% to occur within the same function. Indeed, it is often necessary
% to start a group within one function and finish it within another,
% for example when seeking to use non-standard category codes.
これらの関数はそれぞれ定義のためのグループを開始・終了します.
代入操作はグローバル指定がないかぎりグループ内でローカルに行なわれ
ます(いくつか例外がありますが,それらは適宜説明します).
\cs{group_begin:}で開始されたグループは必ず\cs{group_end:}で終了
される必要があります.ただし,これらは必ずしも同じ関数内で完結して
いなくても構いません.実際,しばしばある関数でグループを開始して,
別の関数でグループを終了しなければならないことがあります.例えば
非標準的なカテゴリーコードを適用したい場合などです.
\end{function}
\begin{function}{\group_insert_after:N}
\begin{syntax}
\cs{group_insert_after:N} \meta{token}
\end{syntax}
% Adds \meta{token} to the list of \meta{tokens} to be inserted
% when the current group level ends. The list of \meta{tokens} to be
% inserted is empty at the beginning of a group: multiple
% applications of \cs{group_insert_after:N} may be used to build
% the inserted list one \meta{token} at a time. The current group
% level may be closed by a \cs{group_end:} function or by a token
% with category code $2$ (close-group), namely a ^^A{
% |}| if standard category codes apply.
\meta{token}を現在の(最も内側の)グループの終了時に挿入される
トークンのリストに追加します.このトークンのリストはグループの開始
時点で空リストとなるように作成されます.\cs{group_insert_after:N}を
複数回使用した場合,リストに格納された各\meta{token}が一度に挿入
されることになります.現在のグループは\cs{group_end:}関数か,
カテゴリーコード$2$(グループ終了)のトークン(標準的なカテゴリー
コード設定下では|}|)によって終了させることができます.
\end{function}
%\section{Control sequences and functions}
\section{制御綴と関数}
%As \TeX{} is a macro language, creating new functions means
%creating macros. At point of use, a function is replaced by
%the replacement text (\enquote{code}) in which each parameter
%in the code (|#1|, |#2|, \emph{etc.}) is replaced the appropriate
%arguments absorbed by the function. In the following, \meta{code}
%is therefore used as a shorthand for \enquote{replacement text}.
\TeX はマクロ言語なので,関数を作ることはマクロを作ることを意味します.
関数を使用すると,その関数は置換テキスト (\enquote{code}) に置き換えられ
ます.このとき置換テキスト内の各パラメータ (|#1|, |#2|, \dots) はそれ
ぞれ関数に与えられた適切な引数に置き換えられます.そのため以下では
\meta{code}は「置換テキスト」のことを指しています.
%Functions which are not \enquote{protected} are fully expanded
%inside an \texttt{x} expansion. In contrast, \enquote{protected}
%functions are not expanded within \texttt{x} expansions.
「保護付き」の関数以外は\code{x}展開では完全展開可能です.一方で
「保護付き」の関数は\code{x}展開においては展開されません.
%\subsection{Defining functions}
\subsection{関数定義}
%Functions can be created with no requirement that they are declared
%first (in contrast to variables, which must always be declared).
%Declaring a function before setting up the code means that the name
%chosen is checked and an error raised if it is already in use.
%The name of a function can be checked at the point of definition using
%the \cs[no-index]{cs_new\ldots} functions: this is recommended for all
%functions which are defined for the first time.
関数は(必ず事前に宣言を必要とする各種変数と異なり)事前に宣言すること
なく作成することができます.関数定義をする前に関数を宣言するということ
には選んだ関数名をチェックし,もし既に使用されている場合にはエラーを出す
という効果があります.\cs[no-index]{cs_new*}系の関数を用いると定義の際に
このチェックを行うことができます.任意の関数を最初に定義する際は,この
方法を使用することが推奨されます.
%There are three ways to define new functions.
%All classes define a function to expand to the substitution text.
%Within the substitution text the actual parameters are substituted
%for the formal parameters (|#1|, |#2|, \ldots).
関数を定義する方法は3種類(クラス)に大別できます.いずれの方法を用いて
も,その関数は置換テキストに展開されるように定義されます.置換テキスト
内のパラメータ (|#1|, |#2|, \dots) は実際の引数に置き換えられます.
%
\begin{description}[style=multiline, leftmargin=3zw]
% \item[\texttt{new}]
% Create a new function with the \texttt{new} scope,
% such as \cs{cs_new:Npn}. The definition is global and results in
% an error if it is already defined.
\item[\code{new}]
新しい関数は\cs{cs_new:Npn}などの\code{new}系の関数で作成できます.
これらによる定義はグローバルで,既に定義済みの関数を作成しようと
するとエラーが発生します.
%
% \item[\texttt{set}]
% Create a new function with the \texttt{set} scope,
% such as \cs{cs_set:Npn}. The definition is restricted to the current
% \TeX{} group and does not result in an error if the function is already
% defined.
\item[\code{set}]
新しい関数は\cs{cs_set:Npn}などの\code{set}系の関数でも作成できます.
これらによる定義は現在の(最も内側の)グループ内に限定され,既に
定義済みの関数であってもエラーは発生しません.
%
% \item[\texttt{gset}]
% Create a new function with the \texttt{gset} scope,
% such as \cs{cs_gset:Npn}. The definition is global and
% does not result in an error if the function is already defined.
\item[\code{gset}]
新しい関数は\cs{cs_gset:Npn}などの\code{gset}系の関数でも作成できます.
これらによる定義はグローバルで,既に定義済みの関数であってもエラーは
発生しません.
\end{description}
%Within each set of scope there are different ways to define a function.
%The differences depend on restrictions on the actual parameters and
%the expandability of the resulting function.
上記の各クラスの中でも,関数を定義する方法は多岐にわたります.関数には
実引数や関数の展開可能性を柔軟に設定できます.
%
\begin{description}[style=multiline, leftmargin=6zw]
% \item[\texttt{nopar}]
% Create a new function with the \texttt{nopar} restriction,
% such as \cs{cs_set_nopar:Npn}. The parameter may not contain
% \cs{par} tokens.
\item[\code{nopar}]
\cs{cs_set_nopar:Npn}などで関数を作成すると\code{nopar}制限が付加
されます.実引数は\cs{par}トークンを含むことができなくなります.
%
% \item[\texttt{protected}]
% Create a new function with the \texttt{protected} restriction,
% such as \cs{cs_set_protected:Npn}. The parameter may contain
% \cs{par} tokens but the function will not expand within an
% \texttt{x}-type or \texttt{e}-type expansion.
\item[\code{protected}]
\cs{cs_set_protected:Npn}などで関数を作成すると\code{nopar}制限が
付加されます.実引数は\cs{par}トークンを含むことができますが,
関数自体は\code{x}展開や\code{e}展開においては展開されなくなります.
\end{description}
%Finally, the functions in
%Subsections~\ref{sec:l3basics:defining-new-function-1}~and
%\ref{sec:l3basics:defining-new-function-2} are primarily meant to define
%\emph{base functions} only. Base functions can only have the following
%argument specifiers:
以下\ref{sec:l3basics:defining-new-function-1}節と\ref{sec:l3basics:%
defining-new-function-2}節で説明する関数は\emph{基本関数}のみを定義する
ことが意図されています.基本関数がもち得る引数指定子は以下のもののみです:
%
\begin{description}[style=multiline, leftmargin=3zw]
% \item[|N| and |n|] No manipulation.
% \item[|T| and |F|] Functionally equivalent to |n| (you are actually
% encouraged to use the family of |\prg_new_conditional:| functions
% described in Section~\ref{sec:l3prg:new-conditional-functions}).
% \item[|p| and |w|] These are special cases.
\item[\code{N}/\code{n}] 操作なし
\item[\code{T}/\code{F}] 機能的には\code{n}と同様(実践ではここに挙げる
関数よりも\ref{sec:l3prg:new-conditional-functions}節で説明する
|\prg_new_conditional:*|系の関数の利用が推奨されます)
\item[\code{p}/\code{w}] 一部特殊なものもあります
\end{description}
%The |\cs_new:| functions below (and friends) do not stop you from using
%other argument specifiers in your function names, but they do not handle
%expansion for you. You should define the base function and then use
%\cs{cs_generate_variant:Nn} to generate custom variants as described in
%Section~\ref{sec:l3expan:variants-method}.
以下の|\cs_new:*|系の関数(およびその仲間)を用いて上記以外の引数指定子
をもつ関数を定義することもできますが,展開制御が自動的に行なわれることは
ありません.まずは基本関数を定義して,その上で\cs{cs_generate_variant:Nn}%
を用いて独自の変種を生成するのがよいでしょう
(\ref{sec:l3expan:variants-method}節を参照).
%\subsection{Defining new functions using parameter text}
\subsection{パラメータテキストを用いた関数定義}
\label{sec:l3basics:defining-new-function-1}
\begin{function}{\cs_new:Npn, \cs_new:cpn, \cs_new:Npx, \cs_new:cpx}
\begin{syntax}
\cs{cs_new:Npn} \meta{function} \meta{parameters} \Arg{code}
\end{syntax}
% Creates \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% The definition is global and an error results if the
% \meta{function} is already defined.
\meta{code}を置換テキストとする関数\meta{function}を作成します.
\meta{code}内では\meta{parameters} (|#1|, |#2|, \dots) はその関数に
渡された引数に置換されます.この定義はグローバルで,\meta{function}が
定義済みの場合はエラーが発生します.
\end{function}
\begin{function}
{
\cs_new_nopar:Npn, \cs_new_nopar:cpn,
\cs_new_nopar:Npx, \cs_new_nopar:cpx
}
\begin{syntax}
\cs{cs_new_nopar:Npn} \meta{function} \meta{parameters} \Arg{code}
\end{syntax}
% Creates \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% When the \meta{function} is used the \meta{parameters} absorbed
% cannot contain \cs{par} tokens. The definition is global and
% an error results if the \meta{function} is already defined.
\meta{code}を置換テキストとする関数\meta{function}を作成します.
\meta{code}内では\meta{parameters} (|#1|, |#2|, \dots) はその関数に
渡された引数に置換されます.\meta{function}の使用時に渡される引数に
\cs{par}トークンを含めることはできません.この定義はグローバルで,
\meta{function}が定義済みの場合はエラーが発生します.
\end{function}
\begin{function}
{
\cs_new_protected:Npn, \cs_new_protected:cpn,
\cs_new_protected:Npx, \cs_new_protected:cpx
}
\begin{syntax}
\cs{cs_new_protected:Npn} \meta{function} \meta{parameters} \Arg{code}
\end{syntax}
% Creates \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% The \meta{function} will not expand within an \texttt{x}-type
% argument. The definition is global and an error results if the
% \meta{function} is already defined.
\meta{code}を置換テキストとする関数\meta{function}を作成します.
\meta{code}内では\meta{parameters} (|#1|, |#2|, \dots) はその関数に
渡された引数に置換されます.定義された\meta{function}は\code{x}展開および
\code{e}展開では展開されません.この定義はグローバルで,\meta{function}が
定義済みの場合はエラーが発生します.
\end{function}
\begin{function}
{
\cs_new_protected_nopar:Npn, \cs_new_protected_nopar:cpn ,
\cs_new_protected_nopar:Npx, \cs_new_protected_nopar:cpx
}
\begin{syntax}
\cs{cs_new_protected_nopar:Npn} \meta{function} \meta{parameters} \Arg{code}
\end{syntax}
% Creates \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% When the \meta{function} is used the \meta{parameters} absorbed
% cannot contain \cs{par} tokens. The \meta{function} will not
% expand within an \texttt{x}-type or \texttt{e}-type argument. The definition is global
% and an error results if the \meta{function} is already defined.
\meta{code}を置換テキストとする関数\meta{function}を作成します.
\meta{code}内では\meta{parameters} (|#1|, |#2|, \dots) はその関数に
渡された引数に置換されます.\meta{function}の使用時に渡される引数に
\cs{par}トークンを含めることはできません.定義された\meta{function}は
\code{x}展開および\code{e}展開では展開されません.この定義はグローバル
で,\meta{function}が定義済みの場合はエラーが発生します.
\end{function}
\begin{function}{\cs_set:Npn, \cs_set:cpn, \cs_set:Npx, \cs_set:cpx}
\begin{syntax}
\cs{cs_set:Npn} \meta{function} \meta{parameters} \Arg{code}
\end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% The assignment of a meaning to the \meta{function} is restricted to
% the current \TeX{} group level.
関数\meta{function}を\meta{code}に展開されるように設定します.
\meta{code}内では\meta{parameters} (|#1|, |#2|, \dots) はその関数に
渡された引数に置換されます.この\meta{function}の意味の設定は,現在の
最も内側の\TeX グループ内でのみ有効です.
\end{function}
\begin{function}
{
\cs_set_nopar:Npn, \cs_set_nopar:cpn,
\cs_set_nopar:Npx, \cs_set_nopar:cpx
}
\begin{syntax}
\cs{cs_set_nopar:Npn} \meta{function} \meta{parameters} \Arg{code}
\end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% When the \meta{function} is used the \meta{parameters} absorbed
% cannot contain \cs{par} tokens. The assignment of a meaning
% to the \meta{function} is restricted to the current \TeX{} group
% level.
関数\meta{function}を\meta{code}に展開されるように設定します.
\meta{code}内では\meta{parameters} (|#1|, |#2|, \dots) はその関数に
渡された引数に置換されます.\meta{function}の使用時に渡される引数に
\cs{par}トークンを含めることはできません.この\meta{function}の意味
の設定は,現在の最も内側の\TeX グループ内でのみ有効です.
\end{function}
\begin{function}
{
\cs_set_protected:Npn, \cs_set_protected:cpn,
\cs_set_protected:Npx, \cs_set_protected:cpx
}
\begin{syntax}
\cs{cs_set_protected:Npn} \meta{function} \meta{parameters} \Arg{code}
\end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% The assignment of a meaning to the \meta{function} is restricted to
% the current \TeX{} group level. The \meta{function} will
% not expand within an \texttt{x}-type or \texttt{e}-type argument.
関数\meta{function}を\meta{code}に展開されるように設定します.
\meta{code}内では\meta{parameters} (|#1|, |#2|, \dots) はその関数に
渡された引数に置換されます.定義された\meta{function}は\code{x}展開
および\code{e}展開では展開されません.この\meta{function}の意味の
設定は,現在の最も内側の\TeX グループ内でのみ有効です.
\end{function}
\begin{function}
{
\cs_set_protected_nopar:Npn, \cs_set_protected_nopar:cpn ,
\cs_set_protected_nopar:Npx, \cs_set_protected_nopar:cpx ,
}
\begin{syntax}
\cs{cs_set_protected_nopar:Npn} \meta{function} \meta{parameters} \Arg{code}
\end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% When the \meta{function} is used the \meta{parameters} absorbed
% cannot contain \cs{par} tokens. The assignment of a meaning
% to the \meta{function} is restricted to the current \TeX{} group
% level. The \meta{function} will not expand within an
% \texttt{x}-type or \texttt{e}-type argument.
関数\meta{function}を\meta{code}に展開されるように設定します.
\meta{code}内では\meta{parameters} (|#1|, |#2|, \dots) はその関数に
渡された引数に置換されます.\meta{function}の使用時に渡される引数に
\cs{par}トークンを含めることはできません.定義された\meta{function}は
\code{x}展開および\code{e}展開では展開されません.この\meta{function}%
の意味の設定は,現在の最も内側の\TeX グループ内でのみ有効です.
\end{function}
\begin{function}{\cs_gset:Npn, \cs_gset:cpn, \cs_gset:Npx, \cs_gset:cpx}
\begin{syntax}
\cs{cs_gset:Npn} \meta{function} \meta{parameters} \Arg{code}
\end{syntax}
% Globally sets \meta{function} to expand to \meta{code} as replacement
% text. Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% The assignment of a meaning to the \meta{function} is \emph{not}
% restricted to the current \TeX{} group level: the assignment is
% global.
関数\meta{function}を\meta{code}に展開されるようグローバルに設定します.
\meta{code}内では\meta{parameters} (|#1|, |#2|, \dots) はその関数に
渡された引数に置換されます.この\meta{function}の意味の設定は,現在の
\TeX グループに\emph{制限されません}.すなわち,この設定はグローバル
です.
\end{function}
\begin{function}
{
\cs_gset_nopar:Npn, \cs_gset_nopar:cpn,
\cs_gset_nopar:Npx, \cs_gset_nopar:cpx
}
\begin{syntax}
\cs{cs_gset_nopar:Npn} \meta{function} \meta{parameters} \Arg{code}
\end{syntax}
% Globally sets \meta{function} to expand to \meta{code} as replacement
% text. Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% When the \meta{function} is used the \meta{parameters} absorbed
% cannot contain \cs{par} tokens. The assignment of a meaning to the
% \meta{function} is \emph{not} restricted to the current \TeX{}
% group level: the assignment is global.
関数\meta{function}を\meta{code}に展開されるようグローバルに設定します.
\meta{code}内では\meta{parameters} (|#1|, |#2|, \dots) はその関数に
渡された引数に置換されます.\meta{function}の使用時に渡される引数に
\cs{par}トークンを含めることはできません.この\meta{function}の意味の
設定は,現在の\TeX グループに\emph{制限されません}.すなわち,この設定
はグローバルです.
\end{function}
\begin{function}
{
\cs_gset_protected:Npn, \cs_gset_protected:cpn,
\cs_gset_protected:Npx, \cs_gset_protected:cpx
}
\begin{syntax}
\cs{cs_gset_protected:Npn} \meta{function} \meta{parameters} \Arg{code}
\end{syntax}
% Globally sets \meta{function} to expand to \meta{code} as replacement
% text. Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% The assignment of a meaning to the \meta{function} is \emph{not}
% restricted to the current \TeX{} group level: the assignment is
% global. The \meta{function} will not expand within an
% \texttt{x}-type or \texttt{e}-type argument.
関数\meta{function}を\meta{code}に展開されるようグローバルに設定します.
\meta{code}内では\meta{parameters} (|#1|, |#2|, \dots) はその関数に
渡された引数に置換されます.この\meta{function}の意味の設定は,現在の
\TeX グループに\emph{制限されません}.すなわち,この設定はグローバル
です.定義された\meta{function}は\code{x}展開および\code{e}展開では
展開されません.
\end{function}
\begin{function}
{
\cs_gset_protected_nopar:Npn, \cs_gset_protected_nopar:cpn,
\cs_gset_protected_nopar:Npx, \cs_gset_protected_nopar:cpx
}
\begin{syntax}
\cs{cs_gset_protected_nopar:Npn} \meta{function} \meta{parameters} \Arg{code}
\end{syntax}
% Globally sets \meta{function} to expand to \meta{code} as replacement
% text. Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
% When the \meta{function} is used the \meta{parameters} absorbed
% cannot contain \cs{par} tokens. The assignment of a meaning to the
% \meta{function} is \emph{not} restricted to the current \TeX{}
% group level: the assignment is global. The \meta{function} will
% not expand within an \texttt{x}-type argument.
関数\meta{function}を\meta{code}に展開されるようグローバルに設定します.
\meta{code}内では\meta{parameters} (|#1|, |#2|, \dots) はその関数に
渡された引数に置換されます.\meta{function}の使用時に渡される引数に
\cs{par}トークンを含めることはできません.この\meta{function}の意味の
設定は,現在の\TeX グループに\emph{制限されません}.すなわち,この設定は
グローバルです.定義された\meta{function}は\code{x}展開および\code{e}展開
では展開されません.
\end{function}
%\subsection{Defining new functions using the signature}
\subsection{シグネチャを用いた関数定義}
\label{sec:l3basics:defining-new-function-2}
\begin{function}
{
\cs_new:Nn, \cs_new:cn,
\cs_new:Nx, \cs_new:cx
}
\begin{syntax}
\cs{cs_new:Nn} \meta{function} \Arg{code}
\end{syntax}
% Creates \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. The definition is global and
% an error results if the \meta{function} is already defined.
\meta{code}を置換テキストとする関数\meta{function}を作成します.
この\meta{code}内で使用できる\meta{parameters} (|#1|, |#2|, \dots)
の数は,関数シグネチャから自動的に特定されます.これらの
\meta{parameters}はその関数に渡された引数に置換されます.この定義は
グローバルで,\meta{function}が定義済みの場合はエラーが発生します.
\end{function}
\begin{function}
{
\cs_new_nopar:Nn, \cs_new_nopar:cn,
\cs_new_nopar:Nx, \cs_new_nopar:cx
}
\begin{syntax}
\cs{cs_new_nopar:Nn} \meta{function} \Arg{code}
\end{syntax}
% Creates \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. When the \meta{function} is used the \meta{parameters}
% absorbed cannot contain \cs{par} tokens. The definition is global and
% an error results if the \meta{function} is already defined.
\meta{code}を置換テキストとする関数\meta{function}を作成します.
この\meta{code}内で使用できる\meta{parameters} (|#1|, |#2|, \dots)
の数は,関数シグネチャから自動的に特定されます.これらの
\meta{parameters}はその関数に渡された引数に置換されます.
\meta{function}の使用時に渡される引数に\cs{par}トークンを含めることは
できません.この定義はグローバルで,\meta{function}が定義済みの場合は
エラーが発生します.
\end{function}
\begin{function}
{
\cs_new_protected:Nn, \cs_new_protected:cn,
\cs_new_protected:Nx, \cs_new_protected:cx
}
\begin{syntax}
\cs{cs_new_protected:Nn} \meta{function} \Arg{code}
\end{syntax}
% Creates \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. The \meta{function} will not expand within an \texttt{x}-type
% argument. The definition is global and
% an error results if the \meta{function} is already defined.
\meta{code}を置換テキストとする関数\meta{function}を作成します.
この\meta{code}内で使用できる\meta{parameters} (|#1|, |#2|, \dots)
の数は,関数シグネチャから自動的に特定されます.これらの
\meta{parameters}はその関数に渡された引数に置換されます.定義された
\meta{function}は\code{x}展開および\code{e}展開では展開されません.
この定義はグローバルで,\meta{function}が定義済みの場合はエラーが
発生します.
\end{function}
\begin{function}
{
\cs_new_protected_nopar:Nn, \cs_new_protected_nopar:cn,
\cs_new_protected_nopar:Nx, \cs_new_protected_nopar:cx
}
\begin{syntax}
\cs{cs_new_protected_nopar:Nn} \meta{function} \Arg{code}
\end{syntax}
% Creates \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. When the \meta{function} is used the \meta{parameters}
% absorbed cannot contain \cs{par} tokens. The \meta{function} will not
% expand within an \texttt{x}-type or \texttt{e}-type argument. The definition is global and
% an error results if the \meta{function} is already defined.
\meta{code}を置換テキストとする関数\meta{function}を作成します.
この\meta{code}内で使用できる\meta{parameters} (|#1|, |#2|, \dots)
の数は,関数シグネチャから自動的に特定されます.これらの
\meta{parameters}はその関数に渡された引数に置換されます.
\meta{function}の使用時に渡される引数に\cs{par}トークンを含めることは
できません.定義された\meta{function}は\code{x}展開および\code{e}展開
では展開されません.この定義はグローバルで,\meta{function}が定義済み
の場合はエラーが発生します.
\end{function}
\begin{function}
{
\cs_set:Nn, \cs_set:cn,
\cs_set:Nx, \cs_set:cx
}
\begin{syntax}
\cs{cs_set:Nn} \meta{function} \Arg{code}
\end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function.
% The assignment of a meaning to the \meta{function} is restricted to
% the current \TeX{} group level.
関数\meta{function}を\meta{code}に展開されるように設定します.
この\meta{code}内で使用できる\meta{parameters} (|#1|, |#2|, \dots)
の数は,関数シグネチャから自動的に特定されます.これらの
\meta{parameters}はその関数に渡された引数に置換されます.この定義は
グローバルで,\meta{function}が定義済みの場合はエラーが発生します.
\end{function}
\begin{function}
{
\cs_set_nopar:Nn, \cs_set_nopar:cn,
\cs_set_nopar:Nx, \cs_set_nopar:cx
}
\begin{syntax}
\cs{cs_set_nopar:Nn} \meta{function} \Arg{code}
\end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. When the \meta{function} is used the \meta{parameters}
% absorbed cannot contain \cs{par} tokens.
% The assignment of a meaning to the \meta{function} is restricted to
% the current \TeX{} group level.
関数\meta{function}を\meta{code}に展開されるように設定します.
この\meta{code}内で使用できる\meta{parameters} (|#1|, |#2|, \dots)
の数は,関数シグネチャから自動的に特定されます.これらの
\meta{parameters}はその関数に渡された引数に置換されます.
\meta{function}の使用時に渡される引数に\cs{par}トークンを含めることは
できません.この\meta{function}の意味の設定は,現在の最も内側の\TeX
グループ内でのみ有効です.
\end{function}
\begin{function}
{
\cs_set_protected:Nn, \cs_set_protected:cn,
\cs_set_protected:Nx, \cs_set_protected:cx
}
\begin{syntax}
\cs{cs_set_protected:Nn} \meta{function} \Arg{code}
\end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. The \meta{function} will not expand within an \texttt{x}-type
% argument.
% The assignment of a meaning to the \meta{function} is restricted to
% the current \TeX{} group level.
関数\meta{function}を\meta{code}に展開されるように設定します.
この\meta{code}内で使用できる\meta{parameters} (|#1|, |#2|, \dots)
の数は,関数シグネチャから自動的に特定されます.これらの
\meta{parameters}はその関数に渡された引数に置換されます.定義された
\meta{function}は\code{x}展開および\code{e}展開では展開されません.
この\meta{function}の意味の設定は,現在の最も内側の\TeX グループ内
でのみ有効です.
\end{function}
\begin{function}
{
\cs_set_protected_nopar:Nn, \cs_set_protected_nopar:cn,
\cs_set_protected_nopar:Nx, \cs_set_protected_nopar:cx
}
\begin{syntax}
\cs{cs_set_protected_nopar:Nn} \meta{function} \Arg{code}
\end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. When the \meta{function} is used the \meta{parameters}
% absorbed cannot contain \cs{par} tokens. The \meta{function} will not
% expand within an \texttt{x}-type or \texttt{e}-type argument.
% The assignment of a meaning to the \meta{function} is restricted to
% the current \TeX{} group level.
関数\meta{function}を\meta{code}に展開されるように設定します.
この\meta{code}内で使用できる\meta{parameters} (|#1|, |#2|, \dots)
の数は,関数シグネチャから自動的に特定されます.これらの
\meta{parameters}はその関数に渡された引数に置換されます.
\meta{function}の使用時に渡される引数に\cs{par}トークンを含めることは
できません.定義された\meta{function}は\code{x}展開および\code{e}展開
では展開されません.この\meta{function}の意味の設定は,現在の最も
内側の\TeX グループ内でのみ有効です.
\end{function}
\begin{function}
{
\cs_gset:Nn, \cs_gset:cn,
\cs_gset:Nx, \cs_gset:cx
}
\begin{syntax}
\cs{cs_gset:Nn} \meta{function} \Arg{code}
\end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function.
% The assignment of a meaning to the \meta{function} is global.
関数\meta{function}を\meta{code}に展開されるようグローバルに設定します.
この\meta{code}内で使用できる\meta{parameters} (|#1|, |#2|, \dots)
の数は,関数シグネチャから自動的に特定されます.これらの
\meta{parameters}はその関数に渡された引数に置換されます.この設定は
グローバルです.
\end{function}
\begin{function}
{
\cs_gset_nopar:Nn, \cs_gset_nopar:cn,
\cs_gset_nopar:Nx, \cs_gset_nopar:cx
}
\begin{syntax}
\cs{cs_gset_nopar:Nn} \meta{function} \Arg{code}
\end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. When the \meta{function} is used the \meta{parameters}
% absorbed cannot contain \cs{par} tokens.
% The assignment of a meaning to the \meta{function} is global.
関数\meta{function}を\meta{code}に展開されるようグローバルに設定します.
この\meta{code}内で使用できる\meta{parameters} (|#1|, |#2|, \dots)
の数は,関数シグネチャから自動的に特定されます.これらの
\meta{parameters}はその関数に渡された引数に置換されます.
\meta{function}の使用時に渡される引数に\cs{par}トークンを含めることは
できません.この設定はグローバルです.
\end{function}
\begin{function}
{
\cs_gset_protected:Nn, \cs_gset_protected:cn,
\cs_gset_protected:Nx, \cs_gset_protected:cx
}
\begin{syntax}
\cs{cs_gset_protected:Nn} \meta{function} \Arg{code}
\end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. The \meta{function} will not expand within an \texttt{x}-type
% argument.
% The assignment of a meaning to the \meta{function} is global.
関数\meta{function}を\meta{code}に展開されるようグローバルに設定します.
この\meta{code}内で使用できる\meta{parameters} (|#1|, |#2|, \dots)
の数は,関数シグネチャから自動的に特定されます.これらの
\meta{parameters}はその関数に渡された引数に置換されます.定義された
\meta{function}は\code{x}展開および\code{e}展開では展開されません.
この設定はグローバルです.
\end{function}
\begin{function}
{
\cs_gset_protected_nopar:Nn, \cs_gset_protected_nopar:cn,
\cs_gset_protected_nopar:Nx, \cs_gset_protected_nopar:cx
}
\begin{syntax}
\cs{cs_gset_protected_nopar:Nn} \meta{function} \Arg{code}
\end{syntax}
% Sets \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. When the \meta{function} is used the \meta{parameters}
% absorbed cannot contain \cs{par} tokens. The \meta{function} will not
% expand within an \texttt{x}-type or \texttt{e}-type argument.
% The assignment of a meaning to the \meta{function} is global.
関数\meta{function}を\meta{code}に展開されるようグローバルに設定します.
この\meta{code}内で使用できる\meta{parameters} (|#1|, |#2|, \dots)
の数は,関数シグネチャから自動的に特定されます.これらの
\meta{parameters}はその関数に渡された引数に置換されます.
\meta{function}の使用時に渡される引数に\cs{par}トークンを含めることは
できません.定義された\meta{function}は\code{x}展開および\code{e}展開
では展開されません.この設定はグローバルです.
\end{function}
\begin{function}[updated = 2012-01-14]
{
\cs_generate_from_arg_count:NNnn,
\cs_generate_from_arg_count:cNnn,
\cs_generate_from_arg_count:Ncnn
}
\begin{syntax}
\cs{cs_generate_from_arg_count:NNnn} \meta{function} \meta{creator} \Arg{number} \Arg{code}
\end{syntax}
% Uses the \meta{creator} function (which should have signature
% |Npn|, for example \cs{cs_new:Npn}) to define a \meta{function}
% which takes \meta{number} arguments and has \meta{code} as
% replacement text. The \meta{number} of arguments is an integer expression,
% evaluated as detailed for \cs{int_eval:n}.
関数を作成する関数\meta{creator}を用いて,関数\meta{function}を引数を
\meta{number}個取り,置換テキストを\meta{code}とするものとして定義
します.\meta{creator}は\cs{cs_new:Npn}などシグネチャ|Npn|をもつ関数
である必要があります.引数の数\meta{number}は整数表現で,\cs{int_eval:n}%
関数のところで説明されるように評価されます.
\end{function}
%\subsection{Copying control sequences}
\subsection{制御綴の複製}
%Control sequences (not just functions as defined above) can
%be set to have the same meaning using the functions described
%here. Making two control sequences equivalent means that the
%second control sequence is a \emph{copy} of the first (rather than
%a pointer to it). Thus the old and new control sequence are not
%tied together: changes to one are not reflected in the other.
制御綴は(上記の方法で定義された関数以外のものも含めて)ここで紹介する
関数を用いることにより,別の制御綴と同一の意味を持つように設定することが
可能です.2つの制御綴を同一化するということは,一方の制御綴をもう一方に
(ポインタを張るのではなく)コピーするということを意味します.したがって
元の制御綴と新しい制御綴は互いに関係を持ちません.つまり,一方の意味を
変更したとしても,もう一方には影響を及ぼさないということです.
%In the following text \enquote{cs} is used as an abbreviation for
%\enquote{control sequence}.
以下の説明では略語\enquote{cs}を制御綴 (control sequence) の意味で
用います.
\begin{function}
{\cs_new_eq:NN, \cs_new_eq:Nc, \cs_new_eq:cN, \cs_new_eq:cc}
\begin{syntax}
\cs{cs_new_eq:NN} \meta{cs_1} \meta{cs_2}
\cs{cs_new_eq:NN} \meta{cs_1} \meta{token}
\end{syntax}
% Globally creates \meta{control sequence_1} and sets it to have the same
% meaning as \meta{control sequence_2} or <token>.
% The second control sequence may
% subsequently be altered without affecting the copy.
\meta{cs_1}をグローバルに作成し,その意味を\meta{cs_2}または\meta{token}と
同じものに設定します.\meta{cs_2}の意味がその後に変更されたとしても,
コピーには影響を与えません.
\end{function}
\begin{function}
{\cs_set_eq:NN, \cs_set_eq:Nc, \cs_set_eq:cN, \cs_set_eq:cc}
\begin{syntax}
\cs{cs_set_eq:NN} \meta{cs_1} \meta{cs_2}
\cs{cs_set_eq:NN} \meta{cs_1} \meta{token}
\end{syntax}
% Sets \meta{control sequence_1} to have the same meaning as
% \meta{control sequence_2} (or <token>).
% The second control sequence may subsequently be
% altered without affecting the copy. The assignment of a meaning
% to the \meta{control sequence_1} is restricted to the current
% \TeX{} group level.
\meta{cs_1}を\meta{cs_2}または\meta{token}と同じ意味を持つように設定します.
\meta{cs_2}の意味がその後に変更されたとしても,コピーには影響を与えません.
\meta{cs_1}への意味の代入は現在の\TeX グループの中でのみ有効です.
\end{function}
\begin{function}
{\cs_gset_eq:NN, \cs_gset_eq:Nc, \cs_gset_eq:cN, \cs_gset_eq:cc}
\begin{syntax}
\cs{cs_gset_eq:NN} \meta{cs_1} \meta{cs_2}
\cs{cs_gset_eq:NN} \meta{cs_1} \meta{token}
\end{syntax}
% Globally sets \meta{control sequence_1} to have the same meaning as
% \meta{control sequence_2} (or <token>).
% The second control sequence may subsequently be
% altered without affecting the copy. The assignment of a meaning to
% the \meta{control sequence_1} is \emph{not} restricted to the current
% \TeX{} group level: the assignment is global.
\meta{cs_1}を\meta{cs_2}または\meta{token}と同じ意味を持つようにグローバル
に設定します.\meta{cs_2}の意味がその後に変更されたとしても,コピーには
影響を与えません.\meta{cs_1}への意味の代入は現在の\TeX グループの中に
制限されません.この代入はグローバルです.
\end{function}
%\subsection{Deleting control sequences}
\subsection{制御綴の削除}
%There are occasions where control sequences need to be deleted.
%This is handled in a very simple manner.
時として制御綴を削除したい場合があります.次の関数は,この需要をとても
シンプルに満たします.
\begin{function}[updated = 2011-09-15]{\cs_undefine:N, \cs_undefine:c}
\begin{syntax}
\cs{cs_undefine:N} \meta{control sequence}
\end{syntax}
% Sets \meta{control sequence} to be globally undefined.
制御綴\meta{control sequence}をグローバルに未定義にします.
\end{function}
%\subsection{Showing control sequences}
\subsection{制御綴の表示}
\begin{function}[EXP, updated = 2011-12-22]{\cs_meaning:N, \cs_meaning:c}
\begin{syntax}
\cs{cs_meaning:N} \meta{control sequence}
\end{syntax}
% This function expands to the \emph{meaning} of the \meta{control sequence}
% control sequence. For a macro, this includes the \meta{replacement text}.
この関数は制御綴\meta{control sequence}の「意味」へと展開されます.
マクロについては,その「意味」には置換テキストも含まれます.
%
\begin{texnote}
% This is \TeX{}'s \tn{meaning} primitive.
% For tokens that are not control sequences, it is more logical to
% use \cs{token_to_meaning:N}.
% The \texttt{c} variant correctly reports undefined arguments.
これは\TeX の\tn{meaning}プリミティブです.制御綴以外のトークンに対しては
\cs{token_to_meaning:N}関数を用いる方が論理的です.\code{c}変種では,
未定義の制御綴名についてはその旨を正しく報告します.
\end{texnote}
\end{function}
\begin{function}[updated = 2017-02-14]{\cs_show:N, \cs_show:c}
\begin{syntax}
\cs{cs_show:N} \meta{control sequence}
\end{syntax}
% Displays the definition of the \meta{control sequence} on the
% terminal.
制御綴\meta{control sequence}の定義をターミナルに表示します.
%
\begin{texnote}
% This is similar to the \TeX{} primitive \tn{show}, wrapped to a
% fixed number of characters per line.
これは\TeX プリミティブ\tn{show}と類似していますが,行における文字数が
固定されるようラップされています.
\end{texnote}
\end{function}
\begin{function}[added = 2014-08-22, updated = 2017-02-14]{\cs_log:N, \cs_log:c}
\begin{syntax}
\cs{cs_log:N} \meta{control sequence}
\end{syntax}
% Writes the definition of the \meta{control sequence} in the log
% file. See also \cs{cs_show:N} which displays the result in the
% terminal.
制御綴\meta{control sequence}の定義をログファイルに書き込みます.
ターミナルに定義を表示する\cs{cs_show:N}も参照してください.
\end{function}
%\subsection{Converting to and from control sequences}
\subsection{制御綴と文字列の相互変換}
\begin{function}[EXP]{\use:c}
\begin{syntax}
\cs{use:c} \Arg{control sequence name}
\end{syntax}
% Expands the \meta{control sequence name} until only characters
% remain, and then converts this into a control sequence. This process
% requires two expansions. As in other \texttt{c}-type arguments the
% \meta{control sequence name} must, when fully expanded, consist of
% character tokens, typically a mixture of category code $10$ (space),
% $11$ (letter) and $12$ (other).
制御綴名\meta{control sequence name}を文字のみが残る状態まで展開し,
その後その文字列を制御綴へと変換します.この処理には2回の展開が必要
です.他の\code{c}タイプの引数と同様に\meta{control sequence name}は
完全展開された状態では必ず文字トークンで構成されている必要があります.
つまり,典型的にはカテゴリーコードが$10$(空白),$11$(文字),$12$
(その他の文字)のいずれかをもつトークンの混合になります.
%
\begin{texnote}
% Protected macros that appear in a \texttt{c}-type argument are
% expanded despite being protected; \cs{exp_not:n} also has no
% effect. An internal error occurs if non-characters or active
% characters remain after full expansion, as the conversion to a
% control sequence is not possible.
\code{c}タイプの引数の中では保護付きのマクロも関係なく展開されます.
\cs{exp_not:n}も同様に無効です.完全展開の後も文字以外のトークンや
アクティブ文字が残る場合,制御綴への変換ができないため内部エラーが
発生します.
\end{texnote}
\end{function}
%As an example of the \cs{use:c} function, both
\cs{use:c}の使用例を挙げます.
%
\begin{verbatim}
\use:c { a b c }