처음 사용하지 않고 특정 용어집 필드에 액세스

처음 사용하지 않고 특정 용어집 필드에 액세스

용어집 항목을 생성하는 동안 수동으로 구성된 필드 중 매크로나 새 명령(아마도 다음 형식)을 통해 수동으로/고의적으로 액세스할 수 있는지 알고 싶습니다.

\newcommand{\expectedFirst}[1]{???}

어디 ??? 짧은, 이름, 레이블, 긴, 설명, 첫 번째 복수형 등과 같은 미리 정의된 필드를 가져오기 위해 gls 레이블 #1을 사용하는 정의입니다. 가져오려는 각 필드에 대해 새 명령을 만들거나 아마도 사용

\newcommand{\expectedField}[2]{???}

여기서 #1은 레이블 문자열이고 #2는 추출하거나 액세스할 수 있게 만들려는 필드를 나타냅니다.

.dtx 용어집 파일을 살펴봤지만 외부에서 복제할 수 있는 변수 생성처럼 보이는 매크로 정의를 찾지 못했습니다. 흥미롭고 잠재적으로 유용해 보이는 것은 해당 용어가 아직 호출되었는지 여부를 추적하는 추적 부울이 있다는 것입니다. 이 부울은 내 사용자 정의 매크로와 비교하고 싶은 또 다른 변수입니다.

MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}

\setlength\parindent{0pt}


%=========================================================================================================================================
% PACKAGES REQUIRED FOR GLOSSARIES
%=========================================================================================================================================

% Glossaries must be loaded before amsmath as per details in the following forum answer
% http://tex.stackexchange.com/questions/85696/what-causes-this-strange-interaction-between--and-amsmath
\usepackage[nogroupskip,toc,acronym]{glossaries} % must come after href   
\usepackage{scrwfile}%http://www.dickimaw-books.com/cgi-bin/faq.cgi?action=view&categorylabel=glossaries#glsnewwriteexceeded

\makeglossaries

\newglossaryentry{ICPMS}{ type={acronym}, sort={inductively coupled plasma mass spectrometry},  name={ICPMS}, short={ICPMS}, long={inductively coupled plasma mass spectrometry}, first={inductively coupled plasma mass spectrometry (ICPMS)}, description={inductively coupled plasma mass spectrometry} }

\begin{document}

    \begin{itemize}
        \item \gls{ICPMS}
        \item \gls{ICPMS}
            %\item \expectedFirst{ICPMS}
    \end{itemize}


\end{document} 

답변1

문서를 좀 더 주의 깊게 조사하고 원래 질문의 의견에서 얻은 영감을 통해 패키지가 및 glossaries유사한 형식의 명령을 사용하여 일부 필드에 액세스할 수 있도록 한다는 사실을 발견했습니다 . 가장 중요한 점은 이러한 명령을 사용해도 적절한 첫 사용 평가를 방해하는 카운터가 인위적으로 트리거되지 않는다는 것입니다.\glsentryshort{}\glsentrylong{}

MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}

\setlength\parindent{0pt}

%=========================================================================================================================================
% PACKAGES REQUIRED FOR GLOSSARIES
%=========================================================================================================================================

% Glossaries must be loaded before amsmath as per details in the following forum answer
% http://tex.stackexchange.com/questions/85696/what-causes-this-strange-interaction-between--and-amsmath
\usepackage[nogroupskip,toc,acronym]{glossaries} % must come after href   
\usepackage{scrwfile}%http://www.dickimaw-books.com/cgi-bin/faq.cgi?action=view&categorylabel=glossaries#glsnewwriteexceeded

\makeglossaries

\newglossaryentry{ICPMS}{ type={acronym}, sort={inductively coupled plasma mass spectrometry},  name={ICPMS}, short={ICPMS}, long={inductively coupled plasma mass spectrometry}, first={inductively coupled plasma mass spectrometry (ICPMS)}, description={inductively coupled plasma mass spectrometry} }

\begin{document}

    \begin{itemize}
        \item \glsentrylong{ICPMS}
        \item \glsentryshort{ICPMS}
        \item \glsentryfull{ICPMS}
        \item \gls{ICPMS}
        \item \gls{ICPMS}
    \end{itemize}


\end{document} 

관련 정보