적절한 아래 첨자와 위 첨자, 사용자 정의 인수가 포함된 복합 용어집 명령

적절한 아래 첨자와 위 첨자, 사용자 정의 인수가 포함된 복합 용어집 명령

gls 기호를 결합하는 데 도움이 되는 매크로를 만들고 싶습니다. 각 복합 기호는 본문과 (선택적으로) 위 첨자 및 아래 첨자(그 자체가 gls 기호이며 아래/위 첨자에 대한 다른 기호 목록에 나열됨)로 구성되어야 합니다. 또한 일부 복합 기호에 대한 사용자 정의 인수를 추가하고 싶습니다. 내가 달성하고 싶은 것의 한 가지 예: 여기에 이미지 설명을 입력하세요

내 문제는 다음과 같습니다.

  1. 화합물 뒤에 추가되는 하위/위 첨자가 "복합" 하위/위 첨자에 추가되는지 확인하려면 정의된 매크로( ) xparse의 마지막 두 매개 변수로 장식 기능을 사용해야 합니다.E{^_}{{}{}}
  2. 를 통해 얼마나 많은 사용자 정의 인수가 추가되는지 미리 모르기 때문에 args=장식에 어떤 매개변수 번호가 포함될지 알 수 없습니다(즉, 인수 수를 세고 매개변수 번호를 동적으로 추가해야 합니다).

나는 다음 코드를 생각해 냈습니다(작동하지 않습니다). 여기서 주요 문제는 매크로가 최종적으로 정의되기 전에 장식( \l_compound_supparameter_tl및 )에 대한 매개변수 번호를 보유하는 변수가 확장되도록 올바른 확장이라고 생각합니다. \l_compound_subparameter_tl게다가 쉼표로 구분된 인수 사양만 args.

\documentclass[margin=5mm]{standalone}

\usepackage[symbols]{glossaries}
\newglossaryentry{body}{
    type=symbols,
    name={body},
    symbol={B},
    description={A body.}
}
\newglossaryentry{phase}{
    type=symbols,
    name={phase},
    symbol={\alpha},
    description={A material phase.}
}
\newglossaryentry{index}{
    type=symbols,
    name={index},
    symbol={i},
    description={A body index.}
}

\ExplSyntaxOn

% Define the keys
\keys_define:nn { my/glscompound }{
    body        .tl_set:N = \l_compound_body_tl,
    args        .tl_set:N = \l_compound_args_tl,
    superscript .tl_set:N = \l_compound_superscript_tl,
    superscript .initial:n = {},
    subscript   .tl_set:N = \l_compound_subscript_tl,
    subscript   .initial:n = {},
}

\tl_new:N \l_compound_supparameter_tl  % stores the macro parameter for superscript (e.g. #3)
\tl_new:N \l_compound_subparameter_tl  % stores the macro parameter for subscript (e.g. #4)

\cs_generate_variant:Nn \exp_args:Nnnx { NnVx }

\NewDocumentCommand{\NewGlsCompound}{ m m }{
    \tl_clear:N \l_compound_body_tl
    \tl_clear:N \l_compound_args_tl
    \tl_clear:N \l_compound_superscript_tl
    \tl_clear:N \l_compound_subscript_tl
    \tl_set:Nn \l_compound_supparameter_tl { # }
    \tl_set:Nn \l_compound_subparameter_tl { # }

    \keys_set:nn { my/glscompound } { #2 }

    % convert tl to sequence of arguments
    \seq_set_split:NnV \l_tmpa_seq { , } \l_compound_args_tl

    % get the count of the seq to determine the number of custom arguments
    \int_set:Nn \l_tmpa_int { \seq_count:N \l_tmpa_seq }

    % parameter number of superscript
    \int_incr:N \l_tmpa_int 
    \tl_put_right:NV \l_compound_supparameter_tl \l_tmpa_int

    % parameter number of subscript
    \int_incr:N \l_tmpa_int 
    \tl_put_right:NV \l_compound_subparameter_tl \l_tmpa_int

    % convert the arument seq to a single tl
    \tl_set:No \l_compound_args_tl { \seq_use:Nn \l_tmpa_seq { , } }

    % append the sub/superscript arguments
    \tl_put_right:Nn \l_compound_args_tl { ~E{^_}{{}{}} }

    % Define the new command
    \exp_args:NnVx \NewDocumentCommand {#1} \l_compound_args_tl {
        \l_compound_body_tl

        % superscript

        % evaluated during runtime, if an additional superscript as parameter
        % '\l_compound_supparameter_tl' is given
        \IfValueT{ \l_compound_supparameter_tl }{ 
            % append the custom superscript to the body of the compound superscript
            \tl_put_right:Nn \l_compound_superscript_tl { \l_compound_supparameter_tl } 
        }
        % if the body of the superscript is not empty, call the superscript macro
        \tl_if_blank:VF \l_compound_superscript_tl { \sp{ \l_compound_superscript_tl } } 
        
        % subscript (same as superscript)
        \IfValueT{ \l_compound_supparameter_tl }{ 
            \tl_put_right:Nn \l_compound_subscript_tl { \l_compound_supparameter_tl }
        }
        \tl_if_blank:VF \l_compound_subscript_tl { \sb{ \l_compound_subscript_tl } }
    }
}
\ExplSyntaxOff

\NewGlsCompound{\Body}{
    body = { \glssymbol{body} },
    args = { O{arg1}, O{arg2} }, % this is comma separated list of arguments
    superscript = { \glssymbol{phase},#1 },
    subscript   = { \glssymbol{index},#2 },
}

\begin{document}
\begin{minipage}{.7\textwidth}
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{l l}
    \verb+\Body+                &\(\rightarrow \Body\)\\
    \verb+\Body^{,a}_{,y}+      &\(\rightarrow \Body^{,a}_{,y}\)\\
    \verb+\Body[foo]+           &\(\rightarrow \Body[foo]\)\\
    \verb+\Body[foo]^{,x}+      &\(\rightarrow \Body[foo]^{,x}\)\\
    \verb+\Body[foo][bar]^{,x}+ &\(\rightarrow \Body[foo][bar]^{,x}\)
\end{tabular}
\end{minipage}
\end{document}

그 확장 문제를 해결하는 데 도움을 주시면 매우 감사하겠습니다!

답변1

  • 우선 xparse-argument-signature에 의해 지정된 인수의 양을 계산하는 루틴이 필요합니다.

    아래 예에서는 이것이 루틴입니다 \MYSTUFF_xparse_arg_signature_count:n.

    \__cmd_split_signature:n에서 설명한 루틴의 코드를 표절해서 작성했습니다.LaTeX 2ε 소스에 댓글을 달았습니다., 파일 g: ltcmd.dtx 날짜: 2023-08-19 버전 v1.2a, 섹션 "1.7.2 명령 정의 표시".

    루틴은 \MYSTUFF_xparse_arg_signature_count:n의 인스턴스에 대한 x-parse-argument-signature를 형성하는 인수를 사용합니다 \NewDocumentCommand.
    두 확장 단계 이후의 루틴은 x-parse-argument-signature에 의해 지정된 인수의 양을 10진수 표기법으로 나타내는 일련의 숫자 토큰을 반환합니다.

  • 또 다른 문제는 undescore가 범주 코드 11(문자)를 갖도록 while을 정의할 때 정의된 명령의 -type 인수의 _장식 사양에 범주 8(아래 첨자)의 밑줄( )을 추가하는 것입니다 .E\NewGlsCompound\NewGlsCompound\ExplSyntaxOn

이것이 내가 할 수 있는 방법입니다:

%\errorcontextlines=10000
\ExplSyntaxOn
%-------------------------------------------------------------------------------
\cs_new:Nn \MYSTUFF_xparse_arg_signature_count:n 
  {
    \exp:w \exp_after:wN \exp_after:wN \exp_after:wN \exp_end:
    \int_eval:n
      {
        0 \__MYSTUFF_xparse_arg_signature_count_loop:Nw #1 
        \q_recursion_tail \q_recursion_stop
      }
  }
\cs_new:Npn \__MYSTUFF_xparse_arg_signature_count_loop:Nw #1
  {
    \quark_if_recursion_tail_stop:N #1
    \tl_if_exist:cTF
      { c_MYSTUFF_xparse_map_arg_type_to_argclass_\tl_to_str:n{#1}_tl }
      {
        \tl_use:c
          { c_MYSTUFF_xparse_map_arg_type_to_argclass_\tl_to_str:n{#1}_tl }
      }
      { +1 \__MYSTUFF_xparse_arg_signature_count_loop:Nw }
  }
\cs_set:Npn \__cmd_tmp:w #1 #2
  {
    \quark_if_nil:nF
      {#1}
      { 
        \tl_const:cn { c_MYSTUFF_xparse_map_arg_type_to_argclass_#1_tl } {#2} 
        \__cmd_tmp:w 
      }
  }
\__cmd_tmp:w
  t{\__MYSTUFF_xparse_arg_remove_arg_specification_of_class_delim:w}
  r{\__MYSTUFF_xparse_arg_remove_arg_specification_of_class_delims:w}
  d{\__MYSTUFF_xparse_arg_remove_arg_specification_of_class_delims:w}
  R{\__MYSTUFF_xparse_arg_remove_arg_specification_of_class_delims_opt:w}
  D{\__MYSTUFF_xparse_arg_remove_arg_specification_of_class_delims_opt:w}
  O{\__MYSTUFF_xparse_arg_remove_arg_specification_of_class_opt:w}
  e{\__MYSTUFF_xparse_arg_remove_arg_specification_of_class_e:w}
  E{\__MYSTUFF_xparse_arg_remove_arg_specification_of_class_E:w}
  +{\__MYSTUFF_xparse_arg_remove_arg_specification_of_class_prefix:w}
  !{\__MYSTUFF_xparse_arg_remove_arg_specification_of_class_prefix:w}
  >{\__MYSTUFF_xparse_arg_remove_arg_specification_of_class_processor:w}
  ={\__MYSTUFF_xparse_arg_remove_arg_specification_of_class_processor:w}
  \q_nil \q_nil
  %------------
\cs_new:Npn \__MYSTUFF_xparse_arg_remove_arg_specification_of_class_delim:w
            #1
            { +1 \__MYSTUFF_xparse_arg_signature_count_loop:Nw }
\cs_new:Npn \__MYSTUFF_xparse_arg_remove_arg_specification_of_class_delims:w
            #1 #2
            { +1 \__MYSTUFF_xparse_arg_signature_count_loop:Nw }
\cs_new:Npn \__MYSTUFF_xparse_arg_remove_arg_specification_of_class_delims_opt:w
            #1 #2 #3
            { +1 \__MYSTUFF_xparse_arg_signature_count_loop:Nw }
\cs_new:Npn \__MYSTUFF_xparse_arg_remove_arg_specification_of_class_opt:w
            #1
            { +1 \__MYSTUFF_xparse_arg_signature_count_loop:Nw }
\cs_new:Npn \__MYSTUFF_xparse_arg_remove_arg_specification_of_class_e:w
            #1
            { +\tl_count:n{#1} \__MYSTUFF_xparse_arg_signature_count_loop:Nw }
\cs_new:Npn \__MYSTUFF_xparse_arg_remove_arg_specification_of_class_E:w
            #1 #2
            { +\tl_count:n{#1} \__MYSTUFF_xparse_arg_signature_count_loop:Nw }
\cs_new:Npn \__MYSTUFF_xparse_arg_remove_arg_specification_of_class_prefix:w
            { \__MYSTUFF_xparse_arg_signature_count_loop:Nw }
\cs_new:Npn \__MYSTUFF_xparse_arg_remove_arg_specification_of_class_processor:w
            #1
            { \__MYSTUFF_xparse_arg_signature_count_loop:Nw }
%-------------------------------------------------------------------------------
\cs_if_exist:NF \IfBlankF { \cs_new_eq:NN \IfBlankF \tl_if_blank:nF }
\cs_if_exist:NF \IfBlankT { \cs_new_eq:NN \IfBlankT \tl_if_blank:nT }
\cs_if_exist:NF \IfBlankTF { \cs_new_eq:NN \IfBlankTF \tl_if_blank:nTF }
%-------------------------------------------------------------------------------
\tl_new:N \l_MYSTUFF_GLSCOMPOUND_body_tl
\tl_new:N \l_MYSTUFF_GLSCOMPOUND_args_tl
\tl_new:N \l_MYSTUFF_GLSCOMPOUND_superscript_tl
\tl_new:N \l_MYSTUFF_GLSCOMPOUND_subscript_tl
\tl_new:N \l_MYSTUFF_GLSCOMPOUND_supparameter_tl
\tl_new:N \l_MYSTUFF_GLSCOMPOUND_subparameter_tl
%-------------------------------------------------------------------------------
\keys_define:nn { MYSTUFF/GLSCOMPOUND }{
  body.tl_set:N = \l_MYSTUFF_GLSCOMPOUND_body_tl,
  args.tl_set:N = \l_MYSTUFF_GLSCOMPOUND_args_tl,
  superscript.tl_set:N = \l_MYSTUFF_GLSCOMPOUND_superscript_tl,
  subscript.tl_set:N = \l_MYSTUFF_GLSCOMPOUND_subscript_tl,
}
% ------------------------------------------------------------------------------
% Use expl3-infrastructure for providing error-message in case the key
% "body" is not specified in the 2nd argument of \NewGlsCompound.
% ..............................................................................
\prop_gput:Nnn \g_msg_module_type_prop { MYSTUFF_GLSCOMPOUND } {}
\prop_gput:Nnn
  \g_msg_module_name_prop
  { MYSTUFF_GLSCOMPOUND } 
  {Macro-Defined-In-Preamble:}
\msg_new:nnnn {MYSTUFF_GLSCOMPOUND} 
              {No Value specified}
              {Macro~#1:~No~value~for~key~"#3"~specified.}
              {In~the~#2~argument~a~value~for~key~"#3"~must~be~specified~%
               when~calling~macro~#1.}
\cs_new:Npn \NoValueSpecifiedError #1#2#3 {
  \exp_args:Nne \use:nn {
    \msg_error:nnnnn {MYSTUFF_GLSCOMPOUND} {No Value specified}
   }{{\iow_char:N \\ \cs_to_str:N#1}}{#2}{#3}
}%
%-------------------------------------------------------------------------------
% In order to get _ of category 8(subscript) and ^ of category 7(superscript)
% into the embellishment specification of the E-type argument of the command
% defined via \NewGlsCompound, define a scratch variant of \NewGlsCompound
% which as arguments grabs these tokens and redefines itself.
\group_begin:
\cs_set:Npn \NewGlsCompound #1#2
  {
    \group_end:
    \NewDocumentCommand \NewGlsCompound {mm} {
      \group_begin:
      \exp_args:Nnx \keys_set:nn { MYSTUFF/GLSCOMPOUND } { 
        body={\exp_not:o{\c_novalue_tl}},
        args={},
        superscript={},
        subscript={}
      }
      \keys_set:nn { MYSTUFF/GLSCOMPOUND } { ##2 }
      \exp_args:NV \tl_if_novalue:nTF
        \l_MYSTUFF_GLSCOMPOUND_body_tl
        { \group_end: \NoValueSpecifiedError{\NewGlsCompound}{second}{body} }
        {
          \tl_set:Nf \l_MYSTUFF_GLSCOMPOUND_supparameter_tl 
            {
              \int_eval:n
                {
                  \exp_args:No \MYSTUFF_xparse_arg_signature_count:n
                               {\l_MYSTUFF_GLSCOMPOUND_args_tl} + 1 
                } 
            }
          \tl_set:Nf \l_MYSTUFF_GLSCOMPOUND_subparameter_tl
            {
              \int_eval:n
                {
                  \tl_use:N \l_MYSTUFF_GLSCOMPOUND_supparameter_tl + 1
                }
            }
          \tl_put_left:Nn \l_MYSTUFF_GLSCOMPOUND_supparameter_tl {####}
          \tl_put_left:Nn \l_MYSTUFF_GLSCOMPOUND_subparameter_tl {####}
          \tl_put_right:Nn \l_MYSTUFF_GLSCOMPOUND_args_tl { E{#1#2}{{}{}} }
          \__MYSTUFF_GLSCOMPOUND_set_scriptdirective_to_tokenlist:NNN
              \l_MYSTUFF_GLSCOMPOUND_superscript_tl
              \l_MYSTUFF_GLSCOMPOUND_supparameter_tl
              #1
          \__MYSTUFF_GLSCOMPOUND_set_scriptdirective_to_tokenlist:NNN
              \l_MYSTUFF_GLSCOMPOUND_subscript_tl
              \l_MYSTUFF_GLSCOMPOUND_subparameter_tl
              #2
          \exp_args:Nnx 
            \use:nn 
            { \group_end: \NewDocumentCommand {##1} }
            {
              { \exp_not:o{\l_MYSTUFF_GLSCOMPOUND_args_tl} }
              {
                \exp_not:o{ \l_MYSTUFF_GLSCOMPOUND_body_tl}
                \exp_not:o{\l_MYSTUFF_GLSCOMPOUND_superscript_tl}
                \exp_not:o{\l_MYSTUFF_GLSCOMPOUND_subscript_tl} 
              }
            }
        }
    }
  }
\char_set_catcode_math_superscript:N \^
\char_set_catcode_math_subscript:N \_
\NewGlsCompound{^}{_}
% Scratch-\NewGlsCompound im the line above does 
% \group_end:
%--------------------
\cs_new:Nn \__MYSTUFF_GLSCOMPOUND_set_scriptdirective_to_tokenlist:NNN
  {
    % #1 = \l_MYSTUFF_GLSCOMPOUND_superscript_tl / 
    %      \l_MYSTUFF_GLSCOMPOUND_subscript_tl
    % #2 = \l_MYSTUFF_GLSCOMPOUND_supparameter_tl /
    %      \l_MYSTUFF_GLSCOMPOUND_subparameter_tl
    % #3 = _ (subscript) or  ^ (subscript)
    \__MYSTUFF_GLSCOMPOUND_set_scriptdirective_to_tokenlist:NVVN#1#1#2#3
  }
\cs_new:Nn \__MYSTUFF_GLSCOMPOUND_set_scriptdirective_to_tokenlist:NnnN
  {
    % #1 = \l_MYSTUFF_GLSCOMPOUND_superscript_tl /
    %      \l_MYSTUFF_GLSCOMPOUND_subscript_tl
    % #2 = content of \l_MYSTUFF_GLSCOMPOUND_superscript_tl /
    %      content of \l_MYSTUFF_GLSCOMPOUND_subscript_tl
    % #3 = content of \l_MYSTUFF_GLSCOMPOUND_supparameter_tl /
    %      content of \l_MYSTUFF_GLSCOMPOUND_subparameter_tl
    % #4 = _ (subscript) or  ^ (subscript)
    \tl_if_blank:nTF{#2}
      {
        \tl_set:Nn
          #1 
          { 
            \tl_if_blank:oF 
              {
                \exp:w
                \tl_if_blank:nTF{#3}{\use:n}{\use_ii_i:nn{#3}}{\exp_end:} 
              }
              {
                #4
                {
                  \exp:w
                  \tl_if_blank:nTF{#3}{\use:n}{\use_ii_i:nn{#3}}{\exp_end:}
                }
              }
          }
      }
      {
        \tl_set:Nn
          #1
          { 
            \tl_if_blank:oF
              {
                \exp:w 
                \tl_if_blank:nTF{#3}{\use:n}{\use_ii_i:nn{,#3}}{\exp_end:#2}
              }
              {
                #4
                {
                  \exp:w
                  \tl_if_blank:nTF{#3}{\use:n}{\use_ii_i:nn{,#3}}{\exp_end: #2}
                }
              }
          }
      }
  }
\cs_generate_variant:Nn
  \__MYSTUFF_GLSCOMPOUND_set_scriptdirective_to_tokenlist:NnnN
  { NVVN }
\ExplSyntaxOff


\documentclass[margin=5mm]{standalone}

\usepackage{array}

\usepackage[symbols]{glossaries}
\newglossaryentry{body}{
    type=symbols,
    name={body},
    symbol={B},
    description={A body.}
}
\newglossaryentry{phase}{
    type=symbols,
    name={phase},
    symbol={\alpha},
    description={A material phase.}
}
\newglossaryentry{index}{
    type=symbols,
    name={index},
    symbol={i},
    description={A body index.}
}

\NewGlsCompound{\Body}{
  body = {\glssymbol{body}},
  args = {O{arg1} O{arg2}}, 
  superscript = {\glssymbol{phase}\IfBlankF{#1}{,#1}},
  subscript   = {\glssymbol{index}\IfBlankF{#2}{,#2}}
}

%\NewGlsCompound{\Stuff}{
%%  body = {stuff},
%  args = { }, 
%  superscript = {up},
%  subscript   = {down}
%}

\begin{document}

\begin{minipage}{\textwidth}
%  \(\Stuff^{2up}_{2down}\) \par\bigskip
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{l>{\(\rightarrow\)}c>{\(}l<{\)}}
\verb|\Body|&&\Body\\
\verb|\Body[foo]|&&\Body[foo]\\
\verb|\Body[foo][bar]|&&\Body[foo][bar]\\
\verb|\Body^{X}|&&\Body^{X}\\
\verb|\Body[foo]^{X}|&&\Body[foo]^{X}\\
\verb|\Body[foo][bar]^{X}|&&\Body[foo][bar]^{X}\\
\verb|\Body_{Y}|&&\Body_{Y}\\
\verb|\Body[foo]_{Y}|&&\Body[foo]_{Y}\\
\verb|\Body[foo][bar]_{Y}|&&\Body[foo][bar]_{Y}\\
\verb|\Body^{X}_{Y}|&&\Body^{X}_{Y}\\
\verb|\Body[foo]^{X}_{Y}|&&\Body[foo]^{X}_{Y}\\
\verb|\Body[foo][bar]^{X}_{Y}|&&\Body[foo][bar]^{X}_{Y}\\
\multicolumn{3}{l}{Behavior when specifying optional arguments blank:}\\
\verb|\Body[ ]|&&\Body[ ]\\
\verb|\Body[ ][ ]|&&\Body[ ][ ]\\
\verb|\Body[ ]^{X}|&&\Body[ ]^{X}\\
\verb|\Body[ ][ ]^{X}|&&\Body[ ][ ]^{X}\\
\verb|\Body[ ]_{Y}|&&\Body[ ]_{Y}\\
\verb|\Body[ ][ ]_{Y}|&&\Body[ ][ ]_{Y}\\
\verb|\Body[ ]^{X}_{Y}|&&\Body[ ]^{X}_{Y}\\
\verb|\Body[ ][ ]^{X}_{Y}|&&\Body[ ][ ]^{X}_{Y}\\
\multicolumn{3}{l}{Behavior when specifying embellishments blank:}\\
\verb|\Body^{ }|&&\Body^{ }\\
\verb|\Body[foo]^{ }|&&\Body[foo]^{ }\\
\verb|\Body[foo][bar]^{ }|&&\Body[foo][bar]^{ }\\
\verb|\Body_{ }|&&\Body_{ }\\
\verb|\Body[foo]_{ }|&&\Body[foo]_{ }\\
\verb|\Body[foo][bar]_{ }|&&\Body[foo][bar]_{ }\\
\verb|\Body^{ }_{ }|&&\Body^{ }_{ }\\
\verb|\Body[foo]^{ }_{ }|&&\Body[foo]^{ }_{ }\\
\verb|\Body[foo][bar]^{ }_{ }|&&\Body[foo][bar]^{ }_{ }\\
\multicolumn{3}{l}{Behavior when specifying optional args and
                   embellishments blank:}\\
\verb|\Body[ ]^{ }|&&\Body[ ]^{ }\\
\verb|\Body[ ][ ]^{ }|&&\Body[ ][ ]^{ }\\
\verb|\Body[ ]_{ }|&&\Body[ ]_{ }\\
\verb|\Body[ ][ ]_{ }|&&\Body[ ][ ]_{ }\\
\verb|\Body[ ]^{ }_{ }|&&\Body[ ]^{ }_{ }\\
\verb|\Body[ ][ ]^{ }_{ }|&&\Body[ ][ ]^{ }_{ }
\end{tabular}
\end{minipage}

\end{document}

여기에 이미지 설명을 입력하세요

주의사항:

  • \Body^_{down}장식 인수의 값을 어디로 _가져갈 것인지 같은 작업을 수행하지 마십시오 ^.

  • 매크로 ^에는 로 표시된 선택적 장식 인수 외에도 두 개의 후속 -구분 선택적 인수가 있습니다 . 따라서 첫 번째 -delimited 선택적 인수도 명시적으로 지정하여 기본값을 제공하는 것 외에 첫 번째 -delimited 선택적 인수 의 기본값을 고수하면서 이러한 -delimited 선택적 인수 중 두 번째에 대해서만 기본값에서 벗어날 수 있는 방법이 없습니다. ._\Body[...][...][...][...]

  • 현재(2024년 1월 13일, 07:18:40(UTC + 0000)) xparse-argument-signature로 표시된 인수를 계산하기 위한 적절한 공식 인터페이스가 없는 것 같습니다.
    따라서 \MYSTUFF_xparse_arg_signature_count:n향후 LaTeX 릴리스에서 내부 사항이 변경되면 중단될 수 있습니다. 예를 들어 비표준 구문 분석/계산이 포함된 더 많은 xparse-argument-types가 추가되어 인수 서명 구문 분석 메커니즘을 조정해야 하는 경우입니다.

  • \MYSTUFF_xparse_arg_signature_count:n유효한 xparse-argument-signature인 인수에 대해 오류 검사가 구현되지 않았습니다 . 유효한 xparse-argument-signature인 args매크로의 두 번째 인수 키 값에 대한 오류 검사도 구현되지 않습니다 . 따라서 값이 첫 번째 인수에 표시된 명령을 통해 정의하여 \NewGlsCompound트리거된 유효한 xparse-argument-signature 시도를 형성하지 않는 경우 알 수 없는 인수 유형 등에 대한 오류 메시지가 나타날 수 있습니다.\NewGlsCompound\NewDocumentCommand

관련 정보