용어집을 사용하여 처음 사용 플래그를 수동으로 설정

용어집을 사용하여 처음 사용 플래그를 수동으로 설정

나는 glossaries내 약어와 몇 가지 다른 목록을 추적하는 데 사용하고 있습니다. 그러나 \acf전체 약어를 인쇄하는 데 사용하고 싶은 상황에 직면하고 있으며 후속 \ac명령에서 설명을 반복해서는 안 됩니다. 기본적으로 \acf처음 사용하는 경우 첫 번째 발생 시 \acTA(Test Acronym)와 같은 전체 약어가 다시 인쇄됩니다.

특히 몇 가지 용어를 소개하기 위해 목록을 만들고 description있으며 전체 약어가 레이블에 있는지 확인하고 싶습니다.

\documentclass{scrreprt}

\usepackage[xindy, shortcuts]{glossaries}

\newacronym{TA}{TA}{Test Acronym}
    \makeglossaries

\begin{document}

\printglossary[type=\acronymtype]

\begin{description}
    \item[\acf{TA}] This is an explanation of the item…
         The first use flag should be set after this!
         But it does!, and will display Test Acronym (TA) again… Which is not intended!
\end{description}

When using \ac{TA} here like this, it should not reproduce the entire entry again.

\printglossary

\end{document}

따라서,첫 번째 사용 플래그를 수동으로 설정/시행하거나 여기서 이 문제를 피할 수 있는 방법은 무엇입니까?

답변1

패키지 용어집은 모든 항목에 대해 부울 플래그를 정의합니다. 호출하면 \ac부울 플래그가 true로 설정됩니다. 이는 다음 번에 해당 항목이 사용되었음을 알 수 있음을 의미합니다.

이 플래그를 수동으로 설정하기 위해 패키지는 다음 명령을 제공합니다 \glsunset.

설명서에서는 105페이지(glossaries-user.pdf)의 명령에 대해 설명합니다.

및 대문자 변형을 사용하는 경우 \gls, \glspl용어집 항목을 이미 사용한 경우에도 첫 번째 키에 의해 제공된 값을 사용할 수 있습니다. 반대로, 용어집 항목을 사용하지 않았더라도 텍스트 키로 제공된 값을 사용할 수 있습니다. 전자는 다음 명령 중 하나로 달성할 수 있습니다.

...

후자는 다음 명령 중 하나를 사용하여 수행할 수 있습니다.

\glsunset{⟨label⟩}

귀하의 예와 관련하여 다음을 수행하십시오.

\documentclass{scrreprt}

\usepackage[xindy, shortcuts]{glossaries}

\newacronym{TA}{TA}{Test Acronym}
    \makeglossaries

\begin{document}

\printglossary[type=\acronymtype]

\begin{description}
    \item[\acf{TA}\glsunset{TA}] This is an explanation of the item…
         The first use flag should be set after this!
         But it does!, and will display Test Acronym (TA) again… Which is not intended!
\end{description}

When using \ac{TA} here like this, it should not reproduce the entire entry again.

\printglossary

\end{document}

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

관련 정보